Gtk.PrintOperation::paginate

function callback(print_operation, context:Gtk.PrintContext, ):Boolean;

Emitted after the Gtk.PrintOperation::begin-print signal, but before the actual rendering starts. It keeps getting emitted until a connected signal handler returns true.

The ::paginate signal is intended to be used for paginating a document in small chunks, to avoid blocking the user interface for a long time. The signal handler should update the number of pages using Gtk.PrintOperation.prototype.set_n_pages, and return true if the document has been completely paginated.

If you don't need to do pagination in chunks, you can simply do it all in the ::begin-print handler, and set the number of pages from there.

Since 2.10

print_operation

instance of Gtk.PrintOperation that is emitting the signal

context

the Gtk.PrintContext for the current operation

Returns

true if pagination is complete