PDF.OCX

ARW
ARW used Ask the Experts™
on
Using a type library in Delphi 5 generated from Adobe Reader 5.o, I have been able to accomplish much of what I needed to to as far as embedding viewing and printing of PDFS within my application.  During testing I came across a snag in Windows XP.  The PrintAll method no longer works.  Actually what happens is a dialog comes up in a fresh adobe installation when the print all method is called and it asks if it is OK for a script to print all the pages of the PDF.  The user has to click yes or no and there is also a check box about whether to ask this in the future. If the user selects to not be prompted in the future printall method becomes disabled.  If the user never says do not warn me then the dialog-less implimentation of printing I have with PF>OCX on other platfors is gone in Windows XP.

My question is there a way to get around this shortcoming of the pDF.ocx in XP?  The solution must work with Adobe 5 and 6. readers?



Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Engineer, Advisory
Top Expert 2005
Commented:

The problem really isn't so much with the ActiveX control (or with XP) as it is with the version of Adobe that is currently registered. Here is the problem:

Version 6 of Adobe "enhanced" ;-) their EWH32.api plugin (its just a dll) to generate that stupid warning dialog. They also messed up because if the checkbox is checked, then the registry key at:

HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\6.0\AVAlert\cCheckbox\cEWH

iWarnScriptPrintAll=1

gets updated. Once the value is set, then the dialog does not show, but the PrintAll does not print either. I did check to see if the EWH32.API from ver 5 could be used as a 6.0 plugin, but this caused GPF's in ver 6, so I am guessing they might have changed entry points, parameter count/type, or something else that makes them incompatible.

So, this leaves you with very few options:

1.) Make sure that version 5 is installed on the system, and register the pdf.ocx that exists in the version 5 directory (C:\Program Files\Adobe\Acrobat 5.0\Reader\ActiveX).

or

2.) You could manually delete the registry key listed above. The user will still get the dialog, but at least they can print. One note to this is that if Adobe is running, the information is cached, and registry changes are ignored while acrobat is running.

Hope this helps some,
Russell
 



ARW

Author

Commented:
OK, I looked over the registry and you are correct.  If I delete the key, the Adobe Reader is too stupid to rewrite the key, so the dialog always comes up unless they cleick the checkbox. Then printing stops working until the Reader is restarted because the answer gets cached.  I tried fat-fingering in 2,3,4,99 trying to get one that would allow silent printing.  Surely Adobe must be able to do silent printing whent hey want to allow it.  It is just a matter of hacking outthe value or finding some otherregistry key that makes it work.  Maybe some social engineering is the next step...

AW
ARW

Author

Commented:
Not the solution I had hoped for, but a knowledge exchange nonetheless...thank you


~aw
odd lieSenior Quality Assurance Engineer

Commented:
The Adobe version 6 has a OCX that they now says they will support to developers so we can hope for a update

Look at this forum there are som explaning what is changed on version 6
http://www.sedtech.com/isedquickpdf/?page=forum

Forum
pdf.ocx

Poster: chicks
Date: 2004-07-13 18:40:25      
Adobe is asking for feedback from anyone using the (currently unsupported) pdf.ocx control. They are actually thinking about providing developer support for the control!

http://forum.planetpdf.com/webboard/wbpx.dll/read?115318,3 
      

Poster: chicks
Date: 2004-07-13 19:17:04      
Try this URL if the other requires a login:

http://forum.planetpdf.com/wb/default.asp?action=9&read=42813&fid=3

Good information in the answers
I hope this can help you to adress the problem to the right gays

oldelphi

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial