Pixilab
Home › Companies › Show HN launch › Tetris in a PDF

Tetris in a PDF

Show HN: Tetris in a PDF

Tetris in a PDF operates in show hn launch.

Profile

I realized that the PDF engines of modern desktop browsers (PDFium and PDF.js) support JavaScript with enough I/O primitives to make a basic game like Tetris.It was a bit tricky to find a union of features that work in both engines, but in the end it turns out that showing/hiding annotation "fields" works well to make monochrome pixels, and keyboard input can be achieved by typing in a text input box.All in all it's quite janky but a nice reminder of how general purpose PDF scripting can be. The linked PDF is all ASCII so you can just open it in a text editor, or have a look at the source code here: https://github.com/ThomasRinsma/pdftris/blob/main/gengrid.py

The company sits in the show hn launch segment, where it competes on its core product or service.

The company is listed at the Show HN launch stage of development.

SectorShow HN launch
StageShow HN launch

Website: th0mas.nl/downloads/pdftris.pdf

Browse related

Sign in to view the contact information we hold for Tetris in a PDF.
Create a free account