[Poppler-bugs] [Bug 44002] Rendering of the document only works for certain sizes

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Dec 25 12:35:28 PST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=44002

--- Comment #2 from Benjamin Berg <benjamin at sipsolutions.net> 2011-12-25 12:35:28 PST ---
Outch.

I found the problem (after looking through the cairo trace, stepping trough
cairo, and finally trying to reproduce the problem with a simple script ...).

So, the trouble is, that the PDF will overflow cairo's 24.8 (1 sign bit) fixed
point number representation.

It contains the following command:

0 4058686.144 2037628.645 -4058684.387 re W n

With the tranformation matrix at that point, this results in a rectangle
between the points (in px):
(-1753.3703124604863, 3439.9252751940003) (-9657653340.689249,
-3435427201.820131)

And some of these values are larger than 2^23.

I guess I should investigate how those insane numbers could creep into the PDF
(and fix the affected PDFs). A workaround in Poppler (or cairo?) might be to
clip the rather large numbers to something more sane. Which might not be easy
because of the transformation matrix.

I'll attach the test script which reproduces the error.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list