You know you can generate PDF documents from AS3 by using Life Cycle ES but what happens when the project you are working on requires another server technology? In my case - PHP. Well, you can just tell your client that PDF is not good option at all! Hey, that could solve the problem! OK. Since i am working on the project that requires pdf generation, i made simple class to achiefe that. You can download APDF class from Google code:
http://code.google.com/p/apdf/ .
In the package, you will find php code too (it requires PHP 5).
There are two versions of APDF you can download. The only diference is that one of them use as3corelib for image encoding - see my previous post (please be aveare that as3corelib is NOT included in the download) and the other one not. If you are on Flex 3, choose the one with out as3corelib.
The APDF class enables to create and export PDF documents from Flex. It uses open source PHP library FPDF to generate the pdf document. You can add the images or text by calling APDF methods. This is still in beta but i would really appreciate you let me know if you find any errors.
I was thinking about to make a demo application that enables you to dynamicly create pages, add images, text, links and so on but it is sooo predictible... So i made application that enables you to capture the video, add coments to captions and then finally to export all the captions to PDF. Think it's pretty cool but i will leave it to you. Check it out
HERE.
This is great - any change you could post the source for your demo?
ReplyDeleteVery nice! I'll definitely be playing with this great class...
ReplyDeleteThanks for the contribution!
Man your library is great!
ReplyDeleteOnly a question, its possible to export a chart created in flex to the pdf with your library?
@Alfonso: Yep! It is possible! See "addImage" method and you are on! :)
ReplyDeleteDoes this only work with Flex? Can it work with Flash AS3 as well?
ReplyDeleteI am very interested in this application...please can you give some more informations about the source of this http://ceramicns.com/cndy/apdf/
ReplyDeleteIs it support multiple language like UTF-8, GB2312 and BIG5 ??
ReplyDeleteHi, Mirko :
ReplyDeleteIs here a possible way to deploy your aPDF on .Net platform ?
thanks!
cant you give the source code?it would have great help...
ReplyDeletethank you
Hi!
ReplyDeleteHow can export the pdf to my C: directory?? only can I export to internet?
Hi,
ReplyDeletethanks for very nice library.
Can we use grids and tables??
Hi,
ReplyDeleteThis is great.can you give the source code?
Hi,
ReplyDeleteI need to export my Flex data grid into PDF. I am using asp.net not PHP. please give me some sample code.
Thanks in Advance.
Great job! exactly what I was looking for..
ReplyDeleteI nice feature would be to exprt the contents of a canvas to pdf, but that's maybe a bit complex to build.
thanks again!
Peter
Oh this tip will be very useful. I can export some of my flex documents to PDF in order to nobody can modify them.
ReplyDeleteGreat work! My only problem is that the text encoding messes up and foreign languages (Greek in my case) appear as signs :(
ReplyDelete