Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 25th, 2003, 03:31 PM
Nooby Nooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 11 Nooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Disable header printing in NN7 MAC

I work as part of sales team for a small UK based electronic entertainment company. Our stock ordering system is going through an overhaul as a result of the increased demands being placed on the ordering system.

Part of this streamlining process involves the creation of printable invoices from web pages and online forms. Privacy is an issue ,As these invoices will eventually be dispatched to customers and obviously we wish to protect certain information.

When printing web pages from within Netscape Navigator 7, the document URL is printed (as is other information) in the header/footer of the printed page.

It is possible to disable this feature on NN7 for PC by going:-

1. File-->Page Setup.
2. Select the "Margins & Header/Footer" tab
3. Changing the "Headers & Footers" roll-out menus accordingly

This feature is not present on the MAC version of NN7. Is there an alternative method with which to turn off this unwanted information or is the MAC NN7 incable of removing the header/ footer from a printed web page?

Any Information would be greatly appreciated (and may help me to obtain a small bonus!).

Reply With Quote
  #2  
Old March 25th, 2003, 08:21 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Quote:
and may help me to obtain a small bonus!

Money is a lousy motivator mate. We just like to break stuff! (never mind....)

Well... I can't tell you how to disable it from the program, but you could probably work around it by Saving the Page As text-only before printing.

There's lots of programming options, however....

Reply With Quote
  #3  
Old March 25th, 2003, 11:52 PM
mttatkns mttatkns is offline
Got source?
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Mar 2003
Location: Laguna Niguel, California, USA
Posts: 2,332 mttatkns User rank is Private First Class (20 - 50 Reputation Level)mttatkns User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Quote:
Money is a lousy motivator mate.
I think he meant a bonus for himself, not for us.

Reply With Quote
  #4  
Old March 26th, 2003, 01:14 AM
Nooby Nooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 11 Nooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm affraid it's all got to be excecuted fro mwithin NN7. It's so that customer invoices can be completed and printed automatically (at the moment they are processed manually.

We have a situation where the invoice is created dynamically using online forms but can't be printed because the document URL is displayed at the top of the page.

Saving as a text only file will ruin the invoice formatting I'm affraid.

Reply With Quote
  #5  
Old March 26th, 2003, 12:05 PM
Nooby Nooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 11 Nooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
user_pref("print.print_footercenter","");
user_pref("print.print_footerleft","");
user_pref("print.print_footerright","");
user_pref("print.print_headerleft","");
user_pref("print.print_headercenter","");
user_pref("print.print_headerright","");

I tried the proposed solution with no luck, on my MAC NN7, the header and footer still appear. I stuck the code in the 'user.js' file as this is supported by NN7 and a preferred method to altering the prefs.js.

What exactly is this JS doing? I assume it's getting the property "print_..." and filling it with an empty string, right? Could I there for do this?..

user_pref("print.print_footercenter","Red");
user_pref("print.print_footerleft","Green");
user_pref("print.print_footerright","Blue");

...making the footer display the names of various colours?

The more I investigate, the more I think the functionality to alter this header and footer information has been completely removed from the MAC version though quite why I'm not sure.

Reply With Quote
  #6  
Old March 26th, 2003, 12:26 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Quote:
though quite why I'm not sure

Because Netscape started sucking about 3 version majors ago and never stopped

I'm kind of thrashing in the water here because I haven't touched an Apple/Mac in a dozen+ years. On top of that, I hate javascript, I don't have NN7 available, and you're looking for a NN7 js solution, but try putting this into the location bar:
Code:
javascript:var win = window.open('/Invoice', ''); win.document.write(document.body.innerHTML);
// NOTE: for whatever reason, the forum is making javascript into java script (two words) - it should all be one word.

If that doesn't choke navigator (which I think it will) hopefully it will at least put the document text into a new window minus a real URL. You'll still see a URL print, I believe, but at least it won't be a real one.

It's worth a shot I suppose

Quote:
I think he meant a bonus for himself, not for us

I know, but he posted here so I have to try and convert him to be like us, don't I? Joooiiiinnnn ussss!

Last edited by Ctb : March 26th, 2003 at 12:29 PM.

Reply With Quote
  #7  
Old March 27th, 2003, 10:50 AM
Nooby Nooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 11 Nooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've managed to get things sorted and can now override the user prefs in NN7 for.... PC.

To get right to the root of the problem I had to find "comm.jar" in netscape/chrome/, open it up using Winzip and take out "printpageprefs.js" (or a similar file, I forget the exact name). In there was the very code that assigns the values to the Headr/Footer so by snipping it at the root I was able to remove this information from the PC version of NN7.

When I tried this on a mac though (albeit using stuffit and simpletext, rather than winzip and notepad) I just made Netscape unstable, it even failed to load at all at times!

So as soon as I find out how to sucsesfully edit comms.jar on a MAC then I'm sorted, it's just finding out how I do this that poses a problem!

Reply With Quote
  #8  
Old March 27th, 2003, 11:14 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
How important is the formatting? You might be able to send a "text/plain" content-type header (and then send the invoice as unformatted plain text) to ixnay the header.

This works on linux/mozilla 1.0.1, and MAY work on Netscape, without having to touch any .jar files.

Reply With Quote
  #9  
Old March 27th, 2003, 04:35 PM
Nooby Nooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 11 Nooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The formatting is an issure, sorry mate.

I'm trying to print customer invoices out from within NN7 (The software from where we process all the orders).

Like I say, I'm not sure that it's possible any more, I'd just like someone to explain to me why it's not. It's got something to do with editing and repacking the comm.jar file on a MAC, but quite what I don't know.

I guess I'll not be getting that bonus after all!

Reply With Quote
  #10  
Old March 27th, 2003, 05:30 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
One other option: Use HTMLdoc to take the HTML and turn it into PDFs server-side. PDFs may even be preferable to the client as a file format. . .

HTMLdoc is very fast, and the output is quite impressive.

Reply With Quote
  #11  
Old March 28th, 2003, 04:17 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Maybe we don't know what's going on here...

If you're already generating the invoices programmatically, why can't you just send them straight to a printer instead of a browser? The other option is to create an app to parse the HTML pages that sit on the disk and just reformat them for an invoice that is sent to the printer. Why do they HAVE to be printed from a browser? That seems sort of inefficient to me anyway.

Reply With Quote
  #12  
Old March 28th, 2003, 06:18 PM
Nooby Nooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 11 Nooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Inefficiant? To be honest mate, I couldn't agree more with you. Our setup at work is totally non-standard and rather obscure, this makes the process of problem solving a very awkward one (for those who haven't guessed).

I have no access to anything serverside (I'm usually just the end user, spending no time on the site development) and "the boss" doesn't want to add more links in the chain (more applications etc).

If you ask me, we need a drastic re-think on the structure of our stock ordering system but having almost no authority in the company I work for, it's difficult to voice this opinion without being patronized.

The company has failed to re-organize it's self effectively as it has grown. Then again, what do I know?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Disable header printing in NN7 MAC


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |