[Kst] [Bug 216746] It should be possible to save the print configuration for kst

Barth Netterfield netterfield at astro.utoronto.ca
Thu Feb 4 15:33:59 CET 2010


Short version:
	the last set margins are sticky for all future printing, until changed by the 
Print->options dialog.  Set them to 5mm, and they will stay that way.
	However: the last set margins are not reflected in the Print->options dialog 
defaults.  Instead some giant dimensions are used (1 and 1.5 inches)  These 
appear to be un-settable.  (bug/deficiency in Qt)  So everytime you want to 
change paper size or orientation, you also have to reset the margins.

------------------
Longer version

Actually, everything works as you want it to, *except* for an apparent 
bug/deficiency in in Qt: 

We do store the margins set in the print dialog->options dialog, and it is 
sticky for all future printing, including from the command line.

However, there seems to be no way to set the defaults in the options dialog, 
so this fact is not discoverable.  The page size and orientation settings are 
picked up from the QPrinter we pass to the QPrintDialog, and reflected as 
defaults in the options dialog, but the margins are not.  

If you don't 'ok' or 'apply' in the print->options dialog the last set margins 
are still used.  But if you enter the print->options dialog, say, to change 
the paper size, the 1 and 1.5" defaults get set into the dialog, and will be 
applied as the new margin size.  There appears to be no way to set these 
defaults, or change them in any way, or to remove them from the dialog.  So, 
if you want to change the paper size or the orientation with the Print-
>options dialog, you *also* have to re-enter the margins to what you actually 
want.

This really bugs me, but I don't see a way forward short of re-writing or 
patching the Qt print dialog (which I am not keen to do, since 4.7 is 
coming...).

If someone knows something I don't, I would love to hear it.

so,

Go to the print -> options dialog.  Set the margins to something good (say 
5mm).  Set your orientation and paper size to what you want.  apply.

From now on, until you re-enter and 'apply' the print->options dialog, what 
you just set will be used. 

cbn

On Thursday 04 February 2010 03:36:06 Nicolas Brisset wrote:
> https://bugs.kde.org/show_bug.cgi?id=216746
> 
> 
> 
> 
> 
> --- Comment #7 from Nicolas Brisset <nicolas brisset eurocopter com> 
>  2010-02-04 09:36:03 --- OK, nice addition. Thanks a lot.
> How about the possibility to set some properties in the preferences, to
>  avoid having to set them manually each time we want to print?
> 
> I have tested it a bit in interactive mode and from what I could see:
> - the orientation property is remembered from one print action to the next,
> though I don't know whether Qt defaults to doing that or if it's done on
> purpose. But that's nice.
> - the default margins are extremely large (top/bottom: each 25.4 mm,
> right/left: each 31.75 mm, or for A4 landscape 24% and 21% of the paper
> estate!!) for any reason that's totally unclear to me. And worse: they are
>  not remembered => I have to set all four values to something more
>  reasonable each time, which is *very* painful and definitely has to be
>  avoided.
> 
> Interestingly, in batch mode the margins are more reasonable. I suspect you
> have set a better default there.
> 
> So to sum up, I would still recommend one of the two following options:
> 1) add a "Printing" section in the settings where we can set the margins
>  and orientation (and use that to initialize the print dialog)
> 2) remember the last used values in the settings and restore that. It is
>  even less obtrusive UI-wise and should fit most people's needs. That would
>  also work for batch printing: you could print once interactively to set
>  the settings and then fire it from the command line
> 


More information about the Kst mailing list