AIR & Printing
AIR 2, AlivePDF and PurePDF:
everything you need in your RIA or desktop apps
Luca Mezzalira
ACE and ACI on Flash, Flex with AIR and Flash Lite

Mart3 owner and Flash Platform Developer


Adobe Italy Consultant


Teacher, Writer, Adobe supporter!
Luca Mezzalira
ACE and ACI on Flash, Flex with AIR and Flash Lite

Mart3 owner and Flash Platform Developer


Adobe Italy Consultant


Teacher, Writer, Adobe supporter!


Oh, yes! I forget! I’m Chewbacca also!
Save time
when someone ask me
to print a report in my
RIA or Desktop App
Agenda
. Printing with Flash and Flex
. AIR 2 new features
. AIR 2 and PrintJob
. AlivePDF
. PurePDF
. Questions & Answear
When do you use PRINTING API?
. to print a report
. to print a form (invoice, receipt, ...)
. to print an artwork
. to prepare a PDF for typography (REMEMBER that

WE HAVE TLF)
Printing in Flash
. PrintJob class
. OS Dialog box to interact with printer
. problem to create complex documents
. problem to manage more than 1 page
. problem to print big images
. not easy to work with dynamic data
Printing with Flex
. FlexPrintJob to print Flex objects
. PrintAdvancedDataGrid
. PrintDataGrid
. PrintOLAPDataGrid
FlexPrintJob
var printJob:FlexPrintJob = new FlexPrintJob();
printJob.start();
printJob.addObject(myObject, FlexPrintJobScaleType.MATCH_WIDTH);
printJob.send();


When you call start() method Flash Player or AIR:
1. give a feedback from user’s choice (true/false)
2. retrieve page dimension from Printer


Each object added with addObject method will be
print in a different page
PrintDataGrid
//thePrintView is a custom component with PrintDataGrid component
printJob.addObject(thePrintView);
while (thePrintView.myDataGrid.validNextPage) {
    thePrintView.myDataGrid.nextPage();
    printJob.addObject(thePrintView);
}


With PrintDataGrid component you can manage
rows to print in many pages
this is the
past...
     ...now the
     PRESENT
AIR 2 new features
Multitouch API (     do you know Steve!? )
Microphone data access
Open documents with user’s default application
UDP Socket
Socket Server (this feature ROCKS!)
Screen reader support
File promises
Mass storage device detection
Printing API ( :D )
... and so on ...
AIR Printing API
. pixelsPerInch -> resolution to use for Bitmap
. printer -> set Printer
. printers -> Vector.<String> with all printers installed
. copies -> number of copies to print
. selectePaperSize() -> choose your page size
. start2() -> start a print with new API
. terminate() -> reset PrintJob object if you need it
AIR Printing API
PrintMethod:
   . AUTO -> Automatic selection of best method of printing
   . VECTOR -> ehm... maybe print with Vector method?
   . BITMAP -> mumble, mumble... DOH!



PrintIUIOptions -> need to manage Print Dialog Box

Everything you need it’s Language Reference!!!
AlivePDF
AS3 PDF library                        AlivePDF works with:
                                           Images, EPS files,
you can use online                      Vectors, Embedded
and offline                                          Fonts...

you don’t need                          You can add in your
any serverside                                  PDF: links,
script                                          transitions,
                                              PDF settings,
                                                          ...
                     THANK YOU MATE!
AlivePDF
Steps to work with AlivePDF API:
1. create a PDF object
2. addPage()
3. add content (images, text, eps...)
3a. (Optional) setting your PDF...
4. save it with FileReference or FileStream
AlivePDF - case history
My client ask me to create a comic creator that
runs on Mac and PC without installation



What do I need ???
Flash + Zinc + AlivePDF
PurePDF
It’s a very powerful PDF library made by Sephiroth
http://www.sephiroth.it/weblog/archives/2010/02/
purepdf_a_complete_actionscript_pdf_l.php

PurePDF has tons of cool features:
. barcode generator
. multi column
. embedded movies
. metadata, page headers, page footers
. vertical text
. javascript
... and so on
PurePDF
This library is targeted for Flash Player 10

For any help, doubt or more use PurePDF list:
http://code.google.com/p/purepdf/issues/list

Sepy and his team is working on this open-source as3 libs so in
the next future will see new amazing functionalities!!!
Resources
ALIVEpdf
http://code.google.com/p/alivepdf/
PUREpdf
http://code.google.com/p/purepdf/
FlexReport
http://flexreport.riaforge.org/
Finally...
my “thoughts” about Flash Platform attack:
my “thoughts” about Flash Platform attack:




HTML 5, Apple and so on!
my “thoughts” about Flash Platform attack:




HTML 5, Apple and so on!

                      NO
OOP, Design Patterns, workflow, TLF, real multiple
screen deployment...
to lose your time with this cool shit!



blog:lucamezzalira.com                email:luca@mart3.org
twitter:lucamezzalira                  site:www.mart3.org

Adobe AIR & Printing

  • 1.
    AIR & Printing AIR2, AlivePDF and PurePDF: everything you need in your RIA or desktop apps
  • 2.
    Luca Mezzalira ACE andACI on Flash, Flex with AIR and Flash Lite Mart3 owner and Flash Platform Developer Adobe Italy Consultant Teacher, Writer, Adobe supporter!
  • 3.
    Luca Mezzalira ACE andACI on Flash, Flex with AIR and Flash Lite Mart3 owner and Flash Platform Developer Adobe Italy Consultant Teacher, Writer, Adobe supporter! Oh, yes! I forget! I’m Chewbacca also!
  • 4.
    Save time when someoneask me to print a report in my RIA or Desktop App
  • 5.
    Agenda . Printing withFlash and Flex . AIR 2 new features . AIR 2 and PrintJob . AlivePDF . PurePDF . Questions & Answear
  • 6.
    When do youuse PRINTING API? . to print a report . to print a form (invoice, receipt, ...) . to print an artwork . to prepare a PDF for typography (REMEMBER that WE HAVE TLF)
  • 7.
    Printing in Flash .PrintJob class . OS Dialog box to interact with printer . problem to create complex documents . problem to manage more than 1 page . problem to print big images . not easy to work with dynamic data
  • 8.
    Printing with Flex .FlexPrintJob to print Flex objects . PrintAdvancedDataGrid . PrintDataGrid . PrintOLAPDataGrid
  • 9.
    FlexPrintJob var printJob:FlexPrintJob =new FlexPrintJob(); printJob.start(); printJob.addObject(myObject, FlexPrintJobScaleType.MATCH_WIDTH); printJob.send(); When you call start() method Flash Player or AIR: 1. give a feedback from user’s choice (true/false) 2. retrieve page dimension from Printer Each object added with addObject method will be print in a different page
  • 10.
    PrintDataGrid //thePrintView is acustom component with PrintDataGrid component printJob.addObject(thePrintView); while (thePrintView.myDataGrid.validNextPage) { thePrintView.myDataGrid.nextPage(); printJob.addObject(thePrintView); } With PrintDataGrid component you can manage rows to print in many pages
  • 11.
    this is the past... ...now the PRESENT
  • 12.
    AIR 2 newfeatures Multitouch API ( do you know Steve!? ) Microphone data access Open documents with user’s default application UDP Socket Socket Server (this feature ROCKS!) Screen reader support File promises Mass storage device detection Printing API ( :D ) ... and so on ...
  • 13.
    AIR Printing API .pixelsPerInch -> resolution to use for Bitmap . printer -> set Printer . printers -> Vector.<String> with all printers installed . copies -> number of copies to print . selectePaperSize() -> choose your page size . start2() -> start a print with new API . terminate() -> reset PrintJob object if you need it
  • 14.
    AIR Printing API PrintMethod: . AUTO -> Automatic selection of best method of printing . VECTOR -> ehm... maybe print with Vector method? . BITMAP -> mumble, mumble... DOH! PrintIUIOptions -> need to manage Print Dialog Box Everything you need it’s Language Reference!!!
  • 15.
    AlivePDF AS3 PDF library AlivePDF works with: Images, EPS files, you can use online Vectors, Embedded and offline Fonts... you don’t need You can add in your any serverside PDF: links, script transitions, PDF settings, ... THANK YOU MATE!
  • 16.
    AlivePDF Steps to workwith AlivePDF API: 1. create a PDF object 2. addPage() 3. add content (images, text, eps...) 3a. (Optional) setting your PDF... 4. save it with FileReference or FileStream
  • 17.
    AlivePDF - casehistory My client ask me to create a comic creator that runs on Mac and PC without installation What do I need ??? Flash + Zinc + AlivePDF
  • 18.
    PurePDF It’s a verypowerful PDF library made by Sephiroth http://www.sephiroth.it/weblog/archives/2010/02/ purepdf_a_complete_actionscript_pdf_l.php PurePDF has tons of cool features: . barcode generator . multi column . embedded movies . metadata, page headers, page footers . vertical text . javascript ... and so on
  • 19.
    PurePDF This library istargeted for Flash Player 10 For any help, doubt or more use PurePDF list: http://code.google.com/p/purepdf/issues/list Sepy and his team is working on this open-source as3 libs so in the next future will see new amazing functionalities!!!
  • 20.
  • 21.
  • 22.
    my “thoughts” aboutFlash Platform attack:
  • 23.
    my “thoughts” aboutFlash Platform attack: HTML 5, Apple and so on!
  • 24.
    my “thoughts” aboutFlash Platform attack: HTML 5, Apple and so on! NO OOP, Design Patterns, workflow, TLF, real multiple screen deployment...
  • 26.
    to lose yourtime with this cool shit! blog:lucamezzalira.com email:luca@mart3.org twitter:lucamezzalira site:www.mart3.org