I agree with Cathy, try with PUBLISH.
The only question is can it be automated with lisp? I don't know anyone ever tried that.
EDIT: I did my research and found BlackBox's publish reactor (I added some stuff and info to it):
;Reactor for PUBLISHING (author: BlackBox)
;Reactor starts upon "AUTOMATICPUB" variable is set to 1, and Ctrl+S (quicksave) the drawing
;NOTE: to PUBLISH IN .PDF format go to "Options" -> "Plot and Publish" -> "Automatic Publish Settings", in General DWF/PDF options change "File format" to PDF
(setq PBCOLLATE (getvar 'PUBLISHCOLLATE))
(setvar "PUBLISHCOLLATE" 1)
(setq PBHATCH (getvar 'PUBLISHHATCH))
(setvar "PUBLISHHATCH" 1)
(setq PBALLSHEETS (getvar 'PUBLISHALLSHEETS))
(setvar "PUBLISHALLSHEETS" 1)
(setq FIELD-EVAL (getvar 'FIELDEVAL))
(setvar "FIELDEVAL" 4)
(setq AUTOPUB (getvar 'AUTOMATICPUB))
(setvar "AUTOMATICPUB" 1)
(setq AUTODWFPUB (getvar 'AUTODWFPUBLISH))
(setvar "AUTODWFPUBLISH" 0)
;AUTOMATICPUB 0 and ctrl+s
;AUTOMATICPUB 1 and ctrl+s to start the reactor
(vl-load-com)
(defun Autopublish:StartReactor ()
(or *AutopublishReactor*
(setq preferences (vla-get-Preferences (vlax-get-acad-object)))
(setq *AutopublishReactor*
(vlr-docmanager-reactor
nil
'(
(:vlr-documentbecamecurrent . Autopublish:DocumentBecameCurrent)
)
)
)
)
(princ)
)
(defun Autopublish:DocumentBecameCurrent (rea doc)
(if (and *AutopublishReactor* (= 1 (getvar 'automaticpub)))
(prompt (strcat "\n[BlackBox] : AUTOMATICPUB = "
(itoa (setvar 'automaticpub 0))
)
)
)
(princ)
)
(Autopublish:StartReactor)
And maybe this would be handy addition:
;Toggle the AUTOMATICPUB variable:
(defun c:tgAutoPub (/)
(if (= (getvar "AUTOMATICPUB") 1)
(setvar "AUTOMATICPUB" 0)
(setvar "AUTOMATICPUB" 1)
)
(princ (strcat "\nAUTOMATICPUB variable is set to \"" (rtos(getvar "AUTOMATICPUB")) "\" " ))
(princ)
)