to add to it, you “can” add anything arbitrary, but it is not same as downloading a executable. Due to some really weird reasons, many parties were interested in using pdfs like interactive forms, for example some government forms, where you can fill a field, and you can add scripting to execute upon input and convey back. It is somewhat like javascript for pdfs, and then the onus is on the pdf readers to be compliant enough to execute such scripts, and provide enough access to your system. Many minimal pdf viewers do not implement these features, or for example pdf viewer in firefox has the option to execute, but disabled by default.
There is scripting on them, and afaik it’s actually javascript. It’s a limited version of it (the actual specification was supposed to allow for data sending and receiving, and complete arbitrary code), but it’s enough to run code. A madlad has ported doom and linux to PDF, and you can fully run them on a compliant enough pdf viewer.
to add to it, you “can” add anything arbitrary, but it is not same as downloading a executable. Due to some really weird reasons, many parties were interested in using pdfs like interactive forms, for example some government forms, where you can fill a field, and you can add scripting to execute upon input and convey back. It is somewhat like javascript for pdfs, and then the onus is on the pdf readers to be compliant enough to execute such scripts, and provide enough access to your system. Many minimal pdf viewers do not implement these features, or for example pdf viewer in firefox has the option to execute, but disabled by default.
epubs are effectively self contained html files, but the scripting is not there (afaik)
There is scripting on them, and afaik it’s actually javascript. It’s a limited version of it (the actual specification was supposed to allow for data sending and receiving, and complete arbitrary code), but it’s enough to run code. A madlad has ported doom and linux to PDF, and you can fully run them on a compliant enough pdf viewer.
LinuxPDF
DoomPDF
(My bad, I wanted to reply to a higher post, but I’m gonna leave this here cuz federation is sometimes weird with deleted comments)