Note that this value is set during print preparation phase (gtk.types.PrintStatus.Preparing), so this value should never be get before the data generation phase (gtk.types.PrintStatus.GeneratingData). You can connect to the #GtkPrintOperation::status-changed signal and call gtk.print_operation.PrintOperation.getNPagesToPrint when print status is gtk.types.PrintStatus.GeneratingData. This is typically used to track the progress of print operation.
PrintOperation.nPagesToPrint
int nPagesToPrint() @propertyGet nPagesToPrint property.
Returns
The number of pages that will be printed.