pypi xhtml2pdf 0.2.28
v.0.2.28

4 hours ago

🎉 New

  • Output for print shops: @page { bleed: 3mm; marks: crop cross } grows
    the page around its trim size, with a TrimBox and a BleedBox,
    backgrounds that reach into the bleed and crop and registration marks
    outside it.
  • device-cmyk() and cmyk() colours in CSS, written to the PDF in
    DeviceCMYK.
  • PDF/X-4: pdfx={"profile": ..., "condition": ...}, or
    --pdfx-profile on the command line, adds the output intent, XMP
    metadata and page boxes PDF/X asks for, tags RGB as sRGB and draws neutral
    greys on the black plate.
  • A document with bleed, marks or PDF/X logs the images drawn under 300 ppi
    and the text set in fonts that are not embedded.
  • @font-face takes OpenType fonts with PostScript (CFF) outlines, and
    WOFF and WOFF2 web fonts, converted to TrueType with fontTools: the new
    fonts extra, pip install 'xhtml2pdf[fonts]'. The first source of
    a src list that loads is used; the rest are fallbacks.

🐛 Bug-Fixes

  • Text in the MSung-Light face (traditional Chinese) is written with the
    CMap of its own character collection, UniCNS-UCS2-H. Viewers that
    check the pair, such as Poppler, showed none of it.
  • A colour function in the background shorthand is read as the
    background colour, also when an argument has a decimal point:
    background: rgb(10.5, 0, 0) was taken for an image.
  • A Type 1 face named in @font-face by its .pfb file is embedded,
    with the .afm beside it, as one named by its .afm already was.
  • An SVG list-style-image is drawn as vectors. It was rasterised with
    renderPM, and failed the document when its backend was not installed.

📘 Documentation

  • A guide to printing: :doc:guide/printing.

Don't miss a new xhtml2pdf release

NewReleases is sending notifications on new releases.