How to backup and restore tray option with PDFPrint Command Line software?

Hello VeryPDF Support Team,

We are currently testing the Evaluation Version of your PDFPrint as a significant part of an complex printing process. In this scenario I recognized a behavior in your software that can cause some unwanted effects in a printing process. As I read in the debug log (with parameter -debug) when printing on a defined printer (with parameter -printer "xxx") the software changes the default printer of the user, who runs the pdfprint.exe, to this defined printer and restores this option after the printing completes. This means, if a second application of the pdfprint.exe is spawned by the same user, right after the first one sets the default printer but before the printing is started, the second application overrides the default printer which was set by the first application and so the first application prints on the wrong printer. I was able to readjust this scenario by spawning two pdfprint.exe processes with different defined printers in exact the same moment. The result was that both PDF Files were printed on the printer defined in the second application. This may happen very rarely, but with an increased amount of parallel calls of the pdfprint.exe this behavior can cause huge problems in my whole printing process.

I read in your documentation, that there is a parameter called -nochgprinter (which doesn’t change the default printer) but I don’t understand why you don’t generally use this option and I’m forced to always set it.

Is there some behavior that force you to generally change the default printer of the executing user? (It’s also very strange that, with the parameter -nochgprinter, I don’t see any entry in the debug log (parameter -debug) where the defined printer for the job is shown.)

That was my minor "problem" because I can solve it by using the "nochgprinter" parameter. The bigger thing is, that the same behavior happens when changing the paper bin (parameter -chgbin) of a printing process. In this case a second application of the pdfprint.exe can override the paper bin setting of a first one when started in the "right" moment by the same user on the same printer. This is crucial for my printing process because we use a wide variety of paper bins with different papers inside. Is there a solution for this problem available or do you have a tip for me how the solve this?


You can use "-restoreprinter" option to backup and restore tray option for the target printer,

-restoreprinter : restore original settings to printer after printing


pdfprint.exe -restoreprinter -chgbin 15 -printer "docPrint" D:\test.pdf


See Also:

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!