The xf:printing-options extension can be used for various output formats, most notably PostScript, to specify advanced printing options.
Its syntax is of the following form:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xf="http://www.ecrion.com/xf/1.0">
<fo:layout-master-set>
<fo:simple-page-master master-name="all-pages" page-height="2in" page-width="6in">
<fo:region-body region-name="xsl-region-body" column-gap="0.25in" padding="6pt" margin="0.7in" />
<fo:region-before region-name="xsl-region-before" display-align="after" extent="0.7in" padding="6pt"/>
<fo:region-after region-name="xsl-region-after" display-align="before" extent="0.7in" padding="6pt"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="default-sequence">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default-sequence">
<xf:printing-options input-tray="0" output-tray="0" copy-count="1" duplex="false" media-color="blue" sheet-width="8in" sheet-height="11in">
<xf:ps-printer-code>
<!-- insert PostScript specific printer code here -->
</xf:ps-printer-code>
</xf:printing-options>
<fo:flow flow-name="xsl-region-body">
<fo:block>Hello World!</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
The element must be placed inside the fo:page-sequence tag, before any fo:flow elements.
The attributes have the following meaning:
| • | The input-tray attribute specifies the index of the input tray that should be used. Default is 0. |
The values for this attribute are different depending on the output format.
For PS and AFP format input-tray is a numerical value. Any non-numerical value will have no effect and a warning will be issued.
For Direct Printing format the attribute may be as both numerical and non-numerical value. When a non numerical value is specified the, server tries to detect it automatically from the tray name.
| • | The output-tray attribute specifies the index of the output tray that should be used. Default is 0. |
The values for this attribute are different depending on the output format.
For AFP format, the attribute is a numerical value. Any non-numerical value will have no effect and a warning will be issued.
For PS format, output-tray is a string value.
For Direct Printing format values for this attribute are not supported.
| • | The copy-count attribute specifies the number of copies that should be printed. Default is 1. |
| • | The duplex attribute specifies whether this page sequence should be printed in duplex mode. Default is false. |
| • | The media-color attribute specifies the color to use for printing. Default is none. |
| • | The sheet-width and sheet-height options specify the dimensions of the sheet. |
The xf:ps-printer-code element can be added as a child of xf:printing-options and allows for PostScript specific printer code to be inserted.
Note:
When this parameters are specified from both command line tools and DAL job, the xf:printing-options in the DAL job will overwrite command line parameters.
When this parameters are specified from both DAL job and from page-sequence, the xf:printing-options in page-sequence will overwrite xf:printing-options in the DAL job.
When this parameters are specified from both page-sequence and simple-page-master, the xf:printing-options in simple-page-master will overwrite the xf:printing-options in page-sequence.