Hello people
I was following this tutorial to generate a "pdf" file from a view in my rails app. Everything was ok, until I tried to hide the "link to download". Everytime I generate the PDF file, the link is still shown. I think that the "@media print" style in the css file is not working.
Is there another way to hide the link in the generated pdf开发者_如何学JAVA file?
Thanks for the help
It is answered here http://railscasts.com/episodes/220-pdfkit. Check section application.css
You need to give an id for the "link to download" then in the CSS file hide the element using display: none. In the above example the id name is pdf_link and css properties are defined like this -
#pdf_link{ display: none; }
That should work.
精彩评论