Jump to content

lisp to plot mass drawing layouts to single pdf


amb2301

Recommended Posts

Hi Friends, 

                 I am having a task to open all drawings(nearly 50 drawings) from a single folder path & plot the layouts to pdf (monochrome),

Note: All the plotted pdf to be in a single pdf file.

some one help & please provide me the lisp to do this task.

 

Thanks in Advance.

Link to comment
Share on other sites

Yes, if you open these 50 dwg's in 1 Autocad window, then Publish can make 1 pdf of these open dwg's.

 

Is that acceptable?

Edited by Emmanuel Delay
Link to comment
Share on other sites

You can generate a multi-page DWF file with publish, then you can open it in design review and plot to PDF with a installed PDF printer.

Link to comment
Share on other sites

You can open 50 dwgs plot a pdf then use Ghostscript to join them all back into 1 pdf. You will need to download Ghostscript its free software.

 


;MergePdfs
;Merges multiple pdf (or eps) files into one
;Requires the installation of Ghostscript 

; make a batch file ?
;gs -sDEVICE=pdfwrite \
;    -dNOPAUSE -dBATCH -dSAFER \
;    -sOutputFile=combined.pdf \
;    first.pdf \
;    second.pdf \
;    third.pdf [...]

;Ghostscript (http://www.ghostscript.com/) can be used to combine PDFs.

; Something like this should work: by Roy_043

(defun KGA_String_Join (strLst delim)
(if strLst
(apply
'strcat
(cons
(car strLst)
(mapcar '(lambda (a) (strcat delim a)) (cdr strLst))
)
)
""
)
)

; (CombinePdf 
;  (setq gsexe "C:\\Program Files\\gs\\gs9.19\\bin\\gswin64c.exe")
(setq gsexe "P:\\gs\\gs9.19\\bin\\gswin64c.exe")
; (setq srcFilelst  '("D:\\Tmp\\A.pdf" "D:\\Tmp\\B.pdf"))
; (setq trgfile "C:\\Acadtemp\\Total.pdf")
; )
; Note: Existing trgFile will be overwritten.
(defun CombinePdf (gsExe srcFileLst trgFile)
(startapp 
(strcat
gsExe " "
"-sDEVICE=pdfwrite -dBATCH -dNOPAUSE -dQUIET  "
"-sOutputFile=\"" trgFile "\" "
"\"" (KGA_String_Join srcFileLst "\" \"") "\""
)
)
)


 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...