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

hide items/html elements from PDF ?

ltwally wrote on 2011-03-08:
I have been using CSS to hide (ie. @media print {display:none}) the Print link and such when printing my webpages.


I was wondering if anyone knew of a way to do this with pdfcrowd? Can anyone think of any simple CSS to do this with? Or should I use PHP to send pdfcrowd a specially designed version of the pages that do not have the items that I wish to hide??

Thanks in advance
support wrote on 2011-03-08:
In case of the Save to PDF Link, there is no easy way to hide an element using just CSS at the moment. As more users have been asking for this, we are currently considering these options:

1. To add use_print_media parameter which would use the print CSS media type:
http://pdfcrowd.com/url_to_pdf/?use_print_media=1


2. To not to print an element with a specific class name to PDF:
<a href="http://pdfcrowd.com/url_to_pdf/" class="pdfcrowd-hide">Convert this page to a PDF</a>
ltwally wrote on 2011-03-08:
Both solutions seem like great ideas to me... though for my own case, your first would solve my problem.

Thanks very much for the excellent service.
support wrote on 2011-03-09:
We updated the service and the Save to PDF Link now supports the use_print_media option. Please, let us know if it works for you.
ltwally wrote on 2011-03-16:
It works great! Thanks!