4036Re: [XSL-FO] urgent help with pdf rendering
- Sep 1, 2003
>From: "soken78" <soken78@...>What XSL-FO formatter are you using?
>Hello I have been able to successfully render a pdf from a specified
>xsl and xml file.
>However only the static information within the pdfTo convert string to byte array use the getBytes() method on String.
>is shown. I am suspicious that maybe the xml is empty. Can someone
>please verfiy that the following code is correct, specifically the
>line: byte xmlSrc = xml.getBytes();. I think that this might be
>causing the problem. If it is how can I convert the string to a
>byte and then convert that byte to a StreamSource?
StreamSource takes InputStream as argument to its contructor, so create a
ByteArrayInputStream based on your byte array, e.g.
new StreamSource(new ByteArrayInputStream(yourString.getBytes()));
>This is quite urgent. I hope someone can help and thank you in
I had a quick look at your code and noticed that you don't close the output
stream in your renderFOP method. You need to close the ByteArrayOutputStream
to ensure all data is flushed to the array.
The problem could also be in your stylesheet, post small snippets of your
XSL and XML files if you still have no luck.
Use MSN Messenger to send music and pics to your friends
- << Previous post in topic