Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe the reason we're still stuck with LaTeX and PDFs because ebook software can't be bothered to implement decent typesetting.


PDF's are size agnostic, by the way. We think of them as being restricted to A4 or letter paper, but you can generate a pdf of almost any size.


The PDF specification is size agnostic.

A given, created, PDF, is fixed to whatever size it was created to represent.

Acrobat claims to be able to "reflow" some PDF's, but whatever it is doing is more black magic voodoo than anything else, given how text layout is represented inside the PDF format.

The text layout becomes (essentially) a stream of instructions to "move current point to 123,456" and "place this text at current point". And the numerical values used are tied directly to the page size and internal "point size" used by the PDF writing software. I.e, the text is simply "physically positioned" on a virtual x,y canvas.


There is a practical limit. "Page dimensions are not limited by the format itself. However, Adobe Acrobat imposes a limit of 15 million by 15 million inches, or 225 trillion in2 (145,161 km2)." <https://en.wikipedia.org/wiki/PDF>


Do you mean they can be created for any page size, or do you mean they sensibly resize when you change page size?


He (probably) means that the geometry of a PDF "page" can be customized. You can even have different sizes within the same document. But most people using LaTeX or even basic plotting utilities which export to PDF know this.


A properly prepared PDF will scale "perfectly" (FSVO - needs all drawings in vector form) as long as you keep the aspect ratio the same.

The problem is changes in aspect ratio or wanting to reflow text to have larger font when rendering to small screen.

Not sure if it's doable to generate flexible enough rendering commands in PDF. Was doable in PostScript (again, FSVO) but PDF was explicitly made to be decidable and less turing complete.


For printing, yes.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: