Re:SumatraPDF Reader
by lost_tourist on Monday October 23, 2023 @10:48PM
(#37994353)
because some viewers have built in javascript interpreters. In the pdf it's just text labelled as a script
I hope I can amuse you further: PDF embedded 3d models https://helpx.adobe.com/mt/acrobat/using/displaying-3d-model... and interaction https://www.astrobetter.com/blog/2012/03/07/tutorial-for-emb...
You 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?
That's a nice idea. Can we call that PDF bomb?
In reality most PDF apps don't support those elements (even software like macOS Preview) and people get along just fine.
Re:SumatraPDF Reader
by MilStdJunkie on Tuesday October 24, 2023 @02:34PM
(#38003302)
Please 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.
The 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.
Re:SumatraPDF Reader
by baal80spam on Tuesday October 24, 2023 @03:02AM
(#37995621)
I remember someone wrote a game in a PDF document...
I think this is it: https://github.com/osnr/horrifying-pdf-experiments
https://tcpdf.org/examples/example_014/
How does this even work?