Earlier quoted context omitted.
You're describing PDF files, but unfortunately Adobe didn't invest much time or money into making them interactive with a scripting language.
PDF has a limitation: it defines page size and the layout of everything fixed to this page, and thus can't do responsive layout like HTML can (reorganizing stuff in the page to match the screen size)
* Yes, I know, PDF doesn't -always- do this, but a well designed PDF generally does.