Client Side PDF Generation Using Flash, Flex and AIR

As far as I know, it is really complicated and challenging task to generate PDF on the server side. We have recently faced this challenge on the client side. Our products - LiveArt and Pivot Table have to incorporate the PDF generation functionality. We have conducted several researches and I am glad to announce that it is easy (hurray :)) to generate PDF using Flash, Flex and AIR. It has become possible thanks to AlivePDF library. This post helped us to find it.

How powerful client side PDF generation is? Powerful enough to meet our main need at the moment – generate PDF document as the exact copy of graphic and data visualization objects which users get when they use our Flash/Flex products, like LiveArt and Pivot Table. AlivePDF library allows inserting JPEG format images into PDF document. The addImage method uses DisplayObject object (its incoming argument) to take a snapshot of it in JPEG format and insert into the PDF document.

AlivePDF library allows us to easily do the following:
  • Set layout, margins, get sizes;
  • Add and compose pages;
  • Use drawing primitives, manage color models;
  • Set fonts and text properties;
  • Add images in JPEG format;
  • etc.

Of course, there is no limit to perfection. Our dream is to be able to convert Flash vector objects into similar vector objects in PDF. It seems that we need a number of steps undertaken to make it real. But we will strive and will succeed!
 

3 comments

Saturday, 05 July 2008 22:47
by
visitor
It's not totally client side as you need PHP or CF to deliver the file content back to the browser. To my knowledge, there is no way to create PDF files without server assistance.
Thursday, 07 August 2008 09:19
by
visitor
Actually with Flash Player 10 you can do it all client side, no server side needed.
Thursday, 21 August 2008 23:13
by
visitor
Can you please explain how can we do at client side.
or submit a new comment

Welcome to Flexmonster, the first Flash Pivot Table developer!


See blogs for PIVOT

Project Tags Cloud

Blog Authors