2 replies [Last post]
rschmidt
Offline
newbie
Raleigh, NC
Last seen: 16 years 13 weeks ago
Raleigh, NC
Joined: 2005-10-26
Posts: 2
Points: 0

hey guys
I am trying to print out a form and was hoping you guys may be able to help. There are 3 things I'm trying to accomplish...

1. I'm trying to get rid of the margins using

@page {
  margin : 0;
}

Is this supposed to get rid of the actual print margins that are setup in the printer setting or is it just the page margins? Is this possible to do with CSS? If not, can I use negative margins to counteract the print margins?

2. Headers and Footers that are set by the brower when printing (page number, url, date, etc...). I need to get rid of them using CSS. Is it possible?

3. Again, dealing with the printer settings. Is it possible to get the printer to default print to landscape using CSS? (so the user doesn't have to change the setting...). I know about

@page {
  size : landscape;
}

...but I'm guessing that is just setting the print style to landscape...

If anyone can help me out....that would be great. Hopefully I will be able to return the favor sometime.

TIA
--Ryan

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 12 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

@page and printing

Hi

We had a discussion on this subject a few days ago.

Basically, whilst you can make those settings, most computers won't use them.

In Windows, access to any print settings is barred except for the user themselves. You need to have a link which says 'before you print, change your settings to ....'

So, page orientation, headers/footers, margins are all down to the user.

Knowing somewhat about the hardware side of PC's, the problem is that to make such changes the OS needs to allow you (an unauthorised user) access to the print dll's, which means the browser has to open you up a port to the system settings. Well, you can see where that would lead (hackers, come on down).

Unfortunately, there is nothing you can do. Most users who print pages realise they need to change their default browser print settings. Those that don;t must waste a lot of paper and have lower than average IQ's.

Trevor

rschmidt
Offline
newbie
Raleigh, NC
Last seen: 16 years 13 weeks ago
Raleigh, NC
Joined: 2005-10-26
Posts: 2
Points: 0

@page and printing

thanks Trevor...that's what I figured