-
-
Notifications
You must be signed in to change notification settings - Fork 752
Description
Hi, I love the project!
I noticed that I get a syntax error/warning from this PDF when generated with weasyprint even though the SVG looks totally fine. Here is what the PDF looks like (I've dumbed it down).

Acrobat's preflight syntax checker gives this warning.

Invalid content stream state for operator (1 match on 1 page)
The PAC 2024 accessibility checker gives these errors.

First error:
Error while parsing the PDF Document (Operator 'gs' not allowed in this current state. See ISO 32000-2 Figure 9 for an overview of allowed operator states.)
Second error:
Operator 'gs' not allowed in this current state. See ISO 32000-2 Figure 9 for an overview of allowed operator states.
This issue matters, because one cannot get an approved accessibility report if the PDF has syntax warnings.
Here are the files that can be used for testing (using weasyprint pdf_syntax_error.html pdf_syntax_error.pdf --pdf-variant=pdf/ua-1
):
pdf_syntax_error.html
Thank you so much!