Settings->Application



Run application after printing finishes
This option allows Zan Image Printer to open a third party program after printing is finished.
If this option is cleared, Zan Image Printer will not launch an application. If this option is checked, Zan Image Printer will either:
Launch the default viewer for the generated image
or run a user specified application(s) with the given parameters:
Application / Browse
Enter the full path for the application(s) to run. The Browse button lets you browse for and select an existing application.

Zan Image Printer also supports the following built in commands:
copyfile, lets you copy file: copyfile source,destination
The destination must be a folder (the trailing backslash '\' is required). Examples:
copyfile [%allfiles], c:\test\
copyfile [%allfiles], \\myserver\doc\


deletefile, lets you delete the specified file: deletefile filename

removeext, remove the file extension from a path, if one is present: removeext filename

faxcoverpage, add a bmp file as the fax cover page to a faxable monochrome TIFF file:
faxcoverpage source.tif, faxcover.bmp, destination.tif
where:
source.tif is the original TIFF file.
faxcover.bmp is the fax cover page in monochrome (black and white) .bmp image format.
destination.tif is the output file (optional). If omitted, the output file is assumed to be source.tif.
Examples:
faxcoverpage [%file], c:\fax\cover.bmp
faxcoverpage [%file], c:\fax\cover.bmp, c:\fax\fax.fcx

ShellExecute, perform an operation on a specified file: ShellExecute Operation, filename
Operation (also referred to as verb) specifies the action to be performed.
The set of available verbs depends on the particular file, the following verbs are commonly used:
open
print
mailto
runas
edit
find
explore

The Parameters field is optional and gives you more space for additional application parameters so you do not have to fit all your data into the one-line Application field. You can also enter the parameters in the Application field and leave the Parameters field blank. For example, to launch outlook.exe and insert the generated image file as message attachment, enter the following into the Application field:
"C:\Program Files\Microsoft Office\OFFICE11\outlook.exe " /a "[%file]"

Entering the following command in the Application field will start an e-mail message in Outlook using the extracted Email address (using the [%email] macro), attach the printed file to the e-mail, and open Outlook so you can review the message before it is sent:
"C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE" /a "[%file]" /m "[%email]"

Use semi-colons ';' to separate multiple applications/commands, for example:
c:\myapp1\app1 [%file]; c:\myapp2\app2 [%allfiles];deletefile [%filenoext].txt;deletefile [%folder]\mysentinel.txt
If you have multiple Applications specified (separated by ';'), and you use the [%allfiles] macro, the specific subsection of the application command string (between ';' characters) will be repeated for each file before the next subsection is called.
Click here to see usage examples.

Wait for completion
If this option is selected, Zan Image Printer will wait until the application(s) have exited before continuing operation.

Timeout
Timeout intervals in seconds (0-3600).
If the timeout interval is any value between 1 and 3600, the print job will return after the specified interval elapses, even if the launched application has not exited.
If the Timeout is 0, the timeout interval never elapses so the print job will keep waiting until the launched application exits.

Parameters
Both the Parameters and Application fields support the following application specific macros and the save macros (click here to see usage examples):
Name Macro Description Example
File name of the first image [%file] Fully qualified file name of first image c:\abc\img1.jpg
File name of the first image without extension [%filenoext] Fully qualified file name of first image without the extension c:\abc\img1
Number of pages printed [%page] Number of pages printed 268
Fully qualified file names of all generated images [%allfiles] The specified application will be called to process each generated image file in succession (one at a time) c:\abc\img1.jpg
c:\abc\img2.jpg
Fully qualified file names of all generated images without the extension [%allfilesnoext] The specified application will be called to process each generated image file in succession (one at a time) c:\abc\img1
c:\abc\img2
Current save folder name without a trailing backslash [%folder] Current save folder name without a trailing backslash c:\abc
Sentinel file [%sentinel] Fully qualified file name of the sentinel file. The sentinel file can be used to collect information about print jobs (for example, a list of image files generated) and pass that information to your application for processing. c:\image\sentinel_image printer_0034.txt
Program Files folder directory for 32-bit applications [%programfilesx86] The Program Files folder directory (without a trailing backslash) on a 32-bit (x86) OS, and the Program Files (x86) folder on a 64-bit (x64) OS C:\Program Files (x86)

You may also specify other application specific command line parameters separated by blank spaces.
For example, if the application specified in the Application field is Kodak Imaging Preview for Windows: C:\Program Files\Windows NT\Accessories\ImageVue\kodakprv.exe, and the text in the Parameters field is [%file], ], and the output file name is c:\abc\img1.jpg. After printing finished, the final command to be executed would be:
C:\Program Files\Windows NT\Accessories\ImageVue\kodakprv.exe c:\abc\img1.jpg.

Help
Loads the help file, and displays the Settings->Application topic.

Usage Examples
The examples below assume the following settings:
You have selected the Wait for completion option, set Timeout to 0, and left the Parameters field blank.
You have downloaded the powerful ImageMagick suite (http://www.imagemagick.org) from http://www.imagemagick.net/download/binaries/ and installed the ImageMagick-5.5.7-Q16-windows-dll.exe package. ImageMagick is free for both personal and commercial use. If you need more sophisticated image manipulations not supported by Zan Image Printer, you can try ImageMagick.

The simplest way to use ImageMagick is from the command prompt. Using the command prompt, you can automate your image processing by calling ImageMadick from the command line after printing is finished:
Text annotation
Copy and paste the following into the Application field and make your own modifications as necessary:
C:\Program Files\ImageMagick-5.5.7-Q16\convert -font arial -fill green -pointsize 48 -draw "text 10,45 'hello, world'" [%allfiles] [%allfiles]

Watermark
Copy and paste the following into the Application field and make your own modifications as necessary:
"C:\Program Files\ImageMagick-5.5.7-Q16\composite" -watermark 30% -gravity southeast c:\abc\logo.jpg [%allfiles] [%allfiles]

Border trimming
Copy and paste the following into the Application field and make your own modifications as necessary:
"C:\Program Files\ImageMagick-5.5.7-Q16\convert" -trim [%allfiles] [%allfiles]

Convert to GIF
Copy and paste the following into the Application field and make your own modifications as necessary:
"C:\Program Files\ImageMagick-5.5.7-Q16\convert" [%allfiles] [%allfilesnoext].gif;deletefile [%allfiles]