Summary: | PDF not displayed except 1st page | ||
---|---|---|---|
Product: | poppler | Reporter: | Dimitri Papadopoulos <dimitri.papadopoulos-orfanos> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | t.kuchta |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Downloaded from http://downloads.avaya.com/css/P8/documents/100095593
Call constructXRef if necessary xref can't be fetched Call constructXRef if necessary xref can't be fetched and the PDF don't use xref streams |
Description
Dimitri Papadopoulos
2015-10-17 17:04:30 UTC
Bug can be reproduced easily this way: $ pdftocairo -png /NN46240-710_01.01_Troubleshooting-VPN.pdf Syntax Error: font resource is not a dictionary Syntax Error: font resource is not a dictionary Syntax Error: XObject 'Im0' is unknown Syntax Warning: Object (1 0) is not a pageDict Syntax Warning: Failed parsing page 2 using hint tables Syntax Error: Top-level pages object is wrong type (null) Syntax Warning: Object (1 0) is not a pageDict Syntax Warning: Failed parsing page 2 using hint tables Syntax Error: Top-level pages object is wrong type (null) Syntax Warning: Object (1 0) is not a pageDict Syntax Warning: Failed parsing page 2 using hint tables Syntax Error: Top-level pages object is wrong type (null) Syntax Warning: Object (1 0) is not a pageDict Syntax Warning: Failed parsing page 2 using hint tables Syntax Error: Top-level pages object is wrong type (null) Syntax Warning: Object (1 0) is not a pageDict Syntax Warning: Failed parsing page 2 using hint tables Syntax Error: Top-level pages object is wrong type (null) libpng warning: Image width is zero in IHDR libpng warning: Image height is zero in IHDR libpng error: Invalid IHDR data Internal Error: Error during writing header Error writing NN46240-710_01.01_Troubleshooting-VPN-002.png $ *** Bug 94260 has been marked as a duplicate of this bug. *** The PDF is broken but the reconstruction algorithm of poppler is not called! Created attachment 122276 [details] [review] Call constructXRef if necessary xref can't be fetched This patch solves it That patch seems to regress the opening of file at https://bugs.freedesktop.org/attachment.cgi?id=27949 (In reply to Albert Astals Cid from comment #5) > That patch seems to regress the opening of file at > https://bugs.freedesktop.org/attachment.cgi?id=27949 Hmmh, yes, this PDF is broken: it references an AcroForm with num 1: .../AcroForm 1 0 R ... which the PDF doesn't contain. But this is not visible when rendering the PDF, so nobody complains. But we can't call the constructXRef() for this PDF, because the PDF contains an ObjStm stream, and the poppler reconstruction algorithm doesn't work for PDF which contains ObjStm streams, the objects inside these streams are missing after the reconstruction algorithm. To improve the reconstruction algorithm that it also handles ObjStm streams would be a bigger task, so I don't want to do that right now. So I decide to don't call constructXRef() in the case the PDF might contain an ObjStm stream. Since I can't detect if a PDF contains an ObjStm stream but an ObjStm stream is only possible if the PDF uses xref streams, I use this pointer. Created attachment 122325 [details] [review] Call constructXRef if necessary xref can't be fetched and the PDF don't use xref streams This patch solves it and is more careful. Fix pushed. |
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.