Xportability / css-to-pdf

Convert any HTML page or region to PDF - supports CSS, SVG, embedded XML objects, and more..
http://www.cloudformatter.com/CSS2Pdf
207 stars 77 forks source link

Embed PDF into email anchor tag? #14

Closed GonzaloCalandria closed 8 years ago

GonzaloCalandria commented 9 years ago

Is there a posibility to generate an anchor tag that can embed the PDF into a new email?

kbrown01 commented 8 years ago

This is not really a question for our code. We do return the base64 encoded PDF to you to do as you wish. Slight modification of the code and you could grab that.

That said, the syntax for mailto: within a hyperlink I believe does not allow for anything like that. You would only specify the "body" of the email as text content. I do not think you can insert HTML into it.

kbrown01 commented 8 years ago

A better implementation would be that we add a few parameters and the server could be setup to auto email the PDF out. We may consider such a thing BUT we would need to be careful here and likely throttle that capability in the non-commercial site.

kbrown01 commented 8 years ago

Or as stated, you have access to the returned PDF the the main Javascript. Look at the __postBackSuccess function. You could override this to send that base64 encoded PDF to your own server and do as you like (as it attach it to an email and send it out).