Packagecom.flexicious.print
Classpublic class PrintOptions
InheritancePrintOptions Inheritance PrintExportOptions Inheritance Object
Implements flash.events.IEventDispatcher

Class to print the datagrid, either one page at a time or specific pages, or all pages.



Public Properties
 PropertyDefined By
  asynch : Boolean
Flag to enable asynchronous processing of the print results.
PrintOptions
  asynchDelayCapture : Boolean
Flag to wait for the grid to completely render prior to capturing a snapshot for printing.
PrintOptions
  asynchTimeInterval : int
The time interval, in milliseconds, used by the timer of the execute() method to iteratively process pages.
PrintOptions
  availableColumns : ArrayCollection
PrintOptions
  columnsToPrint : ArrayCollection
PrintOptions
  columnWidths : ArrayCollection
PrintOptions
 InheritedexcludeHiddenColumns : Boolean = false
A flag that will To disable the user from printing or exporting invisible columns altogether .
PrintExportOptions
  extendedDataGrid : IExtendedDataGrid
The grid being printed.
PrintOptions
 InheritedhideHiddenColumns : Boolean = false
A flag that will hide any columns that are not visible from being printed or exported by default.
PrintExportOptions
  includeInvisibleColumns : Boolean
If you set this to true, columns that are set to visible=false on the parent grid will be printed.
PrintOptions
  includePageFooter : Boolean
Whether or not to include the page footer Default is true
PrintOptions
  includePageHeader : Boolean
Whether or not to include the page header Default is true
PrintOptions
  includePrintFooter : Boolean
Whether or not to include the report footer Default is true
PrintOptions
  includePrintHeader : Boolean
Whether or not to include the report header Default is true
PrintOptions
  modalWindows : Boolean
Flag, which defaults to false, launches the preview and options screen in modal mode.
PrintOptions
  pageFooterRenderer : IFactory
The renderer component for the page footer.
PrintOptions
 InheritedpageFrom : Number = -1
In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES determines which pages of a grid with paging enabled to print.
PrintExportOptions
  pageHeaderRenderer : IFactory
The renderer component for the page header.
PrintOptions
  pageSize : PageSize
Size of the paper in the printer.
PrintOptions
 InheritedpageTo : Number = -1
In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES determines which pages of a grid with paging enabled to print.
PrintExportOptions
 InheritedpopupParent : DisplayObject
In scenarios where you are using modules, or are in an AIR application, where you want the window to open up as a child of anything other than the top level application, use this property.
PrintExportOptions
  preview : Boolean
Set this to true if you want the print controller to perform a preview before printing.
PrintOptions
  previewWindow : IPrintPreview
This is the actual instance of the preview window being used to render the preview.
PrintOptions
  printable : IPrintable
The printable being printed.
PrintOptions
  printAsBitmap : Boolean
Sets the printAsBitmap property of the print job Defaults to true, similar to the default for the FlexPrintJob class
PrintOptions
  printComponent : IPrintComponent
The print representation of the printable being printed.
PrintOptions
  printComponentRenderer : IFactory
PrintOptions
  printContainer : DisplayObjectContainer
Before attempting to print, we add the print window to a display object container.
PrintOptions
  printDataGrid : IPrintDatagrid
The print representation of the grid being printed.
PrintOptions
  printDataGridRenderer : IFactory
For backwards compatibility, this is same as printComponentRenderer
PrintOptions
  printedPages : ArrayCollection
An image of each page and stores it in the printedPages array instead of sending them to the printer, when printToPdf is set to true
PrintOptions
 InheritedprintExportOption : String = Current Page
Specifies what to export, valid options are: EXPORT_CURRENT_PAGE EXPORT_ALL_PAGES EXPORT_SPECIFIED_PAGES EXPORT_SELECTED_RECORDS The All pages and specified pages are only available if paging is enabled and the grid is in client mode.
PrintExportOptions
  printExportParameters : Object
Any custom data that is passed into the print/export mechanism. This will then be available on Print/Export Options when the Print or Export is run. Please note, this is not persisted in preferences.
PrintOptions
  printOptionsViewrenderer : IFactory
The view renderer for the print options.
PrintOptions
  printPreviewViewrenderer : IFactory
The view renderer for the preview.
PrintOptions
  printToPdf : Boolean
Added for integration with Alive PDF.
PrintOptions
  propertiesToTransfer : Array
The properties to transfer from the grid being printed to the print version.
PrintOptions
  reportFooterRenderer : IFactory
The renderer component for the overall print footer.
PrintOptions
  reportHeaderRenderer : IFactory
The renderer component for the overall print header.
PrintOptions
 InheritedsaveFileMessage : String = File generated. Download?
To bypass flash player 10 security when filterPageSortMode="server", we need user action to initiate file download.
PrintExportOptions
 InheritedshowColumnPicker : Boolean = true
Flag to control whether or not to show the column picker.
PrintExportOptions
 InheritedshowWarningMessage : Boolean = true
Flag to control whether or not to show the warning message when user changes print layout or page size.
PrintExportOptions
  stylesToTransfer : Array
The styles to transfer from the grid being printed to the print version.
PrintOptions
  wasPreview : Boolean
When we do a print, we turn off preivew flag.
PrintOptions
  windowStyleProperties : Dictionary
A dictionary of style properties and their values to be applied to the print canvas.
PrintOptions
Public Methods
 MethodDefined By
  
PrintOptions
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void
PrintOptions
  
create(toPdf:Boolean = false):PrintOptions
[static] Convenience method to create an exporter of a specified type
PrintOptions
  
dispatchEvent(event:Event):Boolean
PrintOptions
  
hasEventListener(type:String):Boolean
PrintOptions
  
loadFromPersistedString(grid:IExtendedDataGrid, val:String):void
Hydrates previously persisted property values for the user interactive persistable properties of the print options from the string value created earlier.
PrintOptions
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
PrintOptions
  
toPersistenceString(grid:IExtendedDataGrid):String
Converts the user interactive persistable properties of the print options to a string that can be used for persistence.
PrintOptions
  
willTrigger(type:String):Boolean
PrintOptions
Public Constants
 ConstantDefined By
 InheritedPRINT_EXPORT_ALL_PAGES : String = All Pages
[static]
PrintExportOptions
 InheritedPRINT_EXPORT_CURRENT_PAGE : String = Current Page
[static]
PrintExportOptions
 InheritedPRINT_EXPORT_SELECTED_PAGES : String = Selected Pages
[static]
PrintExportOptions
 InheritedPRINT_EXPORT_SELECTED_RECORDS : String = Selected Records
[static]
PrintExportOptions
Property Detail
asynchproperty
asynch:Boolean

Flag to enable asynchronous processing of the print results. If you set this to true, the pages are processed in timer events, giving the application an opportunity to show progress and prevent timeouts. Asynch can only work if you specify the preview flag, because the print then shows the progress in the preview window, and uses the preview window as a parent container.


Implementation
    public function get asynch():Boolean
    public function set asynch(value:Boolean):void
asynchDelayCaptureproperty 
asynchDelayCapture:Boolean

Flag to wait for the grid to completely render prior to capturing a snapshot for printing. The way the print works, is that it renders each page of the grid takes a snapshot and adds it to the print object to be spooled to the printer. Same concept applies to pdf where instead of adding to the print object the snapshot is converted to an image and added to the pdf byte stream. This does not work well in scenarios where you have external images that are loaded by url as opposed to using embedded assets. In scenarios like these you may need to add a delay to the printing mechanism to ensure that enough time is available for the external images to load. This flag, in combination with the asynchTimeInterval lets you control the amount of time that the print mechanism will wait after the grid is rendered to capture the snapshot.

This property can be used as the source for data binding.


Implementation
    public function get asynchDelayCapture():Boolean
    public function set asynchDelayCapture(value:Boolean):void
asynchTimeIntervalproperty 
asynchTimeInterval:int

The time interval, in milliseconds, used by the timer of the execute() method to iteratively process pages. You can set it to a higher value if you want to wait for longer before the next page is processed. This is used in cases where you are loading external images in your item renderers. Please make sure you also set asynchDelayCapture to true in this scenario. The default value is 1, which allows enough time for the UI to update itself to show the end user a progress bar and also prevents timeouts while printing or exporting to pdf a large number of pages.

This property can be used as the source for data binding.


Implementation
    public function get asynchTimeInterval():int
    public function set asynchTimeInterval(value:int):void
availableColumnsproperty 
availableColumns:ArrayCollection


Implementation
    public function get availableColumns():ArrayCollection
    public function set availableColumns(value:ArrayCollection):void
columnsToPrintproperty 
columnsToPrint:ArrayCollection


Implementation
    public function get columnsToPrint():ArrayCollection
    public function set columnsToPrint(value:ArrayCollection):void
columnWidthsproperty 
columnWidths:ArrayCollection


Implementation
    public function get columnWidths():ArrayCollection
    public function set columnWidths(value:ArrayCollection):void
extendedDataGridproperty 
extendedDataGrid:IExtendedDataGrid

The grid being printed. This is the grid that you pass in to the print controller


Implementation
    public function get extendedDataGrid():IExtendedDataGrid
    public function set extendedDataGrid(value:IExtendedDataGrid):void
includeInvisibleColumnsproperty 
includeInvisibleColumns:Boolean

If you set this to true, columns that are set to visible=false on the parent grid will be printed. (Applicable to Classic only);

This property can be used as the source for data binding.


Implementation
    public function get includeInvisibleColumns():Boolean
    public function set includeInvisibleColumns(value:Boolean):void
includePageFooterproperty 
includePageFooter:Boolean

Whether or not to include the page footer Default is true

This property can be used as the source for data binding.


Implementation
    public function get includePageFooter():Boolean
    public function set includePageFooter(value:Boolean):void
includePageHeaderproperty 
includePageHeader:Boolean

Whether or not to include the page header Default is true

This property can be used as the source for data binding.


Implementation
    public function get includePageHeader():Boolean
    public function set includePageHeader(value:Boolean):void
includePrintFooterproperty 
includePrintFooter:Boolean

Whether or not to include the report footer Default is true

This property can be used as the source for data binding.


Implementation
    public function get includePrintFooter():Boolean
    public function set includePrintFooter(value:Boolean):void
includePrintHeaderproperty 
includePrintHeader:Boolean

Whether or not to include the report header Default is true

This property can be used as the source for data binding.


Implementation
    public function get includePrintHeader():Boolean
    public function set includePrintHeader(value:Boolean):void
modalWindowsproperty 
modalWindows:Boolean

Flag, which defaults to false, launches the preview and options screen in modal mode.

This property can be used as the source for data binding.


Implementation
    public function get modalWindows():Boolean
    public function set modalWindows(value:Boolean):void
pageFooterRendererproperty 
pageFooterRenderer:IFactory

The renderer component for the page footer. Prints on each page of the print out. Has to extend from com.flexicious.print.PrintArea or implement com.flexicious.print.IPrintArea. Default implementation is provided that simply displays the page number. See com.flexicious.print.PageFooter

This property can be used as the source for data binding.


Implementation
    public function get pageFooterRenderer():IFactory
    public function set pageFooterRenderer(value:IFactory):void

See also

com.flexicious.print.PageFooter
com.flexicious.print.PrintArea
com.flexicious.print.IPrintArea
pageHeaderRendererproperty 
pageHeaderRenderer:IFactory

The renderer component for the page header. Prints on each page of the print out Has to extend from com.flexicious.print.PrintArea or implement com.flexicious.print.IPrintArea. Default implementation is provided that simply displays the page number. See com.flexicious.print.PageHeader

This property can be used as the source for data binding.


Implementation
    public function get pageHeaderRenderer():IFactory
    public function set pageHeaderRenderer(value:IFactory):void

See also

com.flexicious.print.PageHeader
com.flexicious.print.PrintArea
com.flexicious.print.IPrintArea
pageSizeproperty 
pageSize:PageSize

Size of the paper in the printer. Valid values are PAGE_SIZE_A3 PAGE_SIZE_A4 PAGE_SIZE_A5 PAGE_SIZE_LETTER PAGE_SIZE_LEGAL Default is PAGE_SIZE_LETTER

This property can be used as the source for data binding.


Implementation
    public function get pageSize():PageSize
    public function set pageSize(value:PageSize):void
previewproperty 
preview:Boolean

Set this to true if you want the print controller to perform a preview before printing. Default is true

This property can be used as the source for data binding.


Implementation
    public function get preview():Boolean
    public function set preview(value:Boolean):void
previewWindowproperty 
previewWindow:IPrintPreview

This is the actual instance of the preview window being used to render the preview.

This property can be used as the source for data binding.


Implementation
    public function get previewWindow():IPrintPreview
    public function set previewWindow(value:IPrintPreview):void
printableproperty 
printable:IPrintable

The printable being printed. This is the grid that you pass in to the print controller

This property can be used as the source for data binding.


Implementation
    public function get printable():IPrintable
    public function set printable(value:IPrintable):void
printAsBitmapproperty 
printAsBitmap:Boolean

Sets the printAsBitmap property of the print job Defaults to true, similar to the default for the FlexPrintJob class

This property can be used as the source for data binding.


Implementation
    public function get printAsBitmap():Boolean
    public function set printAsBitmap(value:Boolean):void
printComponentproperty 
printComponent:IPrintComponent

The print representation of the printable being printed.

This property can be used as the source for data binding.


Implementation
    public function get printComponent():IPrintComponent
    public function set printComponent(value:IPrintComponent):void
printComponentRendererproperty 
printComponentRenderer:IFactory

This property can be used as the source for data binding.


Implementation
    public function get printComponentRenderer():IFactory
    public function set printComponentRenderer(value:IFactory):void
printContainerproperty 
printContainer:DisplayObjectContainer

Before attempting to print, we add the print window to a display object container. This is required for the print datagrid to render. If set to null, we default to the parent of the grid being printed.

This property can be used as the source for data binding.


Implementation
    public function get printContainer():DisplayObjectContainer
    public function set printContainer(value:DisplayObjectContainer):void
printDataGridproperty 
printDataGrid:IPrintDatagrid

The print representation of the grid being printed. If the extendedDataGrid is a ExtendedDataGrid, this is a ExtendedPrintDataGrid. IF the extendedDataGrid is an ExtendedAdvancedDataGrid, this is an printAdvancedDataGrid. If extendedDataGrid is FlexDataGrid(Ultimate) then this is a PrintFlexDataGrid.


Implementation
    public function get printDataGrid():IPrintDatagrid
    public function set printDataGrid(value:IPrintDatagrid):void
printDataGridRendererproperty 
printDataGridRenderer:IFactory

For backwards compatibility, this is same as printComponentRenderer


Implementation
    public function get printDataGridRenderer():IFactory
    public function set printDataGridRenderer(value:IFactory):void
printedPagesproperty 
printedPages:ArrayCollection

An image of each page and stores it in the printedPages array instead of sending them to the printer, when printToPdf is set to true

This property can be used as the source for data binding.


Implementation
    public function get printedPages():ArrayCollection
    public function set printedPages(value:ArrayCollection):void
printExportParametersproperty 
printExportParameters:Object

Any custom data that is passed into the print/export mechanism. This will then be available on Print/Export Options when the Print or Export is run. Please note, this is not persisted in preferences.

This property can be used as the source for data binding.


Implementation
    public function get printExportParameters():Object
    public function set printExportParameters(value:Object):void
printOptionsViewrendererproperty 
printOptionsViewrenderer:IFactory

The view renderer for the print options. The default view shows page options, as well as an option for the user to preview Default implementation is com.flexicious.print.PrintOptionsView. You can provide your own implementation, see example #4.

This property can be used as the source for data binding.


Implementation
    public function get printOptionsViewrenderer():IFactory
    public function set printOptionsViewrenderer(value:IFactory):void
printPreviewViewrendererproperty 
printPreviewViewrenderer:IFactory

The view renderer for the preview. Default implementation is com.flexicious.print.PrintPreview. You can provide your own implementation, see example #4.

This property can be used as the source for data binding.


Implementation
    public function get printPreviewViewrenderer():IFactory
    public function set printPreviewViewrenderer(value:IFactory):void
printToPdfproperty 
printToPdf:Boolean

Added for integration with Alive PDF. Defaults to false. When set to true, creates an image of each page and stores it in the printedPages array instead of sending them to the printer

This property can be used as the source for data binding.


Implementation
    public function get printToPdf():Boolean
    public function set printToPdf(value:Boolean):void
propertiesToTransferproperty 
propertiesToTransfer:Array

The properties to transfer from the grid being printed to the print version. Not yet supported. For future release

This property can be used as the source for data binding.


Implementation
    public function get propertiesToTransfer():Array
    public function set propertiesToTransfer(value:Array):void
reportFooterRendererproperty 
reportFooterRenderer:IFactory

The renderer component for the overall print footer. Prints only on the last page of the printout. Has to extend from com.flexicious.print.PrintArea or implement com.flexicious.print.IPrintArea. Default implementation is provided that simply displays today's date. See com.flexicious.print.PrintFooter

This property can be used as the source for data binding.


Implementation
    public function get reportFooterRenderer():IFactory
    public function set reportFooterRenderer(value:IFactory):void

See also

com.flexicious.print.PrintFooter
com.flexicious.print.PrintArea
com.flexicious.print.IPrintArea
reportHeaderRendererproperty 
reportHeaderRenderer:IFactory

The renderer component for the overall print header. Prints only on the first page of the printout. Has to extend from com.flexicious.print.PrintArea or implement com.flexicious.print.IPrintArea. Default implementation is provided that simply displays today's date. See com.flexicious.print.PrintHeader PLEASE NOTE: If you specify a custom report or page header or footer renderer, please specify a fixed height to it. Currently, variable row height headers and footers are not supported in print preview.

This property can be used as the source for data binding.


Implementation
    public function get reportHeaderRenderer():IFactory
    public function set reportHeaderRenderer(value:IFactory):void

See also

com.flexicious.print.PrintHeader
com.flexicious.print.PrintArea
com.flexicious.print.IPrintArea
stylesToTransferproperty 
stylesToTransfer:Array

The styles to transfer from the grid being printed to the print version.

This property can be used as the source for data binding.


Implementation
    public function get stylesToTransfer():Array
    public function set stylesToTransfer(value:Array):void
wasPreviewproperty 
wasPreview:Boolean

When we do a print, we turn off preivew flag. So that we remember what it was before we turned it off, we add this variable

This property can be used as the source for data binding.


Implementation
    public function get wasPreview():Boolean
    public function set wasPreview(value:Boolean):void
windowStylePropertiesproperty 
windowStyleProperties:Dictionary

A dictionary of style properties and their values to be applied to the print canvas. By default the following properties are added: backgroundColor: #FFFFFF paddingTop: 20 paddingBottom: 20 paddingLeft: 20 paddingRight: 20

This property can be used as the source for data binding.


Implementation
    public function get windowStyleProperties():Dictionary
    public function set windowStyleProperties(value:Dictionary):void
Constructor Detail
PrintOptions()Constructor
public function PrintOptions()



Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
weakRef:Boolean (default = false)

create()method 
public static function create(toPdf:Boolean = false):PrintOptions

Convenience method to create an exporter of a specified type

Parameters

toPdf:Boolean (default = false)

Returns
PrintOptions
dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Parameters

type:String

Returns
Boolean
loadFromPersistedString()method 
public function loadFromPersistedString(grid:IExtendedDataGrid, val:String):void

Hydrates previously persisted property values for the user interactive persistable properties of the print options from the string value created earlier.

Parameters

grid:IExtendedDataGrid — The string value
 
val:String

removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

toPersistenceString()method 
public function toPersistenceString(grid:IExtendedDataGrid):String

Converts the user interactive persistable properties of the print options to a string that can be used for persistence. Non persitable properties (like the renderers) are ignored.

Parameters

grid:IExtendedDataGrid

Returns
String
willTrigger()method 
public function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean