Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have been searching for several weeks now how best to approach something we have been asked to come up with and it seems that it should be simple but I have yet to find a suitable answer. I want to print from Sharepoint WSS 3 with the ability to add a custom header and footer without the default header and footer from IE. I had hoped that there would be a way to use C# code to do this, but I am just not finding anything that points me in the right direction. Is it possible to build a print function that will do this and if so, please point me to any examples that may be available.

share|improve this question
add comment

3 Answers 3

I am nearly positive that this cannot be done in IE without the user altering the Page Setup. You may want to consider using a "Printable Version" link that simply redirects the user to a dynamically created PDF version of the content.

share|improve this answer
add comment

It sounds like you want one header and footer to display when someone is browsing a page, but you want a different header and footer to display when printing the page.

For this, I would recommend using CSS media types. This will instruct the browser to use one stylesheet when viewing and a different stylesheet when printing. Here is some more information: http://webdesign.about.com/cs/css/a/aa042103a.htm

Tim
share|improve this answer
    
Will these templates overwrite IE print templates. I thought that you would still get the annoying IE header/footer when using these. I will look into this in more depth. Thanks! –  spevilgenius Jun 29 '10 at 12:27
add comment

Using CSS and Javascript you can grab the contents of a content container and send it to a new window with the additional content (header/footer) added. You should be able to build this into a Web Part that is deployed to the pages that require it.

share|improve this answer
    
I did look at this as an option, but it still prints through IE right? –  spevilgenius Jun 29 '10 at 17:30
    
This method would print through IE –  Mike Oryszak Jun 29 '10 at 18:46
    
What I meant was the default header and footer of IE would still show up on the print out and the requirement is that they do not. –  spevilgenius Jun 29 '10 at 19:58
    
In the window.open() call you can control what gets displayed and what does not. You can turn off the toolbars, URL, etc. javascript-coder.com/window-popup/javascript-window-open.phtml –  Mike Oryszak Jun 29 '10 at 20:43
    
I know how to do that part and thanks for the link to that. I think what I am missing is how this will allow the printing of my custom header/footer info without printing the IE header/footer info like the url and page x of y in our intranet. You are being extremely helpful which I do appreciate. –  spevilgenius Jun 29 '10 at 21:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.