IE and Print Stylesheets
September 26, 2004 9:46 PM   Subscribe

Is there any way of forcing IE to ignore a print stylesheet, and using the screen stylesheet, when printing a page?
posted by jedro to Computers & Internet (10 answers total)
 
This might help.
posted by kirkaracha at 11:31 PM on September 26, 2004


Yikes! That costs thousands of dollars for a business!

They must be nuts when you can do that for free. Just install this.

Of course, people still pay to print to PDF as well (which is also included on that page -- for free).

Man, the things people charge for... Next thing it'll be perriair.
posted by shepd at 11:49 PM on September 26, 2004


Save the source, take out the link to the print stylesheet?
posted by kindall at 11:54 PM on September 26, 2004


Thanks for the suggestions. I'm hoping for something foolproof and cheap (as in free).
posted by jedro at 1:02 AM on September 27, 2004


I was thinking about writing a bookmarklet that removed the <link> but that wouldn't cover the @media print {} syntax. Natch.
posted by holloway at 1:41 AM on September 27, 2004


I might be misunderstanding the question, but can you highlight everything then do Print --> Selection? I think I've gotten that to work before, but I might be answering a different question from the one you are asking.
posted by arco at 4:19 AM on September 27, 2004


A bookmarklet could access the document.stylesheets[] DOM object which will contain all stylesheets. I'm not sure if you can walk through that array and check for media=print.
posted by zsazsa at 6:03 AM on September 27, 2004


Okay, I made a bookmarklet that disables print stylesheets. There's a version that works in Firefox/Mozilla and one that works in IE. I don't think it works in Safari; its DOM isn't totally complete. Lemme know if it works for that @media syntax holloway mentioned.
posted by zsazsa at 1:39 PM on September 27, 2004


Okay, it doesn't nuke @media stuff at all.. It's possible to nuke it, at least in Firefox, but the amount of effort it'd take to code it is more than I'm willing to put into it.

Most print styles I've seen are in a separate stylesheet, defined with media=print in the <link> tag, and the bookmarklet works fine with those. I hope this works on the site you're trying to use it on!
posted by zsazsa at 2:18 PM on September 27, 2004


It didn't work on the site I was wanting to use it on. It nuked stylesheets completely when printed, so it didn't even use the screen stylesheet for printer output.

But thanks for taking a shot at it.
posted by jedro at 3:41 PM on September 27, 2004


« Older C# Question   |   Saving downloaded JPGs in Firefox Newer »
This thread is closed to new comments.