Hello,
When I am trying to output the image via XSLT without any wrapper container around it, i.e. like that:
<xsl:template match=“img”>
< Image File="{text()}" Type="{@type}" FixHeight="{@height}" FixWidth="{@width}" />
</xsl:template>
(Space between the < and Image intended, otherwise it would show in this post)
the Aspose PDF throws error:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Aspose.Pdf.Page.#=zvjHewFY=(XmlReader #=zNI6$7Kk=)
at Aspose.Pdf.Document.BindXml(Stream stream)
at Aspose.Pdf.Document.BindXml(Stream xmlStream, Stream xslStream, XmlReaderSettings settings)
at Aspose.Pdf.Document.BindXml(Stream xmlStream, Stream xslStream)
The error is not thrown if the image is wrapped in some sort of a container, i.e. Floating Box, but I can’t use it either as there is an issue with positioning Floating Box next to tables.
How could I fix the error thrown when the image is not wrapped by a container?
Test case code here: image-nullpointerexception-code-sample.zip (141.9 KB)