;| Examples:
(MergePDFs
(strcat (getenv "userprofile") "\\Desktop\\Hale 515\\PDFs") ; in
(strcat (getenv "userprofile") "\\Desktop\\" "MergedPDFS.pdf") ; out
)
(MergePDFs
(list ; in
(getfiled "Specify PDF file" (strcat (getenv "userprofile") "\\Desktop\\") "pdf" 16)
(strcat (getenv "userprofile") "\\Desktop\\I_Dont_Exist.pdf")
(getfiled "Specify PDF file" (strcat (getenv "userprofile") "\\Desktop\\") "pdf" 16)
(getfiled "Specify PDF file" (strcat (getenv "userprofile") "\\Desktop\\") "pdf" 16) ; You can cancel and provide nil if you want to
); list
(strcat (getenv "userprofile") "\\Desktop\\" "MergedPDFS.pdf") ; out
)
|;
; in - folder that contains .pdf files, or a list of ("<dir1>\\<filename1>.pdf" "<dir2>\\<filename2>.pdf" ..)
; out - path\\filename.pdf - Overwrites the existing (if theres one)
; If successful, Returns assoc list of '((<FilePath\\Filename.pdf> PageCount) ..)
(defun MergePDFs
( in out
/ *error* AcroApp L PD r
) ; http://www.theswamp.org/index.php?topic=53974.msg586248#msg586248
); and
); defun *error*
( (eq 'STR
(type in
)) ; folder provided )
( (vl-consp in
) ; list of .pdf filepaths'n'names provided )
); cond
(foreach x
(cdr L
) ; L - assoc list of (#<VLA-OBJECT> <FilePath> <PagesCount>) )
)
(prompt "\nCannot save the modified document") ); or
); progn
); and
(*error* nil) r
); defun MergePDFs