Print barcode from web with no header or footer

Hi all. I have an Intranet site that has all of our products. There is a "Barcode" button that makes a popup box appear with a tiny barcode & style #. My problem is printing that barcode. It wants to print the header & footer of the page so it doesn't fit on my tiny labels that are supposed to go on the products. I have seen this done on other sites before I just have no idea how they're doing it (Microsoft MCP site is one of them). I do not want to force each person to edit their preferences to take those out for good. I don't mind forcing them to use IE if ActiveX is the only way, but it must be done in a way that they don't have to click an Accept box every time the try to print from the site. Any ideas???

Thanks.
Jon
LVL 3
Jon DeVitoCTO / CIOAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CyberGhostCommented:
if you're able to change the code of that Intranet popup window (or ask somebody to make that change for you), you can make use of the CSS "media" parameter like this:

<link rel=stylesheet href="your_styles.css" media="print">

OR

<style media="print">
/* your styles */
</style>

this can be a stylesheet where your header and footer parts will be defined as hidden and the media="print" part will load this stylesheet only when user will be printing that page (for viewing in browser, no changes will be visible)
Jon DeVitoCTO / CIOAuthor Commented:
Thanks CyberGhost but not really what I'm talking about (unless I'm misreading). Go to any website & click print...In the top left corner will be the Title of the page, the top right will be the address, the bottom left is the page #, the bottom right is the date & time.
I need to remove all of that stuff of the barcode will not fit onto the label...

Thanks.
Jon
CyberGhostCommented:
in that case I misunderstood your question - however, this is a browser setting issue and since each browser (Internet Explorer, Mozilla, Chrome, Opera) use different header and footer to print pages, I guess there is no real workaround here perhaps other than resizing the barcode (which I don't know if possible)

... or at least I'm not aware of any solution to this issue. Sorry.
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

tncodeCommented:
Look at the "Generate in New Window" javascript behind this form http://www.bcgen.com/linear-barcode-creator.html 
Jon DeVitoCTO / CIOAuthor Commented:
Thanks but that just puts it into a popup but does not do anything for the printing...just do a print preview & you can still see the header & footer. Thanks though.
CyberGhostCommented:
possible workaround would be to create a PDF file with that barcode and force people to download that PDF (or maybe open it from within their browser) - this approach would not generate any headers or footers, although it does require users to have a PDF reader installed on their system
Jon DeVitoCTO / CIOAuthor Commented:
Thanks, but it would also require a PDF creator on the server & I would have no idea how to create a PDF that would print to a 1.5 x .75 label. This needs to be idiot proof, I cant have them using multiple programs to print the labels out. Good idea though.
Jon DeVitoCTO / CIOAuthor Commented:
Thanks for the help everyone but I figured out that the way to do this was using ScriptX. Thanks for the help though.

Jon

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jon DeVitoCTO / CIOAuthor Commented:
No other solution did what I needed.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.