Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firefox print settings, print background (images and colors)?

4,483 views
Skip to first unread message

Bernd Mueller

unread,
Dec 9, 2011, 6:15:53 AM12/9/11
to
Hi,
does anybody know where and how this settings are stored within ff?

I want to set this by default or programatically via Javascript, etc.
(no manually)

Unfortunately i couldn't find a about:config pref-switch in print branch
on that, so i assume that it didn't exists here in the preference-service/system.

Thx,
Bernd

gla...@linuxuser.iam

unread,
Dec 9, 2011, 7:09:32 AM12/9/11
to
---

with firefox v/r 2.0.0.24 (20111108) from 'main menu'

File > Print > Options


--
peace out.

tc, hago.

walking the walk. long live tux.

g
.

*please reply "plain text" only. "html text" are deleted*

Ron Hunter

unread,
Dec 9, 2011, 7:43:50 AM12/9/11
to
As I understand it, the parameters are taken from your OS printer
driver, and saved in the profile. Changes apply to the printer defined
in your OS as 'default', or the printer you choose in the print setup
dialog.

gla...@linuxuser.iam

unread,
Dec 9, 2011, 8:24:34 AM12/9/11
to
On 12/09/2011 12:43 PM, Ron Hunter wrote:
> On 12/9/2011 5:15 AM, Bernd Mueller wrote:
>> Hi,
>> does anybody know where and how this settings are stored within ff?
>>
>> I want to set this by default or programatically via Javascript, etc.
>> (no manually)
>>
>> Unfortunately i couldn't find a about:config pref-switch in print branch
>> on that, so i assume that it didn't exists here in the preference-service/system.
>>
> As I understand it, the parameters are taken from your OS printer
> driver, and saved in the profile. Changes apply to the printer defined
> in your OS as 'default', or the printer you choose in the print setup
> dialog.
---

how would printer know what web browser sees as background images and color?

such would be defined in html code and with browser reading the code and not
printer driver, web browser would know what to pass or not pass to printer
drive.

Jay Garcia

unread,
Dec 9, 2011, 8:33:22 AM12/9/11
to
On 09.12.2011 07:24, gla...@linuxuser.iam wrote:

--- Original Message ---

> On 12/09/2011 12:43 PM, Ron Hunter wrote:
>> On 12/9/2011 5:15 AM, Bernd Mueller wrote:
>>> Hi,
>>> does anybody know where and how this settings are stored within ff?
>>>
>>> I want to set this by default or programatically via Javascript, etc.
>>> (no manually)
>>>
>>> Unfortunately i couldn't find a about:config pref-switch in print branch
>>> on that, so i assume that it didn't exists here in the preference-service/system.
>>>
>> As I understand it, the parameters are taken from your OS printer
>> driver, and saved in the profile. Changes apply to the printer defined
>> in your OS as 'default', or the printer you choose in the print setup
>> dialog.
> ---
>
> how would printer know what web browser sees as background images and color?
>
> such would be defined in html code and with browser reading the code and not
> printer driver, web browser would know what to pass or not pass to printer
> drive.
>

The "default" printer may be a b/w laser that won't print a color
background .. for example. And true, the printer will only
print/interpret what is sent to it. So therefore the printer does "know"
or "see" and interprets/prints accordingly.



--
Jay Garcia - www.ufaq.org - Netscape - Firefox - SeaMonkey - Thunderbird
Mozilla Contribute Coordinator Team - www.mozilla.org/contribute/
Mozilla Mozillian Member - www.mozillians.org
Mozilla Contributor Member - www.mozilla.org/credits/

gla...@linuxuser.iam

unread,
Dec 9, 2011, 8:46:00 AM12/9/11
to
On 12/09/2011 01:33 PM, Jay Garcia wrote:
> On 09.12.2011 07:24, gla...@linuxuser.iam wrote:
<>

>> how would printer know what web browser sees as background images and color?
>>
>> such would be defined in html code and with browser reading the code and not
>> printer driver, web browser would know what to pass or not pass to printer
>> drive.
>>
>
> The "default" printer may be a b/w laser that won't print a color
> background .. for example. And true, the printer will only
> print/interpret what is sent to it. So therefore the printer does "know"
> or "see" and interprets/prints accordingly.
---

convenes me.

show me one *printer* configuration program that has anything to do
with web page background images or color, other than what is supplied
with web browser.

Bernd Mueller

unread,
Dec 9, 2011, 1:21:00 PM12/9/11
to
please, back to my topic.

I use ff8, and i know how to change it in the menu/gui.

But i want to set it programatically or via a preference to
set it default to checked, so that background (colors & images)
will always be printed.

I don't want that the user must check it manually.

Thxs,
Bernd

Jay Garcia

unread,
Dec 9, 2011, 1:34:56 PM12/9/11
to
On 09.12.2011 07:46, gla...@linuxuser.iam wrote:

--- Original Message ---

> On 12/09/2011 01:33 PM, Jay Garcia wrote:
>> On 09.12.2011 07:24, gla...@linuxuser.iam wrote:
> <>
>
>>> how would printer know what web browser sees as background images and color?
>>>
>>> such would be defined in html code and with browser reading the code and not
>>> printer driver, web browser would know what to pass or not pass to printer
>>> drive.
>>>
>>
>> The "default" printer may be a b/w laser that won't print a color
>> background .. for example. And true, the printer will only
>> print/interpret what is sent to it. So therefore the printer does "know"
>> or "see" and interprets/prints accordingly.
> ---
>
> convenes me.
>
> show me one *printer* configuration program that has anything to do
> with web page background images or color, other than what is supplied
> with web browser.
>
>

Maybe I didn't make myself clear. A B/W printer will print a background
but not in color. That can make a difference when you select a printer
to print a web page.

Dave Pyles

unread,
Dec 9, 2011, 1:35:15 PM12/9/11
to
Bernd Mueller wrote:
> please, back to my topic.
>
> I use ff8, and i know how to change it in the menu/gui.
>
> But i want to set it programatically or via a preference to
> set it default to checked, so that background (colors& images)
> will always be printed.
>
> I don't want that the user must check it manually.
>
> Thxs,
> Bernd

Firefox button>Print>Page setup, select "Print Background (colors & images)"

That setting persists between Firefox sessions, so you should only have
to set it once. Are you saying that it does not persist between
sessions for you?
Dave Pyles

Bernd Mueller

unread,
Dec 9, 2011, 2:26:27 PM12/9/11
to
Yes, i know how to change the settings in ff menu/gui.
They persist between sessions, thats all ok and fine.

The problem is that the default of this setting is "unchecked"
and i wanted it to be "checked" by default.
I have an webapp packaged with an ff-runtime, so every user
starts with a fresh new profile created on first startup of the webapp.

printing with background (colors & images) should be the default
so that no user must change/check it manually via ff-button>Print>Page setup.

ff (v6,7,8) must store the setting somewhere?
As far as i can see, unfortunately it's not in the about:config prefs service/system. That's unhandsome.

All i want to know is:
Where is the place (the file, etc.) FF is storing that value?
And how can it be tweaked from the outside or programaticaly (by javascript)
from within an extension/addon?
So that i can change the default to be checked.

Thx,
Bernd

Ron K.

unread,
Dec 9, 2011, 4:00:17 PM12/9/11
to
Bernd Mueller on 12/9/2011 2:26 PM, keyboarded a reply:
> Yes, i know how to change the settings in ff menu/gui.
> They persist between sessions, thats all ok and fine.
>
> The problem is that the default of this setting is "unchecked"
> and i wanted it to be "checked" by default.
> I have an webapp packaged with an ff-runtime, so every user
> starts with a fresh new profile created on first startup of the webapp.
>
> printing with background (colors& images) should be the default
> so that no user must change/check it manually via ff-button>Print>Page setup.
>
> ff (v6,7,8) must store the setting somewhere?
> As far as i can see, unfortunately it's not in the about:config prefs service/system. That's unhandsome.
>
> All i want to know is:
> Where is the place (the file, etc.) FF is storing that value?
> And how can it be tweaked from the outside or programaticaly (by javascript)
> from within an extension/addon?
> So that i can change the default to be checked.
>
> Thx,
> Bernd

OK, see where your coming from. You want a custom default with the
run-time, different than the FF run-time.

Looking at the FF prefs using about:config I did not see a default, just
the user set pref over-ride. I am willing to bet the default is contained
in the Gecko defaults which used to be in folder greprefs within the
program files folder. Since those prefs appear to now be compiled into the
application, your need should be addressed to the developers, who will
know where and how a 3rd-party developer, like yourself, can customize the
prefs.

Suggest posting to mozilla.dev.apps.firefox for assitance.

--
Ron K.
Who is General Failure, and why is he searching my HDD?
Kernel Restore reported Major Error used BSOD to msg the enemy!

gla...@linuxuser.iam

unread,
Dec 9, 2011, 4:45:17 PM12/9/11
to
On 12/09/2011 06:21 PM, Bernd Mueller wrote:
> please, back to my topic.
---

if you insist. ;)


> I use ff8, and i know how to change it in the menu/gui.
---

i am using;

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24)
Gecko/20111108 Red Hat/3.6-3.el5_7 Firefox/3.6.24


> But i want to set it programatically or via a preference to
> set it default to checked, so that background (colors & images)
> will always be printed.
---

with my v/r, 'about:config' defaults are;

print.printer_PostScript/default.print_bgcolor default boolean true
print.printer_PostScript/default.print_bgimages default boolean true


these are set from a 'user default' config, which will need to be located
if above is not your default. because i am using linux, my "grep"ing thru
my firefox files for defaults will be useless for you.

therefore, i will suggest you post to firefox developer list with your
question, or wait to see if a subscriber here knows or can find it for
you.

or, you could search thru your firefox files for either 'user', 'defaults',
'profile', or combinations.


i would also imagine that location of files is held in 'registry', but
that is another 'needle in a bigger hay stack'.


> I don't want that the user must check it manually.
---

understand.


to you a question, have you tried looking thru your about:config and
used "bg" as "Filter:" word?


much luck.

gla...@linuxuser.iam

unread,
Dec 9, 2011, 4:55:45 PM12/9/11
to
On 12/09/2011 06:34 PM, Jay Garcia wrote:
> On 09.12.2011 07:46, gla...@linuxuser.iam wrote:
>> On 12/09/2011 01:33 PM, Jay Garcia wrote:
>>> On 09.12.2011 07:24, gla...@linuxuser.iam wrote:
>> <>
>>
>>>> how would printer know what web browser sees as background images and color?
>>>>
>>>> such would be defined in html code and with browser reading the code and not
>>>> printer driver, web browser would know what to pass or not pass to printer
>>>> drive.
>>>>
>>> The "default" printer may be a b/w laser that won't print a color
>>> background .. for example. And true, the printer will only
>>> print/interpret what is sent to it. So therefore the printer does "know"
>>> or "see" and interprets/prints accordingly.
>> ---
>>
>> convenes me.
>>
>> show me one *printer* configuration program that has anything to do
>> with web page background images or color, other than what is supplied
>> with web browser.
>>
>>
>
> Maybe I didn't make myself clear.
---

this is true. you did not.

> A B/W printer will print a background but not in color. That can make a
> difference when you select a printer to print a web page.
---

exception being that op;

From: Bernd Mueller <bem...@googlemail.com>

use;

Subject: Firefox print settings, print background (images and colors)?

and magic word is "colors". ;)

Beauregard T. Shagnasty

unread,
Dec 9, 2011, 5:13:25 PM12/9/11
to
glad2be wrote:

> Subject: Firefox print settings, print background (images and colors)?
>
> and magic word is "colors". ;-)

Shades of gray are colors, too!

--
-bts
-This space for rent, but the price is high

Ralph Fox

unread,
Dec 9, 2011, 5:25:14 PM12/9/11
to
On Fri, 9 Dec 2011 03:15:53 -0800 (PST), in message <171572.727.1323429353387.JavaMail.geo-discussion-forums@vbak19>
Bernd Mueller wrote:

> Subject: Firefox print settings, print background (images and colors)?
> does anybody know where and how this settings are stored within ff?
>
> Unfortunately i couldn't find a about:config pref-switch in print branch
> on that, so i assume that it didn't exists here in the preference-service/system.


This is stored in prefs.js

There are multiple settings.
Specifically, there are two preference settings stored for each printer.
The menu/gui makes it *appear* to be a single preference setting for all printers.


In Firefox 8.0 ...

1. The last printer which I printed on is found in the preference
named "print_printer" (no periods)


2. When the last printer which I printed on was the FoonlyJet Writer,
then the preferences for printing background colours and images
are in the two preferences named

"printer_FoonlyJet_Writer.print_bgcolor"
"printer_FoonlyJet_Writer.print_bgimages"

These two settings work independently of one another.

I can change each of these preference settings in about:config.
They independently affect how the message is printed on the
FoonlyJet Writer.


3. If I change the printer in Firefox's print dialog drop-down
from: FoonlyJet Writer
to: Epsylon Lazor
and I then print on the Epsylon Lazor, Firefox will:

3.1 Copy the two preference settings above from the FoonlyJet
Writer into these two preferences

"printer_Epsylon_Lazor.print_bgcolor"
"printer_Epsylon_Lazor.print_bgimages"

3.2 The use these two preference settings for printing on the
Epsylon Lazor.

This copying is only done when I actually go ahead and print.
If I select the the Epsylon Lazor in the drop-down but cancel
before printing, nothing is changed.


4. My prefs.js also has preference settings beginning "print." which
are not used. For example

"print.print_printer"
"print.printer_FoonlyJet_Writer.print_bgcolor"

These preferences are for what I was using some time ago back in
an older version of Firefox.


--
Kind regards
Ralph

Jay Garcia

unread,
Dec 9, 2011, 6:33:12 PM12/9/11
to
On 09.12.2011 15:55, gla...@linuxuser.iam wrote:

--- Original Message ---

> exception being that op;
>
> From: Bernd Mueller <bem...@googlemail.com>
>
> use;
>
> Subject: Firefox print settings, print background (images and colors)?
>
> and magic word is "colors". ;)

It says (colors and images) by default, doesn't matter what printer
you're using. If you want to print "colors" then you have to use a
"color" printer, else it prints in B/W and usually a color background
looks horrible when printed in B/W.

Bernd Mueller

unread,
Dec 10, 2011, 3:00:02 AM12/10/11
to
Many thanks to all, finally i see now how it is arranged ans it works.
It's stored for each printer, that's what i didn't see before.

I hope ff will create the printer_... prefs for the default-os-printer
during first startup of newly created profile.
This would makes me possible to set all _bgcolor and _bgimages entrys
for it or i could find in the printer_ branch to true via js.

If not maybe i can get the default-os-printer via an js/xpcom-call to
create them by myself.

THX,
Bernd

Ron Hunter

unread,
Dec 10, 2011, 4:14:11 AM12/10/11
to
On 12/9/2011 7:46 AM, gla...@linuxuser.iam wrote:
> On 12/09/2011 01:33 PM, Jay Garcia wrote:
>> On 09.12.2011 07:24, gla...@linuxuser.iam wrote:
> <>
>
>>> how would printer know what web browser sees as background images and color?
>>>
>>> such would be defined in html code and with browser reading the code and not
>>> printer driver, web browser would know what to pass or not pass to printer
>>> drive.
>>>
>>
>> The "default" printer may be a b/w laser that won't print a color
>> background .. for example. And true, the printer will only
>> print/interpret what is sent to it. So therefore the printer does "know"
>> or "see" and interprets/prints accordingly.
> ---
>
> convenes me.
>
> show me one *printer* configuration program that has anything to do
> with web page background images or color, other than what is supplied
> with web browser.
>
>
My printer driver can enable/disable printing of background images.
This, of course, requires that the website have the background defined
as a separate image, as most do.

Beauregard T. Shagnasty

unread,
Dec 10, 2011, 7:34:23 AM12/10/11
to
Ron Hunter wrote:

> My printer driver can enable/disable printing of background images.
> This, of course, requires that the website have the background defined
> as a separate image, as most do.

Only if the website's author wanted an image. Don't forget there's plain
colors as well - and yes, my printer driver can enable/disable them too.
Use CSS:

body {
background-color: #4b2638; /* purple */

gla...@linuxuser.iam

unread,
Dec 10, 2011, 8:37:52 AM12/10/11
to
---

what printer driver?

via what are you accessing it?

gla...@linuxuser.iam

unread,
Dec 10, 2011, 8:39:09 AM12/10/11
to
On 12/10/2011 12:34 PM, Beauregard T. Shagnasty wrote:
> Ron Hunter wrote:
>
>> My printer driver can enable/disable printing of background images.
>> This, of course, requires that the website have the background defined
>> as a separate image, as most do.
>
> Only if the website's author wanted an image. Don't forget there's plain
> colors as well - and yes, my printer driver can enable/disable them too.
> Use CSS:
>
> body {
> background-color: #4b2638; /* purple */
> }
>
---

what is name of .css file?

goodwin

unread,
Dec 10, 2011, 11:09:54 AM12/10/11
to
On 12/10/2011 05:39 AM, gla...@linuxuser.iam wrote:
> On 12/10/2011 12:34 PM, Beauregard T. Shagnasty wrote:
>> Ron Hunter wrote:
>>
>>> My printer driver can enable/disable printing of background images.
>>> This, of course, requires that the website have the background defined
>>> as a separate image, as most do.
>>
>> Only if the website's author wanted an image. Don't forget there's plain
>> colors as well - and yes, my printer driver can enable/disable them too.
>> Use CSS:
>>
>> body {
>> background-color: #4b2638; /* purple */
>> }
>>
> ---
>
> what is name of .css file?
>
userChrome.css probably

Beauregard T. Shagnasty

unread,
Dec 10, 2011, 12:22:42 PM12/10/11
to
glad2be wrote:

> Beauregard T. Shagnasty wrote:
>> Ron Hunter wrote:
>>> My printer driver can enable/disable printing of background images.
>>> This, of course, requires that the website have the background defined
>>> as a separate image, as most do.
>>
>> Only if the website's author wanted an image. Don't forget there's
>> plain colors as well - and yes, my printer driver can enable/disable
>> them too. Use CSS:
>>
>> body {
>> background-color: #4b2638; /* purple */
>> }
>
> what is name of .css file?

Whatever the author chooses to name it.

<link type="text/css" rel="stylesheet" href="anything_goes.css">

Beauregard T. Shagnasty

unread,
Dec 10, 2011, 12:27:08 PM12/10/11
to
goodwin wrote:

> On 12/10/2011 05:39 AM, gla...@linuxuser.iam wrote:
>> Beauregard T. Shagnasty wrote:
>>> ... Use CSS:
>>>
>>> body {
>>> background-color: #4b2638; /* purple */
>>> }
>>
>> what is name of .css file?
>>
> userChrome.css probably

userContent.css

And that would only be if the visitor (you) wanted to disable background
colors for all web sites.

body {
background-color: none !important;
0 new messages