Hi all,

I love this module :-)
I have a request I believe have not been adressed so far (or I simply can't find the answer)
I have created a template for my print pdf (print--pdf--node--book.tpl.php), stripped the entire content and added some php to fits my needs. It is working so far just fine and really pleased with the results.

Now I would love to hide some text from the screen and show them on the print pdf.

with @media screen {.mediascreen {display:none; } } it is working fine on my webpage, but it also affects the pdf generated page.

Event thought I add @media print it doesn't work (only if I print the page straight from the browser)

Thanks for all suggestions.
Drupal 7

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Indeed, the PDF libraries don't care at all about the @media CSS properties.

You should try to remove the mediascreen class entirely so that the PDF library doesn't try to use it. Try str_replace() or something similar on the $content variable.

karibel’s picture

Thanks, I added the text of the printable pdf to the ''resume'' part instead. No quite what I wanted but it works. Thank.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

No problem.