Changes in KDE Printer Properties Margins are not Persistent

Since upgrading to openSUSE 11.4 (x86_64) KDE: 4.6.3 I find that any changes made in the KDE Printer → Properties → Margins dialogue with Konqueror, Kate, Kwrite, etc. are not persistent. Such changes are persistent in openSUSE 11.3 (x86_64) KDE: 4.4.4.

Consequently I must open the Printer → Properties → Margins dialogue and change the default margin setting (4.23 mm) four times (TBLR) for each print job.

A similar issue with non-persistent duplex printing was solved by installing system-config-printer but that does not provide an option to reset the default margin settings.

I have made the usual searches and checked the printer pages in the SDB. There are some related bug reports on openSUSE, KDE and QT bug tracking systems that make interesting reading (!) but I did not find a user level solution for non-persistent margins.

I would be grateful for some feedback on this issue. Are others experiencing similar printing problems? How are the default KDE print margins set and can they be changed?

I’ve never used this dialogue to set margins but set them within the application; so I have never encountered the problem.

Thanks for replying JH. The printer properties dialogue is opened from the File Menu in all these applications ie, within the applications as you say. If you use openSUSE 11.4 KDE, could you explain how do you set print margins in say, kwrite, and are they persistent?

It’s a good question, and it would be easy for the KDE developers to add this as a ‘System Settings’ feature, or via the printer applet. However, it would not necessrily be respected by non-KDE apps, which use their own printing processes. Fortunately CUPS has some persistent methods for setting options (such as margins) for a specific printer. The ‘lpoptions’ command is used for this. (Then when ‘lpr’ or ‘lp’ command is invoked by the KDE printing process, these options will also be parsed).

Any options set by lpoptions are stored in ~/.cups/lpoptions

(You can also make system-wide changes as root, in which case the options are then written to /etc/cups/lpoptions instead).

Say you have a printer called ‘Office’, then you could do something like this to set the left and right margins

lpoptions -p Office -o page-left=10 -o page-right=10 -o media=A4
  • The values are in points (1pt = 1/72" or 0.35mm)

These options will now be stored in ~/.cups/lpoptions

cat  ~/.cups/lpoptions
Office media=A4 page-left=10 page-right=10

More info here:

CUPS Software Users Manual

Thank you kindly. I will try that and report back on the result.

OK. Tried CUPS lpoptions command.

cat  ~/.cups/lpoptions
Default brother_mono_HL5250DN media=A4 page-bottom=40 page-left=40 page-right=40 page-top=40

Result: (printing plain text file from kwrite) no change to default

Sorry, timed out. Trying again…

OK. Tried CUPS lpoptions command. This amended the ~/.cups/lpoptions file as expected:

cat  ~/.cups/lpoptions
Default brother_mono_HL5250DN media=A4 page-bottom=40 page-left=40 page-right=40 page-top=40

Tried printing plain text file from kwrite, to network printer using IPP protocol.
Printer was setup with Yast and is visible in the CUPS web interface.

Result:

  1. No changes seen in the the Kwrite File Menu → Printer → Properties → Margins dialogue
  2. Page printed but default print margins (4.23mm) were retained.

Perhaps network printing means the ‘lpr’ or ‘lp’ command is not invoked in this case?

I have never used kwrite for anything where margins are important but if you open Settings>Configure Editor>Fonts and colors you are offered several different schemas including Kwrite printing which is different from Kwrite normal. Are you assuming that kwite is WYSISYG because this suggests it is not. As far as I can see, there is no way to set the margins explicitly in kwrite but you can change the font size and the number of characters before word wrap which will presumably have the effect of changing the margin size. So, even if the printer dialogue did respect any printer margins set, these would be for a single document and would not be associated with kwrite generally. I’ve set margins in KWord and other applications which are persistent but I suspect that the options in the printer dialogue are the same as a feature WordStar had thirty years ago - whatever the margins in the document, you could print the document out with different margins without affecting the content of the source document - this of course was before WYSIWYG was invented and people were really happy that you didn’t have to go through the document changing the margins in the document if you wanted them to be different just once.

Thank you for your interest in this thread. I did once use WordStar, first on an Aussie MicroBee, then on an Hitachi Peach with a Motorola 6809 processor running CP/M. Those were the days.

I currently use KDE Kate & Kwrite because they are excellent ‘plain text’ editors and, for me, the most efficient way to draft, edit and and store plain text on my computer. I use Konqueror and other KDE apps because they are KDE apps and well integrated with the KDE.

There are many ways to work around the printing deficiencies in openSUSE 11.4 KDE4 and I have tried quite a few, but they all compromise the efficiency and usefulness of the KDE for me.

I opened this thread, after some weeks searching, because, although some of the problems around non-persistent print settings seem to be show-stoppers (eg. for some corporate IT roll-outs) they are not really a ‘bug’ and so do not seem to be getting much attention from the openSUSE, KDE and QT developers.

The issues are complex but to this puzzled penguin they seem to flow from the decision by KDE developers to adopt the QT printing system. I understand it is more efficient than the KDE tools it replaced but it seems to be designed to create and delete each print instance on the fly (perhaps with mobile phones in mind?). I suspect, but do not know, that this is at the core of the non-persistent print settings problems in KDE.

If so, designing an elegant solution may be quite difficult. It would certainly require coordinated effort by openSUSE, KDE and QT developers which itself presents challenges since perceived priority for action and actual capacity to action is likely to be distributed inversely across those development teams.

I also understand that development effort for a Common Printing Dialogue for Linux OS has been proceeding for some years but that is a massive undertaking and still some time away from our desktops.

So the impact of non-persistent print settings on the efficiency and usefulness of the KDE in openSUSE 11.4 seems a relevant topic for this forum. The non-persistent print settings in KDE apps are a problem for me. Are they a problem for any other users? Is there already some easy way for users to very the default KDE print settings in a way that is persistent? If not, does this issue warrant an appeal for development effort to provide a suitable ‘feature’?

I certainly think this is an issue which it would be worth putting on the KDE wishlist for Kwrite; my reservation about it for the printer dialogue would be that it may create other problems because the algorithms for calculating word wrap with proportional typefaces would need to be in the dialogue. It seems to me far more efficient to have the margins calculated by the originating program rather than the printer dialogue with text programs.

This issue is not about word wrap in Kwrite but you make a good point, I agree it seems more useful to have margins (and other source related print settings like fonts, page orientation, etc., etc.) set by the originating program.

I am not sure it is a wish list item either. Such ‘originating program’ related printer settings were persistent (and very useful) in earlier versions of openSUSE KDE3.5. They worked, if a bit less usefully, in openSUSE 11.3 KDE4, but they are not persistent in openSUSE 11.4 KDE 4.5 & 4.6 and there is no obvious way to even alter the defaults, even with wise advice from this forum. That does not seem like a wish list matter to me.

The problem is reproducible in other KDE apps, including Konqueror, Kwrite, Kate and Kmail. Having to click through the print dialogue and enter 4 margin settings manually for each print job is a distraction and a big waste of time. The many ‘user’ errors (!) that do slip through in my case cause a shameful waste of paper.

Installing the CUPS system-config-printer 1.2.5 (it’s in the repos) will allow Printer related settings, such as Media Size, Print quality, Media Type, Media Source, Manual Feed, Duplex, Toner Save, Screen Lock & BR-Script Level, to be changed persistently. (thanks Red Hat!)

But there is no obvious place or known add-on that allows a user to change ‘originating program’ related print settings (such as default margins, page orientation, etc., etc.) persistently in these core KDE apps.

My purpose in opening this thread was to find a solution, if possible, and get a better understanding of the issue and its impact on other openSUSE users who find it a problem. You reported that you don’t set margins for printing with KDE apps, so it is not a problem for you. Perhaps it is not a problem for any others in this forum? That is useful to know.

Installing the CUPS system-config-printer 1.2.5 (it’s in the repos) will allow Printer related settings, such as Media Size, Print quality, Media Type, Media Source, Manual Feed, Duplex, Toner Save, Screen Lock & BR-Script Level, to be changed persistently. (thanks Red Hat!)

The system-config-printer utility is just an alternative CUPS interface. I have it installed. The same config settings exist in the CUPS graphical web interface.

But there is no obvious place or known add-on that allows a user to change ‘originating program’ related print settings (such as default margins, page orientation, etc., etc.) persistently in these core KDE apps.

This is a KDE limitation. As such, it would be a good idea to take it up with the KDE developers.

Indeed it is, but for me, it is easier to access and use.

That may be so. Others say it is a QT limitation, or design feature. Certainly it impacts on the ‘usability’ of the openSUSE 11.4 distribution and of the KDE.

There are many relevant bug reports already on the openSUSE, KDE and QT lists. One report on the KDE list has over 1000 votes. That is part of the problem. The reports originate from users concerned about different aspects of the KDE printing settings system (duplex, PDF, web pages, email, margins, page orientation, etc., etc.).

The ‘printer orientated’ aspects of the issue can be solved by using CUPS configuration. Perhaps less than optimal but satisfactory. There is no such solution for the ‘originating program’ aspects. I am not completely sure why.

As I said in #9, I think progress on this issue requires coordinated effort by the key KDE distributions, the KDE and the QT developers. Some KDE developers have marked related bug reports closed saying it is an upstream issue. There are at least two relevant bug reports with QT, but the QT developers have many higher priorities. Their perception of the issue and its priority may be affected by the uncoordinated user level bug reports that have been made and, possibly, because it is at least partly a KDE and distribution related issue, since QT is designed to work that way.

I am a grateful and curious openSUSE user with a strong commitment to the open source economy. I don’t understand the computer science or the development processes involved and don’t want to risk slowing progress with an unhelpful bug report. I have just added a comment to an existing report and given it a few more votes.

From responses to this thread I have learned how to fix the ‘printer orientated’ aspects (especially duplex printing, in my case) and I have a much better understanding of the wider issue and its priority for other openSUSE users. The non-persistent print settings ‘feature’ in KDE apps doesn’t seem to be much of a problem for others here. Good to know.

I am a grateful and curious openSUSE user with a strong commitment to the open source economy. I don’t understand the computer science or the development processes involved and don’t want to risk slowing progress with an unhelpful bug report. I have just added a comment to an existing report and given it a few more votes.

That’s the main thing - you’ve added to an existing bug report. Many users complain (via forums), but do nothing else.

As I said in #9, I think progress on this issue requires coordinated effort by the key KDE distributions, the KDE and the QT developers. Some KDE developers have marked related bug reports closed saying it is an upstream issue. There are at least two relevant bug reports with QT, but the QT developers have many higher priorities. Their perception of the issue and its priority may be affected by the uncoordinated user level bug reports that have been made and, possibly, because it is at least partly a KDE and distribution related issue, since QT is designed to work that way.

QT is the underlying platform on which KDE is built, but make no mistake, this is an issue that can easily be tackled by the KDE developers if desired.

From responses to this thread I have learned how to fix the ‘printer orientated’ aspects (especially duplex printing, in my case) and I have a much better understanding of the wider issue and its priority for other openSUSE users. The non-persistent print settings ‘feature’ in KDE apps doesn’t seem to be much of a problem for others here. Good to know.

Many users probably just accept the status quo (or are just happy that their printer works), but its only by users questioning (or requesting features) that improvements get made.

On Wed, 08 Jun 2011 15:06:02 GMT, Tallowwood
<Tallowwood@no-mx.forums.opensuse.org> wrote:

>
>Sorry, timed out. Trying again…
>
>OK. Tried CUPS lpoptions command. This amended the ~/.cups/lpoptions
>file as expected:
>
>
>Code:
>--------------------
> cat ~/.cups/lpoptions
> Default brother_mono_HL5250DN media=A4 page-bottom=40 page-left=40 page-right=40 page-top=40
>
>--------------------
>
>
>Tried printing plain text file from kwrite, to network printer using
>IPP protocol.
^^^^^^^^^^^^

>Printer was setup with Yast and is visible in the CUPS web interface.
>
>Result:
>1. No changes seen in the the Kwrite File Menu → Printer →
>Properties → Margins dialogue
>2. Page printed but default print margins (4.23mm) were retained.
>
>Perhaps network printing means the ‘lpr’ or ‘lp’ command is not invoked
>in this case?

I think so. IPP and LP(R) are not the same.

Non-persistent print margins are an issue for ALL user’s, any OS. Many user’s do not make the effort to report troublesome bugs, like the non-persistent print margins. Typically, user’s will grumble and curse with each print job, without reporting the problem. I have reported this problem to KDE twice; we have all lived with it since KDE 4.0. I would like to see this issue move way up the KDE/QT priority ladder. APPLY PRESSURE NOW!

Hi all,
it’s some time since the last post, but I stumbled across the same problem. Is there any solution to the problem available? It is kind of annoying to enter the “right” margins in every print dialogue over and over again…
Many thanks,
Knut