Bug 25465 - writing literal null's sometimes produces invalid pdf
Summary: writing literal null's sometimes produces invalid pdf
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-05 12:37 UTC by Axel Struebing
Modified: 2009-12-07 11:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch for PDFDoc.cc (250 bytes, patch)
2009-12-05 12:37 UTC, Axel Struebing
Details | Splinter Review

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.