tailwind to PDF #353
Comments
Hi @danielecas , I haven't done that with tailwindcss before (learning it myself), but in other situations we needed to create a printable version of a web page. There are a few things you can look at and tune in order to produce a print view (or pdf). First, you can add an additional or entirely different css for print media. You can do that by adding the To check your print view without actually printing, you can change the A last tip, and that's maybe what happens to your layout- when I printed to A4 (similar to US letter format), the browser used the Hope that help! |
Which resolution is triggered is browser and environment-dependent, |
many thanks for the tips guys, I will try and let you know how it goes |
Having the same issue with cards. On printing everything separates out. Tailwind by itself does not seem to have any print directives..so not sure how to do this.. |
There is a section in the docs for adding a Then you can do things like |
I bought "Refactoring UI" yesterday and I am also trying to learn Tailwind CSS.
One issue I am facing at the moment is when I try to convert my html/css page to pdf.
The result looks very different after the conversion. Some elements go off the page, some sections and pictures are stacked instead of showing horizontally etc.
These are screenshots of how my test HTML + Tailwind CSS page looks like:
And here is the resulting PDF (quite different)
response.pdf
I would like to end up with a printable pdf that looks nicely designed and formatted as closely as possible to the web page.
Anybody has done this before and/or has any tips?
The text was updated successfully, but these errors were encountered: