Summary: PDFGraphics2D.drawString(AttributedCharacterIterator it,
                    float x, float y) throws NullPointerException
           Product: Fop
           Version: all
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: pdf
        ReportedBy: [EMAIL PROTECTED]

PDFGraphics2D.drawString(AttributedCharacterIterator it, float x, float y)
throws NullPointerException:

Exception in thread "main" java.lang.NullPointerException
        at org.apache.fop.svg.PDFGraphics2D.drawString(
        at com.yegor.fop.TestPDFGraphics.main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.lang.reflect.Method.invoke(

A failing test is attached. 

It looks like drawString(AttributedCharacterIterator it, float x, float y) is
not   finished. The variable fontState which results in NPE is assigned to null
and never initialized. 

If possible, I'd like to have it fixed in FOP 0.95. I would be happy to upload
a patch but my knowledge of PDF is not enough for that :). Please suggest how
it can be fixed.

Shouldn't this method be re-written so that drawString(String str, float x,
float y) is called for each individual text run in the AttributedString? If so,
   how can I measure the length of a text run and advance the x co-ordinate?  


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to