Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2007, 03:57 AM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic PDF Email Attachments

Hi,
I have a PDF file stored in the BLOB field of Oracle DB.
Is there a way to dynamically attach this PDF file in a mail without storing it into server machine?

My other requirement is to show the same file to the user. By using itext i am able to do the same. After reading the Byte Array i am using the PDFWriter to do the same.

Document document = new Document();
ByteArrayOutputStream baosPDF = (ByteArrayOutputStream) this.testStreamBLOB();// this will return me the Byte Array from DB
PdfWriter docWriter = PdfWriter.getInstance(document, baosPDF);
ServletOutputStream sos = response.getOutputStream();
baosPDF.writeTo(sos);

Is ther a way to use the same logic for sending it as an attachment?

Thanks
Selva






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Attachments with email arshad mahmood Classic ASP Professional 3 May 31st, 2006 08:13 PM
Email with Attachments echovue Access 2 March 22nd, 2005 10:36 AM
Convert dynamic PHP report to PDF and then email phishee Pro PHP 0 November 4th, 2004 03:05 PM
Email Attachments Doug Riede Classic ASP Basics 0 October 24th, 2003 11:11 AM
Email w/Attachments aingalsbe PHP How-To 1 June 25th, 2003 04:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.