Author Topic: Manipulating AdobeReader using Visual LISP Possible?  (Read 11699 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Manipulating AdobeReader using Visual LISP Possible?
« on: August 18, 2010, 02:38:33 PM »
I found this:

http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true

which has a reference for using OLE Automation, but I'm not sure if its possible through VL?

Any advice is appreciated.

Lee

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9268
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #1 on: August 18, 2010, 03:06:35 PM »
I not sure i understand the question.

> ... I'm not sure if its possible through VL?
i doubt it. What would you want to?

http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/Overview_GettingStarted.3.10.html
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9268
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #2 on: August 18, 2010, 03:07:39 PM »
ah, just noticed the title said: "Adobe reader". ...my answer "doubt it" changes to "nope".
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #3 on: August 18, 2010, 03:17:06 PM »
Print PDF's mostly... but I don't really know where to start  :|

LE3

  • Guest
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #4 on: August 18, 2010, 04:20:13 PM »
wild guess, sir:
... get the interface (vla-getinterface ...)
... get the property documents
... open the doc required for print
... invoke the print method
... close the doc

... in between that there must be a way/method to set the printer, etc.

... to see all the methods and properties exported - maybe a import the table library via vlisp too, add your prefixes and then in the apropos search for those prefixes...

very mickey mouse help, but better than nothing. :)

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #5 on: August 18, 2010, 04:49:37 PM »
Thanks Luis, that's the way I was visualising it, but I can't seem validate any of the objects listed in the SDK reference - so perhaps it can't be done...

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9268
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #6 on: August 18, 2010, 04:53:52 PM »
Quote
<snip>
Adobe Reader does not support OLE.

Same link as what i posted before.
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/Overview_GettingStarted.3.10.html
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #7 on: August 18, 2010, 06:01:07 PM »
Quote
<snip>
Adobe Reader does not support OLE.

Same link as what i posted before.
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/Overview_GettingStarted.3.10.html


Ok - so next logical question: Can you print PDF's without using AdobeReader?

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9268
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #8 on: August 18, 2010, 06:48:24 PM »
That is a very vague question (how long is a string) but Im gonna say: sure. However, you should know that you're traveling down a rabbit hole because printing isnt a simple or consistent task.

Methods:
1. Ghostscript
2. Windows (binary copy to port or network)
3. redmon
4. ...

Now whichever method you choose will give you X results and if you choose another method you can get Y results (and that is with one TYPE of PDF file). -i.e. if you use Windows port: "xcopy /B mypdf.pdf //lpt1" may work with this (let's say an HP Laser jet) printer and give you X results because the PDF driver (version 1.?) on the printer uses HPGL only and not PS. OR if you use Ghostscript to send a PDF to a windows printer it will only send Postscript PDFs this way with these results.

So my question is: can you print a PDF without Adobe Reader (And BTW, Adobe reader--if you were to open the file and hit the print button--will print a file differently too.)?

What kind of PDF are you printing (PS--binary or text--or HPGL)?


EDIT: Fixed wording error.
« Last Edit: August 18, 2010, 11:13:05 PM by Se7en »
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

cmwade77

  • Swamp Rat
  • Posts: 1206
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #9 on: August 18, 2010, 07:54:15 PM »
One way that I can think of is use lisp to attach the PDF to a CAD File, then plot the cad file. I know it's a round about way to get there, but it should work.

Patrick_35

  • Bull Frog
  • Posts: 276
  • Rennes, France
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #10 on: August 19, 2010, 05:36:03 AM »
Hi

With PdfCreator ?

Code: [Select]
(setq pdf (vlax-create-object "PDFCreator.clsPDFCreator"))
I never work with him

@+
The shape even of the pyramids of Egypt shows that already the workmen tended to make some less and less.
Will Cuppy, 1884-1949.

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #11 on: August 19, 2010, 02:58:10 PM »
That is a very vague question (how long is a string) but Im gonna say: sure. However, you should know that you're traveling down a rabbit hole because printing isnt a simple or consistent task.

Methods:
1. Ghostscript
2. Windows (binary copy to port or network)
3. redmon
4. ...

Now whichever method you choose will give you X results and if you choose another method you can get Y results (and that is with one TYPE of PDF file). -i.e. if you use Windows port: "xcopy /B mypdf.pdf //lpt1" may work with this (let's say an HP Laser jet) printer and give you X results because the PDF driver (version 1.?) on the printer uses HPGL only and not PS. OR if you use Ghostscript to send a PDF to a windows printer it will only send Postscript PDFs this way with these results.

So my question is: can you print a PDF without Adobe Reader (And BTW, Adobe reader--if you were to open the file and hit the print button--will print a file differently too.)?

I take your point about using different programs to print the PDF, I just wondered if there was another way to bypass the reader and just print the file (programmatically of course) - but I haven't spent too much time outside of the comforts of AdobeReader and so would be stabbing in the dark using the other programs/methods that you recommend.

What kind of PDF are you printing (PS--binary or text--or HPGL)?

I've never heard of HPGL and will google it momentarily, but I believe I am printing PS (PostScript?)

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #12 on: August 19, 2010, 02:59:19 PM »
One way that I can think of is use lisp to attach the PDF to a CAD File, then plot the cad file. I know it's a round about way to get there, but it should work.

Hmmm... I'd rather not go this route - I don't particularly want to mess around with the PDF file too much  :|

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #13 on: August 19, 2010, 02:59:41 PM »
Hi

With PdfCreator ?

Code: [Select]
(setq pdf (vlax-create-object "PDFCreator.clsPDFCreator"))
I never work with him

@+

Thanks Patrick, I'll be sure to look into that.  :-)

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9268
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #14 on: August 19, 2010, 03:39:23 PM »
Wait a minute. What do you mean by "print"? Do you mean: "Create"?

I'm talking about an actual physical piece of paper. The PDF file nor the printing of it has anything to do with Adobe Reader. Adobe Reader only displays the PDF on your screen.
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--