You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Tobias Kuhn <tk...@mailserv.rz.fh-muenchen.de> on 2002/09/18 16:54:43 UTC

is it possible to supply fop driver with xml stream instead of xml file?

Hello,
 
i wonder if it is possible to supply the fop driver in my section:
 
XSLTInputHandler inputHandler = new XSLTInputHandler( >> new
File(xmlFile) <<, new File(xslFile));
 
with an xml stream instead of an xml file.
 
I have already embedded the rendering to pdf succesfully and the last
problem is that the result pdf file is not accesible (Acrobat reader
says it is locked.),  while the application in which i embedded my code
is running.
i tried "driver.reset();" but this doen not seem to work properly.
 
Thanks for tips in advance.
 
T. Kuhn

Re: is it possible to supply fop driver with xml stream instead of xml file?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Tobias Kuhn wrote:
> i wonder if it is possible to supply the fop driver in my section:
>  
> XSLTInputHandler inputHandler = new XSLTInputHandler( >> new
> File(xmlFile) <<, new File(xslFile));
>  
> with an xml stream instead of an xml file.

No, unless you change the source.
Look here for an alternative:
  http://marc.theaimsgroup.com/?l=fop-user&m=102503859424424&w=2

> I have already embedded the rendering to pdf succesfully and the last
> problem is that the result pdf file is not accesible (Acrobat reader
> says it is locked.),  while the application in which i embedded my code
> is running.
> i tried "driver.reset();" but this doen not seem to work properly.

You have to close the output ffile, for example if you use a
FileOutputStream:
   FileOutputStream fos = new FileOutputStream("foo.pdf");
   Driver driver = new Driver();
   driver.setOutpurStream(fos);
  .... do the rendering ...
   fos.close();

Check the Java docs for details.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org