set print settings in user.js

REpost from Layout:
I am printing from within a chrome environment so the user cannot use 
print preview to change the settings.

I am tring to set global print settings in the user.js file, so that 
when a user uses another printer all of the settings remain the same.

I have tried this

user_pref("print.print_margin_bottom", "0");
user_pref("print.print_margin_left", "0");
user_pref("print.print_margin_right", "0");
user_pref("print.print_margin_top", "0");

which does not work. Does anyone know of the correct synax to force 
mozilla to set the settings?

begging

Murray

0
murray
7/31/2003 8:25:49 AM
netscape.mozilla.general 7061 articles. 0 followers. Follow

10 Replies
859 Views

Similar Articles

[PageSpeed] 29

On 31/07/2003 09:33, Jay Garcia wrote:

> On 31.07.03 03:25, murray bryant wrote:
> 
> --- Original Message ---
> 
>>REpost from Layout:
>>I am printing from within a chrome environment so the user cannot use 
>>print preview to change the settings.
>>
>>I am tring to set global print settings in the user.js file, so that 
>>when a user uses another printer all of the settings remain the same.
>>
>>I have tried this
>>
>>user_pref("print.print_margin_bottom", "0");
>>user_pref("print.print_margin_left", "0");
>>user_pref("print.print_margin_right", "0");
>>user_pref("print.print_margin_top", "0");
>>
>>which does not work. Does anyone know of the correct synax to force 
>>mozilla to set the settings?
> 
> You have to do it by printer model, such as:
> 
> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", "0");
> user_pref("print.printer_OKIPAGE_14e.print_margin_top", "0");
> 
> so forth and so on ...

Umm, should there be qoutes around the second value? Since it's an 
integer key, I would expect it to look like:

user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", 0);
user_pref("print.printer_OKIPAGE_14e.print_margin_top", 0);

If you are putting in string values, they might be getting ignored as 
invalid values by Mozilla.

-=Straxus=-

0
David
7/31/2003 5:26:37 PM
try print.use_global_printsettings

0
Daniel
7/31/2003 8:05:13 PM
Jay Garcia wrote:

> On 31.07.03 03:25, murray bryant wrote:
> 
> --- Original Message ---
> 
> 
> 
>>REpost from Layout:
>>I am printing from within a chrome environment so the user cannot use 
>>print preview to change the settings.
>>
>>I am tring to set global print settings in the user.js file, so that 
>>when a user uses another printer all of the settings remain the same.
>>
>>I have tried this
>>
>>user_pref("print.print_margin_bottom", "0");
>>user_pref("print.print_margin_left", "0");
>>user_pref("print.print_margin_right", "0");
>>user_pref("print.print_margin_top", "0");
>>
>>which does not work. Does anyone know of the correct synax to force 
>>mozilla to set the settings?
>>
>>begging
>>
>>Murray
>>
> 
> 
> You have to do it by printer model, such as:
> 
> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", "0");
> user_pref("print.printer_OKIPAGE_14e.print_margin_top", "0");
> 
> so forth and so on ...
> 
I was afraid of that.

The org that i am writing for has between 20-30 printers. So i was 
hoping to be able to set some blanket settings rather than have to 
change every time.

Since i am printing from within a chrome my users do not get to see the 
page settings or print preview and change any of the settings.

Does anyone know if it is possible to call the print preview or print 
settings of mozilla from within a chrome url. I have tried searching but 
cannot find any information on using functionality of mozilla from 
within custom chrome interfaces.

thanks for your help

Murray

0
murray
8/1/2003 2:22:13 AM
Daniel Wang wrote:
 
> try print.use_global_printsettings

Erm... no.
This is IMHO an internal prefs which should not be set by an user or
admin.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) Roland.Mainz@informatik.med.uni-giessen.de
  \__\/\/__/  gisburn@informatik.med.uni-giessen.de
  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-41370 FAX +49 641 99-41359
0
Roland
8/1/2003 3:06:29 AM
David Spade wrote:

> On 31/07/2003 09:33, Jay Garcia wrote:
> 
>> On 31.07.03 03:25, murray bryant wrote:
>>
>> --- Original Message ---
>>
>>> REpost from Layout:
>>> I am printing from within a chrome environment so the user cannot use 
>>> print preview to change the settings.
>>>
>>> I am tring to set global print settings in the user.js file, so that 
>>> when a user uses another printer all of the settings remain the same.
>>>
>>> I have tried this
>>>
>>> user_pref("print.print_margin_bottom", "0");
>>> user_pref("print.print_margin_left", "0");
>>> user_pref("print.print_margin_right", "0");
>>> user_pref("print.print_margin_top", "0");
>>>
>>> which does not work. Does anyone know of the correct synax to force 
>>> mozilla to set the settings?
>>
>>
>> You have to do it by printer model, such as:
>>
>> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", "0");
>> user_pref("print.printer_OKIPAGE_14e.print_margin_top", "0");
>>
>> so forth and so on ...
> 
> 
> Umm, should there be qoutes around the second value? Since it's an 
> integer key, I would expect it to look like:
> 
> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", 0);
> user_pref("print.printer_OKIPAGE_14e.print_margin_top", 0);
> 
> If you are putting in string values, they might be getting ignored as 
> invalid values by Mozilla.
> 
> -=Straxus=-
> 

Are there similar settings you can use to specify the paper size ?
FireBird and TBird both ignore what ever I have set up for my printer
and assume that A4/letter sized paper is loaded.

0
Rob
8/1/2003 3:51:40 AM
Roland Mainz wrote:
> Daniel Wang wrote:
> 
>>try print.use_global_printsettings
> 
> Erm... no.
> This is IMHO an internal prefs which should not be set by an user or
> admin.

why not? because it's hidden, aka internal, or for some other reason?

0
Daniel
8/1/2003 4:30:45 AM
Rob Stow wrote:
> Are there similar settings you can use to specify the paper size ?
> FireBird and TBird both ignore what ever I have set up for my printer
> and assume that A4/letter sized paper is loaded.

http://lxr.mozilla.org/mozilla/source/gfx/src/nsPrintOptionsImpl.cpp#87

print.printer_PRINTERNAME.print_paper_name
print.printer_PRINTERNAME.print_paper_size_type
print.printer_PRINTERNAME.print_paper_data
print.printer_PRINTERNAME.print_paper_size_unit
print.printer_PRINTERNAME.print_paper_width
print.printer_PRINTERNAME.print_paper_height

print.printer_PRINTERNAME.print_paper_size // deprecated

I haven't looked at the code in detail, but I believe many printer prefs 
are printer-specific. If your prefs aren't saved correctly, it could be 
that Mozilla is confused or that the printer driver does not 
support/allow saving the settings.

0
Daniel
8/1/2003 4:40:02 AM
On 31.07.03 12:26, David Spade wrote:

--- Original Message ---


> On 31/07/2003 09:33, Jay Garcia wrote:
> 
>> On 31.07.03 03:25, murray bryant wrote:
>> 
>> --- Original Message ---
>> 
>>>REpost from Layout:
>>>I am printing from within a chrome environment so the user cannot use 
>>>print preview to change the settings.
>>>
>>>I am tring to set global print settings in the user.js file, so that 
>>>when a user uses another printer all of the settings remain the same.
>>>
>>>I have tried this
>>>
>>>user_pref("print.print_margin_bottom", "0");
>>>user_pref("print.print_margin_left", "0");
>>>user_pref("print.print_margin_right", "0");
>>>user_pref("print.print_margin_top", "0");
>>>
>>>which does not work. Does anyone know of the correct synax to force 
>>>mozilla to set the settings?
>> 
>> You have to do it by printer model, such as:
>> 
>> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", "0");
>> user_pref("print.printer_OKIPAGE_14e.print_margin_top", "0");
>> 
>> so forth and so on ...
> 
> Umm, should there be qoutes around the second value? Since it's an 
> integer key, I would expect it to look like:
> 
> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", 0);
> user_pref("print.printer_OKIPAGE_14e.print_margin_top", 0);
> 
> If you are putting in string values, they might be getting ignored as 
> invalid values by Mozilla.
> 
> -=Straxus=-
> 

Copied directly from my about:config ...


-- 
Jay Garcia - Always A Netscape Champion
The UFAQ Lives - http://www.UFAQ.org http://www.UFAQ.org/text_version.html
Post To Group Only - No Email Please

0
Jay
8/1/2003 11:44:14 AM
On 31.07.03 21:22, murray bryant wrote:

--- Original Message ---


> Jay Garcia wrote:
> 
>> On 31.07.03 03:25, murray bryant wrote:
>> 
>> --- Original Message ---
>> 
>> 
>> 
>>>REpost from Layout:
>>>I am printing from within a chrome environment so the user cannot use 
>>>print preview to change the settings.
>>>
>>>I am tring to set global print settings in the user.js file, so that 
>>>when a user uses another printer all of the settings remain the same.
>>>
>>>I have tried this
>>>
>>>user_pref("print.print_margin_bottom", "0");
>>>user_pref("print.print_margin_left", "0");
>>>user_pref("print.print_margin_right", "0");
>>>user_pref("print.print_margin_top", "0");
>>>
>>>which does not work. Does anyone know of the correct synax to force 
>>>mozilla to set the settings?
>>>
>>>begging
>>>
>>>Murray
>>>
>> 
>> 
>> You have to do it by printer model, such as:
>> 
>> user_pref("print.printer_OKIPAGE_14e.print_margin_bottom", "0");
>> user_pref("print.printer_OKIPAGE_14e.print_margin_top", "0");
>> 
>> so forth and so on ...
>> 
> I was afraid of that.
> 
> The org that i am writing for has between 20-30 printers. So i was 
> hoping to be able to set some blanket settings rather than have to 
> change every time.
> 
> Since i am printing from within a chrome my users do not get to see the 
> page settings or print preview and change any of the settings.
> 
> Does anyone know if it is possible to call the print preview or print 
> settings of mozilla from within a chrome url. I have tried searching but 
> cannot find any information on using functionality of mozilla from 
> within custom chrome interfaces.
> 
> thanks for your help
> 
> Murray
> 

Although I don't see it listed anywhere, you could try Daniel's suggestion.


-- 
Jay Garcia - Always A Netscape Champion
The UFAQ Lives - http://www.UFAQ.org http://www.UFAQ.org/text_version.html
Post To Group Only - No Email Please

0
Jay
8/1/2003 11:46:07 AM
Daniel Wang wrote:
> >>try print.use_global_printsettings
> >
> > Erm... no.
> > This is IMHO an internal prefs which should not be set by an user or
> > admin.
> 
> why not? because it's hidden, aka internal, or for some other reason?

It is used as a big switch to teach the mozilla internal code about some
implementation details in the native print code (for example: Mac vs.
Windows vs. Unix/Linux). Change that switch from the platform-specific
default to another value and all hell breaks loose. This switch is
PRIVATE for mozilla-internal communimation between JS, crossplatform and
platform-specific print code. Please don't change it.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) Roland.Mainz@informatik.med.uni-giessen.de
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 2426 901568 FAX +49 2426 901569
 (;O/ \/ \O;)
0
Roland
1/7/2004 11:29:33 PM
Reply:

Similar Artilces:

superreview granted: [Bug 216751] general.config.filename set in user' s prefs.js overrides setting in all.js
Scott MacGregor <mscott@mozilla.org> has granted David Bienvenu <bienvenu@nventure.com>'s request for superreview: Bug 216751: general.config.filename set in user's prefs.js overrides setting in all.js https://bugzilla.mozilla.org/show_bug.cgi?id=216751 Attachment 253396: fix MCD https://bugzilla.mozilla.org/attachment.cgi?id=253396&action=edit ...

superreview requested: [Bug 216751] general.config.filename set in user' s prefs.js overrides setting in all.js
David Bienvenu <bienvenu@nventure.com> has asked Scott MacGregor <mscott@mozilla.org> for superreview: Bug 216751: general.config.filename set in user's prefs.js overrides setting in all.js https://bugzilla.mozilla.org/show_bug.cgi?id=216751 Attachment 253396: fix MCD https://bugzilla.mozilla.org/attachment.cgi?id=253396&action=edit ...

superreview requested: [Bug 216751] general.config.filename set in user's prefs.js overrides setting in all.js : [Attachment 189091] Patch
Frank Wein <bugzilla@mcsmurf.de> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 216751: general.config.filename set in user's prefs.js overrides setting in all.js https://bugzilla.mozilla.org/show_bug.cgi?id=216751 Attachment 189091: Patch https://bugzilla.mozilla.org/attachment.cgi?id=189091&action=edit ...

superreview granted: [Bug 216751] general.config.filename set in user's prefs.js overrides setting in all.js : [Attachment 189091] Patch
Brendan Eich <brendan@mozilla.org> has granted Frank Wein <bugzilla@mcsmurf.de>'s request for superreview: Bug 216751: general.config.filename set in user's prefs.js overrides setting in all.js https://bugzilla.mozilla.org/show_bug.cgi?id=216751 Attachment 189091: Patch https://bugzilla.mozilla.org/attachment.cgi?id=189091&action=edit ...

setting INTIAL preference only, not all.js, not user.js, but...?
I'm configuring some lab machines so that Mozilla starts up a certain way. Some of the values are locked, and those are now in user.js under: C:\Program files\mozilla.org\mozilla\defaults\profile\US\user.js and are installed correctly for new users. "bookmarks.html" in the same directory has also been modified and is picked up that way. Note, the "US", which isn't mentioned here: http://www.mozilla.org/catalog/end-user/customizing/briefprefs.html The problem is that I want to set some values to initial values and then let the end users change t...

Set default settings for new users
I don't know if this is even possible, but here goes. I have about 5 users for our desktop computer, 1 adult, 3 kids and me (I don't count as an adult :P). There are some settings I want to have each of the environments default to, where they can then change them as they wish on their own. Instead of setting them one-at-a-time, is there a way to modify the settings on the template of what goes into a user's /home directory when they are created? Examples: Set it so when I add a person to the system their - default browser is set to Firefox - starting home ...

How to set the print settings via css
Hi  Is it possible to get the printer to default print to landscape using CSS? (so the user doesn't have to change the  settings every time he takes a print out.) also i need to set the page size from letter to a4. Is this possible, if so can i have this. Thanks Janakiraman    No, this isn't possible via CSS.Website Design Darlington - http://mdssolutions.co.ukhttp://lessthandot.com - Experts, Information, Ideas & Knowledgehttp://aspnetlibrary.com - An online resource for professional ASP.NET developersPlease remember to click "Mark as Answer" ...

How can i reflect changes to all the user's settings when one user change the setting?
Hi all, I have a web site in which i want to use web parts. The scenerio is, i want to allow admin to change the web parts on the web page and that changes must be reflected to all the user's settings is it possible using webparts? Thanks in advanceTech Lead, FirstPhera.comMy Blog hi,    I have worked on this and find some solution:  There are two kind of persionalizaions, per user and all user. If you want to change some properties of the page and make the changes available to all the pages then you have to make them shared and it will be reflected to all the users c...

save settings // import settings // export settings
Name: miguel mayol Email: mitcoes_at_gmail.com Product: Firefox Summary: save settings // import settings // export settings Comments: I've just have a stack overflow problem in one of the computers of my office with internet explorer. The other ones, does work with our provider web site ok. But Firefox and Opera does work OK ata all the computers with this site, with problems of bad reading of contents at some pages (I supose becouse of MS HTML non compatible isues). If IE would have export // import settings, probably I've solved all the problems, but I would...

How do you set Local Printer Settings if user is on the Internet
I am evaluating the WDK 2.0 version and can't seem to understand how to configure the client pc's printer to work if they are connected to us via the Internet connection. I need to know how to configure the Client to print on his local printer, who is connected via the internet. Dan Bailes I attempted to add the shared resouces drive letter on the client. Ran the application and attempted to print. Still getting need to setup default printer error message which I do have a default printer already setup. Check that the server has an Admin id setup for "WDKPrintA...

Set International Settings
I can't modify the International Settings, 'sthousand' and 'sdecimal', on windows 95. I have use 2 methods to do it, and with no results. I put this code in the event OPEN of the application : RegistrySet("HKEY_CURRENT_USER\Control panel\International","sDecimal", ",") RegistrySet("HKEY_CURRENT_USER\Control panel\International","sThousand", ".") ...and SetProfileString("c:\windows\WIN.INI", "intl", "sThousand",'"."') SetProfilestring("c:\windows\...

setting a character set
HiIn a security book i'm reading it says i should always set a character set for a web pagee.g. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />How do i do this?Is this characeter set achieved by the following in the web.config or do i need to do something else <globalization requestEncoding="utf-8" responseEncoding="utf-8" />Thanks a lotandrea...

Set Environment setting
I call the following function in my application, but it does not seem to take effect in the program until I exit and execute the program again. The change however is done when viewing it in Windows environment variables. But not instantly in the program. How do I fix this? procedure SetUserEnvironmentVariable(const name, value: string); var rv: DWORD; begin with TRegistry.Create do try RootKey := HKEY_CURRENT_USER; OpenKey('Environment', False); WriteString(name, value); SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, LParam (PChar...

Settings.Settings file
Settings.Design.cs file defaultInstance returns the localhost url instead of remote machine url. The webservice is hosted in remote machine so that the defaultinstance should be returns remote machine url but instead of it returns localhost url. The solution caches the settings somewhere in the physical path? Please anyone know the solution let me know. Thanks. The Settings.designer.cs file is the automatically-generated settings that you edit in the Settings.settings file. You should edit the value using the settings editor, not in the .cs file. To do that, double-click on the settings.s...

Web resources about - set print settings in user.js - netscape.mozilla.general

Help:Contents/Account settings and maintenance - Wikipedia, the free encyclopedia
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. , a non-profit organization.

Mode setting - Wikipedia, the free encyclopedia
Mode setting can be done in kernel space ( Kernel Mode Setting or KMS) or in user space ( User-space Mode Setting , UMS). Doing mode setting ...

5 Facebook Privacy Settings You Must Review Now
Facebook now has five different settings for controlling whether and how you get tagged on the site.

Analysis: Facebook’s New Privacy Settings a Major (and Risky) Step Toward Openness
The upcoming changes to Facebook’s privacy settings will allow users to control who they share information with every time they post a piece ...

Setting Up A Successful Exam-Taking Strategy: 3 Tips For Test Preparation
Are you scared? Good! Because if you are, then you are taking final exams seriously.

SwiftKey updated with a new theme and redesigned Settings menu
... and fall with real gravity depending on how the phone is tilted. The theme can be unlocked with a $1.99 in-app purchase. A revamped Settings ...

In pilot program, Uber is setting drivers up with rental cars
Uber is partnering with Enterprise to rent cars to potential Uber drivers for $210 a week in a pilot program that’s launching this week in Denver, ...

NFL Fantasy Football Week 13: Last-Minute Advice for Setting Your Roster - Bleacher Report
It wasn't so long ago when fantasy drafts were fresh, and our rosters were stocked and stable. When that Eddie Lacy and Dez Bryant combo felt ...

Why did Obama choose the Oval Office setting for his speech and then stand behind a lectern?
Shouldn't he have sat at his desk? I see Callum Borchers at The Washington Post has asked the same question: Whatever the impetus, let's get ...

Setting caution aside, Red Sox went all in for an ace
There was little effort at secrecy — actually, make that none — as a rather unusual dinner party took their places at the table at the Southern ...

Resources last updated: 12/7/2015 10:03:53 PM