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:
-
Markselement should havedefault-mark-valueattribute, that determines if each nestedmarkelement is shown or not. Each mark can override that value with self-defineddefault-mark-valueattribute. -
Default-mark-valuecan also be overridden for elements withpin-nameandpi-nameattributes.<omr:mark position="2" name="eoc" pin-name="eoc.pinpointmatch"/>The attribute
pin-nameidentifies the XEPOUT element to look for. Specifically, should be searched for the occurrence of anpinpointelement with a value ofeoc.pinpointmatch. If the pinpoint exists anywhere within that page, theneoc.pinpointmatchshould be left on the page. On those pages where thepinpointis not found, the mark should be removed. Forpinpointelements withpi-nameattribute,default-mark-valuecan be overridden with axep-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 containparity-valueattribute withodd/evenvalue. If noparity-valueis found the mark is ignored. -
xep-omr offprocessing 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.
|
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-unusedoption is false and the page comes after any matched page; -
the
valueattribute equals to thelocationparameter; -
last
xep:fontelement 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 is1; -
digits- 0 padding and number of digits or no 0 padding. For example,000means 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 isall; -
location- thexep:textvalue to replace. For example:<xep:text value="myseqpinpoint">will be replaced if thelocationparameter ismyseqpinpoint. Default value isppsequence; -
suppress-unused-true, false- controls matchingxep:texttreatment matching on unmatched pages. If true, all the matchedxep:font, xep:textelements are removed from the unmatched pages. If the matchedxep:fontwas the first font description on the page, it is replaced by default Helvetica, 12pt font. If this parameter is false, all the matchedxep:font, xep:textelements on unmatched pages are treated as for matched pages. Default value isfalse.
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:
|
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:
|
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.