PD4ML v4.1.2 is out. It inherits all bug fixes and improvements of PD4ML v4.0.24, and on top of them brings the following changes.

Flexbox

  • The order property is supported.
  • flex-basis: 0% is resolved as in browsers, and percentage widths of flex items use the right base.
  • align-self: stretch, row height shrinking and height: 0 on flex items are applied.
  • Margins of flex items, including negative margins next to floats, are laid out as in browsers.

Metadata

  • New method PD4ML.addMetadata(namespaceURI, prefix, key, value): custom XMP metadata properties in a namespace of your own, for example the W3C TDM Reservation Protocol properties tdm:reservation and tdm:policy. In PDF/A output the namespace is declared in a PDF/A extension schema.
  • XMP metadata values containing &, < or > (title, author, keywords, custom properties) no longer get a stray \u before the character.

Other changes

  • AES encryption no longer needs commons-logging on the classpath (it failed with NoClassDefFoundError: org/apache/commons/logging/LogFactory). The MathML plugin (JEuclid) still needs it; this is now documented.
  • Font fallback: a font declared with @font-face under its own name (e.g. “Haradh Variable”) is used for text no other font can display, instead of showing ? glyphs.
  • The published jar keeps the names of public API that callers reference: enum constants of the com.pd4ml.pdf.* packages (e.g. PdfEncryptor.Algorithm.AES_256, SigningOptions.CertificationLevel.NO_CHANGES_ALLOWED) and the nested types of Constants (e.g. Constants.ErrorPolicy).