Flash Player 10, will be THE player for handling local files.
Here is a tiny demo of the new FileReference feature added in Astro.
Browse for any images (PNG or JPG) and save the PDF to any location. The images are directly embedded into the PDF with no "server upload trick" to access the binary image stream.
The PDF is generated 100% client, with no server involved. As I told you the other day, the create.php script is no longer used here as Astro allows us to output the file with a save-as dialog box
Warning : Flash Player 10 required
Alpha channel PNG images are not supported for now. I will add this feature later this week
When the file is selected and loaded the onFileLoaded function is executed. The addImageStream allows us to inject the image the image stream into the PDF :
myPDF.addImageStream ( evt.target.data, 0, 0, 0, 0, 1, ResizeMode.RESIZE_PAGE );
When the generate button is clicked, we just call the save method and pass the PDF bytes :
saving.save ( myPDF.save ( Method.LOCAL ), "generated.pdf" );
Easy, isn't it ?