Release Notes for 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.


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.



See the release history for earlier versions of Prince.