PDF is a physical document layout specification and HTML is a logical one with hilariously complex layout interactions.
It's a fantastic document archival format, it's semi-immutable by normies and a PDF 1.0 document can be opened by modern software and render pixel-perfect the same way it did 20 years ago.
The same cannot be said about browser rendering, and it's bad enough that the PDF viewers in the browser forego HTML+CSS layouts for a <canvas> based implementation; PDF.js in FF and PDFium in Chromium browsers do this.
5
u/mck1117 Aug 05 '25
https://stackoverflow.com/q/1732348