| Package | com.flexicious.print |
| Class | public class PrintOptions |
| Inheritance | PrintOptions PrintExportOptions Object |
| Implements | flash.events.IEventDispatcher |
| Property | Defined 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 | ||
![]() | excludeHiddenColumns : 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 | ||
![]() | hideHiddenColumns : 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 | ||
![]() | pageFrom : 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 | ||
![]() | pageTo : Number = -1
In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES
determines which pages of a grid with paging enabled
to print. | PrintExportOptions | |
![]() | popupParent : 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 | ||
![]() | printExportOption : 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 | ||
![]() | saveFileMessage : String = File generated. Download?
To bypass flash player 10 security when filterPageSortMode="server", we need
user action to initiate file download. | PrintExportOptions | |
![]() | showColumnPicker : Boolean = true
Flag to control whether or not to show the column picker. | PrintExportOptions | |
![]() | showWarningMessage : 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 | ||
| Method | Defined 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 | ||
| asynch | property |
asynch:BooleanFlag 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.
public function get asynch():Boolean public function set asynch(value:Boolean):void| asynchDelayCapture | property |
asynchDelayCapture:BooleanFlag 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.
public function get asynchDelayCapture():Boolean public function set asynchDelayCapture(value:Boolean):void| asynchTimeInterval | property |
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.
public function get asynchTimeInterval():int public function set asynchTimeInterval(value:int):void| availableColumns | property |
availableColumns:ArrayCollection public function get availableColumns():ArrayCollection public function set availableColumns(value:ArrayCollection):void| columnsToPrint | property |
columnsToPrint:ArrayCollection public function get columnsToPrint():ArrayCollection public function set columnsToPrint(value:ArrayCollection):void| columnWidths | property |
columnWidths:ArrayCollection public function get columnWidths():ArrayCollection public function set columnWidths(value:ArrayCollection):void| extendedDataGrid | property |
extendedDataGrid:IExtendedDataGridThe grid being printed. This is the grid that you pass in to the print controller
public function get extendedDataGrid():IExtendedDataGrid public function set extendedDataGrid(value:IExtendedDataGrid):void| includeInvisibleColumns | property |
includeInvisibleColumns:BooleanIf 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.
public function get includeInvisibleColumns():Boolean public function set includeInvisibleColumns(value:Boolean):void| includePageFooter | property |
includePageFooter:BooleanWhether or not to include the page footer Default is true
This property can be used as the source for data binding.
public function get includePageFooter():Boolean public function set includePageFooter(value:Boolean):void| includePageHeader | property |
includePageHeader:BooleanWhether or not to include the page header Default is true
This property can be used as the source for data binding.
public function get includePageHeader():Boolean public function set includePageHeader(value:Boolean):void| includePrintFooter | property |
includePrintFooter:BooleanWhether or not to include the report footer Default is true
This property can be used as the source for data binding.
public function get includePrintFooter():Boolean public function set includePrintFooter(value:Boolean):void| includePrintHeader | property |
includePrintHeader:BooleanWhether or not to include the report header Default is true
This property can be used as the source for data binding.
public function get includePrintHeader():Boolean public function set includePrintHeader(value:Boolean):void| modalWindows | property |
modalWindows:BooleanFlag, which defaults to false, launches the preview and options screen in modal mode.
This property can be used as the source for data binding.
public function get modalWindows():Boolean public function set modalWindows(value:Boolean):void| pageFooterRenderer | property |
pageFooterRenderer:IFactoryThe 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.
public function get pageFooterRenderer():IFactory public function set pageFooterRenderer(value:IFactory):voidSee also
| pageHeaderRenderer | property |
pageHeaderRenderer:IFactoryThe 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.
public function get pageHeaderRenderer():IFactory public function set pageHeaderRenderer(value:IFactory):voidSee also
| pageSize | property |
pageSize:PageSizeSize 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.
public function get pageSize():PageSize public function set pageSize(value:PageSize):void| preview | property |
preview:BooleanSet 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.
public function get preview():Boolean public function set preview(value:Boolean):void| previewWindow | property |
previewWindow:IPrintPreviewThis 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.
public function get previewWindow():IPrintPreview public function set previewWindow(value:IPrintPreview):void| printable | property |
printable:IPrintableThe 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.
public function get printable():IPrintable public function set printable(value:IPrintable):void| printAsBitmap | property |
printAsBitmap:BooleanSets 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.
public function get printAsBitmap():Boolean public function set printAsBitmap(value:Boolean):void| printComponent | property |
printComponent:IPrintComponentThe print representation of the printable being printed.
This property can be used as the source for data binding.
public function get printComponent():IPrintComponent public function set printComponent(value:IPrintComponent):void| printComponentRenderer | property |
printComponentRenderer:IFactory
This property can be used as the source for data binding.
public function get printComponentRenderer():IFactory public function set printComponentRenderer(value:IFactory):void| printContainer | property |
printContainer:DisplayObjectContainerBefore 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.
public function get printContainer():DisplayObjectContainer public function set printContainer(value:DisplayObjectContainer):void| printDataGrid | property |
printDataGrid:IPrintDatagridThe 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.
public function get printDataGrid():IPrintDatagrid public function set printDataGrid(value:IPrintDatagrid):void| printDataGridRenderer | property |
printDataGridRenderer:IFactoryFor backwards compatibility, this is same as printComponentRenderer
public function get printDataGridRenderer():IFactory public function set printDataGridRenderer(value:IFactory):void| printedPages | property |
printedPages:ArrayCollectionAn 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.
public function get printedPages():ArrayCollection public function set printedPages(value:ArrayCollection):void| printExportParameters | property |
printExportParameters:ObjectAny 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.
public function get printExportParameters():Object public function set printExportParameters(value:Object):void| printOptionsViewrenderer | property |
printOptionsViewrenderer:IFactoryThe 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.
public function get printOptionsViewrenderer():IFactory public function set printOptionsViewrenderer(value:IFactory):void| printPreviewViewrenderer | property |
printPreviewViewrenderer:IFactoryThe 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.
public function get printPreviewViewrenderer():IFactory public function set printPreviewViewrenderer(value:IFactory):void| printToPdf | property |
printToPdf:BooleanAdded 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.
public function get printToPdf():Boolean public function set printToPdf(value:Boolean):void| propertiesToTransfer | property |
propertiesToTransfer:ArrayThe 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.
public function get propertiesToTransfer():Array public function set propertiesToTransfer(value:Array):void| reportFooterRenderer | property |
reportFooterRenderer:IFactoryThe 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.
public function get reportFooterRenderer():IFactory public function set reportFooterRenderer(value:IFactory):voidSee also
| reportHeaderRenderer | property |
reportHeaderRenderer:IFactoryThe 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.
public function get reportHeaderRenderer():IFactory public function set reportHeaderRenderer(value:IFactory):voidSee also
| stylesToTransfer | property |
stylesToTransfer:ArrayThe styles to transfer from the grid being printed to the print version.
This property can be used as the source for data binding.
public function get stylesToTransfer():Array public function set stylesToTransfer(value:Array):void| wasPreview | property |
wasPreview:BooleanWhen 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.
public function get wasPreview():Boolean public function set wasPreview(value:Boolean):void| windowStyleProperties | property |
windowStyleProperties:DictionaryA 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.
public function get windowStyleProperties():Dictionary public function set windowStyleProperties(value:Dictionary):void| PrintOptions | () | Constructor |
public function PrintOptions()| 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):PrintOptionsConvenience method to create an exporter of a specified type
Parameters
toPdf:Boolean (default = false) |
PrintOptions |
| dispatchEvent | () | method |
public function dispatchEvent(event:Event):Boolean
Parameters
event:Event |
Boolean |
| hasEventListener | () | method |
public function hasEventListener(type:String):Boolean
Parameters
type:String |
Boolean |
| loadFromPersistedString | () | method |
public function loadFromPersistedString(grid:IExtendedDataGrid, val:String):voidHydrates 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):StringConverts 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 |
String —
|
| willTrigger | () | method |
public function willTrigger(type:String):Boolean
Parameters
type:String |
Boolean |