AlivePDF 0.1 Alpha Release

As promised :) , I'm happy to announce the alpha release of AlivePDF which is based on FPDF (php library), I adapted it so that we have a Flash player-like drawing API, multiple paging management, transitions, and other cool things.

Most of the stuff can be extended anytime, yesterday I added transitions so that PDF can behaves like slides with some transitions effects. Check the org.alivepdf.transitions package ;)

If you remix code or need anything special just let me know so that we can include it and update the documentation. As you can imagine, this is an early version, as I don't have much time with the book I decided to bring it here so that everybody can try it.

I prepared for you an online documentation available on the brand new AlivePDF website. The sources contains sources for Flash CS3 and the SWC for Flex and AIR. Please, consider the .fla included in the sources as a starting point.

Things to come : PNG Image embedding, more fonts, HTML support, extended cells.

Note : This alpha version is not working with special characters.

Online Demo :

A Flash animation should have appeared here, but it seems that your browser has an older version of the Flash Player or it is not installed at all. Please, install the last release of the Flash Player now, then reload this page.

Updated 08/26/07 : Sources available at http://code.google.com/p/alivepdf/

Hope you like it ;)

Comments (65)

  1. The API looks great. Thanks for open sourcing it!

    Friday, August 24, 2007 at 4:10 am #
  2. That’s great… I love your work, keep it up…

    -abdul

    Friday, August 24, 2007 at 8:49 am #
  3. Jon wrote:

    could you let us know what it would take to get special characters and additional fonts working?

    Also, I’m curious what it would take to add a display object from Flex, X number of times in a tile on multiple pages (like business cards).

    Friday, August 24, 2007 at 9:08 am #
  4. Den Ivanov wrote:

    Wow! Amazing stuff, mate! Keep it going!

    Friday, August 24, 2007 at 9:37 am #
  5. Tek wrote:

    I’m happy to see that you have found the time and the energy (because of the book you are writing) to release the complete and open sourced version of your project.

    The demo is quite sufficient to prove it works like a charm.

    Friday, August 24, 2007 at 10:14 am #
  6. Thibault Imbert wrote:

    Hi Jon,

    Give me a few days for the fonts thing :)

    Concerning the DisplayObject in the pages, you can achieve that with the addImage method, which has all the parameters needed, by the way what I can do is add a addTile method and specify a grid so that DisplayObjects are automatically added in a grid.

    let me know,

    ;)

    Friday, August 24, 2007 at 9:34 pm #
  7. uyang wrote:

    WOW,It’s great work.I love it.But seem to can’t download AlivePDFSources. :(

    Saturday, August 25, 2007 at 6:31 am #
  8. uyang wrote:

    WOW,It’s great work.I love it.But seem to can’t download AlivePDFSources. :(

    Saturday, August 25, 2007 at 6:31 pm #
  9. Aloha,

    We have added your website, great work.

    Saturday, August 25, 2007 at 9:42 pm #
  10. Jed wrote:

    I noticed that AlivePDF seems to be broken in Firefox on a intel mac running 0SX.4… because that’s my machine. Works fine in Safari.

    Also, I couldn’t get this to work using input text. Seemed to work until I changed the default input text… then it just hung on generating the pdf.

    Overall this is totally awesome… excited for the beta.

    Saturday, August 25, 2007 at 10:07 pm #
  11. Thibault Imbert wrote:

    Hi uyang,

    Can you try this link ?

    http://code.google.com/p/alivepdf/downloads/list

    cheers

    Sunday, August 26, 2007 at 1:24 pm #
  12. Jon wrote:

    err…. bustback at gmail. oops!

    Monday, August 27, 2007 at 2:06 am #
  13. uyang wrote:

    YEAH , I can do it. :)

    Monday, August 27, 2007 at 4:38 am #
  14. uyang wrote:

    Thibault Imbert ,thanks a lot. I Can download.Good Job. And I love AlivePDF.:)

    Monday, August 27, 2007 at 12:38 pm #
  15. uyang wrote:

    HI,Thibault Imbert .I download the ALivePDF,but ,How to config AMFPHP in this pdf Project ? Thanks Again.

    Monday, August 27, 2007 at 1:06 pm #
  16. Thibault Imbert wrote:

    Hi uyang,

    There is no need to configure AMFPHP to save a PDF with AlivePDF through AMFPHP.

    Just send the PDF bytearray to the distabnt method and save it, you can have a look on the AMFPHP JPEG Encoder to see how to do it :

    http://www.bytearray.org/?p=90

    I’ll post some new AlivePDF project examples in a few days.

    Monday, August 27, 2007 at 1:32 pm #
  17. Jon wrote:

    Hey Thibault,

    Great stuff. Thanks for the thoughts on the fonts. I’m working on some methods that will allow usage of any system font to be rotated, scaled, etc. (through a bitmap representation). There are some other things I’d like to know about the project and see if I can help out.

    Is there going to be a mailing list, or is it possible to be added as a member to the google code project page? Drop me an email if you can (shiftedPixels at gmail).

    Monday, August 27, 2007 at 2:05 pm #
  18. Thibault Imbert wrote:

    Hi Jon,

    I have added you on google/code ;)

    :)

    Monday, August 27, 2007 at 4:36 pm #
  19. Jon wrote:

    Awesome. SvnX is what I’m using.

    I’ll head over to AlivePDF.org for any posting details, etc. Probably should have a mailing list setup at some point – not sure if Google Code provides that?

    Monday, August 27, 2007 at 6:18 pm #
  20. Thibault Imbert wrote:

    hmmm,

    got to check that, I will let you know soon :)

    Monday, August 27, 2007 at 7:32 pm #
  21. Briyan wrote:

    Nice work!!
    Can this thing load external swf with vector graphic and convert it into pdf?

    Monday, September 3, 2007 at 6:10 am #
  22. Thibault Imbert wrote:

    Hi Briyan,

    yes it is possible, if you load the SWF and then call the addImage method you can pass any DisplayObject it will automatically convert it into an image and add it in the PDF.

    If you are looking for direct SWF embedding in the PDF this something we can add ;)

    Wednesday, September 5, 2007 at 10:18 am #
  23. Briyan wrote:

    I actually need the DisplayObject to be vector in pdf, so it can be for printing use.
    is it the embedding swf in pdf will solve this problem?

    if yes, please add it!!! :D

    Wednesday, September 5, 2007 at 12:26 pm #
  24. felisan wrote:

    I’d like a video-tutorial on how to use this…
    anyone feel like doing one?

    Monday, September 17, 2007 at 8:40 am #
  25. Thibault Imbert wrote:

    Hi felisan,

    I was thinking about doing some little video tutorials to get started with AlivePDF.

    If anyone feel like doing one also it would be great !

    ;)

    Monday, September 17, 2007 at 8:44 am #
  26. Oliver wrote:

    Hi Thibault,
    as Briyan I need to create a pdf from an embedded SWF as vector, so it can be printed in high quality. The addImage Function works well with the swf, but it needs to resist as a vector.

    Monday, September 24, 2007 at 10:28 pm #
  27. Briyan wrote:

    Oliver, are you sure it can use for printing if embed swf in pdf?
    I need to know this is all possible.

    Friday, September 28, 2007 at 7:34 am #
  28. Emilie wrote:

    Hello Thibault,
    I was wondering if there is anyway to make AlivePdf works from a .exe, on a CD Rom. Someone told me about the installation of a server on the CD-Rom. Do you know where I can get any information on this point ? Thanks a lot,

    Friday, September 28, 2007 at 1:19 pm #
  29. Oliver wrote:

    Brian, I used it already for printing an embed SWF as PDF in Flex. Unfortunately, the SWF will be converted to an JPEG, so all Vector data is gone. I hope there will be a solution in the near future..

    Thursday, October 18, 2007 at 4:36 pm #
  30. Liteo wrote:

    First of all kudos for your great work Thibault !

    Je suis en train de tester ton application et j’ai l’impression d’être tombé sur un bug ?

    Je pars du fichier d’exemple et je rajoute juste une ligne :
    myPDF.addImage (generate_local_btn, null , true, ImageFormat.JPG, 100, 0, 0, 0, 0);

    Si j’agrandis trop le bouton, l’image s’affiche déformée et le fichier .pdf refuse de s’imprimer.

    Sais tu d’où celà pourrais venir ?

    Wednesday, October 31, 2007 at 7:25 pm #
  31. Thibault Imbert wrote:

    Salut Liteo,

    je vais regarder ça :)
    Donne moi quelques jours et je te dis :)

    Je suis un peu débordé en ce moment :(

    ++
    Thibault

    Wednesday, October 31, 2007 at 8:10 pm #
  32. PennyLane wrote:

    Hi, i’m very new to this and i have no idea how to install this… where do i unzip it??

    I’m using flex 2… Thanks

    Friday, November 2, 2007 at 11:44 pm #
  33. Oriana wrote:

    Please!!!!!!! I need help… when I add the AlivePDF.swc to the Flex Build path i get an “Unable to load AlivePDF.swc” error…

    What can I do??????? I can’t find help anywhere….

    Thursday, November 8, 2007 at 8:32 pm #
  34. Thibault Imbert wrote:

    Ho Oriana,

    Which version of Flex Builder are you using ?

    Thursday, November 8, 2007 at 11:50 pm #
  35. Liteo wrote:

    Bonjour Thibault,

    As tu eu le temps de jeter un oeil à mon soucis ?
    J’aurais vraiment besoin que tu me donnes ton avis car j’utilise ta librairie sur un projet au boulot, et j’aurais besoin de jauger l’étendue du travail à faire, si bug il y a, bien sûr ;)

    N’hésite pas à me joindre sur mon email ou via msn.

    Merci

    ++

    Monday, November 12, 2007 at 12:14 pm #
  36. MeTech wrote:

    Good Work…

    But I got a problem when I try to run your AIR example :
    ===>>>” unable to open ‘K:\Work\Bytearray.org\Alive PDF\Flex Projects\AlivePDF\bin\AlivePDF.swc’ “

    Thursday, November 22, 2007 at 7:26 am #
  37. MeTech wrote:

    OK. Now, I have added an AlivePDF.swc to my Project and it works fine.

    But, help is needed…

    1) Can we add a video to PDF…? If so, will you give a small code snippet…

    Thanking you in advance.

    Thursday, November 22, 2007 at 9:07 am #
  38. Thibault Imbert wrote:

    Hi Metech,

    I’m happy it works fine :)
    Video embedding will be added in a next release. I already made some sucessful tests.

    I don’t know which version will include this feature for the moment, but stay tuned ! :)

    Thursday, November 22, 2007 at 7:14 pm #
  39. Drew wrote:

    Wondering if the addLink() could include linking to a named destination, also a way to create a named destination. Also, I’m having trouble putting a different image in different pages? Your downloaded example puts an image several times on the same page.

    Tuesday, January 22, 2008 at 10:10 pm #
  40. Thibault Imbert wrote:

    Hi Drew,

    Concerning the addLink method, I can add that if you want.

    Concerning the image issue, can you send me your code ?

    regards,

    Thibault

    Wednesday, January 23, 2008 at 11:17 am #
  41. Drew wrote:

    Not sure if that last one worked with the code.
    I am using zinc to grab a folder full of jpgs, load them each into its own loader instance and then export each page as pdf.
    Do you have an example of multiple pages each with a different jpg.

    Wednesday, January 23, 2008 at 10:58 pm #
  42. heh wrote:

    Hi, is some soution to make PDF in flash without connectivity to network with Google Gears and without AIR? I just need download generated PDF when I am offline.

    Thursday, February 14, 2008 at 4:26 pm #
  43. Murtuza wrote:

    Hello, just as heh said above, I too would like to know if there is any way (even if i have to use zinc) that i can save the pdf w/o using a php.
    Currently, i am stuck with a byteArray that i got from savePDF(Method.LOCAL)
    please assist..
    thanks

    Thursday, February 21, 2008 at 9:14 am #
  44. Drew wrote:

    Re: saving pdf w/o sending to php script. You can do this with zinc. You simply write the byteArray to a file with the correct format. “mdm.FileSystem.BinaryFile.writeData()”

    Sunday, February 24, 2008 at 7:42 pm #
  45. lemon mo wrote:

    Hey DREW… its not that easy…
    in Zinc just by using….BinaryFile.writeData() Method…

    Tried that without success… you have to convert the byteArray into something – maby a hex based String… If you know more than me… gimme an idea…

    greetings mo

    Sunday, March 30, 2008 at 5:04 am #
  46. geeta wrote:

    can you tell me, can we make PDF file of Charting Application in flex.if yes then what thing we require it to work.

    Wednesday, April 2, 2008 at 3:47 pm #
  47. geeta wrote:

    can we generate PDF file for Flex Charting application if yes tell me what fiels we need to include to work that application

    Wednesday, April 2, 2008 at 3:51 pm #
  48. support for flash wrote:

    looks great..i try to do for flash + air but i dont know if i´m doig something wrong, problems with save the file.later and post some code.but there is no supoort to flash. and demos. great book of as3, even idont know nothing of french language. and it´s pretty clear.thanks.

    Monday, September 1, 2008 at 4:40 pm #
  49. Mike wrote:

    Can we directly embed swf file in pdf. The swf file is a hierarchical collapsible/expandible report. I need to export it to a pdf so that I can save and print it. Please suggest. Thanks in advance. – Mike.

    Wednesday, March 4, 2009 at 10:41 am #
  50. Kundleyans wrote:

    Is there any example to embed a swf file in pdf? We have a scenario wherein we show a hierarchical collapsible/expandible chart in flex which we wish to export to a pdf wherein it should have the same capabilities of expand/ collapse. So, if we could embed a swf file, it would suffice our purpose. thanks in advance.

    Thursday, March 5, 2009 at 5:09 pm #
  51. Thibault,

    This is a great project!

    But it lacks one thing — runtime pdf reading!( imagine the awesomeness of loading-editing-saving pdfs purely via flash) Is there any chance you’ll have the time to put this in?

    There’s one project on google code which aims to do this so far, http://code.google.com/p/as3-pdfreader/

    But last update is february, its in early stages and theres really no english documentation.

    This would make the project BADASS and save everyone still using FlashPaper a lot of effort/annoyance.

    Wednesday, May 13, 2009 at 10:50 pm #
  52. Alex wrote:

    Hi,
    The AlivePDF cant support the Chinese Character, I have found that so many people use AlivePDF to create PDF but it cant support Chinese Character,which known from Google, if AlivePDF can support UTF8 will be perfect!

    Wednesday, September 2, 2009 at 6:21 am #
  53. simar wrote:

    Hi,

    I want to convert one of my display object (that is created dynamically and use swc and graphics to draw other controls) into PDF.
    I used AlivePDF to achieve this and use pdf.addImage() method to add display object into this and i need this resulted PDF in vector format but it creates an image in PDF.
    so all Vector data is gone. I hope there will be a solution for this.

    Please reply me ASAP to achieve this using AlivePDF. It will be a great help for me.

    Very Thanks,

    Thursday, December 3, 2009 at 3:09 pm #
  54. Hadi wrote:

    I love the AlivePDF project… I’ve been found it just today though :)

    one question: how will I be able to load a pdf into my project and convert all its pages into some BitmapData?

    I guess it won’t be possible to do that with AlivePDF as itactually tries to create pdf files and not extract them…?

    do you have any idea on where I can get started with that? so that I can make bitmaps from every page of a pdf file…

    Saturday, January 9, 2010 at 6:16 pm #
  55. natarajan wrote:

    I’m having problems trying to insert the contents of a container like Vbox in a PDF
    generated with AlivePDF. I’m not using AlivePDF addimage option
    the container is sliced for the single page
    what i do for generate pdf with out the part of the container

    Tuesday, January 19, 2010 at 5:45 pm #
  56. chandra wrote:

    I have developed some applications by using alive PDF. But i need some clarifications like how to add (merge) more no of pages into single pdf file.
    2)I created one Advanced grid . Inside 50 records available.But only 20 visible to user then he scroll the scrollbar remaining will be visible. But same this converted into pdf only that 20 visible . how to display remaining records into PDF?

    Friday, January 22, 2010 at 1:07 pm #
  57. Al wrote:

    Great job on Alive! I tried to subscribe 2x to the forum, it never sends out the emails… mail server down? thank-you

    Friday, January 22, 2010 at 3:31 pm #
  58. DanWashere wrote:

    Thanks for this great class Thibault!

    I have a problem with it though, I’ve used it in a Flash app to save out a summary in a PDF, the user enters some data then outputs the PDF – the problem comes if they use Internet Explorer with the popup blocker turned on.
    When they click the button to output the PDF they are asked by the blocker to allow popups – they click yes, but Explorer then just refreshes the main page, losing all their data and not even opening the popup.
    If they then go thru the app and output the PDF it works fine.
    I notice on the page for your class ASZIP it has the same problem:
    http://www.bytearray.org/?p=105

    Has anyone got a way around this problem?
    Many thanks,
    Dan

    Tuesday, February 23, 2010 at 12:52 pm #
  59. Anonymous wrote:

    Bonjour,

    J’aurais voulu savoir si cette librairie est native à flash ou s’il faut appeler un serveur?

    Et si la coupure entre les pages est gérées automatiquement, par rapport au texte et aux images

    Merci :)

    Friday, April 23, 2010 at 1:36 pm #
  60. anthony wrote:

    Oups j’ai fais une erreure, si c’est possible de retirer mon adresse mail visible s’il vous plait

    Friday, April 23, 2010 at 1:39 pm #
  61. mahesh wrote:

    var _pdf:PDF = new PDF();
    var bytes:ByteArray = new ByteArray();
    var displayObject:DisplayObject = Application.application.img;
    /* this is Application.application.img */

    var bitmapDataBuffer:BitmapData = new BitmapData (displayObject.width, displayObject.height, false,0 );

    bitmapDataBuffer.draw (displayObject, displayObject.transform.matrix );

    bytes = PNGEncoder.encode ( bitmapDataBuffer, true );

    var resize:Resize = new Resize( Mode.NONE, Position.RIGHT );
    _pdf.addImageStream(bytes,ColorSpace.DEVICE_CMYK,resize,-3,10,0,0,0);

    please provide me solution. addImaageStream is throwing Image format not supported for now this error

    Sunday, July 18, 2010 at 5:06 pm #
  62. Roozbeh wrote:

    Great job! ;-)
    It’s possible to show the imported PDF file online instead of export it as a PDF?

    Friday, September 17, 2010 at 5:54 pm #
  63. Robert wrote:

    Does anybody post an example to add more pages.. i mean i shd print off dynamically 3 pages but how can i arrange it??? a tutorial link or something similar will be appreciate!! thx guys

    Monday, May 30, 2011 at 10:25 pm #
  64. Trinkao wrote:

    Where is header & footer on AlivePDF 1.5 RC ???

    Friday, September 2, 2011 at 1:30 pm #
  65. Hei it seams the alivePDf is not so “alive” lately. One of the key features that I am waitng for is pdf template integration. This would make me very happy. I would be so happy I would be clapping my ears

    Tuesday, August 14, 2012 at 11:47 am #

Trackbacks/Pingbacks (7)

  1. ActionScript und was sonst so dazu gehört on Monday, January 7, 2008 at 7:17 pm

    [...] mich nun mit dem Live JPEG Encoder sowie der Bibliothek zur pdf-Erstellung – AlivePDF – gespielt und muss echt zugeben, dass man sich da schon was abkupfern kann. Alle Experimente zu [...]

     
  2. Generare un pdf con actionscript on Friday, February 29, 2008 at 9:56 am

    [...] Generare un pdf con actionscript Ti riferisci a questo ? AlivePDF 0.1 Alpha Release <font size=’1′>[ by Thibault Imbert ]</font> < ByteArray.o… Non l’ ho mai provato, tu ? __________________ – Non rispondo ai messaggi privati con domande [...]

     
  3. pdf+php+flash - Forum Flash CS3 on Wednesday, June 4, 2008 at 8:34 am

    [...] di s

     
  4. [...] yesterday, Thibault Imbert released the opensource lib for PDF creation, it works great in our project.check it out here [...]

     
  5. [...] cool site I found (http://www.bytearray.org) had an open source AS3 PDF creator called AlivePDF or at http://www.alivepdf.org.  It is a pdf library based on the FPDF library (php).  In addition [...]

     
  6. animated gif generator at Abumarkub on Monday, June 1, 2009 at 1:39 am

    [...] Imbert is an amazing man! Last year i used his AS3 PDF generation library, and now i used his AS3 GIF Animation Encoding Library to make an online gif89a [...]

     
  7. animated gif generator « Abumarkub on Wednesday, August 17, 2011 at 7:02 pm

    [...] Imbert has created numerous amazing AS3 libraries! Last year i used his AS3 PDF generation library, and now i used his AS3 GIF Animation Encoding Library for an online gif89a [...]