Thursday, March 31, 2011

SharePoint custom Master Page Do Not Print

Issue:
When using Microsoft custom Master Pages, print preview pages dont show any content in the body of the page.
Reason:

Sharepoint use core.css file in which they write few classes where they says that this class should not be use for print/media.

Solution:-

While customizing make sure not to use those classes on top of your body area. So that it won’t hide it.

Few classes: Few of classes I am mentioning below which if you use on top of body area then print will not display content.

.ms-leftareacell, .ms-globallinks, .ms-siteaction, .ms-areaseparatorleft, .ms-rightareacell, .ms-areaseparatorright, .ms-areaseparatorcorner, .ms-titlearealeft, .ms-titlearearight, .ms-searchform, .ms-banner, .ms-buttonheightwidth, .ms-buttonheightwidth2
Hope this helps you.

Thanks!
Avinash