Apache FOP 2.3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Apache FOP 2.3

Awadhoot Aphale
Hi,

I have upgraded the FOP library in the legacy application from 0.94 to 2.3. I am using JDK 1.6.

I have made necessary changes in the source code to work with FOP 2.3.

After the upgrade, XML to PDF conversion has stopped working. I am using xsl to convert to pdf.

Following is the section of xsl where error is reported,

<xsl:when test="@id = 'fourthForm'">
<fo:block background-image="{$imgPath}" border-style="solid" border-width="0.2pt"
text-align="left" font-size="8pt"
font-weight="bold" color="white" padding-top="1pt"
padding-bottom="1pt">
<xsl:value-of select="tr/td/span" />
</fo:block>

imgPath is defined as shown below,

<xsl:variable name="imgPath1" select="html/body/input/@value" />
<xsl:variable name="imgPath2"
select="'/images/table_header_center.png'" />

<xsl:variable name="imgPath" select="concat($imgPath1,$imgPath2)" />

Error reported is,

SystemId Unknown; Line #106; Column #41; java.lang.NullPointerException

If I remove background-image="{$imgPath}" from fo:block, it works fine.

Not sure what is wrong here. Any help would be appreciated.

Thank you.
Thanks,
Awadhoot
Reply | Threaded
Open this post in threaded view
|

Re: Apache FOP 2.3

Matt Kynaston


On Thursday, 24 January 2019, Awadhoot Aphale <[hidden email]>

SystemId Unknown; Line #106; Column #41; java.lang.NullPointerException

If I remove background-image="{$imgPath}" from fo:block, it works fine.

I don’t use the XSLT side of it all, but if you can intercept the actual FOP being generated it would almost certainly help.  


--
Matt Kynaston
Lead Developer

Claritum Limited. Registered Office 30 Gay Street Bath BA1 2PA, registered in England and Wales, No. 3878694.