Lesson 23. Printing From Flex


What You Will Learn

In this lesson, you will:

  • Instantiate a FlexPrintJob object and then use the start(), addObject() and send() methods to produce printed output

  • Implement code to gracefully exit the printing process if the user cancels the print job at the operating-system level

  • Use the PrintDataGrid control for printing data from a DataGrid

  • Create a container that is not visible on the screen and is used for formatting printed output

  • Create a custom component that is not visible on the screen and is used for formatting printed output

  • Scale printed output on a page using static constants of the FlexPrintJobScaleType class

Approximate Time

This lesson takes approximately 2 hours to complete.

Lesson Files

Media Files:

None

Starting Files:

Lesson23/printing/start/PrintingTask1.mxml

Lesson23/printing/start/PrintingTask2.mxml

Lesson23/printing/start/PrintingTask3.mxml

Lesson23/printing/start/PrintingTask4.mxml

Lesson23/start/views/ecomm/OrderConf.mxml

Completed Files:

Lesson23/printing/complete/PrintingTask1.mxml

Lesson23/printing/complete/PrintingTask2.mxml

Lesson23/printing/complete/PrintingTask3.mxml

Lesson23/printing/complete/PrintingTask4.mxml

Lesson23/printing/complete/views/PrintView.mxml

Lesson23/complete/views/ecomm/OrderConf.mxml

Lesson23/complete/views/ecomm/PrintReceipt.mxml

In many (if not most) cases, you will not want your printed output to look exactly like the screen display. Adobe Flex gives you functionality to build containers and components to format printed output that does not have to resemble the screen display at all. Two classes, FlexPrintJob and PrintDataGrid, are key to implementing printing.

No longer do web applications have to print receipts and itineraries that are poor resemblances of the real things.

A printed receipt from the checkout process




Adobe Flex 2.Training from the Source
Adobe Flex 2: Training from the Source
ISBN: 032142316X
EAN: 2147483647
Year: 2006
Pages: 225

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net