4 ms·
No joke. Yesterday I found out PDFs can have forms with JavaScript. https://tcpdf.org/examples/example_014/ https://tcpdf.org/examples/example_014/ How does t
by hu3 3y ago
No joke. Yesterday I found out PDFs can have forms with JavaScript.
https://tcpdf.org/examples/example_014/ https://tcpdf.org/examples/example_014/
How does this even work?
- lost_tourist 3y agobecause some viewers have built in javascript interpreters. In the pdf it's just text labelled as a script
- viraptor 3y agoI hope I can amuse you further: PDF embedded 3d models https://helpx.adobe.com/mt/acrobat/using/displaying-3d-models-pdfs.html https://helpx.adobe.com/mt/acrobat/using/displaying-3d-model... and interaction https://www.astrobetter.com/blog/2012/03/07/tutorial-for-embedding-3d-interactive-graphics-into-pdf/ https://www.astrobetter.com/blog/2012/03/07/tutorial-for-emb... You can also do animated page transitions like PowerPoint, but I don't have the right link available...
- hu3 3y agoYou did amuse me! Thanks! To me this is the kind of scope creep that causes a "simple" PDF renderer department to end up with 50 devs working in it full-time. I wonder... can a PDF have an iframe that opens itself? Causing an infinie loop of it loading itself?
- MilStdJunkie 3y agoPlease please don't mention 3d pdfs. Please. I had to implement this. 3d manipulation in a block inside of a print format that might make deliverables in the hundreds of gigs. It's . . it's one of the dumbest functional requirements I've ever seen, and the fact it exists. . I'm sorry, I have to go be by myself for a while.
- somat 3y agoThe stupidest part of the whole thing is that pdf is basically a neutered postscript. The problem with postscript as a document format, is that there is no good way to do metadata, jump to a specific page, count pages, etc. So pdf uses the rendering engine of postscript with all that annoying turing complete behavior torn out. Then at some point they wanted some computational capability in the document[1], but instead of reintroducing postscript into the mix they went with a third language, a wierd poorly designed one invent for browser scripting. 1. Yes we all know how stupid this was. but they wanted fillable forms and validating those forms made sense at the time. Really it was because they were trying to compete with the web.
- baal80spam 3y agoI remember someone wrote a game in a PDF document...
- temny 3y agoI think this is it: https://github.com/osnr/horrifying-pdf-experiments https://github.com/osnr/horrifying-pdf-experiments
- jimjimjim 3y agobadly