I know it’s possible to do that with PHP. But how to do that with AcionScript. If, i.e., I have ant HTML saved in my db, loaded to flash client, how to generate the PDF?
There is a good open source library AlivePDF, but it doesn’t have feature to generate the PDF from HTML.
any suggestions?
The closest thing you will get to generating a PDF with the exact layout of the html is to use a library like
Html wrapper(http://code.google.com/p/htmlwrapper/) to render the html and then use thedrawmethod of theBitmapclass to create a copy of theDisplayObjectthe html is rendered in.Then use the
addImagemethod in theAlivePDFlibrary to add theBitmapDatafrom thatBitmap. Finally render the whole PDF withAlivePDF.This way you will get an exact layout of the html, however everything is a static image inside the pdf. So you won’t be able to select text and such.