Upgrade to 0.1.4.9

Hi everybody,

I just uploaded the latest AlivePDF release to the trunk and to the google download page.

Thanks to christoph.k and Kyle we are having two new improvements in AlivePDF :

- Transformation support (skew() and rotate() methods added).
- 3 times faster JPEG Encoding when using addImage with ImageFormat.JPG.

This is the latest release before 0.1.5 with embedded fonts support, GIF support, transparent PNG's and more. The current alpha version of AlivePDF 0.1.5 is almost 80% ready, some more people are getting involved into AlivePDF development so that we can get this release finally ready ! ;)

Lovelycharts loves AlivePDF

If you don't know yet Lovely Charts, check it out, it's a online tool which allows you to create different kind of flowcharts, diagrams, and save them into different formats and especially as high-quality PDF's.

Guess which library is being used ? The lovely AlivePDF ;)

Cool usage of AlivePDF

Simple, efficient and smart design, I love it :)

Kudos to Boks!

addGrid gets a repeatHeader parameter !

I have just uploaded in the SVN an updated version of AlivePDF (0.1.4.8) which includes a repeatHeader parameter in the addGrid method :

public function addGrid ( grid:Grid, x:Number=0, y:Number=0, repeatHeader:Boolean=true ):void

This will allow you to repeat columns header on each page where the grid is flowing.

This was a request, hope you'll like it Willis ;)

Dynamic Grid Feature updated !

Yesterday I realised that a lot of people were having troubles using the addGrid method in its current state, cause it was not flexible enough for everybody.

I just commited a new release of the 0.1.4.8 release in the AlivePDF SVN, here is how it works now.

First use is the following, you create a Grid and pass some data, you don't specify any width, alignement or even field or header text :

// create a Grid object as usual
var grid:Grid = new Grid ( dp.toArray(), 200, 120, new RGBColor (0x666666), new RGBColor (0xCCCCCC), new RGBColor (0), true, new RGBColor ( 0x0 ), Joint.MITER );

// pass the grid
myPDF.addGrid(grid);

What you will get is a grid with each column with a default width and each column field name as the header text.

Now here comes the good part :

// create columns with header text (here in French), field name, column width, header text and cell alignment
var gridColumnAge:GridColumn = new GridColumn("Age", "age", 20, Align.LEFT, Align.LEFT);
var gridColumnFirstName:GridColumn = new GridColumn("Prénom", "firstName", 20, Align.LEFT, Align.LEFT);
var gridColumnLastName:GridColumn = new GridColumn("Nom", "lastName", 40, Align.LEFT, Align.LEFT);
var gridColumnEmail:GridColumn = new GridColumn("E-Mail", "email", 45, Align.LEFT, Align.LEFT);
var gridColumnCity:GridColumn = new GridColumn("Ville", "city", 40, Align.LEFT, Align.LEFT);

// create a columns Array
// it determines the order shown in the PDF
var columns:Array = new Array ( gridColumnLastName, gridColumnFirstName, gridColumnAge, gridColumnEmail, gridColumnCity );

// create a Grid object as usual
var grid:Grid = new Grid ( dp.toArray(), 200, 120, new RGBColor (0x666666), new RGBColor (0xCCCCCC), new RGBColor (0), true, new RGBColor ( 0x0 ), Joint.MITER );

// pass the columns
grid.columns = columns;

// pass the grid
myPDF.addGrid(grid);

As you can see, a new GridColumn class is added, which allows you to represent physically in ActionScript each column, with a specific text header, a field, a width and alignment.

Keep in mind that if you use the columns property of the Grid class, it also allows you to filter some fields so that they do not appear in the grid. Let's say you do not want the email to show, you will simply modify the columns array this way :

var columns:Array = new Array ( gridColumnLastName, gridColumnFirstName, gridColumnAge, gridColumnCity );

Let's say you want to change the order of the columns in the grid :

var columns:Array = new Array ( gridColumnFirstName, gridColumnLastName, gridColumnCity, gridColumnAge );

Can you guys download this latest version and test it and let me know if it works nicely for you ? Thanks !

Page Display : Zoom factor added in AlivePDF 0.1.4.8

Just a quick note to let you know that I have just added in AlivePDF 0.1.4.8 something which has been requested a multiple times.

When calling the setDisplayMode method you can now pass a zoom factor.

This will inform the PDF reader which zoom value you want when the PDF is opened :

// this will open the PDF at 100% zoom
myPDF.setDisplayMode ( Display.REAL, Layout.SINGLE_PAGE, PageMode.USE_NONE, 1 );

// this will open the PDF at 50% zoom
myPDF.setDisplayMode ( Display.REAL, Layout.SINGLE_PAGE, PageMode.USE_NONE, .5 );

Download the 0.1.4.8 branch in the SVN to use it if you need it :)

Quick update on the 0.1.5 release with font embedding, we are nearly there ;)

Dynamic Grid coming in 0.1.4.8

I am about to release the next version of AlivePDF which is having a new nice feature I already talked about a few months ago, I know you guys needed this one for some projects, you can already download the new release of AlivePDF in the AlivePDF SVN which already contains a beta 0.1.4.8 branch. I will fix some minor stuff and release the final version next week.

This new grid feature will allow you to pass any ArrayCollection and let AlivePDF inject the data in the PDF as a nice table. This new feature is available through the addGrid method which is receiving a Grid object and a position. You can set options like colors and alternate row colors, or text alignement in cells.

I am currently thinking about adding a Microsoft Excel feature so that you can also call the export method on the Grid object and generate an Excel file having all those data in it. Let me know if you think you would like or need such a feature.

Here is a tiny demo which illustrates the power of this new addGrid feature :

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.

Update : Here is the code being used for the demo above

var grid:Grid = new Grid ( dp.toArray(), 200, 120, new Array (40, 50, 40, 30), new Array ( Align.LEFT, Align.LEFT, Align.LEFT, Align.LEFT ), new RGBColor (0x666666), new RGBColor (0xCCCCCC), new RGBColor (0), true, new RGBColor ( 0x0 ), Joint.MITER );

myPDF.addPage();
myPDF.textStyle( new RGBColor(0), 1 );
myPDF.setFont ( FontFamily.ARIAL, Style.NORMAL, 12 );
myPDF.addGrid( grid, 5, 5 );

More stuff to come soon ! :)

Early AlivePDF 0.1.4.7 release

Hi everybody :). It's been a long time since version 0.1.4.6 was released !

Some cool things are happening for AlivePDF. Two new contributors joined AlivePDF development, I am happy to welcome Mark Lynch and Alexandre Pires who already did a great job implementing a new method called writeFlashHTMLText to handle basic HTML tags. We are still doing some tests with the current beta and it is still under heavy development ;)

You can download an early early beta version of AlivePDF 0.1.4.7 on the SVN available here. (Yes !, AlivePDF SVN is finally up !)

For now here is the new stuff in this 0.1.4.7 version :

  • Fixing European character issues
    Thank you Fabien for telling me about issues with european characters, this was fixed in earlier versions and came back because of a typo in the source code !)
  • Added a frame parameter to the save() method to open the PDF in a specific frame
    This was asked in the issues list and added.
  • Switched from private to protected to allow PDF class subclassing
    We think that it will be easier to all of you to extend the PDF core class by allowing to extend it. PDF class is not is not set to final anymore
    This will allow us to develop a PDF subclass handling advanced HTML tags. PDF core class will therefore handle only classic HTML tags.
  • Added a writeFlashHTMLText() to handle basic HTML tag
    This method will handle classic HTML tags (you can see that by its name).
  • Added a header() and footer() to be overriden to implement easy pagination and automatic title on each page
    Now that the PDF class can be subclassed, two new methods have been added. They are called automatically when a page is created. If you override those, you will be able to implement easily custom page titling and pagination.

Now, you may be asking, where is this great method called addGrid he told us about a few months ago !!?
It's definitely coming for this version, I spent a LOT of time working on font embedding (which is not yet finished) and did not focus on the addGrid method. But from what I can see in your comments, you really need this one. So I am going to stick to this one right now :)

A lot of new stuff is coming up for AlivePDF, I think one of the next big features coming in AlivePDF is XSL-FO support !

AlivePDF on Adobe.TV

A few months ago, I recorded a few videos for Adobe.TV, and here is the first one about AlivePDF.
It is a little tutorial to discover and get started with it ;)

Upgrade to 0.1.4.6

Hi everybody, Please download the latest version (0.1.4.6) of AlivePDF which is fixing bugs 83, 84, 77. Thanks !