Did you set the mime type before you wrote the
ByteArrayOutputStream?
response.setContentType("application/pdf");
response.setContentLength(baos.size());
out = response.getOutputStream();
baos.write(out);
out.flush();
Another alternative may be to do something like this:
http://sourceforge.net/mailarchive/message.php?msg_id=2908037
Mac Fraser
--- zousey seyzou <[EMAIL PROTECTED]> wrote:
> I am trying to generated pdf in struts action Action
> class,
> in the memeory using ByteArrayOutputStream.
> but no matter what
> I am getting error message saying that .
> Adobe could not open the file test.dpf, because it
> is either not a supported
> file type or because the file has been corrupted.
>
>
_________________________________________________________________
> F� alle de nye og sjove ikoner med MSN Messenger
> http://messenger.msn.dk/
>
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide
> on ITManagersJournal
> Use IT products in your business? Tell us what you
> think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates!
> Click to find out more
>
http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
>
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions