Bug 595879 - print preview doesn't handle multiple pages per side
print preview doesn't handle multiple pages per side
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gedit (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Marek Kašík
desktop-bugs@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-25 16:28 EDT by Máirín Duffy
Modified: 2010-06-29 11:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-29 11:05:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot showing broken print preview - there should be two pages on the side shown, not one. the total doc size should be 2 pages not 4 (71.63 KB, image/png)
2010-05-25 16:30 EDT, Máirín Duffy
no flags Details
screenshot showing pdf output - it comes out correctly, not like in the preview (129.27 KB, image/png)
2010-05-25 16:31 EDT, Máirín Duffy
no flags Details
test txt file used (13.79 KB, text/plain)
2010-05-25 16:31 EDT, Máirín Duffy
no flags Details
pdf output of test txt file from gedit (39.25 KB, application/pdf)
2010-05-25 16:31 EDT, Máirín Duffy
no flags Details
use gtk+ print preview (6.73 KB, patch)
2010-06-21 11:38 EDT, Marek Kašík
no flags Details | Diff

  None (edit)
Description Máirín Duffy 2010-05-25 16:28:04 EDT
Description of problem:

If you have a long text document you want to print (say 60 pages) it can save paper to print 2 pages to a single page. I tried to do that recently using gedit. Here's the steps I followed:

- Open up text document in gedit
- Go to File > Print ...
- Go to the 'Page Setup' tab
- Under the 'Layout' section on the left, use the dropdown to select '2' pages per side (or '4' if you want to go wild)
- Hit 'Print Preview' in the lower right, left-most button

The preview only shows one page per side. I have an example document I'm working with now. It has 4 pages. When I hit preview after following the steps above, the print preview is 4 pages long, and each page only takes up half of the page and the rest of the page is blank white space.

Now, when I actually print out this document to PDF, it comes out as a 2-page document, with pages 1 & 2 on page 1, and pages 3 & 4 on page 2.

I'm going to attach screenshots of the print preview that shows only 1 page per side, and of the final PDF showing 2 pages per side in reality. I'll also attach my sample text file and the PDF output.

Version-Release number of selected component (if applicable):
gedit-2.28.4-2.el6.x86_64
printer-filters-1.1-4.1.el6.noarch
gutenprint-5.2.5-1.el6.x86_64
(If there's other components you need version numbers of let me know)

How reproducible:
Very, just follow the steps above.
Comment 1 Máirín Duffy 2010-05-25 16:30:15 EDT
Created attachment 416510 [details]
screenshot showing broken print preview - there should be two pages on the side shown, not one. the total doc size should be 2 pages not 4
Comment 2 Máirín Duffy 2010-05-25 16:31:06 EDT
Created attachment 416511 [details]
screenshot showing pdf output - it comes out correctly, not like in the preview
Comment 3 Máirín Duffy 2010-05-25 16:31:29 EDT
Created attachment 416512 [details]
test txt file used
Comment 4 Máirín Duffy 2010-05-25 16:31:55 EDT
Created attachment 416513 [details]
pdf output of test txt file from gedit
Comment 5 Máirín Duffy 2010-05-25 16:33:22 EDT
Note I was only able to reproduce this issue with gedit's print preview. If I try to print out multi-page sides from Evince, the print preview comes out correctly.
Comment 7 Matthias Clasen 2010-05-26 21:41:35 EDT
This is a limitation of gedit's builtin print preview. 
Assigning this to Marek.
Comment 8 RHEL Product and Program Management 2010-06-07 12:02:55 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 9 Marek Kašík 2010-06-21 11:38:21 EDT
Created attachment 425674 [details]
use gtk+ print preview

Hi,

I had a look at it. The problem is that gedit uses GtkPrintOperation, which is a high level API, but tries to do print preview itself (which is already part of GtkPrintOperation). Gedit would need access to some private members of GtkPrintOperation class to be able to draw preview correctly or it has to do the whole preview itself.
The solution can be to use GtkPrintOperation's print preview instead of the one in gedit. There is only 1 major difference I see in this case. It is that the window with print preview will be floating instead of embedded.
The positive thing I see is that it unifies print preview with the rest of Gnome.
What do you think about it Matthias (it is quite a big change in comparison with upstream) ?

Regards

Marek
Comment 10 Matthias Clasen 2010-06-29 10:53:10 EDT
I'd really like to see this at least being in an upstream bug, with some agreement that this may be the right thing forward...
Comment 11 RHEL Product and Program Management 2010-06-29 11:05:11 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.