TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Coder on November 06, 2019, 05:40:48 AM

Title: Get Methods and Properties of PDF file
Post by: Coder on November 06, 2019, 05:40:48 AM
Hello everyone.

How can I dump a PDF file to know the available methods and properties with getfiled function?

Code: [Select]
(setq pdf (getfiled "" "" "pdf" 16))

I have seen the below function to create a PDF object but it returns nil for me.

Code: [Select]
(setq obj (vlax-get-or-create-object "AcroExch.PDDoc"))

Thank you in advance.
Title: Re: Get Methods and Properties of PDF file
Post by: Coder on November 06, 2019, 01:24:08 PM
I need to get the number of pages / sheets of the selected PDF file.

Is this possible?
Title: Re: Get Methods and Properties of PDF file
Post by: Lee Mac on November 06, 2019, 01:25:30 PM
I need to get the number of pages / sheets of the selected PDF file.

Is this possible?

This (https://www.theswamp.org/index.php?topic=39001.msg441632#msg441632) is pretty old now, but may still work.
Title: Re: Get Methods and Properties of PDF file
Post by: Coder on November 06, 2019, 01:47:50 PM
This (https://www.theswamp.org/index.php?topic=39001.msg441632#msg441632) is pretty old now, but may still work.

Beautiful.
Thank you Lee so much.
Title: Re: Get Methods and Properties of PDF file
Post by: Marc'Antonio Alessi on November 07, 2019, 03:50:53 AM
This (https://www.theswamp.org/index.php?topic=39001.msg441632#msg441632) is pretty old now, but may still work.
Grazie Lee.  :)
Title: Re: Get Methods and Properties of PDF file
Post by: kozmos on November 25, 2019, 03:58:46 AM
You need to install Adobe Acrobat Reader or Pro/DC to have access to "AcroExch.PDDoc"
Title: Re: Get Methods and Properties of PDF file
Post by: Coder on November 25, 2019, 07:12:34 AM
You need to install Adobe Acrobat Reader or Pro/DC to have access to "AcroExch.PDDoc"

I already have it installed although it returns nil !  :-(
Title: Re: Get Methods and Properties of PDF file
Post by: kozmos on November 25, 2019, 07:45:47 PM
try to run  (vlax-get-or-create-object "AcroExch.App") first before run (vlax-get-or-create-object "AcroExch.PDDoc").
Title: Re: Get Methods and Properties of PDF file
Post by: Coder on November 26, 2019, 12:40:31 AM
try to run  (vlax-get-or-create-object "AcroExch.App") first before run (vlax-get-or-create-object "AcroExch.PDDoc").
It returns nil.
Quote
$ (vlax-get-or-create-object "AcroExch.App")
nil
_$