Jump to content

Bug in Nitro PDF driver


Erick Miranda

Recommended Posts

Erick Miranda

When using the Nitro PDF driver,  you have no options when using the autogenerate file name. If the software that is printing to this driver is fast enough, you will lose print outs. In my case, I use software that when it prints a batch, it sends multiple printouts at once to the printer. If I send 5 for example, nitro will usually only create two documents because the first three were all named document.pdf (so the first two get overwritten by the third) and the third one gets saved, and the next two the same thing happens except the document is named Document (1).

Link to comment
Share on other sites

  • Official Nitronaut
Allain Umailin

Hello @Erick Miranda,

Thank you for reaching out to us through our Community Forums.

To further understand your workflow, what software is being used to print to your 'Nitro PDF Creator'?

Thanks in advance!

Link to comment
Share on other sites

Erick Miranda

The software in question is called PM Coordinator (https://www.simsofttech.com/pm-coordinator) The software generates reports and these reports are printed out. The reports that are printed are presented in a grid, and the end user can print one row at a time, or click print all and it prints all of the reports printed. Nitro PDF generated the PDF file name and uses the name sent to the printer. Since PM Coordinator uses the same document name for each print out, Nitro PDF is getting unique file name by adding a counter (i.e., Document (1), Document (2), etc.). The way this name is determined has a race condition which does not give a unique name when many jobs are submitted at once with the same document name. This isn't limited to the software being used but to the timing of the print jobs and the name of the print jobs

So, as an example, say I have 5 reports to print through PM Coordinator. The workflow is as follows:

  • The grid presents 5 reports to print
  • End user clicks "Print All"
  • Software prints all 5 reports individually to the printer
  • Nitro PDF print driver receives these 5 jobs
  • I get anywhere between 1 and 5 PDF files. The dialog presented shows that multiple files get the same file name i.e. 2 files get the filename Document (2), so one clobbers the other one and I lose at least one document. I theorize that this is due to your printing processes not having any concurrency checking and you are using the Windows API / .Net classes to get the file name which is fine one process is in control of naming the file, but in your case you have multiple processes naming the file and not talking to each other. On a physical printer I get all 5 documents as well as other PDF print drivers like Cute PDF Writer
  • If instead the end user prints one document at a time, it prints all 5 documents with the names Document.PDF, Document (1).PDF, Document (2).PDF, Document (3).PDF, and Document (4).PDF

This problem could be fixed that instead of using your current method of naming the PDF file, use the document name and append a time stamp with milliseconds (i.e. YYYYMMDDHHMMSS.SSS) to the end of the file as it would be highly improbably that you would every have two print jobs be created on the same millisecond, or append a GUID to the end of the document name.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.