Bug 31627

Summary: pdftops-0.15.2 reports: Error (72): Illegal character '}'
Product: poppler Reporter: William Bader <williambader>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: hib, williambader
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Correct-parsing-of-linearization-table.patch

Description William Bader 2010-11-14 17:31:50 UTC
pdftops from poppler 0.15.2 reports an error with the test file LFW_20100401-bfrange.pdf from Bug 30521 https://bugs.freedesktop.org/show_bug.cgi?id=30521

Previous versions of pdftops do not report this error, so I think that the problem is a regression in poppler rather than a problem with the file.
For example, pdftops-0.14.4 and gs-8.71 distributed with Fedora 14 process this file without any errors or warnings.

/u/gnu/poppler-0.15.2/utils$ ./pdftops LFW_20100401-bfrange.pdf xxx
Error (72): Illegal character '}'

I added debug code to print tokens as they are read in poppler/Lexer.cc.
The debug log starts with the lines below.
It looks like the first stream isn't being read correctly.

read token 'obj'
read token 'R'
read token 'stream'
read token 'x^\�
Error (72): Illegal character '}'
read token 'xref'
read token 'f'
read token 'n'
Comment 1 Albert Astals Cid 2010-11-15 14:54:14 UTC
Hib can you have a look?
Comment 2 Hib Eris 2010-11-16 04:20:41 UTC
(In reply to comment #1)
> Hib can you have a look?

The error is harmless, but of course it is better to avoid it. I will try to come up with a patch for it soon.
Comment 3 Hib Eris 2010-11-16 05:07:05 UTC
Created attachment 40306 [details] [review]
Correct-parsing-of-linearization-table.patch

While parsing the linearization table, it seems that I was reading one object to many. I am not sure why I did that, maybe I just made a mistake. This patch removes the unnecessary read.

Albert, could you try this patch on your regression database to see if it does not cause problems on other documents?
Comment 4 William Bader 2010-11-16 06:15:22 UTC
The patch works on my test files.
Comment 5 Albert Astals Cid 2010-11-19 15:48:09 UTC
Patch 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.