Understanding the Publi PDF Viewer
Publi PDF Viewer is a very simple, but extremely fast PDF Viewer component based on the XPDF technology that can open, display and print PDF documents. A simple text search can also be performed.
Besides a GUI the Publi PDF Viewer offers a simple command line interface that lets you control Publi PDF Viewer via scripts, batch files or the JobExternalCommandApp parameter for a Publi PDF queue.
Using the JobExternalCommandApp parameter is in particular useful when you wish to automate printing to specific printers of PDF documents output by a Publi PDF queue with the Stamper Plug-in enabled, i.e. queues set-up to apply letterheads and/or watermarks during conversion.
Command line interface
The executable file name for Publi PDF Viewer is PDFViewer.exe.
General syntax
The following general rules apply to the command line interface:
- All parameters are pre-fixed with the »/« character.
- Paths may not use the »/« character as separator between folder and file names.
- Paths and file names may not be encapsulated by quotation marks even though such names include space characters.
- All parameters use the »=« character as separator between the parameter (the key) and its corresponding function, action or file name (the value), e.g. /HFC=On.
- Commands may not include break or tab characters.
- Commands can be written in any order unless otherwise noted.
The syntax can therefore be stated as:
<program>.exe /<Key1>=<Value1> /<Key2>=<Value2> ... /<KeyN>=<ValueN>
Hence, an example of a valid command could be:
PDFViewer.exe /JN=C:\PDF Outbox\Testpage.pdf /PS=On /PN=HP Color LaserJet 5500 PS
The above shown command line instructs Publi PDF Viewer to print the document C:\PDF Outbox\Testpage.pdf to the HP Color LaserJet 5500 PS printer without displaying the document.
| Key | Value | Meaning |
|---|---|---|
| ForceQuit or FQ |
On | Specify that the session defined via the /SessionName key should be closed immediately. If such a session couldn't be found nothing will happen (i.e. Publi PDF Viewer will not start). |
| Off (default) | The Publi PDF Viewer is started normally or according to other command parameters. |
The /ForceQuit parameter should not be used along with other parameters than /SessionName.
| Key | Value | Meaning |
|---|---|---|
| JobName or JN |
String | Specifies the file name for the PDF document to open in Publi PDF
Viewer. No error message is displayed if the specified file couldn't be found or accessed. |
The /JobName parameter must specify a valid file name when /OpenPrintDialog or /PrintSilently is also specified. Otherwise neither command will have any effect.
| Key | Value | Meaning |
|---|---|---|
| HideFileClose or HFC |
On | Specify that the menu item File -> Close is disabled. |
| Off (default) | Specify that the menu item File -> Close is enabled. |
| Key | Value | Meaning |
|---|---|---|
| HideFileOpen or HFO |
On | Specify that the menu item File -> Open is disabled. |
| Off (default) | Specify that the menu item File -> Open is enabled. |
| Key | Value | Meaning |
|---|---|---|
| HideFilePrint or HFP |
On | Specify that the menu item File -> Print is disabled. |
| Off (default) | Specify that the menu item File -> Print is enabled. |
| Key | Value | Meaning |
|---|---|---|
| OpenPrintDialog or OPD |
On | Specify that the Print dialog should be displayed after Publi PDF Viewer has opened the file defined via the /JobName key. If this file couldn't be found or accessed nothing will happen. |
| Off (default) | Publi PDF Viewer does not display the Print dialog automatically. |
The /OpenPrintDialog parameter is useful for remote applications that makes use of Publi PDF Viewer as a Print Preview application.
| Key | Value | Meaning |
|---|---|---|
| PrinterName or PN |
String | Specifies the name of the printer Publi PDF
Viewer shall print the PDF document to. Setting this switch will only have effect when the /PrintSilently switch is also set. |
If /PrinterName is not specified along with the the /PrintSilently key Publi PDF Viewer will print to the default printer. If /PrinterName is referring to a network printer the name must be specified in the form \\ServerName\DeviceName, for example:
PDFViewer.exe /JN=C:\PDF Outbox\Testpage.pdf /PS=On /PN=\\MyServer\HP Color LaserJet 5500 PS
The above shown command line instructs Publi PDF Viewer to print the document C:\PDF Outbox\Testpage.pdf to the HP Color LaserJet 5500 PS printer on MyServer without displaying the document.
| Key | Value | Meaning |
|---|---|---|
| PrintSilently or PS |
On | Specifies that Publi PDF Viewer should automatically open and print the
file defined via the /JobName key, and then close
itself down. During printing only a progress bar is displayed. If the file couldn't be found or accessed nothing will happen. |
| Off (default) | The Publi PDF Viewer is started normally or according to other command parameters. |
If /PrintSilently is specified and /PrinterName is not specified Publi PDF Viewer will print to the default printer.
| Key | Value | Meaning |
|---|---|---|
| SessionName or SN |
String | Specifies the name of the Publi PDF Viewer session. The name is
displayed in the title bar. If a Publi PDF Viewer session with the same name as specified with /SessionName already exists the command parameters will be transferred to the running session. |
The default value is /SessionName=Publi PDF Viewer.
| Key | Value | Meaning |
|---|---|---|
| SetTopmost or ST |
On | Specifies that the Publi PDF Viewer should automatically maximize its window and position it as the topmost window. |
| Off (default) | The Publi PDF viewer will open with its default size. |
The /SetTopmost parameter is useful for remote applications that is using the Publi PDF Viewer as a »Print Preview« window.
Known problems
Dropping PDF documents from Windows Explorer doesn't work.
Last revised: 19-12-2007.