General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Page setup
Posted by: lepicsaintloup
Date: June 07, 2017 06:23AM

Whenever I print, it always adds the header and footer info, even if I remove it in the page setup dialog. It always reverts to the same settings too. My printer has no settings for changing this.

Is there a way to always print with no header or footer?

Options: ReplyQuote
Re: Page setup
Posted by: JamesD
Date: June 07, 2017 12:04PM

Quote

lepicsaintloup
Whenever I print, it always adds the header and footer info, even if I remove it in the page setup dialog. It always reverts to the same settings too. My printer has no settings for changing this.

The page setup problem might be specific to a KM version. Which version of KM are you running and on what operating system? I am away from home and have no printer available, but I did FILE > PAGE SETUP and removed the header and footer items. When I print to PDF, I do not see any header/footer info.

I am using KM 76 RC2 on Win 10.

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
Re: Page setup
Posted by: lepicsaintloup
Date: June 08, 2017 01:37AM

I am using the Portable Apps version so maybe that's it:

Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 K-Meleon/75.1.

My "print to PDF" always includes the header and footer even if I remove it first.

Options: ReplyQuote
Re: Page setup
Posted by: lepicsaintloup
Date: June 08, 2017 03:26AM

I've changed to an installed version:
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 K-Meleon/76.0

But this still has the same result. It always prints the header and footer.

Options: ReplyQuote
Re: Page setup
Posted by: JohnHell
Date: June 08, 2017 02:53PM

Since K-meleon 7x.x print has been trickier than before.

I shyly reported it in the development of 7x version (I can't tell one but searching the forum will bring) because there are several print options.

For your problem, my guess is that you go to "File menu > Page Setup", you remove it, but open a new window (I don't know if it happens to tabs) and when you go to that new window the print options have been reset.

This happens because, I don't know why, for every new window, Gecko or K-meleon doesn't remember the previously settings. So every time you are in a new window (theoretically this shouldn't happen in tab inside the same window, but I don't use tab browsing) you need to go to Page Setup.

If that is not your problem you can delete the print. preferences from about:config and start from scratch.


That above is what I think is happening to you. A more technical detail comes..., because the problem is deeper.

We have the General print or main print options. These settings are stored in the preferences print.print_[settingname].

Then we have the per printer print options. These settings are stored in the preferences print.printer_[printername].print_[settingname].

And here comes the problem. It depends a lot on whatever magic for use one or the other settings. Generally, if you have a printer preference set, the print command would obey those settings.

But, for example, for the footer and header, even though you have printer settings, the options will be the main settings. That is what is changed when you use "Page setup". And that makes think you, what do I set for every printer if it is taking the general setting?


Why wasn't this fixed, because Dorian only has one printer and all worked fine for him (my guess is that with only one printer, every time are used the general print settings), but, hey, I have 3 printers!!!. And, believe me, it is a headache to set the settings. Above all, settings margins could be crazy to set because all settings, general and per printer, looks like are related or mixed, and sometimes takes one and other times the other.


So, long story short, the Print options are broken. BUT, not in K-meleon, in Firefox as well, because does exactly the same.

The best. Delete every print. preference and start from scratch if you don't want to get mad about printing, but, as I said, with K-meleon or Firefox. Any Gecko browser I'll say.

Options: ReplyQuote
Re: Page setup
Posted by: siria
Date: June 08, 2017 04:42PM

Whoa, crazy! And I was hoping printing was finally fixed in latest versions. Sigh.
Of course, if (??) the prob is only "remembering" the correct settings, that cries out for a customized own printer pref file in defaults folder, or a macro, or customizing user.js - you know that of course, just as hint for less experienced users ;-)

Options: ReplyQuote
Re: Page setup
Posted by: JohnHell
Date: June 08, 2017 09:00PM

Yep smiling smiley and I already tried, but looks like per printer settings sometimes act more as a container for default setting when printing for that printer then the actual print settings used.

But a I never confirmed this. It is just... I don't know. Maybe someone explains it to me some day.

It's the same as the margin units. Time ago, when I searched for it, some people said that some where in metric system and other in inches. Finally, this winter, as I was using K-meleon to "print" epubs pages (that are html+css) to PDF, I found through trial&error that all units are in inches. All. But as there are the general print settings, the per printer settings, and the margins for all kind of margins (plus printer own margins), at the end you don't know what measurement is given to the printer. After I reset all I understood that.

It is just crazy. So I understand lepicsaintloup. My recommendation reset all print settings (and I forgot to say, but restart after remove the print settings). Or play with them until you find what are being used.

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: siria
Date: June 08, 2017 09:16PM

Just took a look at my about:config
Yikes. Endless "print..." prefs, and more prefs, and yet more...
What a jungle.

A bit info here:
kb.mozillazine.org/About:config_entries#Print

PS: can confirm that in KM1.6 too the page size is fixed to every single tab! When setting it from "letter" to "A4", then activating another tab, that one will show the default size "letter" again. When switching to a third, that too. When switching back to the first one - it still remembers it is now "A4"!
Ok, that gives me plenty opportunity for own little tests, which settings to play with grinning smiley

Kinda funny to read, as you said, tons of probs with firefox too:
www.google.de/search?q=print_paper_data+firefox&btnG=Suche&num=30&nfpr=1&gbv=1
Haven't studied all that yet, perhaps it contains already a simple solution.
But really, considering this jungle of endless prefs, can't help feeling it's no wonder, the browser is just confusing itself and the user too

PS: actually I wasn't checking the printer prefs, only the "page setup". Now notice, that seems not necessarily the same...



Edited 5 time(s). Last edit at 06/08/2017 11:28PM by siria.

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: lepicsaintloup
Date: June 08, 2017 10:41PM

I can confirm that I am seeing what is described here, but it's not even sticking for the tab that I have open.

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: siria
Date: June 08, 2017 11:24PM

Quote
lepicsaintloup
Whenever I print, it always adds the header and footer info, even if I remove it in the page setup dialog. It always reverts to the same settings too. My printer has no settings for changing this.
Is there a way to always print with no header or footer?

Quote
lepicsaintloup
I can confirm that I am seeing what is described here, but it's not even sticking for the tab that I have open.

Hmm, doesn't sound good. If it's not only forgetting the settings, but completely ignoring them, the prob is bigger than first thought :/
Also no luck on my old system yet, tried default-prefs and user.js so far

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: siria
Date: June 09, 2017 12:11AM

Contrary to the page size, the footer-header entries seem to stick better, at least on my old version.
If they are completely ignored on yours, there's probably not much hope, but would try anyway:

Click Edit > Configuration > Profile Directory
Open the file "user.js" with a notepad or any editor
Close the browser
Copy this into user.js (at bottom?):

user_pref("kmeleon.print.footerLeft", "footL-KM");
user_pref("kmeleon.print.footerRight", "footR-KM");
user_pref("kmeleon.print.headerLeft", "headL-KM");
user_pref("kmeleon.print.headerRight", "headR-KM");

user_pref("print.print_footerleft", "footL-FF");
user_pref("print.print_footerright", "footR-FF");
user_pref("print.print_headerleft", "headL-FF");
user_pref("print.print_headerright", "headR-FF");

save the file and restart KM

PS: those texts are just for testing. If they actually appear, you can set the values to empty: ""



Edited 1 time(s). Last edit at 06/09/2017 12:12AM by siria.

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: JohnHell
Date: June 09, 2017 12:19AM

Quote
lepicsaintloup
I can confirm that I am seeing what is described here, but it's not even sticking for the tab that I have open.

Just some ideas.

Try to go to about:config and if you have it, reset (set to empty) the preference print_printer. (One of the problems I see with Firefox and K-meleon is that you can't set a default printer, it defaults, if I'm not wrong, to the latest printer, or something like that, when the print command is used).

So, that, if I'm right, won't take a printer settings, if already exists as default values and would take the default global values.


Also, even I don't think this does something (or stopped doing something to me). Set this to true, or even to false and then to true, restarting K-meleon between changes and/or printing, to see if something changes.
print.save_print_settings


@Siria, a few of those among other problems about size (people complaining about looking tiny), are because are related to the shrink to fit to paper option. As wide your screen is, if the page has fixed widths, tinier would be in an A4 when shrinking.

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: siria
Date: June 09, 2017 07:10AM

Someone somewhere mentioned, his browser would take the printer's own default settings (windows... printers... ) Outside of the browser. Actually this seems to work for me... at the moment... or perhaps it's one of the other prefs I'm still playing with...

===============
Not really (in KM1.6). This is CRAZY: all of a sudden my default page size is now A4!! Which would be good, except I don't have the slightest clue why
These are the candidates I added in user.js, and after some more testing the last one seems the hottest suspect...

user_pref("kmeleon.print.paperWidth", "210");
user_pref("kmeleon.print.paperHeight", "297");

user_pref("print.print_paper_width", "210");
user_pref("print.print_paper_height", "297");

user_pref("print.print_paper_size_unit", 1);
user_pref("kmeleon.print.paperUnit", 1);

user_pref("print.print_paper_data", 9);
user_pref("print.print_paper_size_type", 1);
user_pref("print.print_paper_size", 3);
user_pref("print.postscript.paper_size", "A4");
user_pref("print.print_paper_name", "iso_a4");

===============
Yet another UPDATE :cool:
- Changing settings in about:config is enough, no user.js required
- the page setup shows only the native gecko prefs => are the "kmeleon.print" prefs obsolete, even in KM1.6 already?

Latest tests in KM1.6: can it be that all that really counts is just width/height?
user_pref("print.print_paper_width", "210");
user_pref("print.print_paper_height", "297");

EXCEPT:
The "paper_name" must not be empty!
It can be any nonsense (blabla), just NOT EMPTY or next tab gets "Letter" size again :O
user_pref("print.print_paper_name", "iso_a4");

Next prob, perhaps just my old version:
The above tests are only done with File>Page Setup
Printing is still strange. The PREVIEW does get a bit smaller/wider when switching page size between "Letter" and "A4". But when trying any other pages sizes (A3, or fantasy) the print-preview still sticks with either Letter or A4.

Options: ReplyQuote
Re: Page setup / Print margins etc
Posted by: JohnHell
Date: June 09, 2017 03:38PM

You are focusing on paper size and that is just one of the problems.

I say this because you didn't find yet, for example, that the paper size set in Gecko preferences are just browser preference, but at the time of print, the valid paper size is the one set in the printer dialog settings. So that means, that even if you set letter, or custom width/height, the last word to shrink to fit and/or display print are the paper dimensions set in the printer dialog.

(Better with a PDF printer) I challenge you to set in K-meleon A4 but set in the printer, lets say... A1. What are the results? There you have another thing to scratch your head for. For example, Firefox, doesn't have a paper size on its print dialog. It lets all to the printer paper size.



And we have forgotten about lepicsaintloup problem winking smiley As I said, reset print settings in about config would be the solution. It is better than wasting time trying to understand it. I wasted some, really.



Edited 1 time(s). Last edit at 06/09/2017 03:40PM by JohnHell.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.