Take a look at the code for Productstore Emails.
JohnBrown sent the following on 7/31/2008 7:03 AM:
> Hi Guys,
>
> One of our developers experience problem with sending order email as PDF
> instead of html.
>
> "I have tried all the ways to solve the problem.I used method
> "dispatcher.runSync("sendMail", Map map)" to send email as pdf file not as
> attachment,but this method need body content as the email body,I try to get
> it by "${screens.render()" to get the pdf screen,but I cann't get it,and I
> used the ajax to get the xsl-fo file,and I cann't get it too. Also I used
> the "dispatcher.runSync("sendMailFromScreen", Map map)" to send the pdf file
> as a attachment,this just need input the screen where is the pdf in,but when
> it parse the xslfo screen,it tells me "XML document structures must start
> and end within the same entity",and I check the xsl-fo file,I am sure the
> file does start and end with the same entity."
>
> Does anyone has some ideas on how to get this problem solved? I would
> appreciate any help on thi subject. Thank you in advance.