Hie Stephon

Still I am not sure on the part that ultimately how will i use this stream
to attach the generated pdf as an attachment in the email. Please advise

Thankx and Regards

Vik
Founder
http://www.sakshum.org
http://blog.sakshum.org


On Sun, May 15, 2011 at 9:56 PM, Stephen Johnson <onepagewo...@gmail.com>wrote:

> You're writing the PDF as your web page output. Use a ByteArrayOutputStream
> instead.
>
> On Sun, May 15, 2011 at 7:16 AM, Vik <vik....@gmail.com> wrote:
>
>> Hie
>>
>> Just a little question. I am using this pdfJet thing.
>> The requirement for us is to create a pdf and then mail it to a user.
>>
>> So i am done with pdf creation part and at then end i have the code like:
>>
>> OutputStream out = resp.getOutputStream();
>> PDF pdf = new PDF(out);
>>
>> some actual writing.....
>>
>>  pdf.flush();
>>  out.close();
>>
>> Now the question i have is after this step how do i actually get handle to
>> the created pdf above and attach it to an email ?
>>
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> http://www.sakshum.org
>> http://blog.sakshum.org
>>
>>
>> On Tue, Apr 20, 2010 at 1:52 PM, Patou 
>> <patou.de.saint.ste...@gmail.com>wrote:
>>
>>> Hello
>>>
>>> In App Engine, You can't write a file to the file system. Otherwise
>>> the save method can't be used in GAE.
>>> Use this code to send the pdf to the navigator :
>>>
>>> pdf.wrap();
>>>
>>> String fileName = "Example_03.pdf";
>>>
>>> resp.setContentType("application/pdf");
>>> resp.setHeader("Content-Disposition", "attachment; filename=\"" +
>>> fileName + "\"");
>>> ServletOutputStream outs = resp.getOutputStream();
>>> pdf.getData().writeTo(outs);
>>>
>>> Or to save to the datastore :
>>> new Blob(pdf.getData().toByteArray());
>>>
>>> Bests Regards
>>>
>>> Patrice
>>>
>>> On Apr 20, 4:18 am, jeno <jeno...@gmail.com> wrote:
>>> > Hi François ,
>>> >
>>> > Thanks for your help. I have used PDFjet (PDFJet.jar  version 2.72)
>>> > PDF class missing save method
>>> > So i cant call pdf.save("d.pdf") method.
>>> >
>>> > Cheers
>>> > jeno
>>> >
>>> > On Apr 19, 6:48 pm, François Masurel <fm2...@mably.com> wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > Hi Jeno,
>>> >
>>> > > You can try the PDFjet Open Source Edition :
>>> http://pdfjet.com/os/edition.html
>>> >
>>> > > François
>>> >
>>> > > On 19 avr, 01:55, jeno <jeno...@gmail.com> wrote:
>>> >
>>> > > > Hi Guys,
>>> >
>>> > > > Anyone know open source java  pdf engine for GAE.
>>> >
>>> > > > Thanks
>>> > > > Jeno
>>> >
>>> > > > --
>>> > > > You received this message because you are subscribed to the Google
>>> Groups "Google App Engine for Java" group.
>>> > > > To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> > > > To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> > > > For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups "Google App Engine for Java" group.
>>> > > To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> > > For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "Google App Engine for Java" group.
>>> > To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> > For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to