Bug 82963 - pdftocairo gets stuck on the PDF
Summary: pdftocairo gets stuck on the PDF
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-22 19:17 UTC by Alex Korobkin
Modified: 2016-07-09 10:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
cairo-bad-pdf.pdf (52.69 KB, application/pdf)
2014-08-22 19:17 UTC, Alex Korobkin
Details
cairo-bad-pdf-2.pdf (52.28 KB, application/pdf)
2014-10-15 21:48 UTC, Alex Korobkin
Details

Description Alex Korobkin 2014-08-22 19:17:06 UTC
When i convert this kind of PDFs into level 3 PostScript with pdftocairo, it gets stuck for many minutes (waited 30 min, killed it). At the same time it takes only 6 seconds for pdftops to process this file. 

Used commands: 
pdftocairo -ps -level3 ./cairo-bad-pdf.pdf out.ps
pdftops -level3 ./cairo-bad-pdf.pdf out.ps

As tested on poppler-utils 0.26.4, cairo 1.12.16.
Comment 1 Alex Korobkin 2014-08-22 19:17:26 UTC
Created attachment 105122 [details]
cairo-bad-pdf.pdf
Comment 2 Adrian Johnson 2014-10-07 10:39:36 UTC
Looks like the recording surface is stuck in a loop.
Comment 3 Alex Korobkin 2014-10-15 21:48:59 UTC
Created attachment 107901 [details]
cairo-bad-pdf-2.pdf

Similar issue with this one page PDF. It takes 2+ minutes on my workstation for pdftocairo to process this PDF, while pdftops finishes in 3 seconds.
Comment 4 Adrian Johnson 2016-07-09 10:57:26 UTC
Using the Debian Jessie versions (cairo 1.14.0/poppler 0.26.5):

$ time pdftocairo -ps -level3 cairo-bad-pdf-2.pdf out.ps

real    0m39.002s
user    0m32.084s
sys     0m6.688s

I gave up waiting for cairo-bad-pdf.pdf to finish.

Using lastest cairo git and poppler git:

$ time pdftocairo -ps -level3 cairo-bad-pdf.pdf out.ps

real    1m32.148s
user    1m22.080s
sys     0m10.096s

$ time ~/usr/bin/pdftocairo -ps -level3 cairo-bad-pdf-2.pdf out.ps

real    0m7.413s
user    0m6.436s
sys     0m0.896s

The reason cairo-bad-pdf.pdf take a long time is it contains a very large number (I lost count while reading through the pdf) of nested transparency groups.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.