(defun c:DF () Multipage PDF Insert
(setq fname (getfiled "Select PDF to Insert" (getvar 'dwgprefix) "pdf" 0))
(setq ipoint (getpoint "select insertion point"))
(setq pagenum 1)
(setq pagetotal (getreal "\nType Total Number of Pages you want to Insert: "))
(while (<= pagenum pagetotal)
(setq catchit (vl-catch-all-apply '(lambda () (command "-pdfattach" fname pagenum ipoint 1 0 ))))
(if (vl-catch-all-error-p catchit) (setq pagenum pagetotal) (setq pagenum (+ pagenum 1))) ; apparently no more pages is not an error
(setq ipoint (list (car ipoint) (- (cadr ipoint) 8.5)))
) ;while
) ;PDF