
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 :
Updated 08/26/07 : Sources available at http://code.google.com/p/alivepdf/
Hope you like it ![]()
Comments (61)
The API looks great. Thanks for open sourcing it!
That’s great… I love your work, keep it up…
-abdul
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).
Wow! Amazing stuff, mate! Keep it going!
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.
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,
WOW,It’s great work.I love it.But seem to can’t download AlivePDFSources.
WOW,It’s great work.I love it.But seem to can’t download AlivePDFSources.
Aloha,
We have added your website, great work.
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.
Hi uyang,
Can you try this link ?
http://code.google.com/p/alivepdf/downloads/list
cheers
err…. bustback at gmail. oops!
YEAH , I can do it.
Thibault Imbert ,thanks a lot. I Can download.Good Job. And I love AlivePDF.:)
HI,Thibault Imbert .I download the ALivePDF,but ,How to config AMFPHP in this pdf Project ? Thanks Again.
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.
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).
Hi Jon,
I have added you on google/code
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?
hmmm,
got to check that, I will let you know soon
Nice work!!
Can this thing load external swf with vector graphic and convert it into pdf?
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
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!!!
I’d like a video-tutorial on how to use this…
anyone feel like doing one?
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 !
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.
Oliver, are you sure it can use for printing if embed swf in pdf?
I need to know this is all possible.
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,
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..
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 ?
Salut Liteo,
je vais regarder ça
Donne moi quelques jours et je te dis
Je suis un peu débordé en ce moment
++
Thibault
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
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….
Ho Oriana,
Which version of Flex Builder are you using ?
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
++
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’ “
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.
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 !
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.
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
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.
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.
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
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()”
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
can you tell me, can we make PDF file of Charting Application in flex.if yes then what thing we require it to work.
can we generate PDF file for Flex Charting application if yes tell me what fiels we need to include to work that application
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.
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.
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.
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.
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!
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,
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…
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
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?
Great job on Alive! I tried to subscribe 2x to the forum, it never sends out the emails… mail server down? thank-you
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
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
Oups j’ai fais une erreure, si c’est possible de retirer mon adresse mail visible s’il vous plait
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
Trackbacks/Pingbacks (6)
[...] 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 [...]
[...] 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 [...]
[...] di s
[...] yesterday, Thibault Imbert released the opensource lib for PDF creation, it works great in our project.check it out here [...]
[...] 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 [...]
[...] 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 [...]