I have problems in Seam PDF with the <p:image> tag. I have a PNG file in an external directory on the same hard drive on which my server is running. I pass the image as the parameter "image" to my PDF template file, which renders the image by this tag:
<p:image value="#{image}" />
I attempted to pass the image in various forms. As the absolute path of the image, as a File object, or as a URL, I receive this error:
java.lang.IllegalArgumentException: Image pointed to must exist (input stream must not be null)
I attempted to load the image into a java.awt.Image object to pass as the parameter, and I receive a NullPointerException when I render the template.
Why cannot Seam PDF accept a simple path, File, Image, or URL as a parameter to <p:image>? Any ideas?
I wiped my progress and redid all of the code, and now the image renders properly with <p:image> and a File object. I do not know what I did wrong before. Anyway, problem solved.