Bellamkonda, Ramesh (IE10) wrote:
HiI am new to iText, How can we Concatenate PDF documents using servlets.Please give me a example. I am able to do the same thing in a stand alone application.
If you can do it in a standalone example, you can do it in a Servlet. Just write the PDF to a ByteArrayOutputStream instead of to a FileOutputStream. Consult the tutorial for inspiration: http://itextdocs.lowagie.com/tutorial/general/webapp/ Once you have the ByteArrayOutputStream baos, you'll need to do something like this; response.setContentType("application/pdf"); response.setContentLength(baos.size()); ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); Please read the complete tutorial chapter to find out more about some common pitfalls. br, Bruno
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/