This Coder Shows How To Play Games Inside A PDF File


Play games in PDFShort Bytes: A GitHub user named Omar Rizwan has found a way to put games in PDF files. He even coded his own game after taking help from a tutorial. Rizwan has put the details of this Horrifying PDF Experiments on his repository.

PDFs are famous for the stubbornness they exhibit when it comes to making changes to them. Once created, you’ll have to invest much of your efforts in order to do some last minute edits before your presentation. It can’t be denied that this adds to the enhanced security for which the PDFs are known for.

These files are all about texts and graphics displayed on an A4-sized digital page. You might have never given it a thought to play some games inside your PDF file. Well, a developer named Omar Rizwan thinks so. In fact, he has found some features that allow embedding of flash content, 3D objects, and JavaScript in a PDF file. He discovered all these things while he was scrolling through 1310 pages of a PDF specification document which he describes as “a really clear and interesting read”.

Now, the downside to it is that the PDF readers available at the current point of time don’t have these features. The only ray of light is Google’s Chrome browser which has inbuilt some small subset of the Acrobat Java API surface.

So, the next time you want to impress someone, just put a JavaScript game in your PDF. However, the game should not consume a large number of bits. You can’t just put one as heavy the Far Cry or GTA V.

Check out the arcade Breakout coded by Rizwan. He took the help of a tutorial and he has apologised for the inconsistent speed of the game. Read more about this stuff on his GitHub repository.

Game Tip: After you open the Breakout PDF, move your mouse left and right to move the green paddle. You have to move your mouse in the light blue section below the game arena.

Did you play the game in the PDF? Tell us your experience in the comments section below.

Also Read: The 5 Best and Most Addictive Online Games Ever Made

Aditya Tiwari

Aditya Tiwari

Aditya likes to cover topics related to Microsoft, Windows 10, Apple Watch, and interesting gadgets. But when he is not working, you can find him binge-watching random videos on YouTube (after he has wasted an hour on Netflix trying to find a good show). Reach out at [email protected]
More From Fossbytes

Latest On Fossbytes

Find your dream job