Bug 54024

Summary: [PATCH] Acrobat throws an error when deleting a page of a large FOP generated PDF
Product: Fop - Now in Jira Reporter: Luis Bernardo <lmpmbernardo>
Component: pdfAssignee: fop-dev
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: trunk   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: patch
example source and output

Description Luis Bernardo 2012-10-17 23:13:59 UTC
This issue was noticed in Acrobat 9 and 10. When deleting a page from a large document (200+ pages) Acrobat throws an error (a non descriptive error...). The problem is due to the way FOP generates /PageLabels, which although correct is not according to the spirit of the spec. The patch addresses the issue by generating the /PageLabels dictionary in a more Acrobat friendly way.
Comment 1 Luis Bernardo 2012-10-17 23:18:51 UTC
Created attachment 29493 [details]
patch
Comment 2 Luis Bernardo 2012-10-17 23:38:51 UTC
applied: http://svn.apache.org/viewvc?view=revision&revision=1399483
Comment 3 Alex Giotis 2012-10-18 10:07:47 UTC
Well done Luis, but how did you find out that the problem was the /PageLabels given the Acrobat's non descriptive error ?
Comment 4 Luis Bernardo 2012-10-18 21:32:28 UTC
Created attachment 29495 [details]
example source and output

Even though Acrobat was throwing an error it was nevertheless deleting the page. But I noticed that the thumbnail page images (in the left pane) were not being deleted. Since the labels of the thumbnails come from /PageLabels I decided to disable /PageLabels (by renaming it to, say, /PageLabelz) and see what would happen. The Acrobat error disappeared! Attached is an example *.fo source and the PDF output after and before the fix for those with Acrobat.
Comment 5 Alex Giotis 2012-10-19 08:06:43 UTC
Thanks for the explanations and the example, it was a good catch.