liam grimes <liamgrimes <at> gmail.com> writes: > > Hi all have anyone tried to render the fo stream to pdf and email it to an recipient.?? Is it possible in java.. if so can you please help.Thanx
Hi, render fo stream to pdf : download fop 0.93 , see there is example ExampleFO2PDF.java. you can get an idea. for emailing pdf, you can write program like javax.mail.Session mailSession = javax.mail.Session.getDefaultInstance( properties, null ); Multipart mep = new MimeMultipart(); MimeBodyPart mebp1 = new MimeBodyPart(); MimeBodyPart mebp2 = new MimeBodyPart(); message = new MimeMessage( mailSession ); message.setFrom( ); message.setRecipients( ); try { if (Attachment!=null) { FileDataSource fds = new FileDataSource( Attachment ); mebp2.setDataHandler( new DataHandler( fds )); mebp2.setFileName( fds.getName() ); } } mebp1.setText( ); mep.addBodyPart( mebp1 ); mep.addBodyPart( mebp2 ); // add the Multipart to the message message.setContent( mep ); Transport.send( message, addrRecipient ); sarath --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]