Release Notes for Prince 11

Prince 11.4

June 2018

Fixed "ref_already_used" internal error, related to images in SVG patterns.

Prince 11.3.2

May 2018

Fixed a bug where Prince would crash on Windows 10 after applying Microsoft updates from April 2018.

Prince 11.3.1

October 2017

Fixed a bug where Prince would not accept gzip transfer encoding when making HTTP requests on Windows.

Prince 11.3

August 2017

Fixed issue that could cause deadlocks in some situations when running Prince under PHP 7.

Prince 11.2

July 2017

CSS Support

Fully support the opacity property in CSS.

Added new @prince-overlay @page region that covers the entire page body area for watermarks and other overlays.

SVG Support

Support SVG masks.

Support SVG clipPaths that contain multiple paths by using masks or by drawing and clipping shapes multiple times if masks are not available.

Made SVG paint server references fall back in a standard way.

Javscript Support

Support the CSSStyleDeclaration methods setProperty, setPropertyValue, removeProperty.

Added "pseudo" property to pseudo-element boxes in the box tracking API.

Support numeric indexing for string objects in JavaScript (also enables the array methods to work on strings).

Support JavaScript method Object.getOwnPropertyDescriptor.

Support JavaScript method Function.prototype.bind.

Allowed the JavaScript setTimeout() method to be called from within other timeouts, up to a notional 10 seconds delay.

Added an optional third argument to PDF.attachFile to specify the filename that should be displayed for the attachment in the PDF.

PDF Support

Support new prince-pdf-duplex / PDF.duplex property to specify the PDF viewer preference.

Added new --pdf-xmp option and prince-pdf-xmp CSS property for including XMP metadata in PDF files.

Miscellaneous

Support the OpenType "fina" feature for non-Arabic scripts (used by the Google Pacifico font).

Added --raster-background option to specify whether pages should be rasterised against a white or transparent background.

Bug Fixes and Improvements

CSS

Fixed bug where box-sizing is not taken into account when calculating the size of shrink-to-fit containers like inline-block and float boxes.

Fixed drop-shadow() filter subsurface out-of-bounds exception.

Speeded up CSS selector matching (eg. for Bootstrap).

Made minor accuracy improvements to rasterisation and filtering.

Fixed bug where justified text next to a float that fills an entire page can be rendered incorrectly.

SVG

Fixed bug where non-opaque strokes still knock out the fill on shapes that are filled and stroked.

Fixed bug affecting gradients with opacity that are entirely clipped away.

Fixed minor issues affecting SVG clip paths and transforms.

Fixed bug affecting SVG circle arc direction and dashed strokes.

Fixed issues affecting SVG gradients using object bounding box units.

Fixed issues affecting SVG patterns using object bounding box units or patternTransform.

Fixed bug with percentage lengths in SVG pattern content.

Fixed a problem with clip paths around SVG markers.

Fixed possibility of infinite regress with SVG markers.

Used correct bounding box for an SVG clip path applied to a clipPath child element.

Fixed SVG radialGradient with percentage length for radius.

Javascript

Fixed bug in JavaScript Array constructor where some numeric lengths are not processed correctly.

Miscellaneous

Fixed issue where some OpenType CFF fonts do not work correctly if they are CID-keyed fonts (often used for CJK scripts).

Fixed support for zwnj characters in Bengali and other Indic scripts.

Prince 11.1

February 2017

CSS Support

Updated Media Queries support to comply with latest CSS specification.

SVG Support

Support the SVG stop-opacity property / opacity in gradients.

Support opacity properly in SVG.

Support stroke/fill properly for text-decoration in SVG.

Javscript Support

Support the "name" property on JavaScript function objects.

Support the JavaScript Object.getOwnPropertyNames method.

Support the JavaScript Array.includes method.

Support JavaScript String.localeCompare method.

Support JavaScript console.warn() and console.info() methods.

Support JavaScript DOMImplementation.createDocument method.

Bug Fixes and Improvements

CSS

Fixed bugs affecting absolute and relative positioning in right-to-left layouts.

Improved vertical positioning of absolutely positioned boxes.

Fixed bug affecting relative positioning with percentage offsets.

Fixed table layout for percentage widths with horizontal margins.

Improved line-breaking for paragraphs containing floats.

SVG

Changed default value of SVG stroke-miterlimit to 4 not 10, and clamped small values to at least 1.

Javascript

Fixed bug affecting JavaScript regexps with case-insensitive backreferences.

Fixed bug affecting JavaScript functions with nested functions that shadow function arguments.

Fixed bugs affecting JavaScript bitwise operators.

Fixed issue where JavaScript arrays with holes shadow prototype properties.

Fixed issue where JavaScript for-in loop can show deleted properties.

Fixed bug affecting JavaScript regexps with undefined capture groups.

Fixed issue where attr() functions are serialised incorrectly when element style attributes are accessed from JavaScript.

Fixed bug where JavaScript typeof null should be "object".

Fixed bug where JavaScript strings should convert to 0 if empty or containing only whitespace.

Fixed bug affecting the JavaScript DOM splitText method.

Fixed bug where CSS angle units are serialised incorrectly in JavaScript.

Miscellaneous

Updated CA root certificates.

Updated character data tables to Unicode 9.

Fixed issue where very long PDF bookmark captions can cause crashes on Windows.

Fixed bugs affecting OpenType font shaping for complex fonts such as Amiri.

Fixed handling of Windows UNC paths in URLs.

Fixed bug affecting grayscale PNG images containing a (useless) cHRM chunk.

Avoid hyphenating before -ng at the end of an English word.

Prince 11

November 2016

Rasterisation

Support for rasterising documents directly to a PNG or JPEG image.

Filters

Support for filters in SVG and CSS.

CSS Support

Support for CSS4 Selectors.

Support for CSS4 Media Queries.

Support for CSS rem units.

Support for CSS @supports rule and @import conditions.

New CSS parser with improved conformance and helpful error messages.

Support for the new CSS attr() function syntax.

Support for CSS @charset rule for Latin1 and Windows-1252 encodings.

Support for CSS style sheets encoded in UTF-16.

SVG Support

Support for the SVG dominant-baseline property.

Support for the SVG baseline-shift property.

Support for preserveAspectRatio="defer" for nested SVG images.

Support for global defs in SVG, eg. references to elements outside of the current SVG fragment, either in the same document or other documents.

Support for internal links into and out of SVG content.

Improved support for SVG clip paths.

Fixed bug affecting viewports on nested SVG elements.

Images Support

Added new values to prince-image-magic property: jpeg-verbatim, convert-to-jpeg, and recompress-jpeg (replacing jpeg-quality).

Support for detecting intrinsic JPEG image resolution specified in Exif metadata.

ICC profiles and Exif metadata are stripped from embedded JPEG images.

16-bit images are converted to 8-bit automatically when the specified PDF profile does not support them.

PNG images are color corrected according to their gamma or chromacity chunks.

Progressive/interlaced JPEGs are automatically re-encoded as they can fail to display correctly in Acrobat.

Color Support

Added new option --convert-colors to convert all the colors and images to the specified PDF output intent ICC profile.

Added --fallback-cmyk-profile option.

Added a new property prince-pdf-color-options to control the conversion between RGB and grayscale color spaces.

Added a new property prince-pdf-page-colorspace for specifying the color space used to composite pages with transparency.

Added new CSS properties prince-fallback-cmyk-profile and prince-filter-resolution for the @prince-pdf rule.

Support for opacity with CMYK colors using optional alpha component for cmyk() color function.

Hyphenation & Line Breaking

Support for Thai line-breaking.

Support for hyphenation of words containing punctuation, like "quell'impossibilità" in Italian.

Support for the hyphenate-character property. (Prefixed as prince-hyphenate-character for now).

Support for hyphenating words within hyphenated phrases.

Avoids line-breaks after hyphens at the beginning of words, eg. "-word".

Updated hyphenation pattern dictionaries.

Integration

New --control interface to use a persistent Prince process for multiple consecutive document conversions to reduce latency and increase throughput.

Support for creating PDF files larger than 4GB (for 64-bit Prince packages).

Added new option to control SSL / TLS version for HTTPS connections.

Disabled XInclude by default (it can be enabled with the --xinclude option).

Disabled XML external entity loading (XXE) by default (it can be enabled with the --xml-external-entities or --xxe options).

Removed support for "prince input.html output.pdf" usage without -o/--output option.

PDF Features

Support for tooltip popups in generated PDF files via a new prince-tooltip CSS property that can take text from the HTML title attribute.

Support for new URL scheme for PDF actions, eg. pdf-action:GoBack.

PDF Profiles

Support for PDF/X-1a and PDF/X-3 profiles.

Support for the PDF/A-3b profile.

JavaScript Support

Fixed issue where calling console.log() from JavaScript could cause deadlocks when Prince is being run from a wrapper library.

Support for the JavaScript DOM onload/onerror events for script elements.

Support for the JSON object in the JavaScript DOM, eg. stringify() and parse().

Extended Prince JavaScript shell to provide API for document conversions.

Support for next/previousElementSibling properties on JavaScript DOM nodes.

Support for the DOM window.top, window.parent, and document.defaultView properties.

Optimised getElementsByTagName and getElementsByClassName by caching live node lists.

Changed JavaScript DOM method window.setTimeout so that the second argument is optional.

Fixed bug affecting setting individual values for the CSS clip property in JavaScript.

Fixed JavaScript DOM bug where innerHTML string included unnecessary end tags for empty elements like br and img.

Support for the JavaScript Object.getPrototypeOf method.

Fixed bug where XMLHttpRequest object wasn't an event target, causing spurious error messages.

Support for JavaScript DOM properties for URLs on anchor elements (needed for AngularJS).

Support for JavaScript accessor properties with getter/setter functions (needed for mark.js).

Support for JavaScript Array.every and Array.some methods (needed for mark.js).

Support for JavaScript DOM method Element.matches aka matchesSelector. (needed for mark.js).

Changed DOMContentLoaded event to fire on the window object as well as the document.

Support for JavaScript Array.reduce method (needed for Char.js).

Support for JavaScript DOM TypedArray.subarray method needed for Japanese line-breaking script.

Fixed bug where JavaScript expression "c = [c, c, c]" can be evaluated incorrectly as an array of arrays not array of undefined values.

Support for the JavaScript method Number.toPrecision.

Support for the JavaScript DOM signed integer typed array objects Int{8,16,32}Array.

Support for indented JSON output (via third argument of JSON.stringify DOM method).

Checks type attribute of script elements to ensure JSON is not executed.

Fixed JavaScript bug where accessing undefined global variables would not throw a reference error.

Support for the DOMImplementation.createHTMLDocument method.

Support for the HTMLDocument interface.

Support for the document.title property.

Changed the JavaScript console.log method to insert spaces between its arguments.

Support for the JavaScript DOM TypedArray.set method.

Support for the Array.of and Array.from methods in JavaScript.

Support for the Number.MIN_VALUE and MAX_VALUE constants in JavaScript.

Support for the JavaScript "debugger" statement as a no-op.

Fixed escaping of text returned from innerHTML DOM property for unescaped elements like script and style.

Bug Fixes & Improvements

Support for relative base URLs in the HTML base element.

Added Korean font names to default font style sheet.

Use the PostScript name for TrueType fonts if it is present, and add an experimental --force-identity-encoding option.

Changed handling of fonts with positive descent metrics to match the behaviour on Windows.

Changed XML processing so that XHTML, SVG, and MathML elements must be in their respective namespaces in order to be recognised.

Support for the zero-width non-joiner (zwnj) character, commonly used in Arabic text.

Added new property prince-mark-width to control crop/cross mark thickness.

Support for HTML input[type="number"] and date consistently with other form inputs.

Changed "page-break-before: left | right" to control whether the first page of the document is treated as a left or right facing page.

Optimised conversion of documents with many repeated style rules.

Changed prince-text-replace to apply before prince-linebreak-magic.

Added an auto value to the prince-pdf-page-layout property.

Added new footnote-display property for a more convenient way of specifying whether footnotes should be block or inline.

Support for new syntax for the border-radius shorthand property.

Changed default value for widows/orphans property to 1 instead of 2.

Fixed issues affecting multiple comma-separated values for the background properties.

Fixed bug where backgrounds applied to table cells could repeat on the second page even if they are specified as no-repeat.

Fixed issue where page sizes were rounded to the nearest point (1/72").

Fixed issue with :blank pages and page-break-after property.

Fixed various conformance issues affecting CSS stacking contexts for tables and transformed elements.

Fixed border-radius so that it applies correctly to boxes split across pages.

Fixed bug affecting @page:blank selector combined with page-break-before and multiple input documents.

Fixed issue affecting relative positioning on table cells.

Fixed bug where table cells with large specified height could lead to unnecessary page breaking.

Fixed bug where box-sizing: padding-box was not correct.

Fixed bug where long floating blocks could be "interleaved" across page breaks.

Fixed bug affecting page breaking on content that spans multiple columns.

Fixed absolute positioning for over-constrained situations in right-to-left contexts.

Fixed float margin resolution in right-to-left contexts.

Fixed bug affecting horizontal margins for spans and inline-block elements in right-to-left contexts.

Fixed margin calculation so that fixed-width blocks end up right aligned in right-to-left contexts.

Fixed bug where prince-shrink-to-fit could cause severe slowdown.


See the release history for earlier versions of Prince.