![](https://lemmings.world/pictrs/image/4edf5a0e-76ed-46be-97e3-c1d49eb5f655.png)
![](https://lemmy.dbzer0.com/pictrs/image/a18b0c69-23c9-4b2a-b8e0-3aca0172390d.png)
6·
5 hours agoto 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)