https://issues.apache.org/bugzilla/show_bug.cgi?id=51836
Bug #: 51836
Summary: NullPointerException when navigation target doesn't
exist
Product: Fop
Version: 1.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: trivial
Priority: P2
Component: general
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27512
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27512
IF file after modification
A NullPointerException was encountered when trying to generate a PDF from a
modified FOP IF file. The IF file was systematically manipulated to delete
some of the <page-sequence> and <page> elements. The exception was the result
of <nav:*> elements that reference content that no longer exists in the IF
file. Stripping all <nav:*> elements from the IF file avoids the exception.
There may be a more graceful way of handling this than a NullPointerException.
The specific error I get when trying to generate the PDF is:
Caused by: java.lang.NullPointerException
at
org.apache.fop.render.pdf.PDFDocumentNavigationHandler.updateTargetLocation(PDFDocumentNavigationHandler.java:188)
at
org.apache.fop.render.pdf.PDFDocumentNavigationHandler.getAction(PDFDocumentNavigationHandler.java:160)
at
org.apache.fop.render.pdf.PDFDocumentNavigationHandler.renderLink(PDFDocumentNavigationHandler.java:108)
at
org.apache.fop.render.intermediate.extensions.DocumentNavigationHandler.endElement(DocumentNavigationHandler.java:186)
[rest of stack omitted]
I believe the NullPointerException occurs on this line in
PDFDocumentNavigationHandler.java:
action.getTargetLocation().x / 1000.0
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.