Optimizing performance
Publi PDF queues are basically hot-folder queues that monitor when a print queue has finished writing spool files. When a Publi PDF queue receive a notification from the Windows Print Spooler Subsystem that a print job has finished (and is therefore fully written to the queue), Publi PDF does the following:
- Collects all information about the job, including the login name of the
user who printed the job. This user name is transferred into the
%UserName%
variable that can be used in some of the various paths the Publi PDF
settings
file format supports.
- From the jobs JobId it determines the name of the physical spool file.
Typically, this name is a numeric name formatted as »000XX.spl« or
»FP000XX.spl«, where XX represent the JobId. Such spool files are normally
stored by Windows in the folder specified in Printers Folder -> File -> Server
Properties -> Advanced (found in the registry as »DefaultSpoolDirectory« –
see MSDN articles
137503 and 123747).
- If the spool file can be looked up successfully by Publi PDF, the
spool file is:
- if possible, moved from the DefaultSpoolDirectory folder to the output folder defined by the queue's JobFolder parameter, and then deleted from the print queue. A file move, which is an extremely fast operation, can only happen if the spool file it's placed on physically the same partition as the output folder defined by the queue's JobFolder parameter)
- if possible, copied from the DefaultSpoolDirectory folder to the output folder defined by the queue's JobFolder parameter, and then deleted from the print queue. A file copy is usually happening when the Windows DefaultSpoolDirectory is not the same partition as the output folder defined by the queue's JobFolder parameter.
- if either (1) or (2) fail, the spooled data stream is read out of the
print queue via standard I/O commands to the print spooler, and is then
written to the output folder defined by the queue's
JobFolder parameter. This is
a quite slow process that also introduce a 2 gigabyte limitation on the
spool file size.
- If the spool file can not be looked up successfully by Publi PDF,
the spool file is treated as under (3) above. This should never happen unless
your Windows has a very unusual configuration.
- Conversion starts when the spool file is fully written to the output folder defined by the queue's JobFolder parameter.
As you can see, it's absolutely most interesting to have Publi PDF move the spool file to the destination folder, in which case conversion to the output format specified by the queue's JobOutputFormat parameter will start immediately after the spooled data has arrived into the print queue.
Actually, any other setup in corporate environments will involve an extreme and completely unnecessary traffic on the network, and at the same time hugely degrade the performance experienced by the users.
Hence, do NOT install Publi PDF on a printer server. Install it on a workstation or a file server even though your users connect to the Publi PDF queues as if they are printers.
Following this advice will, in most cases, also eliminate the need for having the Publi PDF NT Service component run under a special account as mentioned in the Important security considerations section.
Last revised: 16-01-2009.