Printing Options

Top Previous Topic Next Topic  Print this topic

The xf:printing-options extension can be used for various output formats (most notably PostScript) to specify advanced printing options.

 

Example of usage:

 

 

<?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 following attributes are available:

 

·The input-tray attribute specifies the index of the input tray that will be used. The default value is "0".

The values for this attribute are different, depending on the output format.

For PS and AFP format files, the input-tray is a numerical value. Any non-numerical value will have no effect and a warning will be issued.

For the Direct Printing format, the attribute, the attribute's value can either be numerical or non-numerical. When a non-numerical value is specified, the server detects it automatically from the tray name.

 

·The output-tray attribute specifies the index of the output tray that will be used. The default value is "0".

The values for this attribute depend on the output file format.

For AFP format files, the attribute is a numerical value. Any non-numerical value will have no effect and a warning will be issued.

For PS format files, the attribute must have 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. The default value is "1".

 

·The duplex attribute specifies whether the page sequence should be printed in duplex mode. The default value is "false".

 

·The media-color attribute specifies the color to use for printing. The default value is "none".

 

·The sheet-width and sheet-height options specify the dimensions of the sheet.

 

·The manual-tray attribute - when using postscript as output format, this attribute specifies the use of the manual tray, if the printer has one (e.g. the printer will expect manual paper feed form the user).

 

·Rotate-content - this attribute specifies if the pages will have a rotation transform. The values accepted are the same as fo:reference-orientation.

 

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.

 

 

Notes:

·When these parameters are specified from both command line tools and DAL job, the xf:printing-options in the DAL job will overwrite the command line parameters.
·When these 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 these 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.