Adobe Flex 3 Help

Basics of printing

Introduction to printing

In ActionScript 3.0, you use the PrintJob class to create snapshots of display content to convert to the ink-and-paper representation in a printout. In some ways, setting up content for printing is the same as setting it up for on-screen display--you position and size elements to create the desired layout. However, printing has some idiosyncrasies that make it different from screen layout. For instance, printers use different resolution than computer monitors; the contents of a computer screen are dynamic and can change, while printed content is inherently static; and in planning printing, the constraints of fixed page size and possibility of multipage printing need to be considered.

Even though these differences may seem obvious, it's important to keep them in mind when setting up printing with ActionScript. Since accurate printing depends on a combination of the values specified by you and the characteristics of the user's printer, the PrintJob class includes properties that allow you to determine the important characteristics of the user's printer that you'll need to take into account.

Common printing tasks

The following common printing tasks are described in this chapter:

  • Starting a print job
  • Adding pages to a print job
  • Determining whether the user cancels a print job
  • Specifying whether to use bitmap or vector rendering
  • Setting page size, scale, and orientation
  • Specifying the printable area of content
  • Converting screen size to page size
  • Printing multipage print jobs

Important concepts and terms

The following reference list contains important terms used in this chapter:

  • Spooler: A portion of the operating system or printer driver software that keeps track of pages as they are waiting to be printed and sends them to the printer when it is available.
  • Page orientation: The rotation of the printed content in relation to the paper--either horizontal (landscape) or vertical (portrait).
  • Print job: The page or set of pages that make up a single printout.