Skip to main content

behavior: pager

This element provides print and print preview functionality.

Elements

These elements have behavior:label applied by default:

  • <frame type="pager">
  • <frame|pager">

Attributes

  • src="url" - url of document to print / preview;
  • page-template="url" - url of page template document;

Events

pagination-start - pagination did start. pagination-end - pagination did end. pagination-page - pagination of a page with event.reason number is complete.

Propertie

pages

frame.pager.pages: integer

Read-only, number of pages

pages

frame.pager.page: integer

Read-write, current page

document

frame.pager.document: Document

Read-only, reference of loaded document to be printed.

documentName

frame.pager.documentName: string

Read-write, name of the document (can be seen in printing jobs queue)

Methods

loadFile()

frame.pager.loadFile(docUrl:string [,templateUrl:string]) : boolean

Loads document and optionally template into the pager.

loadHtml()

frame.pager.loadHtml(html: ArrayBuffer | string , baseUrl : string [, templateUrl: string]) : boolean

Loads document from memory buffer or string and optionally template into the pager.

baseUrl is used to resolve relative urls inside the html

selectPrinterDialog()

Presents to the user system's "Select Printer" dialog and makes that printer as a current.

selectDefaultPrinter()

Selects default system printer as a current.

selectPrinter()

frame.pager.selectPrinter(printerId : string)

Selects dprinter by its Id.

printers()

let printersList = frame.pager.printers();

Returns list (array) of printer definition structures:

{
id : string,
name : string,
shareName : string,
comment : string,
location : string,
isDefault : boolean
}

print()

frame.pager.print([arrayOfPageNumbers]);

Starts printing of whole document or particular pages contained in arrayOfPageNumbers (like [1,3,5])

Value

N/A

Page Template

[TBD]