User Guide
Prince is a powerful converter from Web Standards to PDF: HTML/Markdown and XML, styled with CSS, are seamlessly transformed into documents you can print, download and archive.
Prince supports all the main Web Standards:
- HTML/Markdown, XHTML, XML, SVG
- Cascading Style Sheets (CSS)
- JavaScript / ECMAScript
- JPEG, PNG, GIF, TIFF, WebP, AVIF
Server-side integration can easily be achieved with the most popular programming languages, and several solutions for deployment in cloud computing are available.
A special venture, currently implemented as a parallel project, is Prince for Books, which offers features most requested by the publishing trade.
Styling
When preparing a document with HTML/Markdown and CSS, you need to first create the content - but then you need to style it to make it visually appealing. You can choose which fonts to use, how to format your text and your paragraphs, choose the layout for your page, give your text, background and style some color, insert images - and much more!
Paged Media
Prince produces PDFs - which are a prominent example of paged media. There are a few points that are crucial to keep in mind when preparing a document for paged media, specially if intended for print:
Generated Content
Generated content is text and other content that is not found in the original input document, but is added to the output from a style sheet using the CSS content property. Useful applications of this property include Page regions, List markers or Footnotes.
Scripting
JavaScript can be used to transform documents by generating tables of contents and indices, sorting tables, rendering charts and graphs, and other tasks that go beyond the scope of CSS.
Graphics
Prince supports a wide range of graphic features, treated in more detail in the following sections. RGB(A), CMYK, HSL(A), HWB, and named spot colors are supported, and so is color management. Bitmap images and SVG are supported.
Prince Tips and Tricks
โฆaka the Prince Cookbook, collects recipes to achieve certain common or complex tasks useful when preparing a document for printing. Each recipe shows the required features in a "You need" ingredients list and provides a step-by-step explanation to guide you to the required goal.
Help
The Prince User Guide tries to be exhaustive in explaining how to use the application and its features. However, there might always be something not answered in the documentation, or something not working as expected. There are a couple of ways to get help to solve the problems:
Prince Input
Prince takes HTML/Markdown or XML files as input, and converts them to PDF files. Additionally, CSS style sheets can be provided for styling the documents, and JavaScript files can be used for additional manipulation of the input.
Prince Output
Prince produces PDF files that are compatible with Adobe Acrobat and other PDF viewers. The output can be controlled in several different ways, addressing different aspects of the resulting files.
Prince Networking
Prince can process local files or fetch them from remote locations. To do this, a full URL needs to be provided, including the protocol.
Server Integration
Prince can be used server-side to produce PDFs, invoked by a wrapper script. Some care needs to be used in the configuration to make it reliable and secure.
Prince for Books
Prince for Books is a project that allows us to spend more time on features particularly sought by publishers.