I think that it would be a better comparison between a pdf file and the web: pdfs files can't do the same or more.
And I would argue it is harder for the average user to view the JavaScript inside PDFs: on the web just right click and choose Inspect Element right in the browser; for a PDF you'll have to use specialized tools to decode the myriad encoding schemes inside a PDF. The average JavaScript developer doesn't know how to extract JavaScript from a PDF.
My point still stands: I do not expect a pdf document to be able to do anything like the djsumdog's link and neither do most people. If a pdf document was able to do anything like that I would consider that viewer as broken.
> The average JavaScript developer doesn't know how to extract JavaScript from a PDF.
They could learn with a few google searches.
I mean, it's not like every desktop application you've ever used in your life couldn't do the same or more?