After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660553 - Print Layout: second page is empty when printed
Print Layout: second page is empty when printed
Status: RESOLVED FIXED
Product: glom
Classification: Other
Component: design
git master
Other Linux
: Normal normal
: ---
Assigned To: Murray Cumming
Murray Cumming
Depends on:
Blocks:
 
 
Reported: 2011-09-30 09:28 UTC by Murray Cumming
Modified: 2011-10-06 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
C test case (3.18 KB, application/octet-stream)
2011-10-05 14:03 UTC, David King
Details

Description Murray Cumming 2011-09-30 09:28:31 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
Comment 1 Murray Cumming 2011-10-04 11:25:27 UTC
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.
Comment 2 David King 2011-10-04 11:47:04 UTC
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.
Comment 3 Murray Cumming 2011-10-04 11:48:49 UTC
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.
Comment 4 David King 2011-10-04 12:07:09 UTC
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.
Comment 5 David King 2011-10-05 14:03:29 UTC
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.
Comment 6 Murray Cumming 2011-10-06 14:09:49 UTC
Fixed with this commit:
http://git.gnome.org/browse/glom/commit/?id=65349ab2e9b2784081bdb4376d05504abaf8fb51