Edit online

You can process an XML or HTML document from a command-line interface like this:

chemistry -in my_file.xml -out my_file.pdf
chemistry -in my_file.html -out my_file.pdf

You can specify one or more CSS files to be used. If the document is an HTML document, it may include references to other stylesheets or styles could be embedded using the style element. 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 or HTML file in URI or File syntax.
-in http://my.example.com/my_file.html
-in C:\my.folder\my_file.xml
-out
The output PDF file in File syntax.
-out C:\publishing\my_file.pdf

Optional Parameters

-catalog-prefer
Catalog preference mode. Possible values are: 'system' or 'public'. Default is 'public'.
-catalogs
The path to one or more XML catalogs, in URI or File syntax. You can separate the paths by using the ";" (semi-colon) character. You can use a catalog to solve DTD or Schema references to local files. If the list of catalog files is big, you may run into command-line size limitations. In this case, consider passing it as the XML_CATALOG_FILES environment variable.
-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).
-disable-xinclude
A security setting that disables XML inclusions (XInclude). This is recommended when using Chemistry in a Web context. In addition, you should use a Java Security Manager to control the exact permissions granted to the processor.
-disable-xxe
A security setting that disables XML external entities. This is recommended when using Chemistry in a Web context. In addition, you should use a Java Security Manager to control the exact permissions granted to the processor.
-dump-fo
Dumps the FO file (before converting it to PDF) in the same location as the output file. This can be used for debugging purposes.
-dump-styled-content
Dumps the intermediate, annotated XML file in the same location as the output file. This can be used for debugging purposes.
-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: 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.
-fonts-dir
The directory with additional fonts. The TTF files should be placed directly in it (no subdirectory).
-generate-named-destinations
Controls whether or not the id attributes from the input document are used to generate PDF named destinations (anchors). Accepted values are yes (default) or no. For more informations, see Named Destinations (Anchors).
-help
Prints the usage information.
-http-proxy-host
The HTTP proxy host.
-http-proxy-port
The HTTP proxy port.
-http-proxy-host my.proxy.server -http-proxy-port 3128
-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
-licensekey-dir
Specifies the directory where the license key file is located. The license key file should have the name licensekey.txt.
-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
-no-aggressive-hyphenation
Oxygen PDF Chemistry normally uses an aggressive technique to create hyphenation points at underscores, dots, and case changes. To disable this functionality, use this -no-aggressive-hyphenation parameter.
-no-network
Denies access to all your network connections. If your XML document or CSS files reference remote resources, the transformation will fail.
-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.
-pdf-ua
Produces output that conforms to PDF/UA-1 accessibility standards. Conversion will break if fonts are not embedded. See: Accessibility (508 Compliance).
-show.changes.and.comments.as.pdf.sticky.notes
When set to yes (default), the review elements are shown as PDF annotations. When set to no, the review elements are left in the document object model and can be styled using CSS rules.
-show-pdf
Opens the created PDF file in the default application (Windows only).
-v
Shows the version of the processor.
-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) are 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.