Summary: | Illegal entry in bfrange block in ToUnicode CMap | ||
---|---|---|---|
Product: | poppler | Reporter: | William Bader <williambader> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | williambader |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | proposed patch |
Can you share a pdf that exhibits this problem? I have temporarily copied the files to my web site. They are over 8 MB so I couldn't attach them when I reported the problem. Original file that does not get the error. http://williambader.com/LFW_20100401-orig.pdf Generated file that gets the error. http://williambader.com/LFW_20100401-bfrange.pdf Another file that got the error in previous versions of poppler. http://williambader.com/1288986-ps2pdf-popplerbug.pdf Hmmm, i'm running ./utils/pdftops ~/okularfiles/pdf/LFW_20100401-bfrange.pdf and don't get any warning, are you sure that is the one that gives warnings? Yes, that is the file. I just checked with poppler-0.12.4. /u/gnu/poppler-0.12.4/utils$ ./pdftops LFW_20100401-bfrange.pdf xxx 2>&1 | sort | uniq -c 14718 Error: Illegal entry in bfrange block in ToUnicode CMap I recently updated my system to Fedora 14, and the distributed pdftops does not show the problem, so maybe it has been fixed by another change. Poppler 0.12.4 is a bit old, can you test with 0.14.5 or 0.15.2 if possible I tried with 0.15.2. I didn't get the bfrange errors but I got one warning about an illegal character. Both the pdftops 0.14.4 distributed with Fedora 14 and my old patched pdftops 0.15.0 do not report any errors or warnings with this file. /u/gnu/poppler-0.15.2/utils$ ./pdftops LFW_20100401-bfrange.pdf xxx Error (72): Illegal character '}' That's not the problem you reported in this bug, if you are sure that is a bug, please open a new bug report. |
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.
Created attachment 39087 [details] proposed patch pdftops (as copied from git on 30 Sep 2010) gets "Illegal entry in bfrange block in ToUnicode CMap" on what I think is a valid file. I had a PDF file and compressed it with ps2pdf from ghostscript 9.00. When I run the resulting PDF through poppler's pdftops, I get the errors. I have attached patches that show more information and that stop the message. The messages (before the change to fix them) look like the example below. Error: Illegal entry in bfrange block in ToUnicode CMap, nBits 16 nDigits 4, found '<45>' '<46>' The PDF has a 16 bit table, but the values have only two hex digits, and poppler isn't parsing it correctly. In poppler-30sep10/poppler/CharCodeToUnicode.cc, I made the change if (!(((n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>') || + (nDigits > 2 && n1 == 2 + 2 && tok1[0] == '<' && tok1[2 + 2 - 1] == '>') || (n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')) && ((n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>') || + (nDigits > 2 && n2 == 2 + 2 && tok2[0] == '<' && tok2[2 + 2 - 1] == '>') || (n2 == 4 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')))) { - error(-1, "Illegal entry in bfrange block in ToUnicode CMap"); + error(-1, "Illegal entry in bfrange block in ToUnicode CMap, nBits %d nDigits %d, found '%.*s' '%.*s'", nBits, nDigits, n1, tok1, n2, tok2); continue; }