Introduction

This tutorial shows how to generate PDF documents from XML/HTML
using the "CSS Paged Media" approach, whereby the complete styling
and layout information is kept in cascading stylesheets (CSS).
It will also show the results produced by different tools with identical
data, providing an impression of functionality and output quality.

What is CSS Paged Media

In brief: CSS Paged Media (a W3C standard) is a way of generating
PDF documents using XML/HTML as input and CSS for styling. It can be thought of as
an extension of CSS for print purposes. As such, it is obvious that CSS Paged Media
must deal with print-related considerations such as pagination, page formats, page regions
and other print-specific details.

Usecases for CSS Paged Media

Status of this tutorial

This tutorial is work-in-progress and is based on the "CSS Paged Media"
workshop given for the first time at the XML London 2015 conference.
The tutorial is subdivided into the various aspects of CSS Paged Media, with most parts
containing a sample index.html with appropriate example data for the purpose
of a particular lesson and a styles.css file containing the specific
print styles. The styles are kept as simple as possible in order to demonstrate
functionality. Sophisticated layout options have been omitted for the sake of simplicity.

Version

V 2.0 - 01.02.2018

Tools

There are various CSS Paged Media converters on the market. However, we will focus on
tools that are widely used and that provide reasonable quality for
professional use. Another (personal) requirement is that tools should
work cross-platform, on multiple operating systems (Mac OSX, Linux, Windows).
The tests do not include tools that only work on a single operating system or
platform.

This tutorial covers and compares the following three tools:

PDFreactor 10.0.10722.2

PrinceXML 12.4

Antennahouse 6.6 MR2

This tutorial does not cover installation issues. For this, please refer to
the vendor documentation. All tools are available for free for the purpose
of evaluation. Depending on the converter, the resulting PDF documents may
contain a watermark or a vendor-specific message or icon.