The first development snapshot of PD4ML v4.2.0 is available. Its main addition is a second HTML/CSS layout engine, v42, which works alongside the existing v40 engine and is the basis for most of the new features. v40 stays the default, so applications that don’t opt in keep their current output.
What’s in the snapshot
- The v42 layout engine: a tolerant HTML5 parser, Flexbox, CSS Grid, multi-column layout continued across pages, vertical writing modes and media queries level 4. Its layout is checked against Chrome’s print output. Select it with
useHtmlRenderer(Constants.LayoutEngine.v42)beforereadHTML(). - CSS
@pagerules: page size and margins, first, left, right and blank pages, named pages, and the 16 page-margin boxes with page counters (v42). - The same output on every machine: v42 uses only the configured font set,
@font-facerules and the fonts bundled with PD4ML, never the fonts installed on the host. - A DOM API: read and change the parsed document between
readHTML()and the output: query it with CSS selectors, edit text, attributes and styles, and find out where each element is laid out (DMS and UA editions, v42). - Word output from the same layout: with v42, DOCX and RTF follow the layout of the PDF, and with the UA edition the Word documents are accessible too.
- Both engines: CSS gradients, color emoji,
.emland.mhtinput, smaller PDF files by default, watermarks in DOCX and RTF, and restricted resource loading for untrusted HTML.
The full list, with links to the manual sections and usage examples, is on the documentation page What Is New in PD4ML v4.2.0.
Getting it
Download the latest build from the Downloads page, or use 4.2.0-SNAPSHOT from the PD4ML Maven repository (see Using PD4ML with Apache Maven).
This is a development snapshot: features and details can still change before the release, and it hasn’t been tested to release level, so try it before you deploy. We’d like to hear how your documents come out with the v42 engine. Please report problems and differences from the browser on the support forum.
