"Error while loading the image" indicates the error is during loading.
So, it is not a URL issue but a problem with the image. If you provide
the image we can confirm that.
On 7/10/12 3:52 PM, michael.jerusa...@steria.com wrote:
Hi everyone,
I'm asking for a little help using FOP to render my XML file, which contains
images (checked and unchecked boxes), into a PDF.
My script is done, and works perfectly when I indicate in my xml file :
<checkbox>http://10.6.66.134:7008/images/checkbox.gif</checkbox>, this being an
extern server that I cannot use in Production
But when i want to test it in local on my computer, and replace the previous
line with
<checkbox>box_check.gif</checkbox>, my images being in the same folder than my
script, and my XML and XSL files.
I got the error message :
Error in XObject : Error while loading image
file:/home/emmji/tmp/xml/jni/box_check.gif : class
java.lang.NullPointerException - null
I know the image is found because I tried to rename it and got this error :
[ERROR] Error while creating area : Error while recovering Image Informations
(file:/home/emmji/tmp/xml/jni/box_check2.gif) :
/home/emmji/tmp/xml/jni/box_check2.gif (No such file or directory)
Here is the declaration of the variable and the code where I integrate my image
:
<xsl:variable name="checkedbox">
<xsl:value-of select="/root/param/checkbox"/>
</xsl:variable>
<fo:block text-align="center">
<fo:external-graphic src="url('{$checkedbox}')" width="8px" height="8px"
display-align="center"/>
</fo:block>
I think this is a matter of URL, but I don't understand why.
Thanks for your help.
Regards
PS : I also tried :
<checkbox>./box_check.gif</checkbox>
<checkbox>/home/emmji/tmp/xml/jni/box_check.gif</checkbox>
but I still end up with the same XObject errorCe message est à l'attention
exclusive des destinataires désignés. Il peut contenir des informations
confidentielles. Si vous n'êtes pas destinataire du message, merci d'en avertir
immédiatement l'expéditeur et de détruire ce message. Le contenu de ce message
ne pourrait engager la responsabilité de Steria que s'il a été émis par une
personne dûment habilitée agissant dans le strict cadre de ses fonctions et à
des fins non étrangères à ses attributions. Bien que les meilleurs efforts
soient faits pour maintenir cette transmission exempte de tout virus,
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne
saurait être engagée pour tout dommage résultant d'un virus transmis.
This message is intended exclusively for the designated addressee. It may
contain confidential material. If you are not the correct addressee, please
notify the sender immediately and destroy the message. The content of this
message will engage the responsibility of Steria only if it has been sent by an
authorized person acting in the strict scope of his functions and for purposes
that are related to his competence. Although reasonable efforts have been made
to keep this transmission free from viruses, the sender will not be liable for
damages caused by a transmitted virus.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org