Using Prince XML to Publish to PDF

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

In this tutorial, you'll learn how to work with Prince XML to target the PDF format for printing. Prince is a computer program that converts XML and HTML into PDF documents. Prince can read many XML formats, including XHTML and SVG. Prince formats documents according to style sheets written in CSS.

Tip

You can download Prince XML and use it (non commercially) for FREE. From their download page:

The best way to learn what Prince can do for you is to take a trial run. Prince is available for several platforms and is easy to download and install. The demonstration version of Prince is fully functional, but adds an annotation to the corner of the first page of generated PDF files. This version can be used free for non-commercial use, as per the license.

Preparing your collection to publish to PDF

The Prince XML publishing tab holds all the settings you need to seup Prince. Follow these steps to get to the Prince publishing tab.

  1. Make sure Prince XML is installed on your compupter (see Tip above);
  2. Restart Tópico if you just installed Price;
  3. Select the Publishing tab at the top of the editor area;
  4. Select the Prince XML publishing sub tab.

You're now ready to try Prince XML

The Prince XML publishing tab

If Prince XML is found on your computer, typically in c:\program files\prince\engine\bin\prince.exe, the following sub-tab will appear on the main Publishing tab.

INSERT PRINCE TAB SCREEN CAPTURE

Let's take a closer look at the above options.

  • The stylesheet
    The stylesheet on this tab is added to the Prince XML command line during the publishing process. You can leave this field empty if the stylesheet referenced in the template contains all the required Prince styles.
  • The file root
    The file root field is the root of the target PDF file name. "my_collection" would create "my_collection.pdf", independently of the other file root ( the HTML Help one)
  • The template
    The template file is used to transform the source XHTML files to HTML before processing with Prince XML. This file can be different from the one used for the normal HTML output.
  • Publish with Prince XML button
    The Publish with Prince XML button starts the publishing process immediately.

Editing the template

THIS TOPIC IS A WORK IN PROGRESS

Editing the stylesheet

THIS TOPIC IS A WORK IN PROGRESS

Print specific CSS features

THIS TOPIC IS A WORK IN PROGRESS

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

71 / 194