Hacker News new | ask | show | jobs
by squarefoot 598 days ago
PDFs were born to make real life documents manageable in digital form, that is, letter, legal, A4 etc; nothing that would (and could) have been used on a phone back then. If they don't display properly on a phone I'd say it's on the phone itself. They're not computers usability-wise, not even close: too many compromises with ergonomics, information density and readability fighting against each other in the name of portability. That restaurant had sloppy management/techies, as finding that the .pdf was the wrong size would probably take ten seconds to any of them, the correct the problem by having the QR point to a correctly sized .pdf generated automatically by reading the same db the bigger .pdf was created from. PC sees the link to the bigger one, phone reads the QR containing a link to the mobile one. not hard at all to solve, it's not a .pdf format fault.
1 comments

Dynamically generating PDFs on the fly based on the user’s screen size sounds downright Kafkaesque. I feel a deep sense of dread any time I have to touch PDF-rendering code. Any halfway decent CMS (or just plain old HTML and CSS) can easily create a good-looking, responsive, accessible webpage with a fraction of the work. Leaning on PDFs in this case is a classic example of, “When all you have is a hammer, everything looks like a nail.”

The PDF format can’t necessarily be blamed for its inability to be responsive to screen size, but that’s one of several good reasons to discourage the use of PDFs for purely digital documents. Its design is linked to a specific historical context, and it should be limited to that context.

(Of course, I imagine the actual reason for the PDF is that it’s just an export of the InDesign/Photoshop/whatever file that was used to create the original paper menus. There probably is no “database.”)

> Any halfway decent CMS (or just plain old HTML and CSS) can easily create a good-looking, responsive, accessible webpage with a fraction of the work.

Easily? Because it's not a fraction of the work. Let's just assume you mean to use someone else's solution (of the literal thousands, each with their own quirks), to make your bespoke website.

PDFs have a standard. Libraries to resize are not difficult to find. Most people are able to run a PDF through their printer driver for a resize, because it's a solved problem.

I would say creating a job that outputs a bunch of PDFs is going to be easier than a build system for different devices (CMS or not), every time.

Sure, they can render at different resolutions, but I don’t think I’ve ever seen a PDF that has a responsive layout. A restaurant website is probably going to use some very user-friendly CMS like Squarespace that can absolutely provide you with easy responsive layouts.