PrintOperation.nPages

int nPages() @property

Get nPages property.

Returns

The number of pages in the document.

This must be set to a positive number before the rendering starts. It may be set in a gtk.print_operation.PrintOperation.beginPrint signal handler.

Note that the page numbers passed to the gtk.print_operation.PrintOperation.requestPageSetup and gtk.print_operation.PrintOperation.drawPage signals are 0-based, i.e. if the user chooses to print all pages, the last ::draw-page signal will be for page @n_pages - 1.

void nPages(int propval) @property

Set nPages property.

Parameters

propvalThe number of pages in the document. This must be set to a positive number before the rendering starts. It may be set in a gtk.print_operation.PrintOperation.beginPrint signal handler. Note that the page numbers passed to the gtk.print_operation.PrintOperation.requestPageSetup and gtk.print_operation.PrintOperation.drawPage signals are 0-based, i.e. if the user chooses to print all pages, the last ::draw-page signal will be for page @n_pages - 1.