Bug 97183 - Cannot render a particular PDF document
Summary: Cannot render a particular PDF document
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-02 09:57 UTC by Francesco Turco
Modified: 2018-08-21 10:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
debug info for pdftocairo (20.34 KB, text/plain)
2016-08-02 09:58 UTC, Francesco Turco
Details

Description Francesco Turco 2016-08-02 09:57:17 UTC
I'm running poppler-0.42.0-1 and evince-3.20.1-1 on a Parabola GNU/Linux-libre system.

I found a PDF document that poppler/evince can't render correctly. Some text can't be read and embedded images aren't shown. The PDF document can be retrieved here: https://www.fturco.net/linux.pdf

I also tried to open this PDF with other programs (Mupdf and PDF.js) and they were able to display it correctly. So such PDF is not corrupt as far as I know.

$ pdftocairo -png linux.pdf -singlefile
Syntax Error: Failed to decode jp2 structure<0a>
Syntax Warning: Did not succeed opening JPX Stream as JP2, trying as J2K.
Syntax Error: 00000000: expected a marker instead of 0<0a>
Syntax Warning: Did not succeed opening JPX Stream as J2K, trying as JPT.
Syntax Error: Forbidden value encounter in message header !!<0a>
Syntax Error: [JPT-stream] : Expecting Main header first [class_Id 0] !<0a>
Syntax Error: Did not succeed opening JPX Stream.

You can download the PNG image here: https://www.fturco.net/linux.png

Please also see: https://bugzilla.gnome.org/show_bug.cgi?id=769380
Comment 1 Francesco Turco 2016-08-02 09:58:23 UTC
Created attachment 125479 [details]
debug info for pdftocairo

Command output for:

LD_DEBUG=libs pdftocairo -png linux.pdf -singlefile > pdftocairo.log 2>&1
Comment 2 Francesco Turco 2016-08-02 10:19:25 UTC
I tried rebuilding poppler-0.42.0 with the following options:

1) --enable-libopenjpeg=openjpeg1: pdftocairo produces warnings and a broken PNG file 
2) --enable-libopenjpeg=openjpeg2: pdftocairo produces a good PNG file with no warnings at all
3) --enable-libopenjpeg=auto: it selects version 1; pdftocairo produces warnings and a broken PNG file
Comment 3 Albert Astals Cid 2016-08-02 21:21:39 UTC
So use openjpeg2 ?
Comment 4 Francesco Turco 2016-08-03 08:12:14 UTC
The problem could afflict other users besides me, so I guess that configure option should be used by Arch/Parabola by default. So I filed the following bug: https://bugs.archlinux.org/task/50237
Comment 5 Andreas Radke 2016-08-03 14:53:00 UTC
Arch usually won't switch to use openjpeg2 until upstream recommends it as the preferred/recommended and better tested library. I see Fedora and Debian using openjpeg2 in their latest branches.

Is openjpeg2 now recommended by the poppler devs? Some answer to the question on the mailing list would be nice:

https://lists.freedesktop.org/archives/poppler/2016-July/011899.html


If this is a bug in libopenjpeg(1) I doubt it will ever get fixed.
Comment 6 Francesco Turco 2016-08-05 20:08:45 UTC
The Arch Linux bug has now been marked as fixed.
Comment 7 Albert Astals Cid 2016-08-16 21:09:19 UTC
(In reply to a.radke from comment #5)
> Arch usually won't switch to use openjpeg2 until upstream recommends it as
> the preferred/recommended and better tested library. I see Fedora and Debian
> using openjpeg2 in their latest branches.
> 
> Is openjpeg2 now recommended by the poppler devs? Some answer to the
> question on the mailing list would be nice:
> 
> https://lists.freedesktop.org/archives/poppler/2016-July/011899.html

Yes, agreed, it would be nice if somebody answered my emails
Comment 8 GitLab Migration User 2018-08-21 10:45:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/359.


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.