Remix.run Logo
▲ dofm 6 hours ago

This is precisely why I do make things basically printable right from the start.

For one, it often entirely heads off the requirement for "can we have it so the user can download a PDF of this?" (because users generally know how to print things!)

And for another, it broadens your options for implementing those PDFs if that requirement doesn't go away. You may not have to restrict your markup to that which some PDF generator library can work with, because printing any page in a headless browser is easier.

You often don't have to do much in a CSS stylesheet to get a modern site to render well, because we've moved away from so many layout hacks in general.

▲rhdunn 5 hours ago | parent | next [-]

And with light/dark mode support and CSS variables the colours in a print mode should be easy to define and support.

So you're primarily left with hiding content that shouldn't be printed (like navigation or menu buttons), defining page breaks, and some other quality of life changes for printing.

▲dofm 5 hours ago | parent [-]

Yeah. And out in the real world people are pretty tolerant of minor issues with printing (imperfect page breaks) because it's a miracle when any website prints at all!

▲Zak 5 hours ago | parent | prev [-]

I was recently surprised to notice a PDF download link on a blog post from Anthropic. My first thought was "would anybody want to read a blog post in PDF rather than HTML format?"

This comment suggests the answer is yes.

▲dofm 5 hours ago | parent [-]

I think on corporate blog posts, they have regulatory impact, so that is perhaps additionally about legal teams — printouts of web pages end up in legal filings and discussed in meetings etc.?

Happy paralegals are a finite resource.

But yeah. Someone, somewhere, is printing your web pages for their own reasons, and you may never know whether poor printability cost you.