Skip to main content

Configuration

All configuration of Ibex is done using the Settings class which is accessed from the ibex4.FODocument object.
This class has many properties which can be changed to configure the operation of Ibex.

Properties of the Settings class should be changed prior to calling the generate() method on the FODocument object.

The fact that the Settings object is a property of the FODocument object means that different documents can have different Settings values. For example Figure 20-1 shows how to set the default line height to 1.4em.

using System;
using ibex4;
public class IbexTester {
public static void Main(string[] args) {

FODocument doc = new FODocument()

doc.Settings.LineHeightNormal = "1.4em";

using( Stream xml = new FileStream( args[0], FileMode.Open, FileAccess.Read ) ) {
using ( Stream output = new FileStream( args[1], FileMode.Create, FileAccess.Write ) ) {
doc.generate( xml, output );
}
}
}
}

Figure 20-1: Example usage of the Settings object

Fonts

The following properties on the Settings change the way fonts a processed. By default each absolute font size (small, medium, large etc.) is 1.2 times larger than the previous size.

PropertyTypeDefaultNotes
XX_Smallstring7.0ptMust end in 'pt'.
X_Smallstring8.3ptMust end in 'pt'.
Smallstring10.0ptMust end in 'pt'.
Mediumstring12.0ptMust end in 'pt'.
Largestring14.4ptMust end in 'pt'.
X_Largestring17.4ptMust end in 'pt'.
XX_Largestring20.7ptMust end in 'pt'.

PropertyTypeDefaultNotes
Smallerstring0.8emMust end in 'em'.
Largerstring1.2emMust end in 'em'.

Line height

The following properties on the Settings change the default line height. Ideally Settings.LineHeightNormal should end in 'em' to make line height proportional to the font height.

PropertyTypeDefaultNotes
LineHeightNormalstring1.2em

Page size

The following properties on the Settings change the default page size.

PropertyTypeDefaultNotes
PageHeightstring297mm
PageWidthstring210mm

Include paths

The following properties on the Settings effect retrieving XML or XSL files.

PropertyTypeDefaultNotes
BaseURI_XMLstringThis value sets the base URI for including images and other XML files. When an fo:external-graphic element specifies a relative path, Settings.BaseURI_XML is the base URI used in accordance with the rfc2396 URI Specification. When an XML file uses an entity to include another XML file, Settings.BaseURI_XML is the base URI used when Ibex searches for the included XML file.
BaseURI_XSLstringThis value sets the base URI for including other XSL files. When an xsl:include element is used to include another XSL stylesheet, Settings.BaseURI_XSL can be used to specify the location the included stylesheet should be loaded from.

Images

The following properties on the Settings effect retrieving images specified using the fo:external-graphic element.

PropertyTypeDefaultNotes
BaseURI_XMLstringThis value sets the base URI for including images and other XML files. When an fo:external-graphic element specifies a relative path, Settings.BaseURI_XML is the base URI used in accordance with the rfc2396 URI Specification . When an XML file uses an entity to include another XML file, Settings.BaseURI_XML is the base URI used when Ibex searches for the included XML file.
WebRequestTimeoutMsint300When an fo:external-graphic element specifies an image is retrieved from a web server, this is the timeout used for the call to the web server. Units are milliseconds.

Border widths

The following properties on the Settings change the values for border widths specified with constants like 'thin'.

PropertyTypeDefaultNotes
BorderWidthThinstring1pt
BorderWidthMediumstring2pt
BorderWidthThickstring3pt

Layout

The following properties on the Settings change the appearance of content in the PDF file.

PropertyTypeDefaultNotes
OverflowIsVisiblebooltrueBy default a region has overflow='auto', leaving it up the Ibex to decide whether content which overflows the bottom edge of a region is displayed or discarded. If Settings.OverflowIsVisible is true, the content will be displayed, if false it will be discarded. This property applies only if the attribute 'overflow' is not set or is set to 'auto'.

Leaders

The following properties on the Settings change the values for fo:leader formatting objects.

PropertyTypeDefaultNotes
LeaderDotchar.When leader-pattern ='dots', this is the character used as the dot