5 ms·
Pretty sure you can embed javascript in a PDF document, actually.
by TheSoftwareGuy 6y ago
Pretty sure you can embed javascript in a PDF document, actually.
- davrosthedalek 6y agoYep, but as far as I know, only works with Acrobat Reader. No other reader I tried supports it. Would be nice for presentations.
- jwilk 6y agoAFAIK at least these support JS: MuPDF, Okular, PDF-XChange, Foxit Reader, PDFium.
- davrosthedalek 6y agoI'm pretty sure that at least Okular does not support enough to make the animation with the latex animate package work. But maybe I held it wrong. I'm pretty sure I also tried Foxit and MuPDF for the same thing. I'll have another look. While I despise frame transition animations etc, for some stuff some nice animations are really helpful in explaining concepts.
- jwilk 6y agohttps://texample.net/media/tikz/examples/PDF/wankel-motor.pdf https://texample.net/media/tikz/examples/PDF/wankel-motor.pd... works for me in Okular 1.10.3.
- davrosthedalek 6y agoThanks! Nice, works with my okular 1.9.3 too, after asking whether it should show forms. The PDF-X I have on windows asks also (I think they use the same engine, poppler?), but then shows a blue rectangle if I enable them. I'm pretty sure that was what my experience was generally when I looked at it the last time (2 years ago), so probably some updates in the engine which made it work now.
- slowmovintarget 6y agoYou can also (and really ought to) switch off the JavaScript engine completely in Acrobat reader. There isn't a legitimate reason to run Javascript during the viewing of a PDF. Give me a link... I might visit it in a browser.
- jimhefferon 6y ago> There isn't a legitimate reason to run Javascript during the viewing of a PDF. I have a book, and I'd like to display video clips. AIUI, that requires that the viewer has JS.