Hi,

i've extend the default Servlet, to be able to output my xml+xsl als pdf or png.
as pdf all works fine and it taks about  ~500ms to generate the PDF.
Quite fast!

Setting the output-format to png, takes much longer (~2,5sec) and the first page of my document is missing!
can anybody help me here?

This is the code, that servers the pdf or png:

   String mimeType = MimeConstants.MIME_PDF;
   FOUserAgent foUserAgent = getFOUserAgent();
   foUserAgent.setBaseURL("file:///" + outputPath);

   //Setup FOP for PNG
   if(outputFormat.equals("png"))
   {
        mimeType = MimeConstants.MIME_PNG;
        foUserAgent.setOutputFile(new File(outputPath + outputName +
   ".png"));
   }
   Fop fop = fopFactory.newFop(mimeType, foUserAgent, out);


from commandline, all images are generated (test.png - test6.png).

Thx for your help!

-------
Greetings
Christian

Reply via email to