4 ms·
It's not even JS. I'd argue a HTML + inline JS page is a lot more self-contained than one with external images, videos and fonts. Note that PDFs can contain JS
by dtech 5y ago
It's not even JS. I'd argue a HTML + inline JS page is a lot more self-contained than one with external images, videos and fonts.
Note that PDFs can contain JS too.
- Digit-Al 5y ago> Note that PDFs can contain JS too. That's why he says to use PDF/A, which can't contain JS.
- imglorp 5y ago> Note that PDFs can contain JS too. Wait, why?!? When does it render? Who's supposed to have a js engine to do that? What version? How does it load dependencies? Is HTML and DOM carried along with it? So many questions.
- maskros 5y agoWhy? To validate form fields. Who? The PDF viewer. When? Since about 2000 in PDF format version 1.3. Dependencies? Hah, no such luck. You're stuck with ES5 and Adobe's crufty JS library. There is no HTML and DOM, there are however some pretty thorough PDF document bindings.
- native_samples 5y agoWhy - because scripting is useful. A big use of PDFs is translating paper forms into digital forms without needing to make a web app out of them. JS is used for client side validation, same reason it was put into browsers. Acrobat can handle this along with many other features that most PDF readers can't handle properly. Basically in the PDF world, Acrobat Reader is Chrome and everything else is, like, Konqueror or something. Don't be fooled into thinking PDF is a small spec. It's not.