Command Line Interface

To process a document in a command line interface, use:

chemistry -in my_file.html -out my_file.pdf

You may specify one or more CSS files to be used. If the document is an HTML document, it may reference other stylesheets, or embed styles using the styleelement. The command line CSS files take precedence over files referenced from the document.:

chemistry -in my_file.html -out my_file.pdf -css style1.css style2.css

Required Parameters

-in
The input XML file in URI or File syntax.
-in http://my.example.com/css/printing.css
-in C:\my.folder\css\printing.css
-out
The output PDF file in File syntax.
-out C:\publishing\my_file.pdf

Optional Parameters

-v
Shows the version of the processor.
-help
Prints the usage information.
-css
A list of CSS files, in URI or File syntax, separated by spaces.
-css http://my.example.com/css/pages.css http://my.example.com/css/fonts-and-colors.css 
If you want to process an HTML document, this parameter is optional. If you specify a CSS, it is considered to be more important than the ones referenced from the document (for example, using the link element or the xml-stylesheet processing instruction).
-catalogs
The path to one or more XML catalogs, in URI or File syntax. You can separate the catalogs by using the ":" or ";" symbols. You can use a catalog to solve DTD or Schema references to local files.
-catalog-prefer
Catalog preference mode. Possible values are: 'system' or 'public'. Default is 'public'.
-image-resolution
The resolution (in DPI) of the raster images (an integer), for images that do not provide this meta information. For changing the resolution using CSS, see: Image Resolution.
-image-resolution 72
-http-proxy-host
The HTTP proxy host.
-http-proxy-port
The HTTP proxy port.
-http-proxy-host my.proxy.server -http-proxy-port 3128
-dump-styled-content
Dumps the intermediate style annotated XML file next to the output. Use this for debugging purposes.
-dump-fo
Dumps the FO file before converting it to PDF.
-show-pdf
Opens the created PDF file in the default application (Windows only).
-pdf-ua
Produces output that conforms to PDF/UA-1 accessibility standards. Conversion will break if fonts are not embedded. See: Accessibility (508 Compliance).
-no-rtl-mirroring
Disables switching of left and right margins, padding and borders for right-to-left content. To make stylesheet development easier, the left margin automatically becomes the right margin when the paragraph has an RTL orientation.
-no-network
Denies access to all your network connections. If your XML document or CSS files reference remote resources, the transformation will fail.
-fonts-dir
The directory with additional fonts. The TTF files should be placed directly in it (no subdirectory).
-log4j-file
Full path to a log4j configuration file. Example of configuration file:
log4j.rootCategory=info, R

log4j.category.com.oxygenxml.chemistry.stages=info
log4j.category.org.apache.fop.fonts.autodetect.FontFileFinder=info
log4j.category.org.apache.fop.apps.FopConfParser=error

# R is the standard output
log4j.appender.R=org.apache.log4j.ConsoleAppender
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%r %p [ %t ] %c - %m%n
-enable-latin-ligatures
Used to enable ligatures between some of the characters from the Latin glyph range. The character sequences that might be combined is highly dependent on the font, but usually they are: "fi", "fl", "tt".
Warning: Take special care, the combined characters might not be searchable in PDF readers (for instance, the sequence "fi" from the word "file" can be replaced by a single character and the word will not be found when searching). Use this only when you intend to print on physical media, (such as paper). Ligatures for non-Latin scripts, (such as Arabic) are enabled by default, and do not cause search problems.
-Xmx<NNN>m
Used to specify the maximum amount of memory that is available to the Oxygen PDF Chemistry process. For example, to allow the process to use 1GB of memory:
-Xmx1024m
Note: The default is 512MB.
Note: Larger memory settings (beyond 1GB) is permitted only when the Java Virtual Machine that runs Oxygen PDF Chemistry is 64 bits and there is enough physical memory accessible to the operating system.
Note: If the JAVA_ARG_LINE environment variable is set, this parameter is ignored.