6 ms·
If you read the PDF spec from the late 90's, it is Stephen King novel-scary... container format, multiple encodings, encryption, embedded binaries, embedded Jav
by time-domain0 8y ago
If you read the PDF spec from the late 90's, it is Stephen King novel-scary... container format, multiple encodings, encryption, embedded binaries, embedded JavaScript and more.
- AnaniasAnanas 8y agoI was under the impression that PDF was created as a response to postscript being "too programmable" and not "document enough" but then they decided that PDF is too minimal and so they ended up bloating it beyond what PostScript ever was by including JavaScript, Flash, and other trash in it.
- kibibu 8y agoIt's got a 3d model viewer in it
- ryacko 8y agoSo does TempleOS.
- kibibu 8y agoAre you suggesting we replace PDF with TempleOS?
- grawlinson 8y agoIt would be an improvement!
- fabricexpert 8y agoI'm waiting for someone to post a wasm templeOS build which has some been modified to open pdfs immediately
- danmg 8y agoNot divine.
- ryacko 8y agoNo, just run Adobe in a virtual machine with constrained access to other files. Although TempleOS clearly is a divine revelation.
- ct520 8y agoI’ll get IT on it STAT! Regular employees going to love accessing PDFs in a VM
- yjftsjthsd-h 8y agoHonestly, it's possible to make VM windows show up as if they were normal programs, or you could just do things like Chrome-level internal sandboxing. There's no reason this has to be clunky.
- kibibu 8y agoAdobe Reader is already sandboxed a la Chrome.
- ryacko 8y agoAccording to Zerodium prices, VM escape costs as much as LPE, so it is unclear if there will be much of a security improvement beyond 2x. Although virtual machine hypervisors don’t automatically update, unlike Adobe or Windows.
- AnaniasAnanas 8y agoI am pretty sure that hypervisors update just like any other software, via the package manager.
- SlowRobotAhead 8y agoI don’t know if this is true, but I’ve been told that the pdf spec at one point did/does contain some MS DOS emulation. I’m seriously close to banning acrobat the program for my employees, just haven’t found a rock solid alternative that I can trust to not implement the same dumb parts of the spec.
- sebazzz 8y agoPretty sure that pdf.js from Firefox is safe. At least it runs as sandboxed javascript in the browser. I believe a standalone client may exist as well.
- AnaniasAnanas 8y agoMy issue with pdf.js is that it is really bad at copying. every time that I try to copy something from it every word (and sometimes different letters from a word) end up in a different line. I also had issues with rendering, in some (rare) cases I had it show squares instead of the actual content. Not to mention that it is actually horrifyingly slow compared to most of the viewers that I tried.
- avian 8y agopdf.js had its share of security vulnerabilities in the past. e.g. https://blog.mozilla.org/security/2015/08/06/firefox-exploit-found-in-the-wild/ https://blog.mozilla.org/security/2015/08/06/firefox-exploit...
- occamrazor 8y agoI think that chrome uses (used?) poppler, and is quite good for displaying pdfs.
- hannob 8y agono, chrome uses its own engine called pdfium.
- russellbeattie 8y agoI've done exactly that. Mark my words, a PDF will be the first computer program to gain full sentience.
- saagarjha 8y agoSemi-relevant: https://www.xkcd.com/1667/ https://www.xkcd.com/1667/
- zubspace 8y agoWhile working with the PDF format I sometimes get the impression that this complexity is what Adobe wants. As a result, Adobe Reader is the only viewer that implements the entire spec and can handle all (or most) quirks. This is especially apparent when trying to edit arbitrary PDF files, which is sometimes not so easy or even impossible. Just the definition of fonts and the text layout is already so complicated that this is the logical consequence. But perhaps the format has simply grown and led to additional requirements such as PDF/A, PDF/X, PDF/E and now PDF 2.0, the next standard that makes everything even more complex... Will this every stop?
- SmellyGeekBoy 8y agoThe same could be said for the Microsoft Office file formats. Or PSD, for that matter.
- tonyedgecombe 8y agoThe Office formats are well specified, they are complex because that is the nature of the software but it is a world away from something like PSD or even PDF.
- Quarrelsome 8y agoold binary formats were pretty insane though. Lots of magic to pull the file size down.
- gpvos 8y agoPDF is actually quite well specified, there are not many holes in the specification itself.[0] As to what Adobe Reader will do when it encounters an out-of-spec file, that is a lot fuzzier. On the other hand, the Office file formats (especially Word) have many un- or underspecified cases. [0] The only one I know of is finding the end of compressed inline image data.
- tonyedgecombe 8y ago
- cpeterso 8y agoFor a walk through PDF's history and file format, check out Chas Emerick's 2018 Red Monk tech talk: "Building 100 year systems in the shadow of PDF". https://www.youtube.com/watch?v=5EPn6plqkEs https://www.youtube.com/watch?v=5EPn6plqkEs
- ernst_klim 8y agoIs djvu a viable alternative and if so, why isn't it used as widely as pdf?
- fiddlerwoaroof 8y agoWeren’t there licensing or patent issues?
- ungzd 8y agoDJVU is raster format. It's intended for scans and archiving printed media. It's possible to use it for documents produced digitally, but I don't think it will be a good idea. PDF "core" is not that bad, but 90s "multimedia" craze turned it into badly designed graphical application runtime.
- ernst_klim 8y agoThanks for disambiguation, the raster-vector part is really a major difference. Is PS a viable alternative (even though it is a programming language itself)?
- wbl 8y agoHow do you embed fonts?
- ungzd 8y agoAFAIK, PDF is mostly a container for PS with compression and better handling of fonts (BTW, can fonts be embedded in PS? How fonts are sent to printer?). Still, both formats are too much printing-oriented. Reading documentation in PDF on computer screen is not especially pleasant, and unbearable on phones.
- ksec 8y agoDid PDF version 2.0 made any improvement to clarity? I think it was released last year.
- aidos 8y agoI actually enjoy reading the PDF spec - it’s here for anyone who wants to take a look https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PD... Like every bit of business software, there’s a load of stuff that shouldn’t be in there. It’s a really flexible container format though, and every one of these features went in because there was a need. Times change, things change and it could do with a tidy up, but it’s probably impossible without breaking everything for a load of businesses.
- mpweiher 8y agoWhat do you mean "read"? Implemented. Though obviously not the full thing. Nobody does that. Not even Adobe does that.