Strange, I received the answer to this question, but not the original question. Anyhow:
Iliadis Yannis wrote: > I for myself read a pdf template (physical file) into a > ByteArrayOutputStream and pass it to a PdfStamper where I do all the > manipulation (in your case a PdfWriter object). That's an ideal way to do it if you are reusing the same template over and over again. > After that the final pdf (still a ByteArrayOutputStream) is send through > a web service to the clients web browser. From there the adobe reader > plug takes over and shows the pdf. Yep, but remember that the PDF will be stored somewhere as a file on the client machine (maybe only temporarily). Most viewer (certainly Adobe Reader) need the PDF as a file; Adobe Reader doesn't accept a byte stream from memory. > 2007/4/13, Mork Afur <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>: > > In the case where a file-based PDF would have a short life span, we are > thinking about just using a ByteArrayOutputStream representation for > creating and viewing the PDF. > > Is this possible? I'm not sure how we'd "view" the > ByteArrayOutputStream. > > Also, there is only one example (in the 297 java examples with the book) > that returns a "baos" object. In Chapter 2 I explain that you can write to any OutputStream, including a ByteArrayOutputStream. Point is: how are you going to send those bytes to a Viewer? If you really want to keep the documents in memory only, you could try writing a PDF to a Ramdisk and let the viewer read it from there. I haven't tried this yet. Do people still use ramdisk? I feel very old when I use that word... br, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
