I'll reply to myself to save anyone from wasting time on this.  It turned
out that the character encoding on the machines was different, and
ByteArrayOutputStream.toString() was behaving funny on machines set to use
UTF-8.  The problem was resolved by calling
ByteArrayOutputStream.toString("ASCII") instead.

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam possit
materiari?


> -----Original Message-----
> From: Jarnot Voytek Contr AU HQ/SC 
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 21, 2003 6:05 PM
> To: '[EMAIL PROTECTED] '
> Subject: PDF rendering doesn't work, TXT rendering does
> 
> 
> We have successfully embedded fop in a servlet (actually a 
> Struts action),
> and are generating PDFs with aplomb.
> 
> We also need our web app to periodically 'wake-up' and email 
> PDFs to certain
> users.  The way we've coded this is a thread (started from 
> our servlet) that
> wakes up periodically and starts another thread which connects to the
> database, does xml->pdf with fop, and emails the resulting pdf.
> 
> The problem is that when run from our 'background' thread, 
> fop generates
> almost empty pdf files, they contain only two lines:
> %PDF
> %
> 
> However, when I changed the renderer to render text files, 
> fop generates
> correct files.  In either case, there are no exceptions or 
> errors from fop
> that I can see (even when using DEBUG log level).  This behavior is
> exhibited on Oracle 9iAS 9.0.3, fop 0.20.5, RedHat 8.0.  Interestingly
> enough, the same (as near as I can tell) configuration on 
> RedHat 7.3 works.
> 
> --
> Voytek Jarnot
> Quantum materiae materietur marmota monax si marmota monax 
> materiam possit
> materiari?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to