You can also try the _javascript_ in the pdf (you can add this to the pdf created with itext, writer.addJavaScript(..)). That way you can 'force' the way it should be printed without hassling the user.

Look at the flag values at page 577 (bottom). You can set this how you want this to be printed at each printjob without overwriting the (last) options that were set during printing.

Options, none, fit and schrink

var pp = this.getPrintParams();

pp.pageHandling = pp.constants.fit;

Note, this only works for Acrobat 7 and up.

Ps, the reference can be dl at;

http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf

Peter

You wrote;

I have seen that the printer dialog box parameters can be changed using setViewerPreferences() and that's fine !
 
Now the question : Is there a way to get the viewer preferences ?  I'd like to capture the page scaling (none / fit to printer margins / reduce to printer margins). 
The idea is to send a _javascript_ message when the first page is opened to request the user to change the scaling if is accidently set to "none" (my generated doc does not give optimal results when printed with "none").
 
Thanks for your feedback,
 
André.


Live Search, for accurate results! Click here
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to