Chapter 7 of the IREn User Guide
IREn SVG Generator
7.1. Generating SVG Documents
SVG documents can be generated through the following:
-
IREn Assistant - When formatting the XML file using the IREn Assistant, select SVG as the format, as described in Chapter 3.
-
Command Line - Using the command line, SVG documents can be generated.
-
To generate an SVG document, use the parameter
-svg:-svg <svg document file name>For more information, please refer to Chapter 4.
-
7.2. Image Support
SVG generator supports PNG, JPEG, GIF, SVG/SVGZ and XEPOUT images.
Notes on SVG support in SVG generator:
-
For an SVG image to be processed, it must have an intrinsic size. If
heightorwidthare expressed in unsupported units or missing, aviewBoxattribute must be present: the intrinsic size is determined by the viewBox, assuming 1 user space unit = 1 pixel. If SVG image has no phisical size specified the result is undefined. -
SVG image
heightandwidthcan be expressed in the following units:px, pc, pt, cm, mm, in. Other unit identifiers are not supported.
7.3. Color Support
CMYK, grayscale, spot and registration colors will be rendered into RGB equivalent
7.4. Configuring the IREn SVG Generator
Configuration of the SVG generator is performed in a usual way all IREn generators are configured. All configuration options for SVG generator are child elements of IREn configuration file element <generator-options format="SVG">. Each SVG generator configuration option is an element option and looks like
<option name="OPTION_NAME" value="OPTION_VALUE"/>.
EMBED_IMAGES, BREAK_PAGES and GENERATE_FIRST_N_PAGES options can be passed to SVG generator.
Note: SVG 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.
-
Environment variable (Generator option) - passed within command line and applies for current run of IREn. Generator option 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 Generator option and Configuration file values.
SVG generator's prefix for Generator options is H4SVG. So, EMBED_IMAGES parameter will look like this:
-DH4SVG.EMBED_IMAGES=true
SVG generator's prefix for Processing instructions is xep-svg-. So, EMBED_IMAGES parameter will look like this:
<?xep-svg-embed-images true?>
Processing Instruction may appear at document level or page level.
7.5. Limitations of the IREn SVG Generator
-
SVG generator does not support lines with styles other than
solid,dashed, anddotted; all other lines looksolidin generated SVG documents. -
SVG generator does not support all styles of XSL FO borders (see above limitation on lines). All other borders are drawn as
solidlines. -
SVG generator does not support internal and external bookmarks.
-
SVG generator does not support font embedding and subsetting, so if the specified font is not present in the system, the text may look different.