getCurrentFile syntax

The getCurrentFile method returns the name of a print file in the spool directory for the job. If a file exists that contains a page range selected from the original print file, it returns the name of that file. If not, it returns the name of the original print file. This is useful for allowing the same command to work on the full job as well as a subset of the job, as is often the case with reprints.

Authorized users can use this format for the method:

${getCurrentFile(datatype)}

where:

datatype
The datastream of the print file. AFP can be specified, which makes this method identical to the getCurrentAFPFile method. You can use symbolic notation, such as ${Job.InputDataStream}, for this parameter.

getCurrentFile example

To submit a job to a Passthrough printer using lpr on a UNIX-based system, you could use this command for the value of the Printer command property:

lpr -Pmyprinter ${getCurrentFile(${Job.InputDataStream})}

The first time the job is sent to the printer, the entire job prints. If the job is processed again to print a subset of pages, only the subset is printed.