https://issues.apache.org/bugzilla/show_bug.cgi?id=49808

           Summary: Setting accessibility in Java
           Product: Fop
           Version: 1.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: pdf
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: jgre...@yahoo.fr


When setting accessibility with :

A. userAgent.setAccessibility(true)

and then generating PDF, an exception occurs :

-----
ERROR org.apache.fop.area.AreaTreeModel - Error while rendering page 1
java.lang.NullPointerException
    at
org.apache.fop.render.pdf.PDFPainter.prepareImageMCID(PDFPainter.java:152)
-----


It seems that logicalStructureHandler of PDFPainter is null.

The cause is that the logicalStructureHandler is set when calling :

B. FopFactory.newFop(String outputFormat, FOUserAgent userAgent, OutputStream
stream)

which calls :

PDFDocumentHandler.startDocument()
where it tests accessibility of the attached FOUserAgent.

Issue is due to the fact that at the moment calling "B", we couldn't have
correctly set "A" so, the logicalStructureHandler of PDFPainter remains null.




A solution is to change method FopFactory.setAccessibility() to public, so that
we can set accessibility before calling "B".

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to