GNOME Bugzilla – Bug 590084
print to FILE with multiple pages per sheet has bad results
Last modified: 2009-08-10 09:42:52 UTC
2.27.4 Try to print using the FILE printer, and save a PDF with multiple pages per sheet enabled (using 2 or 4 always triggers the issue, I didn't try more). The result file has some empty pages between the normal pages.
It's a known issue, thanks for reporting. Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 583429 ***
Created attachment 139571 [details] input.pdf
Created attachment 139572 [details] 2 pages per side.pdf obtained printing pages 5-8 with the additional option of 2 pages per side
Created attachment 139574 [details] expected result.pdf
No evince function is called during printing, because singe evince 2.27.x with gtk 2.17.x, it will use gtk print operations.
Created attachment 139791 [details] [review] wait for page draw finish Hi, the problem is that function "end_run" can be executed with wrong page number when printing in another thread, so it can finish drawing of a sheet prematurely. Attached patch fixes this. Regards Marek
Hmm, I don't like how increment_page_sequence is now called in two places. Should increment_page_sequence not be called in the one place where we definitively know that the page rendering is done, gtk_print_operation_draw_page_finish ?
Created attachment 140105 [details] [review] reworked patch Hi Matthias, the problem with gtk_print_operation_draw_page_finish () is that it doesn't have an access to the PrintPagesData structure. So, it cannot pass it to the increment_page_sequence function. I removed the second call of the increment_page_sequence () function, it is not necessary. Regards Marek
Might be slightly more elegant to move the -1 -> 0 transition into increment_page_sequence ? Other than that, looks good to me.
Hi Matthias, you are right, I moved the check to the increment_page_sequence() function. Committed: Increment page sequence before print of the page, not after When printing, increment page sequence before rendering of the page, not after (#590084). In opposite case it runs "end_page" function with wrong parameters when drawing a page in another thread. Marek