Source language: Translate to:

PDFprint issue

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

PDFprint issue

Postby dpayer » Mon Oct 24, 2011 2:49 pm

I am trying to automate printing of PDFs using the Neosoftware Plugin.

when I load and then try to print the file:
Code: Select all
pdfOpen "[selectedfromqueue]" "Rectangle1"
pdfPrint "[selectedfromqueue]" "False"
Delay "3000"
SendKeys "[acrobatlocation]" "{AltDn}n{AltUp}{Enter}"


I use the SendKeys because even though I don't ask for the menu, I get a prompt from the Adobe reader asking me if I want to print because it will print all pages. If I manually press [Enter] it will print.

I find the location of AcroRd32.exe using:
Code: Select all
RegistryRead "HKEY_CLASSES_ROOT" "\SOFTWARE\Adobe\Acrobat\Exe\" "[acrobatlocation]"


Instead of applying the sendkeys to the already running AcroRd32.exe, it launches the reader again.

Essentially, I just need to send a [Enter] keystroke. (I do the Alt-N to remove the prompt in the future)

How can I send this keystroke to the prompt I am getting from the Adobe Acrobat Reader? I can remove the reference to the Acrord32.exe program and it will send the [enter] keystroke to work but I am concerned that if this is used on a system used actively by a user, they may click or type something and then the focus will be wrong.

David P
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby dec » Mon Oct 24, 2011 3:01 pm

Hi,

Take a look at this article. Talking about how to use Acrobat commands to print a document without displaying the "print" dialog. I think you can found this way interesting: even if the article not explain the appropiate commands for you, is possible that this commands (for you) are available on Acrobat. Try searching for "command" on this PDF document.

Hope you got success! ;)
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Postby Neosoft Support » Tue Oct 25, 2011 10:54 am

The prompt that Acrobat displays is not the normal print dialog, but a message box that says:

"WARNING! A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?

[X] Do not show this message again

I don't think using SendKeys is reliable way to get rid of this message box since you can't know whether it will appear or not. Most likely there is a registry setting that controls the appearance of this message that you could set to insure that it doesn't get displayed at all.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby dpayer » Tue Oct 25, 2011 7:10 pm

Neosoft Support wrote:
I don't think using SendKeys is reliable way to get rid of this message box since you can't know whether it will appear or not. Most likely there is a registry setting that controls the appearance of this message that you could set to insure that it doesn't get displayed at all.


Thanks for the tip. I found this link:

http://blog.jtbworld.com/2006/04/acropd ... r-707.html

that points to the location. But, now it appears I need to discover the version of Acrobat in order to address the issue.

BTW, I was able to disable the keyboard / mouse with RAC's AutoIt plugin. But I agree it is not a reliable method.

David P.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 4 guests