What is Doom PDF?
Doom has been ported to calculators, fridges and pregnancy tests, so a PDF was only a matter of time. DoomPDF, released by developer ading2210 in January 2025, runs the actual DOOM engine inside a PDF document — not a video, not a remake, but the original game code compiled to JavaScript and executed by your browser's PDF viewer.
The picture is drawn entirely in text. Each row of the screen is a form text field filled with ASCII characters, and the engine rewrites those rows every frame. Squint a little and E1M1 appears out of the punctuation. It is low-resolution, monochrome and slightly absurd, and it is the most convincing demo of PDF scripting you'll find.
Below you can play doom.pdf in the embedded viewer, read exactly how the controls work (they're unusual), and download the file to show your friends that their "boring document" has a shotgun in it.
How to play.
- 01Use a desktop browser built on Chromium — Chrome, Edge or Brave. The game needs the PDFium engine.
- 02Wait for the engine to boot. The console text at the bottom of the page prints progress while the WAD data loads.
- 03Click the box that says "Type here for keyboard controls." and type: W/S to move, A/D to turn, Space to fire, E to use, Q for the menu and Z to confirm.
- 04Prefer the mouse? Click and hold the on-screen buttons (^, v, <, >, fire, use, esc, enter) beside the screen instead.
- 05Type W, A, S or D as capitals (hold Shift) to run.
How it works.
DoomPDF is built on doomgeneric, a portable version of the DOOM source that only needs a handful of platform functions: draw a frame, read keys, get the time. Those functions are implemented in PDF JavaScript, and the C code is compiled with Emscripten into plain JavaScript that PDFium's scripting engine can execute. The game data is bundled inside the PDF and written to Emscripten's in-memory filesystem at startup.
Because the PDF API has no canvas, each frame is converted into rows of characters and written into a stack of text fields — one field per line of the image. Brightness maps to denser or lighter characters, which is where the ASCII-art look comes from.
Input is the other hack. A text field with a keystroke action calls key_pressed with event.change every time you type; uppercase W, A, S or D are lowered and paired with a virtual Shift so you run. The on-screen buttons use mouse-down and mouse-up actions to call key_down and key_up, which is why holding a button keeps you moving. The input box is reset once a second so it never fills up.
Tips.
- Type, don't hold. Each character in the input box is a key press; holding a key relies on your OS key repeat and can feel jerky.
- For sustained movement, hold the on-screen arrow buttons with the mouse — they send real key-down and key-up events.
- Open doors with E (or the use button) while facing them up close.
- Capital WASD makes you run. Great for dodging, terrible for ledges.
- If the screen freezes, reload with the button above the viewer — a fresh load clears the engine state.
- Zoom your browser out a step if the ASCII screen looks cramped; the characters resolve into shapes at a distance.
Where it runs.
| Viewer | Status |
|---|---|
Chrome / Edge / Brave (desktop) Requires the PDFium engine. | Works |
Firefox (PDF.js) PDF.js doesn't support the APIs this port relies on. | No |
Safari (macOS) No PDF JavaScript. | No |
Adobe Acrobat Reader Untested here; Acrobat's script engine differs from PDFium's. | Partial |
iOS Safari / iPhone & iPad Mobile PDF viewers ignore PDF JavaScript entirely. | No |
Android Chrome Opens PDFs without a script engine, so nothing moves. | No |
Doom PDF, answered.
Q1Is this the real DOOM running in a PDF?
Yes — the original engine via doomgeneric, compiled to JavaScript with Emscripten. Only the display is unusual: frames are rendered as ASCII text instead of pixels.
Q2Why are the controls typed into a box?
PDF scripts can't listen to the keyboard globally. They only see characters typed into a form field, so DoomPDF provides an input box and on-screen buttons.
Q3Can I download doom.pdf?
Yes. Use the download button on this page, then open the file in Chrome or Edge on a desktop computer. It's around 6 MB because the game data is embedded.
Q4Does Doom PDF work on mobile?
No. iOS and Android PDF viewers don't run PDF JavaScript, so you'll see a static page. Use desktop Chrome or Edge.
Q5Who created DoomPDF?
Developer ading2210, who published the source on GitHub as ading2210/doompdf in January 2025. The same developer later built LinuxPDF, which boots Linux inside a PDF.
Q6Why is it so slow or blocky?
Every frame is pushed through form fields, which were designed for tax forms rather than 35 frames per second. Expect a modest frame rate — that's part of the charm.



