HTML to PDF converter for Java and .NET

HOME   FEATURES   PRODUCTS   DOWNLOADS   BUY NOW!   SUPPORT
<< back

PD4ML: Automated PDF printing

For security reasons PDF reader application does not allow silent print in web scenarios.

 

In command line mode that is possible, but you need to specify exact printer driver name.

AcroRd32.exe /t "C:\test.pdf" "AdobePS Tektronix Phaser 840"

The following command line prints test.pdf on a network printer

AcroRd32.exe /t "C:\test.pdf" "\\servername\printername" "AdobePS Tektronix Phaser 840" "123.45.678.910"

The following command line without drivername and portname works, too.

AcroRd32.exe /t "C:\test.pdf" \\servername\printername

So you may build and execute the command line in Java, after pd4ml.render() API call.

PDF file format itself only allows to automatically pop up a print dialog window. PD4ML supports the feature that way:

Map m = new HashMap();
m.put(PD4Constants.PD4ML_PRINT_DIALOG_POPUP, "true");
pd4ml.setDynamicParams(m);
With PD4ML version 3.81+ you could try to define your custom Acrobat JavaScript event handler:
pd4ml.addDocumentActionHandler( "OpenAction", "this.print({bUI: false, bSilent: true});" );
It may, with some luck, implement silent print feature in your environment.
Copyright ©2004-17 zefer|org. All rights reserved. Bookmark and Share