如果你安装了了adobe acrobat的话,可以这样获取总页数:
- (defun K:TotalNum4PDFPages (FileName / PDFDoc TotalNum)
- (vl-load-com)
- (setq PDFDoc (vlax-get-or-create-object "AcroExch.PDDoc"))
- (vlax-invoke-method PDFDoc 'Open FileName)
- (setq TotalNum (vlax-invoke-method PDFDoc 'GetNumPages))
- (vlax-invoke-method PDFDoc 'Close)
- TotalNum
- )
|