The pdf header may have finnished there because I am still saving into a
<file-name>.pdf file (I did not change the file name and file extention,
however changed the file contents.  At the moment I am following the
examples that come with the FOP library.

Now, I did not pretend to open that file (which has FO in it) with the PDF,
I just did that because I was asked to provide the FO!, The FO being
generated is below that header.

I will try saving it in a different file format so not to create confusion.

The following is the code I am using to Join my XML and XSTL into FO:

[code]
try {

  TransformerFactory factory = TransformerFactory.newInstance();
  Transformer transformer = factory.newTransformer(new StreamSource(xslt));

  Source src = new StreamSource(xml);

  Result res = new StreamResult(out);

  transformer.transform(src, res);
  
} finally {
  
  out.close();
}
[/code]

Where out is the stream where to save the file (here my stream pointed to a
PDF file), xml is the stream containing the XML document, and xstl is the
stream containing my XSTL document.
 
As you may see it is basically the same as the ones in the example.  I just
get the streams from other classes in my application.

I am sorry for the misunderstanding, as already said I did not save my
document in that format to open in the the PDF reader, but just to display
the FOP being generated.

regards,
sim085
--
View this message in context: 
http://www.nabble.com/PDF-reader-can-not-read-generated-file-t1818020.html#a4971198
Sent from the FOP - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to