4 ms·
> OTOH it's totally possible to make a self-contained HTML page without using a JS framework of the day. I'm basically in agreement, but the author has a good
by lifthrasiir 5y ago
> OTOH it's totally possible to make a self-contained HTML page without using a JS framework of the day.
I'm basically in agreement, but the author has a good point that PDF is obviously self-contained and self-contained HTML pages are not necessarily distinguishable from those that aren't. Perhaps we might have to revisit MHTML or embrace Web bundles as an alternative to PDF.
- dtech 5y agoIt'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.
- cxr 5y agoYou want PWP <https://blog.jonudell.net/2016/10/15/from-pdf-to-pwp-a-vision-for-compound-web-documents/ https://blog.jonudell.net/2016/10/15/from-pdf-to-pwp-a-visio...> (Later aborted, and the group's work was rolled into EPUB3. As you note, there remains a genuine need for it.) On the other hand, there's nothing stopping you from using a double-barrelled file extension for denoting this sort of thing, e.g. "memex-opus.pub.html"; so long as it ends with something recognizable, double-clicking should still open it in the browser across all the usual platforms, AFAIK. (I'm fond of using "xyzzy.app.htm" myself to take advantage of this trick for distributing simple, self-contained programs that are designed run in the browser.)
- 7sidedmarble 5y agoThis is what PWAs are kind of for.
- IshKebab 5y agoOr... AMP? But no, Google made that so it must be a bad idea.
- pmlnr 5y agoMHTML, which is basically HTML email.