Home Reference Source
public class | source

PrintOptions

Extends:

TypedObjectPrintExportOptions → PrintOptions

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

Static Method Summary

Static Public Methods
public static

create(toPdf: *): *

Convenience method to create an exporter of a specified type

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

Flag to wait for the grid to completely render prior to capturing a snapshot for printing.

public

The time interval, in milliseconds, used by the timer of the execute() method to iteratively process pages.

public
public
public
public

File name for the download.

public
this member was deprecated. - use hideHiddenColumns instead

If you set this to true, columns that are set to visible=false on the parent grid will be printed.

public

Whether or not to include the page footer Default is true

public

Whether or not to include the page header Default is true

public

Whether or not to include the report footer Default is true

public

Whether or not to include the report header Default is true

public

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

public

The renderer component for the page footer.

public

The renderer component for the page header.

public

Size of the paper in the printer.

public

Flag added in 3.3 to enable passing an image to the pdf printer as opposed to the actual display object.

public

If you define a postReportPagesFactory, you may optionally provide a number for this.

public

A class factory that is responsible for instantiating a ICustomPrintComponent that will be printed after the report.

public

If you define a preReportPagesFactory, you may optionally provide a number for this.

public

A class factory that is responsible for instantiating a ICustomPrintComponent that will be printed before the report.

public

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

public

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

public

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

public

The print representation of the printable being printed.

public

Please note - this property has been deprecated.

public

Before attempting to print, we add the print window to a display object container.

public

Any custom data that is passed into the print/export mechanism.

public

The view renderer for the print options.

public

Title for the print options dialog

public

The view renderer for the preview.

public

Title for the print preview dialog

public

Added for integration with Alive PDF.

public

The printable being printed.

public

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

public

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

public

The renderer component for the overall print footer.

public

The renderer component for the overall print header.

public

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

public

A dictionary of style properties and their values to be applied to the print canvas.

Method Summary

Public Methods
public
public

The grid being printed.

public

The print representation of the grid being printed.

public

For backwards compatibility, this is same as printComponentRenderer

public

loadFromPersistedString(grid: *, val: *)

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

public
public
public
public

toPersistenceString(grid: *): *

Converts the user interactive persistable properties of the print options to a string that can be used for persistence.

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

From class PrintExportOptions
public

A flag that will To disable the user from printing or exporting invisible columns altogether .

public

A flag that will hide any columns that are not visible from being printed or exported by default.

public

In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES determines which pages of a grid with paging enabled to print.

public

pageTo: *

In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES determines which pages of a grid with paging enabled to print.

public
public

Specifies what to export, valid options are: EXPORT_CURRENT_PAGE EXPORT_ALL_PAGES EXPORT_SPECIFIED_PAGES EXPORT_SELECTED_RECORDS

public

Not used.

public

Flag to control whether or not to show the column picker.

public
public

Static Public Methods

public static create(toPdf: *): * source

Convenience method to create an exporter of a specified type

Params:

NameTypeAttributeDescription
toPdf *

Return:

*

Public Constructors

public constructor() source

Override:

PrintExportOptions#constructor

Public Members

public asynch: boolean source

public asynchDelayCapture: boolean source

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.

public asynchTimeInterval: number source

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.

public availableColumns: *[] source

public columnWidths: *[] source

public columnsToPrint: *[] source

public exportFileName: * source

File name for the download. Defaults to download.pdf where pdf is the extension.

Properties:

NameTypeAttributeDescription
exportFileName *

public includeInvisibleColumns: boolean source

this member was deprecated. - use hideHiddenColumns instead

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

public includePageFooter: boolean source

Whether or not to include the page footer Default is true

public includePageHeader: boolean source

Whether or not to include the page header Default is true

public includePrintFooter: boolean source

Whether or not to include the report footer Default is true

public includePrintHeader: boolean source

Whether or not to include the report header Default is true

public modalWindows: boolean source

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

public pageFooterRenderer: * source

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

public pageHeaderRenderer: * source

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

public pageSize: * source

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

public pdfUseScreenShot: boolean source

Flag added in 3.3 to enable passing an image to the pdf printer as opposed to the actual display object. Defaults to true, because currently we just add a snapshot of the current view to the PDF page. If this flag is set to false, we will pass the actual display object (and not the image snapshot) to the pdf printer. The pdf printer then has to be smart enough to parse through the Display Object, and call the appropriate APIs on the pdf library to convert the Display Object to PDF version of it.

public postReportPages: number source

If you define a postReportPagesFactory, you may optionally provide a number for this. If you do, we will not attempt to calculate how many pages by calling calculateTotalPages on your ICustomPrintComponent

public postReportPagesFactory: * source

A class factory that is responsible for instantiating a ICustomPrintComponent that will be printed after the report.

public preReportPages: number source

If you define a preReportPagesFactory, you may optionally provide a number for this. If you do, we will not attempt to calculate how many pages by calling calculateTotalPages on your ICustomPrintComponent.

public preReportPagesFactory: * source

A class factory that is responsible for instantiating a ICustomPrintComponent that will be printed before the report.

public preview: boolean source

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

public previewWindow: * source

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

public printAsBitmap: boolean source

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

public printComponent: * source

The print representation of the printable being printed.

public printComponentRenderer: * source

Please note - this property has been deprecated. To change the default renderer for the print component, please use the printComponentFactory on the IPrintable (ExtendedDataGrid, ExtendedAdvancedDataGrid,PrintDataGrid or DashboardContainer) object instead

The component that does the actual print. Following classes do this: For ExtendedDataGrid -> ExtendedPrintDataGrid For ExtendedAdvancedDataGrid -> ExtendedAdvancedPrintDataGrid For FlexDataGrid (Ultimate) -> PrintFlexDataGrid For DashboardContainer -> PrintDashboardContainer

public printContainer: * source

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.

public printExportParameters: * source

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.

public printOptionsViewrenderer: * source

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.

public printOptionsWindowTitle: * source

Title for the print options dialog

Properties:

NameTypeAttributeDescription
printOptionsWindowTitle *

public printPreviewViewrenderer: * source

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

public printPreviewWindowTitle: * source

Title for the print preview dialog

Properties:

NameTypeAttributeDescription
printPreviewWindowTitle *

public printToPdf: boolean source

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

public printable: * source

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

public printedPages: *[] source

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

public propertiesToTransfer: *[] source

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

public reportFooterRenderer: * source

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

public reportHeaderRenderer: * source

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.

public stylesToTransfer: *[] source

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

public windowStyleProperties: {} source

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

Public Methods

public getClassNames(): string[] source

Returns a list of strings that represent the object hierarchy for this object.

Override:

PrintExportOptions#getClassNames

Return:

string[]

public getExtendedDataGrid(): * source

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

Return:

*

public getPrintDataGrid(): * source

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.

Return:

*

public getPrintDataGridRenderer(): * source

For backwards compatibility, this is same as printComponentRenderer

Return:

*

public loadFromPersistedString(grid: *, val: *) source

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

Params:

NameTypeAttributeDescription
grid *
val *

The string value

public setExtendedDataGrid(val: *) source

Params:

NameTypeAttributeDescription
val *

public setPrintDataGrid(val: *) source

Params:

NameTypeAttributeDescription
val *

public setPrintDataGridRenderer(val: *) source

Params:

NameTypeAttributeDescription
val *

public toPersistenceString(grid: *): * source

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.

Params:

NameTypeAttributeDescription
grid *

Return:

*