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

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #30 on: August 22, 2010, 07:38:09 AM »
Luis, what are the '/t' and '/h', and how do these control the Adobe Reader? i.e. how did you know to use them?

hmspe

  • Bull Frog
  • Posts: 362
"Science is the belief in the ignorance of experts." - Richard Feynman

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #32 on: August 22, 2010, 09:44:05 AM »
Many thanks!  8-)

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org


Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #35 on: August 22, 2010, 10:15:04 AM »
Lee,

To bad my printer is not working, so can't really test it... but just tried and appears to (work?):

(startapp "C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe /t /h C:\\Test.pdf")

Do not know if you have something like the above line...

Upon first testing, this appears to work!  :-)  Many thanks Luis  :wink:


And a big thank you to everyone else who has contributed to this thread, much appreciated indeed - I have learnt a lot.

LE3

  • Guest
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #36 on: August 22, 2010, 10:21:11 AM »
Luis, what are the '/t' and '/h', and how do these control the Adobe Reader? i.e. how did you know to use them?

By implementing the T&E technology on a 80% - other 18% some reading about line parameters - and the last 2% tried two combinations in lisp with the startapp.

Now seriously, did a search on the net, with [AcroRd32.exe command line parameters] and noticed the parameters others have used, and started from there.

Now, does it work? :)

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #37 on: August 22, 2010, 10:26:30 AM »
Now, does it work? :)[/size]

Indeed it does  :-)

LE3

  • Guest
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #38 on: August 22, 2010, 10:30:09 AM »
Now, does it work? :)[/size]

Indeed it does  :-)
Good :)

added:
The /t switch-option is an undocumented feature that causes the document to be printed with no prompting dialogs or user input required.
The /h = hide

AFAIK...
« Last Edit: August 22, 2010, 11:10:03 AM by LE »

Crank

  • Water Moccasin
  • Posts: 1503
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #39 on: August 22, 2010, 12:58:10 PM »
Vault Professional 2023     +     AEC Collection

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #40 on: August 22, 2010, 01:10:23 PM »
Thanks again guys  :-)

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #41 on: August 23, 2010, 08:53:31 AM »
Some good news, some bad.

Just tried this at work and got mixed results -

The reader window is opened for each document printed and each document is added to the print queue - then the reader window is closed (all except one window).

However, only the first document is actually printed - I get a timeout error for the rest:

Quote
ERROR: timeout
OFFENDING COMMAND: timeout

STACK:

0
-mark-
-mark-
-mark-
/DecodeABC
-dictionary-
-dictionary-
/CIEBasedABC
-mark-
/N10
-savelevel-

The printer is a HP Color LaserJet 5550 PS on a network.

I have also used a delay in the code of around 1.5 secs (using delay command) - but whatever delay is used, it seems to have no effect on the outcome.

We are using Adobe Acrobat 7.0 (but the reader file is still the same: AcroRd32.exe).

Any help is immensely appreciated, if you need more info, just ask.

Lee
« Last Edit: August 23, 2010, 01:31:24 PM by Lee Mac »

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #42 on: August 23, 2010, 02:09:20 PM »
I recommend *not* using Acrobat.
I recommend using either Ghostscript, Redmon, or Windows copy function (i recommended only these tools for a reason). Choose a method and find the syntax you need to use. Make sure the tool you decide is in the Windows PATH environment variable. Use the STARTAPP function in Auto Lisp.

I recommend that you open a command prompt in windows and start typing in things like:
path              ;; <-- will list the windows path env var
copy /?          ;; <-- help for the COPY command
net help use   ;; <-- help for the NET USE command

Use google to find out what LPT1 is and use NET HELP USE to find out how to set LPT1 or just deal with the UNC path.

Good luck.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #43 on: August 23, 2010, 02:28:48 PM »
Many many thanks Se7en for your direction  :-) I read up on copy and net help use and also found this which was quite helpful:

http://support.microsoft.com/kb/314499

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: Manipulating AdobeReader using Visual LISP Possible?
« Reply #44 on: August 23, 2010, 03:11:54 PM »
Good, now you know how to set one of the LPT ports... what's next (what method are you going to use)?

Did you look up Ghostscript, Redmon, or Windows Copy? What is the difference (what way will using Ghostscript to send a file vs using windows Copy differ)?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org