GNOME Bugzilla – Bug 660553
Print Layout: second page is empty when printed
Last modified: 2011-10-06 14:09:49 UTC
I just added the ability to have a multi-page print layout, mostly just by making the canvas bigger: http://git.gnome.org/browse/glom/commit/?id=76c7317815bef2d86554e8447ae0289500ab8974 However, the second page is empty in the print preview. Maybe we need to do something in PrintOperationPrintLayout::on_draw_page(): http://git.gnome.org/browse/glom/tree/glom/printoperation_printlayout.cc#n69
Some kind of test for the print layout code would be good too. Unfortunately, this probably requires starting a self-host, but we can do that if necessary, and already have test code to do it.
As on_paginate() does the same as on_begin_print(), it should probably be removed: http://developer.gnome.org/gtk3/stable/gtk3-High-level-Printing-API.html#GtkPrintOperation-paginate The pagination is not done in chunks, so there does not seem to be any need to handle the paginate signal.
Very possibly.(In reply to comment #2) > As on_paginate() does the same as on_begin_print(), it should probably be > removed: That sounds reasonable.
Actually, there is a comment in the header, which suggests that bug 345345 must be fixed before on_paginate() can be removed. However, I guess that returning true would be better than recalculating the number of pages again.
Created attachment 198340 [details] C test case Attached is a C test case, which tries to do a similar thing to Glom, and hits the same problem, that the first page contains the correct output and the second page is blank.
Fixed with this commit: http://git.gnome.org/browse/glom/commit/?id=65349ab2e9b2784081bdb4376d05504abaf8fb51