pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/print/py-xhtml2pdf



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Nov 23 12:20:43 UTC 2026

Modified Files:
        pkgsrc/print/py-xhtml2pdf: Makefile PLIST distinfo

Log Message:
py-xhtml2pdf: updated to 0.2.29

0.2.29

New

Page-margin boxes: @page { @top-center { content: ... } } and the
other fifteen boxes of CSS Paged Media write headers and footers in the
page's margin, with counter(page), counter(pages) in any counter
style, and their own font, colour, alignment, background, border, padding
and opacity -- no static @frame or <pdf:pagenumber> needed.
@page :first builds on its @page and is used for the first page,
so @page :first { @top-center { content: none } } leaves the cover
without a header.
string-set and string(): h1 { string-set: chapter content() }
with @top-left { content: string(chapter) } is a running header, with
the first, start, last and first-except choices.
text-decoration: overline, alone or with underline and
line-through.
border-style: groove, ridge, inset and outset are drawn in
two shades of the border colour, as Chrome draws them, on blocks,
paragraphs, tables and table cells. They used to come out solid.
opacity. A block, a table, a flex container or item, an
inline-block, a positioned box or an image is painted with what is in it
as one PDF transparency group, so overlapping parts do not show through
each other, and links inside keep working. An inline element fades its
text, background and images.
list-style-type: circle draws a hollow ring, the default of a list
inside a list. It used to draw the same filled bullet as disc.

Improvements

Text sits in its line as a browser puts it: the leading is shared above
and below the text, as CSS does, rather than left below it. A paragraph
takes the same height as before, and its text is drawn lower inside it,
by about 0.29 em at the default line-height: 150% -- 2.2 pt at 7.5 pt.
Compared with Chrome on the 105 fixtures of make test-browser, 66 come
closer and the average SSIM goes from 0.900 to 0.907. A document laid out
to the point over a background or a form should be checked.
line-height is inherited as CSS says. A percentage or an em
length is worked out on the element that declares it and its descendants
take that length, so body { line-height: 150% } gives a heading the
body's leading, as a browser does, rather than 150% of the heading's own
size; a number such as 1.5 still follows each element's size. The
default is now the number 1.5, which lays out exactly as the
150% it replaces did.
A list (ul, ol, dl) has an em of space above and below it, as
in a browser, and a list inside a list has none; the last item's bottom
margin collapses into the list's. Lists used to have no vertical margin.
ul, ol, dl { margin-top: 0; margin-bottom: 0 } keeps the old spacing.

Bug-Fixes

An @page bleed that is not a length, such as bleed: wide, is
reported once as the page's bleed, where getSize used to report "Not a
float" in its own words and the bleed's warning only came for a negative
value.
A table row too tall for any page that a rowspan crosses no longer
stops the conversion with LayoutError: ... too large on page. Such a
row cannot be cut, nor can the table between the rows the span joins, so
those rows are shrunk to fit the page, with a warning naming them; the
rest of the table goes on as before.
A box whose content fits at the foot of a page, with no room for the
bottom padding under it, no longer leaves a slice of empty box -- its
padding, background and border -- at the top of the next page. The cut is
made where the bottom fits too, so the last line goes on with it, or the
box goes on whole, as in a browser.
A forced page break no longer leaves an empty page:
page-break-before: always on the first element used to make page one
blank, and page-break-after on one block with page-break-before on
the next made an empty page between them. A break where nothing is on the
page yet does nothing, as in a browser; <pdf:nextpage/> still always
starts a page, and left/right still add the page their parity
needs.
A long table inside a block with a background, padding or border runs on
across pages again, rather than being shrunk to one page or raising
LayoutError: Splitting error (:issue:854).
A table in a flex item lays its columns out by their content, as a
browser does, instead of in equal shares of the item. The equal shares
were narrower than a column's content, so a long table's cells wrapped
once its numbers grew, and each page held fewer rows than the last.
An lta signature without validation_context.trust_roots is
refused with a ValueError, where pyHanko quietly fell back to the
operating system's trust list, which it deprecates. extra_trust_roots
is added to trust_roots instead of being passed on as the deprecated
key.
line-height: 2 and the other whole numbers from 1 to 7 multiply the
font size; they were read as the sizes of HTML's <font size>, so
line-height: 2 gave 0.75em.
HttpConfig(timeout=30) keeps the timeout it is given; the default of
5 seconds only fills in a missing one.

Cleanup

The signing tests are skipped when pyHanko is not installed, so a plain
pytest run, as Debian's autopkgtest does, no longer stops at
collection.
The test workflow runs on Ubuntu 26.04: testrender reads ImageMagick
7's compare output, and the 3.13 and 3.14 jobs install libxml2-dev
(:pr:856).
Tests for HttpConfig (:pr:855).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/print/py-xhtml2pdf/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/print/py-xhtml2pdf/PLIST
cvs rdiff -u -r1.7 -r1.8 pkgsrc/print/py-xhtml2pdf/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/print/py-xhtml2pdf/Makefile
diff -u pkgsrc/print/py-xhtml2pdf/Makefile:1.12 pkgsrc/print/py-xhtml2pdf/Makefile:1.13
--- pkgsrc/print/py-xhtml2pdf/Makefile:1.12     Mon Oct 26 08:15:02 2026
+++ pkgsrc/print/py-xhtml2pdf/Makefile  Mon Nov 23 12:20:43 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2026/10/26 08:15:02 adam Exp $
+# $NetBSD: Makefile,v 1.13 2026/11/23 12:20:43 adam Exp $
 
-DISTNAME=      xhtml2pdf-0.2.28
+DISTNAME=      xhtml2pdf-0.2.29
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    print python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=x/xhtml2pdf/}

Index: pkgsrc/print/py-xhtml2pdf/PLIST
diff -u pkgsrc/print/py-xhtml2pdf/PLIST:1.5 pkgsrc/print/py-xhtml2pdf/PLIST:1.6
--- pkgsrc/print/py-xhtml2pdf/PLIST:1.5 Mon Oct 26 08:15:02 2026
+++ pkgsrc/print/py-xhtml2pdf/PLIST     Mon Nov 23 12:20:43 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2026/10/26 08:15:02 adam Exp $
+@comment $NetBSD: PLIST,v 1.6 2026/11/23 12:20:43 adam Exp $
 bin/pisa-${PYVERSSUFFIX}
 bin/xhtml2pdf-${PYVERSSUFFIX}
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
@@ -34,6 +34,12 @@ ${PYSITELIB}/xhtml2pdf/builders/flex_lay
 ${PYSITELIB}/xhtml2pdf/builders/inserts.py
 ${PYSITELIB}/xhtml2pdf/builders/inserts.pyc
 ${PYSITELIB}/xhtml2pdf/builders/inserts.pyo
+${PYSITELIB}/xhtml2pdf/builders/margin_boxes.py
+${PYSITELIB}/xhtml2pdf/builders/margin_boxes.pyc
+${PYSITELIB}/xhtml2pdf/builders/margin_boxes.pyo
+${PYSITELIB}/xhtml2pdf/builders/opacity.py
+${PYSITELIB}/xhtml2pdf/builders/opacity.pyc
+${PYSITELIB}/xhtml2pdf/builders/opacity.pyo
 ${PYSITELIB}/xhtml2pdf/builders/pdfx.py
 ${PYSITELIB}/xhtml2pdf/builders/pdfx.pyc
 ${PYSITELIB}/xhtml2pdf/builders/pdfx.pyo
@@ -49,6 +55,9 @@ ${PYSITELIB}/xhtml2pdf/builders/printmar
 ${PYSITELIB}/xhtml2pdf/builders/signs.py
 ${PYSITELIB}/xhtml2pdf/builders/signs.pyc
 ${PYSITELIB}/xhtml2pdf/builders/signs.pyo
+${PYSITELIB}/xhtml2pdf/builders/strings.py
+${PYSITELIB}/xhtml2pdf/builders/strings.pyc
+${PYSITELIB}/xhtml2pdf/builders/strings.pyo
 ${PYSITELIB}/xhtml2pdf/builders/watermarks.py
 ${PYSITELIB}/xhtml2pdf/builders/watermarks.pyc
 ${PYSITELIB}/xhtml2pdf/builders/watermarks.pyo

Index: pkgsrc/print/py-xhtml2pdf/distinfo
diff -u pkgsrc/print/py-xhtml2pdf/distinfo:1.7 pkgsrc/print/py-xhtml2pdf/distinfo:1.8
--- pkgsrc/print/py-xhtml2pdf/distinfo:1.7      Mon Oct 26 08:15:02 2026
+++ pkgsrc/print/py-xhtml2pdf/distinfo  Mon Nov 23 12:20:43 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.7 2026/10/26 08:15:02 adam Exp $
+$NetBSD: distinfo,v 1.8 2026/11/23 12:20:43 adam Exp $
 
-BLAKE2s (xhtml2pdf-0.2.28.tar.gz) = 4d4a6b7f20bbbafd4d06ea4118b688be02d82fb60913514f5bfe0ab3b084dbe3
-SHA512 (xhtml2pdf-0.2.28.tar.gz) = 9b252f618210569785e2d77809b0135f0bc95b8969eecc92406c7326f141cba9c1c38220a71abbc37032f2be0e0fe579be3de3a25aebe6f22c75744828051f5f
-Size (xhtml2pdf-0.2.28.tar.gz) = 516835 bytes
+BLAKE2s (xhtml2pdf-0.2.29.tar.gz) = b8edd7b444aeab34b0433e2dac54816fd3595d4fcdddab0b40775370324263dd
+SHA512 (xhtml2pdf-0.2.29.tar.gz) = adff63b918da6014dab3ded43a7bc30d66a457dd885c99816c18141ba7af3269aa48eda7db0766a9ba4721a6f2deaa2bce88260a2d63e5b57724a16501ddc55d
+Size (xhtml2pdf-0.2.29.tar.gz) = 541700 bytes



Home | Main Index | Thread Index | Old Index