Please enable JavaScript to view this site.

PDF Image Printer

The included PNStart12.exe tool allows you to run a command that simply starts the given program or application. It provides control over the window state, allowing you to show or hide the program window.  You also have control over if you want to wait for the program to finish before moving to the next step, and if so, how long to wait.

The difference between this utility and the PNExec12.exe utility is that this will only launch the application; it does not expect or process the list of created files. If you need to run a command that does an action on each created file, see Execute a Command for Each File Created.

PNStart12.exe Utility

The included utility has been provided in the RunCommands folder in your PDF Image Printer install folder. This is usually C:\Program Files\PDF Image Printer 12\RunCommands\.

 

Command Line Arguments

/C="path to command"

Required, pass in the full path to the command to execute. Use quotes if there are spaces in the path. Single quotes can also be used.

/A=" 'arg 1' arg2"

Optional, extra arguments to pass to the command.

Use double quotes around the entire argument string, and single quotes around any argument in the string that needs to be passed quoted. Optionally, you can use single quotes around the entire argument string and double quotes around any argument in the string that needs to be passed quoted.

/A='"arg 1" arg2'

/WAIT=<time in seconds>

Optional; how many seconds PNStart12.exe will wait for the command to complete.

When not provided or a negative number - waits indefinitely for the command to finish (complete)

If set to 0 = does not wait for the command to complete

If greater than 0 - waits that many seconds for the command to complete

/MODE=<window state>

Pass in the initial windows state for the command you are running.  The default windows state is to show the window (5 - SW_SHOW).

To hide the window, pass /MODE=0.

0 -  Hide the window (SW_HIDE).

1 - Activates and display the window (SW_SHOWNORMAL).

2 - Show the window minimized (SW_SHOWMINIMIZED).

3 - Show the window maximized (SW_SHOWMAXIMIZED).

4 - Show the window but do not activate it (SW_SHOWNOACTIVATE).

5 - Activates and and display the window (SW_SHOW).

pnstart12 Logging - If there is an error running the command, a log file is created in the %TEMP% folder. The log file name has the pattern pnstart12-{GUID}.txt.

Sample Migration For Run Commands

For users migrating from the older-style commands from version 11 or previous, the following shows the changes needed to update your commands for version 12 and later. To see how to add a new command, go to the step-by-step instructions below.

Single Argument Command

This is a sample run at end command in PDF Image Printer 11.0 using a fictional utility, ArchiveReports.exe. It is not an included utility. In this sample we are running this at End of Job and are passing a argument to the utility.

PDF Image Printer 11.0 End of job settings in Printer Preferences:

LaunchApptEndJobVersion11UI

PDF Image Printer Script File settings for Run at End :

[Run]

RunAtEnd enable=1

RunAtEnd command=C:Tools\ArchiveReports.exe

RunAtEnd parameters=Mode=New

RunAtEnd directory=

RunAtEnd window=Normal

RunAtEnd window active=1

RunAtEnd wait=0

RunAtEnd prompt=Do you want to continue?

In PDF Image Printer 12, using the PNStart12.exe utility in the profile to call the fictional ArchiveReports.exe with the argument "Mode=New", show the window and wait for the program to finish would be added as the following On Success Run Command. Note that even though the list of files is passed to PNStart12.exe, this parameter is ignored.

RunCommandsUsingPNStart12-PDF

 

Multiple Custom Arguments Command

This is a sample run at end command in PDF Image Printer 11.0 using the fictional tool, ArchiveReports.exe. It is not an included utility. This utility takes one custom argument and the JobID of the print job supplied by a printer macro. We also want to show the window and wait for the program to finish.

PDF Image Printer 11.0 End of job settings in Printer Preferences:

PNStartRunAtEndWithArgumentsVersion11UI

PDF Image Printer Script File settings for Run at End :

[Run]

RunAtEnd enable=1

RunAtEnd command=C:Tools\ArchiveReports.exe

RunAtEnd parameters=Mode=NEW $(JobID)

RunAtEnd directory=

RunAtEnd window=Normal

RunAtEnd window active=1

RunAtEnd wait=0

RunAtEnd prompt=Do you want to continue?

In PDF Image Printer 12, using the PNStart12.exe utility in the profile to open the fictional ArchiverRports.exe utility with the given arguments would look like the following.

RunCommandsUsingPNStart12WithExtraArgs-PDF

 

Step by Step Instructions

The steps below demonstrate how to use the PNStart12.exe tool and the new Run Commands tab to call a fictional utility, ArchiveReports.exe. This is not an included utility. It takes as an argument the Job ID supplied by the printer using the printer macro, $(JobID).

LaunchDashboard-PDF

 

1.Select "Edit & Create Profiles" to open Profile Manager.

2.Select "Add a profile" to create a personal profile, or create a copy of one of our system profiles.

3.Name the profile, add a description, and click Save.

4.On the Run Commands tab, click the On Success button to add an On Success command.

AddSuccessRunCommand-PDF

 

5.The command will be added already enabled and the details expanded. Beside Run this command, enter the full path and file name of the PNStart12.exe:

RunCommandsUsingPNStart12Command-PDF

6.In the Use these parameters field, add any parameters needed by the command being run. For our fictional tool, we need to pass the Job ID from the printer. We do this using the printer macro $(JobID). The PNStart12 utility will automatically replace this value with Job Id from the printer when it runs..

RunCommandsUsingPNStart12CommandAndArgs-PDF

 

7.Click Save-Back, and close Profile Manager.

If you choose to enable run commands, you may also want to disable prompting by the Save As dialog each time you print.

i.To turn off prompting by the Save As dialog, disable Prompt for the output location and base file name.

DisablePrompting

 

If you plan to use these settings regularly, you may wish to make this personal profile the default profile used by PDF Image Printer.

 

i.Select the printer you wish to edit and use the Profile drop box to select your desired default profile.

ii.Select "Manage Printers" to open Printer Management.

iii.Select the Save icon to save changes.

iv.Select the Home icon to return to the Dashboard.

 

 

8.Close the Dashboard. Now when you print your document to PDF Image Printer, if the job succeeds, the application, in this case our fictional utility ArchiveReports.exe, is launched and the printer macro $(JobID) passed to the program.