RenderX

Chapter 9 of the IREn User Guide

IREn XHTML Generator

9.1. Generating XHTML Documents

XHTML documents can be generated through the following:

  • IREn Assistant - When formatting the XML file using the IREn Assistant, select HTML as the format, as described in Chapter 3.

  • Command Line - Using the command line, XHTML documents can be generated.

    • To generate an XHTML document, use the parameter -html:

      -html <xhtml document file name>

      For more information, please refer to Chapter 4.

9.2. Image Support

XHTML generator supports PNG, JPEG, GIF, SVG/SVGZ, XEPOUT images.

Notes on SVG/SVGZ support in XHTML generator:

  1. For an SVG image to be processed, it must have an intrinsic size.

  2. SVG image height and width can be expressed in the following units: px, pc, pt, cm, mm, in. Other unit identifiers are not supported. Unspecified units also are not supported.

9.3. Color Support

CMYK, grayscale, spot and registration colors will be rendered into RGB equivalent.

9.4. XForms

Starting from version 4.19, IREn is able to produce XHTML with XForms 1.1. This feature is controlled by a special license key file.

The <pdf-form-field> extension element with it's descendants describes a single field in the XForm. See the Section B.18 part for more information.

In case of XForms value of js-* attributes is required to match the value of its related properties in XForm specification (i.e. XPath expression). Input attributes js-format and js-keystroke correspond to the property type in the field's binding element of the output XForm model. The attribute js-validate corresponds to the property constraint, and the attribute js-calculate - to the property calculate in the field's binding element of the output XForm model.

Since all form fields are collected in fields root element at output XForm model, addressing to the form's field should be /fields/user_field_name or ../user_field_name in XPath expressions.

Note: For XForms to work properly, file extension should be .xhtml

9.5. Configuring the IREn XHTML Generator

Configuration of the XHTML generator is performed in a usual way all IREn generators are configured. All configuration options for XHTML generator are child elements of IREn configuration file element <generator-options format="HTML">. Each XHTML generator configuration option is an element option and looks like

<option name="OPTION_NAME" value="OPTION_VALUE"/>.

EMBED_IMAGES, BREAK_PAGES, GENERATE_FIRST_N_PAGES and XFORMS options can be passed to XHTML generator.

Note: XHTML 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.

XHTML generator's prefix for Generator options is H4HTML. So, EMBED_IMAGES parameter will look like this:

-DH4HTML.EMBED_IMAGES=true

XHTML generator's prefix for Processing instructions is xep-html-. So, EMBED_IMAGES parameter will look like this:

<?xep-html-embed-images true?>

Processing Instruction may appear at document level or page level.

9.6. Limitations of the IREn XHTML Generator

  • XHTML generator supports only vertical and horizontal lines.

  • XHTML generator does not support rotate, polygon, internal-bookmark and external-bookmark XEPOUT elments. Therefore the following XSL FO features are unavailable: borders, reference orientation and bookmarks.

  • XHTML generator does not support font embedding and subsetting, so if the specified font is not present in the system, the text may look different.

  • If BREAK_PAGES option value is true, XForms output is not produced.

  • XForms producer does not support <pdf-javascript> extension element.

  • XForms producer does not support noexport extension attribute.

  • XForms producer supports only js-format, js-keystroke, js-validate and js-calculate JavaScript attributes.

Download the complete IREn User Guide as PDF