Skip to main content

Using the Ibex Command Line

This technical note describes how to use the Ibex command line tool. It applies to Ibex versions 6.0 and higher using .Net 6.0 or higher.

Installation

The Ibex.CommandLine package is a console application to create PDF files from the command line, for use during testing and development. The Ibex.CommandLine package is a .Net tool. This is installed from a command shell like so:

dotnet tool install -g Ibex.CommandLine 

An existing installation can be updated using this command:

dotnet tool update -g Ibex.CommandLine

For more information on installation see Downloads

Executables

The Ibex.CommandLinee package installs a tool allowing you to invoke Ibex using the command "ibex".

Defaults

If an FO file is used (as opposed to an XML and XSL file) and no file extension is specified a default extension of ".fo" will be added to the input file name and a default extension of ".pdf" will be used to create the output file.

This means these two commands are equivalent:

ibex test.fo test.pdf
ibex test

Command line parameters

OptionExampleDescription
-base-uri-xml uriibex -base-uri-xml c:\work testspecifies the base URI used when retrieving XML files and images. This defaults to the location from which the XML or FO file is loaded
-base-uri-xsl uriibex -base-uri-xsl c:\work testspecifies the base URI used when retrieving XSL files. This defaults to the location from which the XSL file is loaded
-fonts [pattern]ibex -number arial > fonts.foan FO file which lists fonts with names matching the specified pattern (or all fonts if no patten is specified) is written to the standard output. This FO can the be used to create a PDF showing the correct usage of each font. This is useful for finding the correct usage when fonts have multi-word names
-level valueibex -level info testspecifies the logging level and must be one of "info", "warning" or "severe"
-logfile nameibex -logfile log.txt testspecifies the name of a file in which Ibex will log messages
-number nibex -number 3test the creation of the PDF will be repeated the specified number of times. This is useful when looking at performance as it minimises the overhead of initialising the .Net runtime
-pdf-versionibex -pdf-version 1.3 testforces the PDF version defined at the start of the PDF file to be the specified value. The default is "1.4"
-pdfx-version valueibex -pdfx-version "PDF/X-3:2003" testwhen creating a PDF/X file this can be used to override the default value of "PDF/X-3:2003"
-transformibex -transform test.xml test.xsl test.fo

ibex -transform test.xml test.xsl test.fo "age=20"
this will create an FO file so you can see the results of the XLST transform. No PDF is generated. The second form shown demonstrates how to pass parameters to the XSLT transformation
-webtimeout valueibex -webtimeout 3000 testthis will change the timeout used when retrieving an image file from an HTTP or HTTPS server. The value specified is in milliseconds. The default value is 1300ms
-xsl nameibex -xsl test.xsl test.xml output.pdfspecifies the name of the XSLT stylesheet to be used to transform the XML file into FO