Job Variables

You can use the XML command packet to submit Job Submission and System variables to Pageflex Server. Some Job variables, however, are not useful in the XML command packet because they have no value until after Pageflex Server finishes the job. You can work with these Job variables as part of a post process.

The examples below show mapped drive letters for variable values. However, you can use UNC paths using the format \\Server\folder\filename as long as the file exists on the same subnet as your Pageflex Server application. If not, the subnets should be connected using a VPN or other tunnel.

Click the Configure Task Processing Settings button on the Host setting page in Pageflex Server Administrator to set up your project input and output directories for variables that require this information.

Enter these commands in the job_variables element of the command packet.

Note:    Do not use reserved job variables in Pageflex project files, for example, do not name any Studio variables with any names defined under job variables. If you use any of these variables, Pageflex Server may return unexpected values.

Job Submission Variables

The following job submission variables are available for use. Boolean values, such as true or false, are not case sensitive, but are displayed as all uppercase for the purposes of this guide.

The variables below are noted as to whether they work with Studio, Studio ID Server, or both.

HTMLFilePath

Studio

Overrides the HTML template file used by the job. This variable should hold the full path to the HTML file, for example:

<pfjob:var name="HTMLFilePath">C:\MyProjects\HouseFlyer.htm</pfjob:var>

JobName

Studio & Studio ID Server

The name of the job you want Pageflex Server to run. The job name must exist in the project file. For example:

<pfjob:var name="JobName">PDF</pfjob:var>

ProjectName

Studio & Studio ID Server

The name and location of the project file, including the full path name and drive letter. For example:

<pfjob:var name="ProjectName">c:\project\PostCard.pf</pfjob:var>

You can also use a UNC path. For example:

<pfjob:var name="ProjectName">\\machine01\project\PostCard.pf</pfjob:var>

TSLFilePath

Studio

Overrides the style sheet (.tsl file) used by the job. When this variable is set, the XMLFilePath variable must also be set. This variable should hold the full path to the .tsl file, for example:

<pfjob:var name="TSLFilePath">C:\MyProjects\HouseFlyer.tsl</pfjob:var>

XMLFilePath

Studio

Overrides the document template (.xdt file) used by the job. This variable should hold the full path to the .xdt file, for example:

<pfjob:var name="XMLFilePath">C:\MyProjects\HouseFlyer.xdt</pfjob:var>

When this variable is set, the TSLFilePath variable must also be set.

System Variables

The following system variables are available for use.

_sys_BitmapCMYKColorMatching

Studio

Turns CMYK color matching on or off for a bitmap job. The default value is FALSE.

Values

TRUE to turn CMYK color matching on.

FALSE to turn CMYK color matching off.

_sys_BitmapJPEGQuality

Studio

Sets the JPEG Quality for the bitmap job.

Values

1-100

This is only available for JPEG output. 1 is better quality but larger size, 100 is worse quality but smaller size.

_sys_BitmapSize

Studio

Sets the size of the bitmap job. Use only one of the following values.

Values

W followed by width in pixels

H followed by height in pixels

% followed by percent increase or decrease.

_sys_BitmapType

Studio

Sets the type of bitmap to output. The default value is JPEG.

Values

GIF

JPEG

TIFF

_sys_ClientJobMonitor

Stuido & Studio ID Server

Sets the status of client job monitoring. The default is FALSE. See “Monitoring Job Status” for details.

Values

TRUE keeps the client socket connection open and reports everything back to the client. This includes the Server window pertaining to the job and the document output.

FALSE for no monitoring.

_sys_CropMarks

Studio

Turns crop marks on or off. The default is FALSE.

Values

TRUE to print crop marks on each page.

FALSE to turn off crop marks.

_sys_CurrentDocument

Studio

This variable is the filename of the current document without the extension. Pageflex Server creates each document filename by combining the Transaction ID with the record number of the document. Use this variable in a post process as it is ignored in a command packet.

_sys_DestinationDir

Studio

This variable contains the full path to the folder where Pageflex Server saves the documents from a job. The destination directory is always inside the final output directory you specify in the Setup dialog box. Use this variable in a post process as it is ignored in a command packet.

_sys_DistillAndDeletePS

Studio

Instructs Pageflex Server to delete PostScript files after running Adobe Distiller to create PDFs, or not. The default is FALSE.

Values

TRUE to delete the PostScript file created for a job that uses Acrobat Distiller for PDF output. If TRUE, Pageflex Server creates the PDF (.pdf) file, and then deletes the PostScript (.ps) file.

FALSE not to delete the PostScript file.

Note:    This applies only to Adobe Acrobat Distiller PDF jobs.

_sys_DistillerOptionsFile

Studio

Use this variable to specify the job options file used by the “Convert PostScript to PDF” format. By default, Server uses a custom joboptions file called PFNorm.joboption that uses the “Press Quality” joboption as a starting point, but changes the color space conversion strategy to “LeaveUnchanged”. The joboptions Settings folder is located in the Pageflex application directory, for example, at “Pageflex\Studio7\Programs\nserver9\Settings”. Use Acrobat Distiller to create custom joboptions files and copy them to the “\nserver9\Settings” folder.

_sys_DownloadFonts

Studio

Sets whether Pageflex Server downloads PostScript Type 1 fonts used in PostScript jobs. The default is TRUE.

Values

TRUE to download the fonts used in the job to the output device.

FALSE not to download the fonts.

_sys_EmailSmtpServer

Studio

Specifies the SMTP server to use, for example, mail.example.com. This is required if you don't want to use the default behavior of sending via the local MS SMTP service. If this isn't specified, the following SMTP server overrides are also ignored.

Example command packet:

<?xml version='1.0' ?>

<?pf_command version='1.0'?>

<pfjob:job_command xmlns:pfjob='http://www.pageflex.com/schemas' name='SubmitJob'>

<pfjob:job_variables>

<pfjob:var name='ProjectName'> TravelAd.pf</pfjob:var>

<pfjob:var name='JobName'>MyEmailJobc</pfjob:var>

<pfjob:var name='_sys_EmailSmtpServer'>mail.example.com</pfjob:var>

</pfjob:job_variables>

</pfjob:job_command>

_sys_EmailSmtpServerPort

Studio

Optionally specifies an SMTP server port.

_sys_EmailSmtpServerUseSsl

Studio

True/False if your SMTP server requires SSL connections.

_sys_EPS_preview_format

Studio

The _sys_EPS_preview_format variable can be used to control the format of the EPS preview when doing EPS output. It is not required that this variable be set for EPS output. The default is 24.

Values

0 to suppress output of the EPS TIFF preview header.

24 to output a 24 bit TIFF preview.

_sys_FinalOutputDir

Studio & Studio ID Server

The final output directory stores the folders with the final output from Server. Use this variable to override the folder you specified in Pageflex Server Administrator. When used in a post process, this variable has the same value as _sys_DestinationDir.

_sys_FinalOutputDirAbsolute

Studio & Studio ID Server

The value is a UNC path to a network folder or a DOS path to a folder on a job host. This specifies an absolute final output directory to use for the final output of a job. If you include this variable, all final output goes into the specified folder. A subfolder named with the transaction ID is not created in this case.

_sys_HtmlOutputDir

Studio

The final output directory stores the folder with the final output from Server. Use this variable to override the folder you specified in Pageflex Server Administrator. This variable requires a corresponding _sys_HtmlOutputUrl.

_sys_HtmlOutputDirAbsolute

Studio

This specifies an absolute final output directory to use for the final output of an HTML job. If you include this variable, final output goes into the specified folder and a subfolder named with the transaction ID is not created. This variable requires a corresponding _sys_HtmlOutputUrlAbsolute.

_sys_HtmlOutputUrl

Studio

The absolute URL for the virtual folder corresponding to the _sys_HtmlOutputDir folder. This variable is required when using a _sys_HtmlOutputDir.

_sys_HtmlOutputUrlAbsolute

Studio

The absolute URL for the virtual folder corresponding to the _sys_HtmlOutputDirAbsolute folder. This variable is required when using a _sys_HtmlOutputDirAbsolute.

_sys_ImageHandling

Studio

This variable specifies the option for handling images. This variable is useful in a post process, but not useful in a command packet. See the Pageflex Studio User Guide for details about these values, as set in the format properties dialog for ASCII or Binary format and when setting content options to omit or include images in the Output tab.

Values

IHC_LOWRES_ASCII. Same as setting the image or page content format to ASCII and selecting the low resolution (if available) check box in Pageflex Studio.

IHC_HIRES_BINARY. Same as setting the image or page content format to Binary and clearing the low resolution (if available) check box in Pageflex Studio. Only applies to PostScript jobs.

IHC_OMIT. Same as selecting omit images in the Output options in Pageflex Studio.

_sys_JobDataSource

Studio

The name of the data source used for the job. For an ODBC data source, the value of the variable is the DSN (Data Source Name).

_sys_JobDataSourceFile

Studio & Studio ID Server

The full path to the database file to use for the job. For files located on a network drive, use the UNC path and not a mapped letter drive.

_sys_JobName

Studio

Reports the name of the job, such as “PostScript Job 1”.

_sys_JobSQLQuery

Studio

The SQL query used to select the records for the job. Insert the query itself as the value for this command.

_sys_OutputJobBillOfMaterials

Studio

The Bill of Materials (BOM) is a plain text list of fonts and images required for the job. The filename is the transaction ID followed by “.bom,” for example, “A0000022.bom.”

Values

TRUE to save the BOM in the folder Pageflex Server created for the final output of a job.

FALSE not to save the BOM.

_sys_OutputXML

Studio

Creates document instance files in addition to the output specified by the job. Document instance files consist of an .xdt and .tsl file using the variables for a record in the job as the default variable contents. These files can subsequently be used to create new Pageflex templates. You can view and edit document instance files with Pageflex Studio.

Values

TRUE to create document instance files as well as the output specified by the job.

FALSE not to create document instance files.

_sys_PageHeight

Studio

Override the document height. Specify the size in inches (in) or millimeters (mm), for example, for a height of five inches, set to 5in.

Note:    The override takes place before Pageflex Server inserts variable pages into the document, therefore variable pages must be the same dimensions as the dimensions in the override, otherwise you will receive a Server error.

_sys_PageScaleX

Studio

Overrides the horizontal page scaling factor as a percentage of the page size. For example, a value of 100.0 equals 100%. Restricted to PostScript and PDF output only.

_sys_PageScaleY

Studio

Overrides the vertical page scaling factor as a percentage of the page size. For example, a value of 100.0 equals 100%. Restricted to PostScript and PDF output only.

_sys_PagesToPrint

Studio

Specifies which pages within a document record are selected for output. List each page number to print separated by commas, and specify ranges with hyphens. An empty string prints all pages.

For example, to print the first two pages for each document in the job, set to:

1,2

To print pages 3 through 5, set to:

3-5

_sys_PageWidth

Studio

Override the document width. Uses the same parameters as _sys_PageHeight.

_sys_ProductionLevel

Studio

The production level has two values for preflight work and one for final production. Pageflex Server assumes a job is intended for final production unless you specify otherwise. See the Pageflex Studio Guide for descriptions of these values, as set on the Generate Output tab in Pageflex Studio.

Values

PreflightDataCheck

PreflightCompose

Production

_sys_ProjectPathName

Studio

This variable contains the full path to the project file (.pf). The full path includes the drive letter. This variable is not useful when specified in the command packet but it can be examined by a post process.

_sys_QueueName

Studio & Studio ID Server

This variable specifies which queue should be used for the given command. For example, you may wish to submit a given job to a queue named “Fast.” It can be used with the SubmitJob, SubmitSession, and GetJobQueueLen commands.

Syntax

<pfjob:var name='_sys_QueueName'>QUEUENAME</pfjob:var>

Example

<?xml version='1.0' ?>

<?pf_command version='1.0'?>

<pfjob:job_command xmlns:pfjob='http://www.pageflexinc.com/schemas'

                                             name='SubmitJob'>

<pfjob:job_variables>

<pfjob:var name='ProjectName'>BusinessCard.pf</pfjob:var>

<pfjob:var name='JobName'>Bitmap_Job</pfjob:var>

<pfjob:var name='_sys_ClientJobMonitor'>true</pfjob:var>

<pfjob:var name='_sys_QueueName'>Fast</pfjob:var>

</pfjob:job_variables>

</pfjob:job_command>

_sys_RunPostProcess

Studio

Specifies whether or not Pageflex Server runs the post process job. Post process jobs are commonly used to move or modify final output files.

Values

TRUE to run the post process.

FALSE to prevent the post process from being run.

_sys_RunPostProcessOnFail

Studio

Sets whether Pageflex Server executes a post process even if the job fails. The default value is FALSE.

Values

TRUE to execute a post-process even if the job fails.

FALSE does not execute post-processing if the job fails.

_sys_TemplateFilePath

Studio ID Server

This specifies the full path to the InDesign document to use for the job.

_sys_TransactionID

Studio & Studio ID Server

Enables you to override the transaction ID for the job. It is very important that Transaction IDs are unique for every job that Pageflex Server runs. Use extreme caution if you are using your own numbering scheme. Pageflex Server may be unable to run the job, or it may overwrite exiting documents. See the Pageflex Server Guide for an explanation of transaction IDs. Here is an example:

<pfjob:var name="_sys_TransactionID">JOB99991</pfjob:var>