Bug 78145

Summary: Syntax Warning: Illegal/Invalid entry in bfrange block in ToUnicode CMap
Product: poppler Reporter: Paul Wise <pabs3>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jwilk
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Always use a 16-bit cmap, Fixes reading of some PDF files.

Description Paul Wise 2014-05-01 05:36:03 UTC
Converting the attached PDF to text results in thousands of warnings. The fix is relatively simple, replace 8 with 16 in the call to readToUnicodeCMap in poppler/GfxFont.cc.

$ pdftotext Image_1.PDF 2>&1 | sort | uniq -c
    150 Syntax Warning: Illegal entry in bfrange block in ToUnicode CMap
   7170 Syntax Warning: Invalid entry in bfrange block in ToUnicode CMap
Comment 1 Paul Wise 2014-05-01 05:38:03 UTC
Created attachment 98279 [details] [review]
Always use a 16-bit cmap, Fixes reading of some PDF files.

Attached the patch for this from my colleague.
Comment 2 Paul Wise 2014-05-01 05:44:05 UTC
I was unable to attach the document to this bug so I have uploaded it here:

http://people.debian.org/~pabs/tmp/Image_1.PDF
Comment 3 Albert Astals Cid 2014-05-03 22:01:40 UTC
You don't have permission to access /~pabs/tmp/Image_1.PDF on this server.

Can you fix that?
Comment 4 Paul Wise 2014-05-04 02:17:06 UTC
Woops, fixed permissions.
Comment 5 Albert Astals Cid 2014-05-04 20:21:11 UTC
Pushed, thanks.
Comment 6 Paul Wise 2014-05-05 06:26:25 UTC
For the record, it was pushed in this commit:

http://cgit.freedesktop.org/poppler/poppler/commit/?id=5b2cdef49a8a0a92fd323fbe45841a5098a42ece
Comment 7 Jason Crain 2015-03-04 08:53:48 UTC
*** Bug 48012 has been marked as a duplicate of this bug. ***

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.