Running a Script in Print Rules

You can specify a command that executes when a print rule is run using the substitution values shown in the Print rules substitution variables table.

Print rules substitution variables

Substitution variable Meaning
%i The name of the input file.
%o The name of the file in which to store the output.
%j The name of the original print file, minus the path (from the document-file-name attribute).
Note: This should only be used to construct another name, such as a temporary file.
%n The name of the original print file, minus the path and minus the extension (from the document-file-name attribute).
Note: This should only be used to construct another name, such as a temporary file.
%d A text string that represents the document format of the input file.
Note: You can also acquire document format through the %%Ddocument-format substitution value.
%p The value of the document's destination-pass-through attribute.
%s The document-sequence-number for the document.