Hacker News new | past | comments | ask | show | jobs | submit login

If we are really talking wish lists, I dream of a simplified PDF spec.



Also a simplified font spec while we're at it? While there are libraries for it, it is apparently discouraging if you wanted to code your own parser for the existing font formats.



That's still just making the best of a bad situation. Carves out bits and pieces of a too-complicated format.


Postscript?


Unlike PDF, PostScript is a full Turing-complete programming language, capable of far more document complexity than PDF (though less interactivity). The PostScript Language Reference Manual is 900 pages, and the PostScript Language Reference Supplement is another 160.


PDF however includes (a subset of) Javascript, making it just as Turing complete.

The spec for PDF 1.7 (dated 2008) is 745 pages long. The more modern PDF 2.0 is not freely available. I'm not willing to spend hundreds of euros to get access to the document, but together with the long list of errata and additional documents linked from the standard body's website, I'm willing to bet it's at least equivalent in length to PostScript.


> PDF however includes (a subset of) Javascript, making it just as Turing complete.

Not really, because the JavaScript is quite limited in what it can do (e.g. forms and interactive features). It can't produce text or graphical elements. A PDF reader can show view of a PDF that looks correct even if it doesn't implement any of the JavaScript features.


Support will vary by viewer, but Chrome's built-in PDF viewer supports a subset of Javascript.

It's enough to play Breakout inside a PDF: https://youtu.be/6rbJu10Telc?t=483


For us laymen, what is fundamentally lacking from svg to handle common PDF use cases ? (Including some multipage svg maybe) ?


The lack of multipage support is the most obvious distinction, I think, but you could probably add the necessary metadata and render fake borders and boxes to simulate pages if you really wanted to. As far as I know, SVGs cannot contain forms for one example. PDFs can also be digitally signed according to the spec, and they contain DRM provisions.

PDF has a lot of features that I would never think of myself (pronunciation guides, for example) which would require designing a custom solution for in many other formats such as SVG.

If I wanted to render something to be printed and I wanted it to be printed exactly as specified, I would consider PDF (and PostScript) files to be much more reliable than SVG files. SVGs are great for images and icons, but they're simply not designed to do the things PDF was designed to do.

Conversely, PDFs are difficult to embed and require proprietary tools to use most of their less common features, so in many areas they're much worse than SVGs.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: