[Poppler-bugs] [Bug 95061] PDF hint table fails to load if PDFDoc is opened with stream start offset != 0

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 27 10:06:19 UTC 2016


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

--- Comment #5 from Ole Liabø <seksfemfire at gmail.com> ---
Here is a more comprehensive patch and a sample application. It fixes the
issues I have seen loading PDFs from a FileStream with startA != 0. Similar
problems could exists in the other stream types.


On Wed, Apr 27, 2016 at 9:44 AM, Ole Liabø <seksfemfire at gmail.com> wrote:

> 1. I would like to withdraw my original patch - it does not solve all the
> issues. Sorry for committing it prematurely. The original bug still remains
> though.
> 2. "The main stream of a PDF always starts with offset 0": This is true if
> the filename PDFDoc constructor is used. But my bug refer to when the
> PDFDoc is created with a BaseStream as input. This stream could have a
> offset != 0, fex if you have concatenated many PDFS into one file. Today
> the code does not handle this case and the use of this PDFDoc constructor
> should be avoided until it's fixed. I'm working on a more comprehensive
> patch.
>
> On Tue, Apr 26, 2016 at 12:21 PM, <bugzilla-daemon at freedesktop.org> wrote:
>
>> *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=95061#c3> on
>> bug 95061 <https://bugs.freedesktop.org/show_bug.cgi?id=95061> from Thomas
>> Freitag <Thomas.Freitag at alfa.de> *
>>
>> I'm a little bit confused about it:
>> 1. If I parse the PDF of comment 2 <https://bugs.freedesktop.org/show_bug.cgi?id=95061#c2> i.e. with /utils/pdftoppm -png -f 1 -l 1
>> -cropbox I don't get any error messages.
>> 2. The main stream of a PDF always starts with offset 0
>> 3. The PDF spec says about the H entry in the "Linearization Parameter
>> Dictionary": offset1 shall be the offset of the primary hint stream from the
>> beginning(!!!) of the file.
>> 4. All offsets in poppler, i.e. also the xref offets, are offsets from the
>> beginning of a file and never add some hypothetical offet of substreams
>>
>> ------------------------------
>> You are receiving this mail because:
>>
>>    - You reported the bug.
>>
>>
>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20160427/2c1a5e3a/attachment.html>


More information about the Poppler-bugs mailing list