This element handles functionality of <frame|pager> and <frame type=pager> elements.
The pager implements print preview and printing functionality.
The behavior can be applied to any block element.
These elements have behavior:frame applied by default:
<frame|pager>
- paged print preview container;After loading document in it the <frame|pager> the element will have as number of child <pagebox>es as defined by cols
and rows
attributes:
<frame|pager cols=2> <pagebox/> <pagebox/> </frame>
Each <pagebox/> renders its own instance of the template inside representing page to be printed.
<frame> attributes that have special meaning:
src="url"
- optional, URL of document to load in the frame;page-template="url"
- optional, URL of page template document;cols="number"
and rows="number"
- these attributes define number of <pagebox>'es in print preview."paginationstart"
event - generated as a first step of document pagination. At this moment printing document is loaded;"paginationpage"
event - generated for each page, event.reason is a page number - 1...N;"paginationend"
event - generated as a last step of document pagination. At this moment number of pages is known and reported by event.reason field.pageslist - optional, is an array of page numbers. If provided defines numbers and order of pages to be printed. Note: page numbering starts from 1.
The method returns array of printers registered in system. Each element of the array is an object:
{ id: string, // id of the printer to be used in setPrinter() method; name: string, // human readable name; location: string, // printer location if available; isDefault: true/false // true if that printer is the default one; }
N/A
var pager = $(frame#pager); pager.on("paginationstart", function() {...}); pager.on("paginationend", function(evt) { var npages = evt.reason; ...});