I have a views page that lists nodes that contain uploaded PDF and bibtex files (see here). Everything looks fine when you view the page, but when you go to print it in the browser, the node path (from the linked title) and the path to the uploaded files are displayed. The client would like to be able to print the page without those paths being shown. Is there a way to suppress these paths when printing from the browser? I suggested having a link to another print friendly page, but he just wants to be able to print from the browser.


Sounds like a CSS issue, so before this question gets flagged, hopefully this will help you out.

The most efficient way, assuming it is a CSS issue, is to add a stylesheet to your theme whose media type is print (see below for example).

Assuming the part you want to hide is an element (div, span, etc) whose class is mycustomclass, inside that stylesheet you could add something like this:

.mycustomclass {
  display: none;
  visibility: hidden;

And here's the example mentioned above:

<link type="text/css" rel="stylesheet" href="http://www.example.com/sites/all/themes/mytheme/print.css" media="print" />



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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