Edit online

PDF Preview Support

Oxygen XML Web Author supports previewing Web Author content as a PDF. Users can either print the current document and a PDF preview will be generated that looks similar to the way the document is rendered in the Web Author editor. Users can also download the current document as the PDF preview. The Oxygen PDF Chemistry engine is used behind the scenes to produce the PDF preview and it is customizable using CSS.

Enabling PDF Preview Support

The Web Author PDF support can be enabled by installing the Web Author Publishing plugin that can be found in the Download > Connectors/Plugins webpage. Make sure that you read and understand the terms and conditions of its end-user license agreement. Once installed and enabled, two actions are contributed to the Web Author interface (available in the More drop-down menu):
  • Print - Generates a PDF preview from the current document and prints it. The PDF is generated using the same CSS files used by the editor.
  • Download PDF - Downloads a PDF preview version of the document based on the framework configuration:
    • By default, the editor styles are used.
    • If one or more publishing scenarios based on Oxygen PDF Chemistry are configured, they appear in a sub-menu of the Download PDF menu item.

Notes About Configuring the Plugin in the Administration Page

When configuring the plugin in the Administration Page, the PDF generation invokes an external process on the server. It includes its own configuration page where you can configure:

  • The memory allocated to a publishing process.
  • The maximum number of concurrent publishing processes.
Note: The content communicated to and from the publishing process is encrypted.

Configuring the CSS

Depending on the action (Print or Download PDF), some CSS files are used (either those configured to render the document in the editor or the ones specified in the transformation scenario).

Some hints:

  • You can use @media print {} rules to configure CSS rules that apply only for generating PDF.
  • For DITA, a file located at css/webauthor/p-dita.css is also loaded along with the editor styles.
  • You can match an element based on its pseudo-classes. For example, to match a -oxy-expanded pseudo-class, you can use the following syntax:
    @namespace oxy-pseudo "https://oxygenxml.com/ns/pseudo-elements/";
    *[oxy-pseudo|p-oxy-expanded]) {
  • You can use any CSS extension supported by the Oxygen PDF Chemistry engine.
  • The PDF generation engine will work on a resolved document. If your content uses DITA conrefs, XInclude, or another content reference mechanism, the references will be expanded before the file is sent to the CMS.
  • Links to other XML files will not work in the generated PDF. You may want to customize your CSS to handle this.
  • Fonts that cover the characters in the document have to be installed on the server that run Web Author. For example, see: Localization.