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.
|
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. |
|||
|
|
|
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
|
|||
|
|
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. |
|||||||||||
|