How to print only certain block of content in a view I have a view that displays shipping details that you print and put on a box before shipping. But using Print module when you click the link it gives entire page to print with all the headers, footers and menus. I need only that block of text rendered by a view.

Also I couldn't make the Print module link appear in a view even though it claims it works, so I had to use View Footer Area and add some PHP to make link work.

&lt;?php $current_url = getenv('REQUEST_URI'); ?&gt;
&lt;img src='/sites/all/modules/print/icons/print_icon.png'&gt;
​&lt;a href='/print&lt;?php print $current_url; ?&gt;'&gt;Print&lt;/a&gt;


But like I said it prints entire page and I need only view content.
I would look at this as most a front-end styling problem. Basically, you need to add print-only style rules that hide all the page elements you don't need. You can do this via an inline media query:

&lt;style&gt;
@media print {
  /* @TODO: Add other selectors that remove page elements
  header, footer, .my-custom-class, #my-custom-id {
    display: none;
  }
}
&lt;/style&gt;


Or a better, more portable, method is to just attach a custom print CSS stylesheet to whatever view that needs to be altered for printing:

drupal_add_css(drupal_get_path('theme', 'MYTHEME').'/css/print-page.css', array('media' =&gt; 'print'));