4 ms·
For some reason, when clicking this link, I've expected SQL database running inside PDF files. Which considering how PDFs can embed JavaScript and that Emscript
by seba_dos1 8y ago
For some reason, when clicking this link, I've expected SQL database running inside PDF files. Which considering how PDFs can embed JavaScript and that Emscripten exists (and that PostScript itself is Turing-complete if you want to go hardcore), may actually be doable.
- avinium 8y agoI briefly looked at running Javascript inside PDF a couple of years ago - I think this is possible under the spec, but no major renderers allow it. Could be wrong.
- gumby 8y ago> I think this is possible under the spec, but no major renderers allow it. Thank goodness, though I suppose you could take the position that you already have a full programming language in your document so how could this be worse? Though the idea of distributing node with all my documents seems a bit hairy.
- DanielDent 8y agoPDFs that work in Chrome's PDF renderer: A calculator: https://pspdfkit.com/images/blog/2018/how-to-program-a-calculator/calculator.pdf https://pspdfkit.com/images/blog/2018/how-to-program-a-calcu... A game of breakout: https://github.com/osnr/horrifying-pdf-experiments/raw/master/breakout.pdf https://github.com/osnr/horrifying-pdf-experiments/raw/maste... The PDF specification is hundreds of pages.
- WrtCdEvrydy 8y agoI wonder if running PouchDB would count... since it's an offline / online database. I'm wondering if having a PDF that would have data that could self-update if there's an internet connection. Anyone wanna collaborate on something like this? I wonder if having a PDF like this that showed you how your stocks of choice are doing would be interesting.
- yomly 8y agoWould would be the advantage of this over a website/PWA? That it's more portable? It's more document-like/printable?
- WrtCdEvrydy 8y agoSelf-contained, no need for internet unless you want it to update, is forward-compatible with future PDF readers.
- avinium 8y agoOh wow - I wonder if this was added to Chrome's PDF engine after I looked into it. Very cool, but a bit concerning at the same time. I have vivid memories of Flash exploitations and all the malware that came with it. I know we've moved on since then, but I still don't see any reason to allow dynamic content in a page layout format.
- heavenlyblue 8y agoOn Firefox calculator opens up, but I can't interact with the elements. The second one is an empty page. I suppose it needs to do some initialization first in order to show the page.
- kulu2002 8y agoThis is amazing.
- jsjohnst 8y agoIf there is one who would, it’d be Adobe Acrobat / Reader, but I don’t think even it does either.
- frabert 8y agoI'm still waiting for someone to put PDF.js in a PDF so that I can finally read my PDFs while I read my PDFs
- speedplane 8y agoI'd prefer if PDFs emulated a virtual machine that ran Windows 3.1 so I can read them in true 1990s style.
- frabert 8y agoYou'll have to ask Fabrice Bellard for that
- gpvos 8y agoPDF does not implement full Postscript.