2 ms·
> In a sense canvas, png/jpg etc are to SVG what PDF is to HTML. An information black hole. Tiny disagreement: PDF isn't necessarily an information black hole
by TeMPOraL 3y ago
> In a sense canvas, png/jpg etc are to SVG what PDF is to HTML. An information black hole.
Tiny disagreement: PDF isn't necessarily an information black hole compared to HTML. PDF is a structured format, not quite plaintext, yet not quite binary either. It can preserve original text and formatting metadata. It's the publishing tools that often (these days less so than in the past) pre-rasterize data, storing bitmaps instead of original text inside the PDF.
The nice thing PDF has going over HTML is fixing the layout. This is not desirable for most content of actual value (i.e. not glorified marketing brochures that half of the web is these days), but sometimes it is useful.
These days, SVG could probably be used as plaintext PDF replacement (maybe with some extensions for pagination, and other print-related metadata), though I bet some people would still opt to "render" SVGs using embedded data-url/base64 images instead of text + metadata...
- nologic01 3y ago> not quite plaintext, yet not quite binary either this applies to SVG at low level as well (path data break with the semantically annotated pattern of higher level constructs). It is in some sense unavoidable / desirable to be able to include such numerical data intensive blobs. Where PDF (and its broader ecosystem) blundered is that it feels it would be rather low cost to maintain logic and metadata that would make re-usability of document information much easier. Of-course we talk with hindsight etc.
- aragilar 3y agoFor things of sufficient complexity (e.g. maths), fixing the layout beforehand gives benefits to readers and writers of such documents. Also, receiving PDFs (over HTML) is much better for any processes which involve printing/sharing outside the confines of the web. Can SVGs embed fonts? PDFs that don't embed fonts tend to have issues with rendering.