Bug 25465

Summary: writing literal null's sometimes produces invalid pdf
Product: poppler Reporter: Axel Struebing <axel.struebing>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch for PDFDoc.cc

Description Axel Struebing 2009-12-05 12:37:42 UTC
Created attachment 31769 [details] [review]
patch for PDFDoc.cc

Write support has a minor problem regarding literal 'null' in written pdf.

If somebody calls saveAs(outputName, writeForceRewrite) on a PDFdoc some invalid values could be written.

In an example pdf there were 
'/Dest[26 0 R/XYZ null 676 null]'

After only opening and saving using the writeForceRewrite flag the result looked like this:

'/Dest[26 0 R/XYZ null676 null]'

and okular and xpdf-based viewers issued warnings.

Unfortunately I am not allowed to post the originating pdf.

I have attached a patch vs. poppler-0.12.2, which solved the problem for my case.
Comment 1 Albert Astals Cid 2009-12-05 14:32:56 UTC
Patch applied, thanks for the heads up.
Comment 2 Axel Struebing 2009-12-07 11:47:07 UTC
that was fast work.

So this can be closed.

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.