We're having an issue when printing PDFs with software that uses Apache PDFBox. We opened a ticket with them and they claim that there is a problem with how WeasyPrint uses transparent backgrounds. Can this be addressed in WeasyPrint?
The PDF stuff is created by - - - Cairo :-1:
This issue is a duplicate of #238, but we may find a workaround for the particular case of empty backgrounds.
The PDF stuff is created by - - - Cairo
Well, it's probably WeasyPrint's fault here :wink:.
@Tontyna You'll be happy to know that fixing this bug is made complicated because of … a new bug in Cairo.
@thasmin This "bug" is now closed, as we don't draw empty patterns for empty page backgrounds anymore (see 17cd8e9).
It doesn't mean that this problem won't happen with other documents. The bug in Java Print Services can happen as soon as there's a transparent layout to draw. But the bug is not in WeasyPrint anymore :wink:.
@liZe thanks for the patch!
Before 17cd8e9:
11 seconds, > 1GB heapAfter 17cd8e9:
1 second, 37MB heapUpgraded to master using:
pip3 install git+git://github.com/Kozea/WeasyPrint@master
Great job finding and fixing this "bug". That was really quick. We appreciate the work.
Most helpful comment
@liZe thanks for the patch!
Before 17cd8e9:
11seconds, >1GBheapAfter 17cd8e9:
1second,37MBheapUpgraded to
masterusing: