Hacker News new | ask | show | jobs
by mkl 1188 days ago
> PDF however includes (a subset of) Javascript, making it just as Turing complete.

Not really, because the JavaScript is quite limited in what it can do (e.g. forms and interactive features). It can't produce text or graphical elements. A PDF reader can show view of a PDF that looks correct even if it doesn't implement any of the JavaScript features.

1 comments

Support will vary by viewer, but Chrome's built-in PDF viewer supports a subset of Javascript.

It's enough to play Breakout inside a PDF: https://youtu.be/6rbJu10Telc?t=483