Chapter 10 of the IREn User Guide
IREn PPML Generator
IREn PPML Generator produces compressed (zipped) stream, which contains the PPML file itself (ppml.ppml), single-page documents of selected target format, and resources (images). A typical structure of the output looks likes the following:
Archive: examples/hammer/hammer.ppml.zip
Length Date Time Name
--------- ---------- ----- ----
13859 2010-03-20 19:58 p-1.ps
10559 2010-03-20 19:58 p-2.ps
13178 2010-03-20 19:58 resources/3C930583962468B4D703279B9434B040
11324 2010-03-20 19:58 resources/EF7F83D0E38E530AA594BE2F0481A979
30007 2010-03-20 19:58 p-3.ps
3440 2010-03-20 19:58 resources/72B960DC67902BA55E8AE7CEFD38EE55
4050 2010-03-20 19:58 resources/2B1239042024CB27DD37A5072BE22AC5
5086 2010-03-20 19:58 resources/147B5BE21F3BED972AFD492D9FC104DC
5352 2010-03-20 19:58 resources/6ABEBDF9A745C573723CF368BC4C782D
6872 2010-03-20 19:58 resources/5EECE4084815E05A11D8055F672846EC
37873 2010-03-20 19:58 p-4.ps
21729 2010-03-20 19:58 p-5.ps
4912 2010-03-20 19:58 ppml.ppml
--------- -------
168241 13 files
Note that the default file naming scheme in command-line xep script is that the output file name extension matches the output format. In case of PPML generator, the command line invocation
$ ./xep -fo examples/basic/color.fo -ppml
will create a file "examples/basic/color.ppml", which in fact is a zip file of the structure similar to the one shown above. For clarity users are encouraged to specify the ouput file name explicitly:
$ ./xep -fo examples/basic/color.fo -ppml examples/basic/color.ppml.zip
The file "ppml.ppml" complies with the PPML 2.2 specification ( http://ppml.podi.org/component/option,com_docman/Itemid,81/task,doc_download/gid,4/) and the DTD ( http://www.podi.org/ppml/ppml220.dtd).
10.1. Generating PPML Documents
PPML documents can be generated through the following:
-
IREn Assistant - When formatting the XML file using the IREn Assistant, select PPML as the format, as described in Chapter 3.
-
Command Line - Using the command line, PPML documents can be generated.
-
To generate an PPML document, use the parameter
-ppml:-ppml <ppml document file name>For more information, please refer to Chapter 4.
-
To set PPML document internal pages format use the parameter
-DH4PPML.TARGET_FORMAT:-DH4PPML.TARGET_FORMAT=<PS or PDF> -
To generate PPML document, compatible with the Graphic Arts Conformance Specification (Level 1 or 2), use the parameter
-DH4PPML.GA_LEVEL:-DH4PPML.GA_LEVEL=<1 or 2>Note: You can set -1 as the value of
-DH4PPML.GA_LEVELto avoid processing images as resources entirely: all images will be passed to the target format generators and appear in pages rather than resources.Alternatively, you can use the configuration file entries. For more details, refer to Section 10.3.
-
10.2. Image Support
PPML generator supports all image formats, which are supported by the chosen target format generator.
Notes on Graphic Arts Level:
-
An image may be included in PPML zip stream as a resource only once, and referenced from the ppml.ppml file multiple times. This allows for reduced output size and improved performance. This feature is very useful for repeating images, like corporate logos, headers, footers, etc.
Note:
In PDF or PS backend you can generate a text/image mixed context (for example, text written on top of image). PPML, however, does not support such behaviour Use
GA_LEVEL=-1as noted above if you need complex overlayed design, but you will lose the benefits of reusable resources. -
If
GA_LEVELnot set or set to zero, then all images are included in PPML document as zip-entrees in internal resources folder. -
If
GA_LEVELis set to 1 or 2, then only JPEG and TIFF images are included in PPML zip stream as resources. All other images are processed by selected target format generator.
10.3. Configuring the IREn PPML Generator
Configuration of the PPML generator is performed in a usual way all IREn generators are configured. All configuration options for PPML generator are child elements of IREn configuration file element <generator-options format="PPML">. Each PPML generator configuration option is an element option and looks like
<option name="OPTION_NAME" value="OPTION_VALUE"/>.
TARGET_FORMAT and GA_LEVEL options can be passed to PPML generator.
Note: PPML parameters can be set in three different ways, depending on your specific needs:
-
Configuration file - in this case, the parameter value applies to all documents processed with this configuration file.
-
System property - passed within command line and applies for current run of IREn. System property value overrides Configuration file values.
-
Processing Instruction - passed within Processing Instruction (PI) inside XSL-FO document. Please refer Output Format Settings section for more details on processing instructions. Processing Instruction value overrides System properties and Configuration file values.
PPML generator's prefix for System properties is H4PPML. So, TARGET_FORMAT parameter will look like this:
-DH4PPML.TARGET_FORMAT="PDF"
PPML generator's prefix for processing instructions is xep-ppml-. So, TARGET_FORMAT processing instruction will look like this:
<?xep-ppml-target-format PDF?>
Processing Instruction may appear only at document level, before <fo:root>.