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 550329 - Print Preview ignore scale factor
Print Preview ignore scale factor
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
: 567665 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-01 23:03 UTC by davaweb
Modified: 2010-10-10 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description davaweb 2008-09-01 23:03:30 UTC
Please describe the problem:
Using GIMP's File>Print dialogue, the Preview Image does not take into account the scaling factor in Print>Page Setup>Scale.

Preview displays the image size, position on paper and paper size as one would expect it if scaled 100%.

If scaled to, say, 0.1% it shows the same in print preview - instead of the image size set in Scale.

It is not, therefore, truly reflecting a preview of the printed image.



Steps to reproduce:
1. Follow the Print steps and change the Scale in Print>Page Setup>Scale to, say .1%
2. Preview
3. Print


Actual results:
Image looks OK to print but the print result is just a 'dot'

Expected results:
Preview shows just a 'dot'.

Does this happen every time?
Yes

Other information:
Comment 1 davaweb 2008-09-01 23:05:12 UTC
This was using Ubuntu HARDY.
Comment 2 Martin Nordholts 2008-09-02 05:01:18 UTC
Hi and thanks for the bug report! But please look for duplicates before you file one.

*** This bug has been marked as a duplicate of 524615 ***
Comment 3 Sven Neumann 2008-09-02 06:37:48 UTC
This is not a duplicate, reopening.
Comment 4 Sven Neumann 2008-09-02 06:45:50 UTC
Actually, I don't understand what the scale factor on the Page Setup tab is supposed to do. If I would understand that, I might be able to implement the expected behavior. But I tend to argue that this is a bug in GtkPrint. The application developer should not have to care about the Scale factor set in the dialog.

My guess is that the Scale factor from Page Setup should be applied to the final page, scaling everything. The preview on the Image Settings tab (which is the only tab that is implemented by the application) should not be affected by this. It should show the page before it is scaled. The preview that is shown when you click on the Preview button at the bottom of the dialog should however take the Scale factor into account. Since this is part of GtkPrint, I am reassigning this report to GTK+.
Comment 5 Andreas J. Guelzow 2008-09-11 18:03:33 UTC
Actually, the scale factor is indeed applied to the final rendering, scaling everything.

I think the problem reported is that the print preview shows the designed page and the scaling is applied afterwards: so the print preview differs from the real printed result. (The latter being in fact scaled according to that after the fact scale percentage.)

As a side note: Gnumeric for example has 2 scale factors. One in its page setup dialog that is being used to design (lay-out) each page. ANd then this second one in the print dialog applied to the final result.

I always envisioned the last scaling to be intended for situation where I need to print a document designed for A4 on USletter. Since I use the preview for designing the document, personally I think the current behaviour just the desired behaviour!
Comment 6 davaweb 2008-09-11 20:57:47 UTC
Andreas,
I can not see the point of Print Preview unless one previewed what is printed. Taking your example of scaling to A4 something intended for US Letter then the options in scaling should be Scale from: (A4 or whatever) To: (US Letter, or whatever) which on a percentage basis option only involves some involved mathematics.
I can not agree that the current behaviour is the desired behaviour - print from A4 to US letter and seeing the result can be achieved by the dimensions set in Page Setup Image Settings and/or Image Settings>Adjust Page Size and Orientation.
Any Print Preview should be that - a preview of the printed image.
Which means taking the Scaling setting into account.

David
Comment 7 Andreas J. Guelzow 2008-09-11 21:56:52 UTC
No. Page Setup Image Settings and/or Image Settings>Adjust Page Size and
Orientation would not do the right thing. Those change the official page size, so a program like Gnumeric would change which cells it can print on the page. 

The creator of any given spreadsheet may have formatted columns and rows in such a way to have the most appropriate cell to page assignment. At print time I may find myself to print to a printer that only has a different page size available. Some drivers in this case will automatically scale the page but others will not. The scale factor allows me to do that.

(This has nothing to do with the fact that gimp really should really provide a way to way to scale images before placing them on a page, such as Gnumeric does. Just because a program fails to provide appropriate options does not mean that the underlying library should be changed to mess up users of other rograms.)


Comment 8 davaweb 2008-09-11 22:27:29 UTC
This bug report was made to Gimp - they reassigned it to GTK+ ...

But let me ask, just how does one Preview a scaled image then? Perhaps GTK+ should take scaling out altogether and leave it at 100% as it becomes a guessing game unless one can preview the result. Scaling can be done in Gimp and if previewed (at 100%) then Image Preview is fine.

I think the question, from a user's point of view, is, does scaling belong in GTK+ given all its other settings? Let the apps take care of scaling? If it does belong there, reflect it in Print Preview.

In your example of a spreadsheet, wouldn't you need the print preview to show that your scaling still made cell contents visible? I know automatic scaling fails completely in this regard for obvious reasons - giving an extreme example, printing a spreadsheet designed for A4 on a postcard. But - (and I'm sorry to come back to this) - we have Image Preview, which, if scaling was taken into account, would show the results.

Or, as in my case, an A5 print looked great in image preview but only ever printed as a dot. Not ever having remembered changing the scaling, it took days and then hours on irc before the vital question: is scaling 100%? It wasn't - it had somehow become 0.1%. Taking Image Preview to mean what it says, (we are in the printing end, so it is quite legitimate to assume 'Printed Image Preview'), it never occurred to me the preview (perfect) was not of the scaled image. Printing thus resulted in just a dot, as I said.

I still don't know why it can't be previewed.

Why is it, in Print Preview unless it can be previewed is the underlying point, methinks?



  
Comment 9 Andreas J. Guelzow 2008-09-11 22:54:22 UTC
There are lots of things that are not shown in the print preview. In fact virtually everything on the page setup tab of the print dialog isn't. If you select 4 pages per sheet, then your print preview still only a single page. This is in no way different.

(Note that I hardly ever use gimp and only talking about this as a gtkprint bug. Obviously the gimp developers did not want to deal with this bug and passed it on.)
Comment 10 davaweb 2008-09-12 05:15:48 UTC
See Comment #4 from Sven Neumann (developer).

In particular I quote, "The preview that is shown when you click on the Preview button at the bottom of the dialog should however take the Scale factor into account. Since this is part of GtkPrint, I am reassigning this report to GTK+."

I agree with this. This is the Print end and should be taken into account.

You say, "If you select 4 pages per sheet, then your print preview still only a single page." Not having needed to do that, I have not come across it. However, as you raised it, then I would humbly maintain that in Print Preview it should show the result of 4 pages per sheet. This not happening can not logically be used as a reason that "makes the behaviour right". I suggest it is merely highlighting a flaw in the process.

Respectfully, "Print Preview" means "preview what you print".
Comment 11 Andreas J. Guelzow 2008-09-12 06:37:46 UTC
Respectfully, I think "Print Preview" means "preview the page as it should print", and not "preview the sheet".

So as Gnumeric develper I would be quite upset if the behaviour would change. 
Comment 12 davaweb 2008-09-12 07:48:06 UTC
Isn't that what I said? Doesn't "preview what you print" mean "preview the page as it should print"?

If so, scaling affects "the page as it should print".

As you see from the GIMP developers, that is what we are talking about.
Comment 13 Andreas J. Guelzow 2008-09-12 13:45:33 UTC
The preview doesn't show scale. On my monitor it is hardly ever 8.5" by 11".  As far as I am concerned there is a differnece between a page and a sheet. So "4 up" prints 4 pages to a sheet. The preview shows a single page.

I guess we disagree and we will see what the gtk developers decide to do.
Comment 14 davaweb 2008-09-12 20:55:53 UTC
Yes, I agree.

I was just on the Gnumeric web site (looks a good app - is it open document, I didn't read that far?).

I noticed this, under Print preview:
"The Print Preview Dialog is used to display what the printed output will look like. The Print Preview dialog can be used to check whether you have the desired formatting and layout before you print out the workbook."

"... display what the printed output will look like."

I am not making this as a personal comment to you, only that it succinctly describes what I/GIMP/et al are talking about. Thus if setting the scale to, say. 0.1% results in the print out of a dot sized imaged, that is what should be displayed.

This is not intended to be a 'dig' or 'sm**t**se" comment to you.




Comment 15 Andreas J. Guelzow 2008-09-12 21:13:22 UTC
And if you reduce the size of the preview window sufficiently then a dot is all that you are going to see.  
Comment 16 davaweb 2008-09-12 21:41:29 UTC
Andreas, when I preview, I preview a representation of the chosen page size, A4, A5, postcard etc. Of course, this preview of the page is only dimensionally proportional to the real page size.

But the preview image inside this representation never shows 'a dot' (scaling 0.1%) - it shows a representation of the image at the dimensions chosen and assumes 100% scaling.

Scaling affects the size of my printout, just as choosing the "x"mm x "y"mm but not the preview. Only the "x"mm x "y"mm affects the preview. So I think it looks perfect on the preview represented page which represents a, say, A4 but is printed as a dot. 

I am not sure I grasp what you mean by reducing the size of the preview window sufficiently.  

David

Comment 17 Marek Kašík 2009-11-09 14:19:33 UTC
Hi,

print preview reflects scale factor (and other settings) since gtk+ 2.19.0 (see the bug #592582).

Regards

Marek
Comment 18 Marek Kašík 2010-05-20 11:27:47 UTC
Hi,

since print preview doesn't ignore scale anymore, I'm closing this.

Marek
Comment 19 Felix Riemann 2010-10-10 13:12:11 UTC
*** Bug 567665 has been marked as a duplicate of this bug. ***