Dear iText Users,
This is my Java snippet:
//Make pdf file (for later printing)
IText.main();
//Make CSV file
Send2File.main();
//Now call a PDF reader to view/print cheque...
Runtime.getRuntime().exec("acroread " + home + "cheque.pdf");
//Direct printing. Knowing I can control Page Size & Region
String lpr_cmd = "lpr -P Officejet_Pro_8600";
lpr_cmd = lpr_cmd + " -o PageSize=Cheque165x89mm";
lpr_cmd = lpr_cmd + " -o PageRegion=Cheque165x89mm";
lpr_cmd = lpr_cmd + " -o InputSlot=Tray1";
lpr_cmd = lpr_cmd + " -o Duplex=None";
lpr_cmd = lpr_cmd + " -o MediaType=Plain";
lpr_cmd = lpr_cmd + " -o OutputMode=Normal";
lpr_cmd = lpr_cmd + " " + home +"cheque.pdf";
Runtime.getRuntime().exec(lpr_cmd);
I would like to avoid the "straight-jacket" if using the lpr command.
However, I have failed to find a way to pass the required print
parameters. either into the PDF file or when calling the Acrobat Reader.
The particularly troublesome printer parameters are *PageRegion* and
*InputSlot*.
Yes, I can manually enter them in the Acrobat Reader GUI, but I would
like to avoid that and have all the required settings pre-populated if
possible, so that the reader is only needed as a previewer.
Alternatively, can anyone suggest a simple java open source pdf viewer?
Best regards, Martin
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php