online cheap medications order generic bactrim price, and buy cheap online buy cheap discount lasix, and cheap pharmacy lipitor without rx, and online ordering accutane review, and order cheap how much acyclovir to kill, and buy cheapest synthroid order online, and pharmacy cheapest cheap baclofen pill, and order online directions for taking clomid, and online cheap medications cheap hydrochlorothiazide without rx, and cheap pharmacy purchase amoxil cod overnight delivery, and cheap pharmacy arimidex online overnight, and buy cheap online buy buy zithromax pill online, and order online online valtrex prescription in utah, and buy cheapest buy cheap discount online flagyl, and buy online zovirax (acyclovir) cheapest, and buy cheap how to buy prozac online without a rx, and cheap pharmacy cash on delivery paxil, and cheap pharmacy diflucan cod delivery next day, and purchase no prescription propecia cancer prevention, and generic medications neurontin and online overnight delivery, and purchase no prescription norvasc fedex shipping, and online ordering purchase doxycycline next day cod, and ordering online feminizing effects of premarin, and buy cheap online buspar and wellbutrin, and online cheap medications order overnight retin-a, and

AlivePDF release

Since I was writing a book, It's been a long time since AlivePDF had been updated, I am happy to post this release.

I was not able to release the 0.1.5 right now, but this release will come in the following weeks :)

For the moment, I decided to release this new release which includes some cool new features especially Image Stream support for the 300 dpi people :) :

New features :

- Image Stream support :

Now, you can embed an image as a ByteArray, this allows you to embed high quality images (300 dpi) to the PDF :

[Embed( source="/assets/cover_300dpi.jpg", mimeType="application/octet-stream" )]
private var jpgBytes:Class;

myPDF.addImageStream( new jpgBytes() as ByteArray, 0, 0, 0, 0, 1, ImageResize.RESIZE_PAGE );

For the moment only JPG images are supported, I will add PNG support in the following days :)

- Page Class :

Here is a brand new org.alivepdf.pages.Page class to handle pages, which is used with the addPage method.

Here is how to add a new page since this new release :

var newPage:Page = new Page ( Orientation.PORTRAIT, Unit.MM, Size.A4 );

myPDF.addPage( newPage );

To create a custom page size, you would use the following code :

var customSize:Size = new Size ( [420.94, 595.28], "CustomSize", [5.88.3], [148, 210] );

var page:Page = new Page ( Orientation.PORTRAIT, Unit.MM, customSize );

myPDF.addPage ( page );

If you trace a Page object, the page describes itself automatically

var newPage:Page = new Page ( Orientation.PORTRAIT, Unit.MM, Size.A4 );

// output : [Page orientation=Portrait page=0 pagewidth=210 height=297]
trace( newPage );

When writing complex pages, you can save some time by cloning the page with the clone() method :

var newPage:Page = new Page ( Orientation.PORTRAIT, Unit.MM, Size.A4 );

myPDF.addPage( newPage );

var clonedPage:Page = newPage.clone();

myPDF.addPage( clonedPage );

The new page model introduces a bunch of new methods like gotoPage :

myPDF.gotoPage ( 1 );

The getPages() method returns an array of pages :

var pdfPages:Array = myPDF.getPages ();

for each ( var p:* in pdfPages ) trace( p );

*/ output :
[Page orientation=Portrait page=0 pagewidth=210 height=297]
[Page orientation=Portrait page=1 pagewidth=210 height=297]*/

- New events :

When a page is added, a PageEvent.ADDED event is dispatched :

myPDF.addEventListener( PageEvent.ADDED, pageAdded );

private function pageAdded ( pEvt:PageEvent ):void

trace( );


To monitor the PDF generation, the following events are dispatched in the following order :

myPDF.addEventListener( ProcessingEvent.STARTED, generationStarted );
myPDF.addEventListener( ProcessingEvent.PAGE_TREE, pageTreeGeneration );
myPDF.addEventListener( ProcessingEvent.RESOURCES, resourcesEmbedding );
myPDF.addEventListener( ProcessingEvent.COMPLETE, generationComplete );

private function generationStarted ( pEvt:ProcessingEvent ):void

trace("pdf generation initiated : " + pEvt.duration / 1000 + " seconds");


private function pageTreeGeneration ( pEvt:ProcessingEvent ):void


trace("page tree generated in : " + pEvt.duration / 1000 + " seconds");


private function resourcesEmbedding ( pEvt:ProcessingEvent ):void


trace("resources embedded : " + pEvt.duration / 1000 + " seconds");


private function generationComplete ( pEvt:ProcessingEvent ):void


trace("pdf generated in : " + pEvt.duration / 1000 + " seconds");


- New saving method :

You can now save the PDF as a base 64 string :

var base64String:String = Method.BASE_64 );

Things fixed :

A lot of bugs fixed, from euro (€) support, to addCell bugs, and scaled objects with the addImage method. I can not list everything :)

Documentation has been updated, I have also included an AIR application example.

Download this new version here

I am also working on non-blocking JPG compression and HTML support for the next release.

Comments 23

  1. Alex wrote:

    Thank you very much Thibault ! Will you add PNG support also for the addImage function ?

    Posted 12 May 2008 at 9:59 am
  2. Thibault Imbert wrote:

    Hi Alex,

    Yes PNG support is almost ready and is definitely one of the next feature coming up ;)

    kind regards,


    Posted 12 May 2008 at 3:04 pm
  3. Isa wrote:

    Thank you very very much so far.
    I’m happy about all further coming features :-)
    Will there be more tutorials?
    Kind regards,

    Posted 12 May 2008 at 7:10 pm
  4. sypd wrote:

    Fantastic! Thanks Thibault.

    Posted 12 May 2008 at 8:08 pm
  5. Jim wrote:

    I have a custom size defined with a landscape page orientation and I get a weird 0,0 coordinate of lower left. This forces all of my text to be positioned off page. What code base effects the 0,0 coordinates?

    Posted 15 May 2008 at 4:52 pm
  6. Jim wrote:

    x coordinate seems fine. Y is offset. If I put in a y=-10 it begins to advance up the page.

    Posted 15 May 2008 at 5:03 pm
  7. Rui Cruz wrote:

    “For the moment only JPG images are supported, I will add PNG support in the following days :)

    really needing this Thibault, I’m using ImageSnapShot and i get a fast png.. if i use the jpegEncoder will increase a lot the time.. send me email when you get it ready, or in light me for i create

    Posted 19 May 2008 at 4:01 pm
  8. Thibault Imbert wrote:

    Hi Rui,

    Definitely a coming up feature, give me a few weeks :)

    Posted 19 May 2008 at 7:27 pm
  9. Jean Szabo wrote:


    Can you contact me, I have a probleme whene I try to display cell with french accent in a cell.

    Posted 22 May 2008 at 11:00 am
  10. Rui Cruz wrote:

    Hi Thibault, I don’t wanna rush you… but there are people waiting for my app to be finish to start print test’s.. I can use the jpg encoder, but it’s so slow that will be impossible… imagine generate 100 pages at 150dpi with jpgEncoder!!! well pngEncoder is the way for now… and for generate pdf alivepdf is the way :)

    Posted 23 May 2008 at 11:08 am
  11. Thibault Imbert wrote:

    Hi Rui,

    I am on holidays till the 25th. I don’t have my laptop with me :) I will try to post a new release next week with some bugs fixed and PNG support.

    kind regards,

    Posted 23 May 2008 at 5:23 pm
  12. Rui Cruz wrote:

    Thank you so much Thibault!! I hope some day have your knowledges for don’t boring you :)

    anyway, I’m implementing alivePdf on and if alivepdf don’t exist I didn’t know how to do it!!

    thanks again

    Posted 27 May 2008 at 4:39 pm
  13. daud wrote:

    Hi Thibault

    I have a few questions that I need answering. Can I email them to you or call you?


    Posted 14 Jul 2008 at 1:04 pm
  14. Steve wrote:

    I would like to save a movieclip to a PDF at 300 dpi. I tried first using your example to import an image and it didn’t work.

    The ImageResize class was renamed ResizeMode but documentation and site have not been updated.

    After fixing that, I tried creating a byteArray with the following code:

    var image:myPic = new myPic();
    var bmd:BitmapData = new BitmapData(image.width, image.height);
    var ba:ByteArray = bmd.getPixels(image.getBounds(image));
    myPDF.addImageStream(ba, 0, 0, 0, 0, 1, ImageResize.RESIZE_PAGE);

    compiling caused this runtime error: ‘Image format not supported for now.’

    I then tried using the embed method in your example, and got this error: ‘Instantiation attempted on a non-constructor.’

    Can you please explain this method a little better and provide a working example of creating a 300 dpi image on a pdf?

    Thank You,

    Posted 29 Dec 2008 at 11:47 pm
  15. fabien wrote:

    hi Thibault,
    I tried to get my pdf sending by email, I have to generate the pdf fist,save it to a file then call another pdf script to send it, but i cant’t get the private fucntion ProcessingEvent.COMPLETE to work … to check is my pdf is created by the php script, if you have an idea …
    (using the 0.14.4 still have a litthe bug on the with addMultiCell at the end of the line)
    thx in advance,

    Posted 15 Jan 2009 at 10:21 pm
  16. chinmoy wrote:

    I have a V-box which has charts , but the charts are not very large. I pass the id of this V-Box to the addImageStream method. I want the charts to be resized(zoomedIn) after click ing the export to PDF button, so that on my PDF I can see zoomed charts. What’s the solution for this?

    Posted 17 Nov 2009 at 4:25 pm
  17. Robert Snow wrote:

    I have a problem following your example
    what I have is:
    [Embed(source="logo2005.jpg", mimeType="application/octet-stream")]
    private var jpgBytes:Class;

    and in my creation function:
    var myPDF:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.LETTER );
    myPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE );
    myPDF.addImageStream( new jpgBytes() as ByteArray,0,0,180,80);

    the error I get is:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at org.alivepdf.pdf::PDF/addImageStream()[/Users/timbert/Documents/Flex Builder 3/AlivePDF/src/main/flex/org/alivepdf/pdf/]

    Posted 18 Nov 2009 at 10:32 pm
  18. Viktor Stevich wrote:

    I have problem with the function gotoPage only when is in if statement, anyone knows any work around?

    Posted 12 Mar 2010 at 6:54 pm
  19. ren wrote:

    I am using AlivePDF for a requirement in my AIR project.Here is my scenerio

    I am using Tab navigator with one viewstack having Chart and another having Datagrid

    I have a number of panels with graphs and charts in the Datagrid. User sees many panels at a time.

    1)How can I present these Panels(with Charts) to different pages of PDF?

    2)How can I write to pdf both chart and datagrid in a tab navigator, and if the creation policy is such that it is loaded only when user selects?

    Do relpy me as soon as possible. Your help will be highly appreciated

    Also I have problem in Using addImage();

    pdf.addImage(dg1, RESIZE,15,20,100,200,0,1,


    what parameter we have to use for resize here. I am using latest version .1.5 beta. I a getting error for resize

    Posted 26 Mar 2010 at 4:28 pm
  20. rc wrote:

    I have
    var customSize:Size = new Size ( [1748, 2480], “CustomSize”, [5.8, 8.3], [148, 210] );

    but acrobat reader show size 61,658cm x 87,479cm
    Why ?

    Posted 26 Apr 2010 at 4:46 pm
  21. Taniguchi wrote:


    I’m trying to set a custom size for my PDF (61X80 mm) but I’m kinda losing hope here.

    I tried the sample code but it displays a wrong size on the pdf foot plus I got blank areas around the image.

    The PDF content its a sing image, nothing else. What I’m trying to do it’s to set the widthXheight in pixels like this:

    var customSize:Size = new Size ( [parseInt(_selectedObjProperties.width), parseInt(_selectedObjProperties.height)], “CustomSize”, [5.8, 8.3], [148, 210]);
    var page:Page = new Page (Orientation.PORTRAIT, Unit.MM, customSize);


    I also tried static values but no success.

    Thanks in advance!

    Posted 03 Jul 2010 at 3:13 am
  22. Taniguchi wrote:

    I figure that _pdf it’s not passing the new size to the create.php. Maybe mistake its on the PHP script?

    Posted 03 Jul 2010 at 3:14 pm
  23. Aram wrote:

    hi, AlivePDF is GREAT lib for exporting PDF, but I have one question, is it possible add all graphic elements that i have in my UIComponent object to PDF page, I need high quality vector graphic in PDF.

    Thanks for advance!

    Posted 05 Aug 2011 at 9:36 pm

Trackbacks & Pingbacks 2

  1. From AlivePDF - AlivePDF release on 27 May 2008 at 11:28 am

    [...] hope this release will help you guys (Rui Cruz) finishing your projects [...]

  2. From portrait orientation - on 27 Jan 2010 at 9:45 pm

    [...] I tested my the theory out by creating a 480w by 640h graphic and assigned it to a contact. …AlivePDF – AlivePDF releasevar newPage:Page = new Page ( Orientation.PORTRAIT, Unit.MM, Size.A4 ) … var newPage:Page = new [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *