3 ms·
I don't think reflow is really "fixable" in PDF. PDF's model is fundamentally based on absolute coordinates and transforms for everything, as it's descended fro
by pcwalton 6y ago
I don't think reflow is really "fixable" in PDF. PDF's model is fundamentally based on absolute coordinates and transforms for everything, as it's descended from a language for printers. Adding client-side layout to that radically alters the entire design in ways that would make it not PDF anymore.
When you say "a multi-hundred page PDF loads in a blink of an eye compared to a advertising tracker-loaded web page", consider why that is. The basic reason is that every page in PDF can be rendered individually. (In fact, the top-level grouping in PDF is the physical page instead of the semantic model of HTML.) This is only possible because PDF has no layout! When you introduce client-side layout, the client must lay out every page to render any of them, because the locations of page breaks depend on characteristics of the client device, creating a sequential dependency. If you were to somehow add layout to PDF, the sequential dependency would be there too; there's nothing magical about PDF that would prevent it from inheriting the problems of HTML.
Finally, PDF does have animations and scripting (with multiple JavaScript engines). In fact, it even has 3D (old-school VRML-style 3D, not the flexible immediate-mode GPU APIs browsers have). You'd be amazed how bloated PDF is!