Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 24590 invoked from network); 7 Jun 2000 21:07:16 -0000 Received: from corporate.planet.net (208.163.25.10) by locus.apache.org with SMTP; 7 Jun 2000 21:07:16 -0000 Received: from planet.net (prog16.planet.net [208.163.30.16]) by corporate.planet.net (8.9.3/8.8.5) with ESMTP id QAA04163 for ; Wed, 7 Jun 2000 16:05:41 -0400 (EDT) Message-ID: <393EAB77.E00CA47E@planet.net> Date: Wed, 07 Jun 2000 16:07:19 -0400 From: sudhi X-Mailer: Mozilla 4.72 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: converted PDF References: <003301bfd088$70ff6a60$301ea3d0@planet.net> <393E5B45.D5F36592@eud.com> <005201bfd08f$eb74bbe0$301ea3d0@planet.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi All, It worked :-) The easiest way was, Java Activation Framework. Here is the snippet of the taglib which attaches the output of the url as a file. --------------------------------------------------------- ..... msgPart = new javax.mail.internet.MimeBodyPart(); URL url = new URL("http://localhost/samples_old/xsp/"+filename+".xml?msds=32"); msgPart.setDataHandler(new javax.activation.DataHandler(url)); msgPart.setFileName(filename+".pdf"); msgContent.addBodyPart(msgPart); msg.setContent(msgContent); Transport.send(msg); ...... ---------------------------------------------------------- The url which it is pointing is an xml file, which looks like this --------------------------------------------------------------- org.gjt.mm.mysql.Driver jdbc:mysql://mydomain.com/test_msds user passwd select prodname,uploaddate,title,rID,revdate,upc,prodnum,category,msdsnumber,mfg,itemnum from msds where msdsnumber = '{@msds}' -------------------------------------------------------------- The stylesheet msds-fo.xsl is the one which converts the resulting xml into a PDF file. ~Sudhi > Nishit Trivedi wrote: > > ok...here is the deal... > I have an xml file(attached with this email) to which I am applying > sql processor. > Then I also apply style sheet to it as you can see in attached file. > Then I apply FOP to convert that file into PDF file. > > Now the whole functionality is in one taglib. e.g. > file = "msds_for_cocoonuser.xml?msds=1"/> > > When I do this, it should grab msds_for_cocoonuser.xml, apply sql > processor to it, apply style sheet to it, apply FOP to it, store the > PDF as stream of bytes (not as a file in a file system) and THEN send > the PDF file as an email attachment to user. This all should happen > dynamically. > > I tried my best to explain the situation...any help will be > appreciated... > > Nishit > Internet Programmer > Planet Access Networks > 973-691-4704 Ext:157 > > ----- Original Message ----- > From: Rafael Oropeza > To: cocoon-users@xml.apache.org > Sent: Wednesday, June 07, 2000 10:25 AM > Subject: Re: converted PDF > > The problem here is you have a converted/renderized > FOP version of your XML contents "on the fly" (it doesn't > really exists as a filesystem file). So, I think (I hope I'm > noty wrong) you need to generate your FOP content as a real > PDF file in your file system. Then, you can send this > generated file as an email attachment, a link to it, etc. > > Nishit Trivedi wrote: > > > hi, > > sorry if this question is somewhat unrelated to cocoon > > user. > > I am having xml file on which I applied FOP to convert it > > to PDF. > > Now I am trying to send THIS CONVERTED PDF file as email > > attachment to user. > > I don't have any clue (:-( > > How do i do it??? > > > > Thanx in advnace... > > > > Nishit > > Internet Programmer > > Planet Access Networks > > 973-691-4704 Ext:157 > > > > -------------------- > > ------------------------------------------------ > > To unsubscribe, e-mail: > > cocoon-users-unsubscribe@xml.apache.org > > For additional commands, e-mail: > > cocoon-users-help@xml.apache.org > > > > -- > Rafael Alberto Oropeza Baudet > > (66) Rather than love, than money, than fame, give me truth > Henry David Thoreau > > > Name: msds_for_cocoonuser.xml > msds_for_cocoonuser.xml Type: BizTalk Schema (text/xml) > Encoding: quoted-printable > > --------------------------------------------------------------- > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org > For additional commands, e-mail: cocoon-users-help@xml.apache.org