Bug 51270

Summary: [PATCH] PDFOutline: 'endobj' should be preceded by an EOL
Product: Fop - Now in Jira Reporter: Matthias Bauer <matthias.bauer.drs>
Component: pdfAssignee: fop-dev
Status: RESOLVED FIXED    
Severity: normal CC: Oliver.Moehrke
Priority: P2    
Version: all   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: patch

Description Matthias Bauer 2011-05-26 13:09:46 UTC
Created attachment 27071 [details]
patch

org.apache.fop.pdf.PDFOutline.toPDF() outputs ">> endobj\n". 

According to PDF/A spec (or at least according to the validators I've used) there has to be a "\n" in front of the endobj tag. (And at every other position in the code we're already outputting a "\n".)

The patch changes the output to ">>\nendobj\n".
Comment 1 Andreas L. Delmelle 2011-05-31 18:08:08 UTC
*** Bug 51301 has been marked as a duplicate of this bug. ***
Comment 2 Oliver Moehrke 2011-05-31 18:29:08 UTC
I applied the patch to the v1.0 source-tree and it solves the compatibility issue with Intarsys PDF/A Live! validator.

Thank you.
Comment 3 Andreas L. Delmelle 2011-05-31 18:34:59 UTC
Thanks for reporting, and the patch!
I currently have some conflicting changes to the same classes to work out, and I'll gladly incorporate this one. 
However, instead of fixing this in one spot --the only place where it happens to be wrong-- I will, at the same time, look at the other 12 occurrences of ">>\nendobj\n" and extract those into a single method of PDFObject. At least, that will prevent it from ever reoccurring (assuming that all good devs will copy the existing pattern, that is)
Comment 4 Glenn Adams 2012-04-07 01:42:53 UTC
resetting P2 open bugs to P3 pending further review
Comment 5 Glenn Adams 2012-04-08 09:10:58 UTC
increase priority due to presence of a patch
Comment 6 Glenn Adams 2012-04-08 20:36:27 UTC
the proposed change was commit on 2012-03-21 in r1303431