If a PDF has highlights, Poppler conversion result SVG shows as blank in browsers or freezes them
Steps to reproduce:
-
Open a regular PDF, such as example.pdf, in Adobe Reader, add 20 highlight annotations, save as PDF: example.20-highlights.pdf
-
Using Poppler 24.03 (depends on Cairo 1.18.0), convert first page to SVG: example.20-highlights.pdf.p2403.svg
pdftocairo -f 1 -l 1 -svg ./example.20-highlights.pdf ./example.20-highlights.pdf.p2403.svg
-
Open in Firefox v125.0.1
- Expected: SVG opens and displays similarly to PDF
- Actual: the tab is blank and uses some 4.7 GB of RAM
-
Open in Chrome 123.0.6312.123. Results may depend on the system:
- Actual: the SVG takes seconds to paint or zoom, OR displays as blank
The issue did not seem to exist prior to version 1.17.6 of Cairo.