xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcos GarcĂ­a <intmarcos.gar...@gmail.com>
Subject WordML link on header / footer error
Date Thu, 21 Jul 2011 07:10:25 GMT
Hi all,

I'm trying to convert a wordml document into pdf with FOP1.0

I usually use the <fo:basic-link> element to get links working on the
resulting pdf and it works pretty well as long as the link is not included
within the WordML header/footer. In that case I get a Nullpointer Exception
like this:

[FOP message]
21-jul-2011 8:37:29 org.apache.fop.events.LoggingEventListener processEvent
FATAL: Error while rendering page 1. Reason: java.lang.NullPointerException
(Unknown source) org.xml.sax.SAXException

[Java stacktrace error]
    at org.apache.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:187)
    at org.apache.pdfbox.pdmodel.PDPageNode.getKids(PDPageNode.java:164)
    at org.apache.pdfbox.pdmodel.PDPageNode.updateCount(PDPageNode.java:83)
    at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:906)
    at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:892)

Following is the template in the XSL stylesheet I use to transform wordml
links into fo:basic-link:

<xsl:template match="w:hlink">
        <xsl:when test="@w:dest">
                <xsl:attribute name="external-destination"><xsl:value-of
select="concat('url(&quot;', @w:dest,'&quot;)')" /></xsl:attribute>

Any clue of what may be going on wrong?


View raw message