RenderX

Chapter 14 of the VDPMill User Guide

Document Post-processing

Post-processing is applied on IREn intermediate format documents (XEPOUT documents) to customize print streams. Several transformations can be applied at this step.

Since XEPOUT documents are in XML format, post-processors are SAX event filters which handle SAX events from the source XEPOUT file and pass them to the underlying SAX handlers to generate the final output files.

XEPOUT documents may contain special XML processing instructions to control post-processing. As well as there is an XML tag pinpoint that can be specified in the source XSL-FO file. IREn processes pinpoint tags transparently and the tags specified in XSL-FO files appear in the resulting XEPOUT document after formatting.

For the detailed description of IREn intermediate format see XEPOUT description.

VDPMill package provides the following post-processing implementations:

D.1. Transpromo

Transpromo, also known as "statement-based marketing", integrates a TRANSactional document with proactive PROMOtional marketing. TransPromo provides an opportunity to blend marketing messages with must-read transaction statements such as invoices, statements, benefit confirmations, explanations, and other notifications to influence behavior and ultimately drive business volume. VDPMill is using Transpromo plug-in to place images on the pages. Image is being placed on the page from a given set of images. Size of the necessary image for the page is being calculated automatically. Image choosing can be done by setting if current image set should be used for specified type of documents (separated or joined) or for specified format. If no document format and type specified, default image set will be used.

 

D.2. OMR (Optical Mark Recognition)

Optical Marks are special marks previously put on paper and can be read by OMR reading software. OMR marks are used to deliver processing instructions to cutting, folding and other postpress machines. For example, an OMR mark can be used to specify the type of the envelope which the letter should be put in. Currently VDPMill includes two specifications: ABC Office 630 series (see the specification) and Pitney Bowes 8 series (see the specification ). Specification is an XML file which contains information about specific OMR marks. Implementation concepts:

  • Marks element should have default-mark-value attribute, that determines if each nested mark element is shown or not. Each mark can override that value with self-defined default-mark-value attribute.

  • Default-mark-value can also be overridden for elements with pin-name and pi-name attributes.

    <omr:mark position="2" name="eoc" pin-name="eoc.pinpointmatch"/>

    The attribute pin-name identifies the XEPOUT element to look for. Specifically, should be searched for the occurrence of an pinpoint element with a value of eoc.pinpointmatch. If the pinpoint exists anywhere within that page, then eoc.pinpointmatch should be left on the page. On those pages where the pinpoint is not found, the mark should be removed. For pinpoint elements with pi-name attribute, default-mark-value can be overridden with a xep-omr-safety on[off] processing instruction in XEPOUT file.

  • Parity mark. Parity is an odd or even match, based on the specs. Parity mark in OMR spec file should contain parity-value attribute with odd/even value. If no parity-value is found the mark is ignored.

  • xep-omr off processing instruction would exclude the marks from the output.

XEPOUT file should also contain specification file and name information. For that purpose processing instructions with omr-spec-file and omr-spec-name targets should be used. Relative OMR specification file path is resolved relative to the input xml file.

<?omr-spec-file file:OMR/OMR.Specs.xml?>
<?omr-spec-name pitney-bowes-8-series?>

 

D.3. Sequence Numbering

Sequence number generation plugin is used to generate page sequence numbers. It searches matching xep:text elements on matching pages and puts current sequence number as a text.

This plugin working algorithm based on using fo:inline elements with monospace Courier font (Courier font comes with default IREn package). IREn Formatter renders <fo:inline font-family="Courier" font-size="0pt">marker</fo:inline> element as a solid <:xep:text value="marker".../> element. 0 size is used to avoid rendering marker text, because it is removed by the sequence plugin. For sequence number generation page layout should be designed to have enough free areas for generated sequence numbers.

Pages are matched using type parameter and the current page number.

The plugin matches xep:text element if all of the following conditions are true:

  • the element is on a matched page or suppress-unused option is false and the page comes after any matched page;

  • the value attribute equals to the location parameter;

  • last xep:font element describes Courier 0-size font.

In the resulting XEPOUT document xep:font family="Courier" ... size="0" element is removed or replaced by default Helvetica, 12pt font, if xep:font family="Courier" was the first xep:font element on the current page.

The parameters which control the sequence numbering are the following:

  • start - initial sequence number. Non-negative integer. Default value is 1;

  • digits - 0 padding and number of digits or no 0 padding. For example, 000 means 3 digits with 0 padding, # means no 0 padding. Default value is # - no 0 padding;

  • type - odd, even, all, [INTEGER]- increment sequence number for all, odd, even pages or for pages with a number which matches the following condition: pagenumber%[INTEGER] == 0. Default value is all;

  • location - the xep:text value to replace. For example: <xep:text value="myseqpinpoint"> will be replaced if the location parameter is myseqpinpoint. Default value is ppsequence;

  • suppress-unused - true, false - controls matching xep:text treatment matching on unmatched pages. If true, all the matched xep:font, xep:text elements are removed from the unmatched pages. If the matched xep:font was the first font description on the page, it is replaced by default Helvetica, 12pt font. If this parameter is false, all the matched xep:font, xep:text elements on unmatched pages are treated as for matched pages. Default value is false.

To use sequence post-processing in VDPMill, the job ticket should contain <post-processing name="sequence"> element with or without (in this case the default values will be used) nested <option> elements. For example, sequence post-processing with start number 3, 6 digits with 0 padding on odd pages can be described in a ticket file as the following:

<post-processing name="sequence">
   <option name="start" value="3"/>
   <option name="digits" value="000000"/>
   <option name="type" value="odd"/>
   <option name="location" value="seq"/>
   <option name="suppress-unused" value="false"/>
 </post-processing>

 

In this case the <xep:text value="seq" .../> elements on the 1st and 2nd pages become 3, the <xep:text value="seq" .../> elements on the 3rd and 4th pages become 4 and so on. Any other <xep:text> elements on all pages remain untouched.

Also sequence number generation can be controlled using XML PIs in XEPOUT file. The following fragment of XEPOUT file sets up sequence number generation as in the example above, except xep:font, xep:text element treatment on unmatched pages:

<xml version="1.0">
<?xep-sequence-start 3?>
<?xep-sequence-digits 000000?>
<?xep-sequence-type odd?>
<?xep-sequence-location seq?>
<?xep-sequence-suppress-unused seq?>
<xep:document ... >
  <xep:page ...>
    ...
  </xep:page>
</xep:document>
                

Here the matched xep:text elements are removed from even pages. The matched xep:font is removed or replaced by default Helvetica, 12pt font if it is the first xep:font on the page.

Important: Important:XML PIs take precedence of plugin options in ticket file.
Important: Important:All the matched xep:text, xep:font are removed from the pages which come before the first matched page.