These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

JavaScript printing problem

bfalor
Registered: Aug 30 2007
Posts: 12

The JavaScript related to printing as shown on page 640 of the Adobe XML Form Object Model Reference does not work in Reader 8.0. I think the problem is that in Reader 8 there is a different page range in the Print Dialog Box. The previous version had 2 page range entry boxes - from and to. The new version has only one entry box in which you enter "from - to". Therefore the print JS using script xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0); does not work. I have not been able to locate anything else that will work. Any ideas? Thank you.

E-Forms Developer

My Product Information:
LiveCycle Designer, Windows
JoelGeraci
ExpertTeam
Registered: Aug 17 2006
Posts: 80
The second and third parameters, the "from" and the "to", are each a 0 based index. They need to be numbers, not strings.

The script...
xfa.host.print(1, 0, 0, 0, 1, 0, 0, 0);

should work just fine.
JoelGeraci
ExpertTeam
Registered: Aug 17 2006
Posts: 80
BTW - Any time you use xfa.host.anything, you should refer to the "JavaScript™ for Acrobat® API Reference"

[url=http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf]http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf[/url]

for more detailed information on what works and what doesn't. The "host" is Acrobat or Reader and it is that JavaScript engine that interprets the call.

J-