> > I started looking at the MyFPDF examples and I am able to make simple > pdf's. I want to be able to make a pdf and attach it to an > email. Here is a simple example to show what I am doing and where I get > lost: >
If your app has write access to the filesystem (almost any environment has except, i.e. GAE), I think you could solve this by writing the fpdf output to an actual file (fpdf supports it, look at the project wiki), then pass the new filepath to the attachment as described in the book: http://www.web2py.com/books/default/chapter/29/08#Attachments One caveat I can think of is that for a given traffic/requests, you'll end up with a lot of useless pdf data stored, so you could write some additional background task for ereasing them. I suppose you could even leave the filelike object which receives the fpdf output open and use that instead as attachment input without the need to write to the filesystem. If you pass a file-like object as argument of Attachment, you have to specify also the name of the file with filename="filename.ext" (documented in the api) This is not a new issue. I think that you could find more useful stuff with a search in this group or here: http://www.web2pyslices.com -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

