This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Not to display menu

prasadgunnam1 wrote on 2014-07-19:

My webpage is converting to pdf but i dont need header like logo and menus in the pdf document. And as well as i dont need footer also. I want only content. Is it possible.
support wrote on 2014-07-21:

If you wish to exclude certain elements from printing, you can use the CSS @media rule:

1/ Define the 'screen-only' class in your style sheet.
// CSS
@media print {
  .screen-only { display:none }

2/ Set the screen-only class on the elements you wish to exclude from printing, for example
<div class="screen-only" id="menu">...</div>
<div class="screen-only" id="footer">...</div>

3/ Enable printing of the print version of the page with the usePrintMedia() API function. A PHP example: