News for hackers. Stuff that matters.
Re:Show HN: A playable game of Tetris inside a PDF by freedomben on Thursday January 09, 2025 @12:15PM (#42647696)
You glorious bastard, what a cool project! This is already a contender for most hacker project of the year :-)

(below is not serious)

I would advise people against using this in production though because it's still missing some critical features. For example:

1. The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work.

2. It doesn't work properly in Evince. It just shows an error "The document contains only empty pages"

Re:Show HN: A playable game of Tetris inside a PDF by zknowledge on Thursday January 09, 2025 @12:56PM (#42648120)
hahaha I wish you almost didn't include the parenthesis. I've had some clients who would definitely email me that point #1.
Re:Show HN: A playable game of Tetris inside a PDF by ChrisMarshallNY on Thursday January 09, 2025 @05:25PM (#42650477)
No. They would fax it to you.
Re:Show HN: A playable game of Tetris inside a PDF by nadis on Thursday January 09, 2025 @01:02PM (#42648195)
"The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work."

-- this comment made my me laugh/choke on my coffee and I have no regrets.

Re:Show HN: A playable game of Tetris inside a PDF by ikari_pl on Thursday January 09, 2025 @02:39PM (#42649119)
You must have never browsed IT support tickets. Oh the horrors...
Re:Show HN: A playable game of Tetris inside a PDF by nadis on Thursday January 09, 2025 @02:52PM (#42649248)
Internally laughing and crying at the same time. "Oh the horrors..." is exactly right.
Re:Show HN: A playable game of Tetris inside a PDF by VagabundoP on Friday January 10, 2025 @05:28AM (#42654432)
"Its broke"

What's broke? How is it broke. Why send a one liner?!?

So many questions.

Re:Show HN: A playable game of Tetris inside a PDF by ddoice on Saturday January 11, 2025 @02:07AM (#42663947)
Can't wait for physical paper with JS support
Re:Show HN: A playable game of Tetris inside a PDF by pk-protect-ai on Saturday January 11, 2025 @03:22PM (#42668645)
There is probably an E-Paper capable of JS support, however it would be difficult to use for printing due to it's thickness ...

https://en.wikipedia.org/wiki/Electronic_paper

Re:Show HN: A playable game of Tetris inside a PDF by FpUser on Thursday January 09, 2025 @01:06PM (#42648240)
>"1. The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work."

Just wait until e-paper replaces the real one ;)

Re:Show HN: A playable game of Tetris inside a PDF by woodrowbarlow on Thursday January 09, 2025 @01:12PM (#42648304)
i recently discovered that the Canadian government depends on this for some fillable forms, because it shows a message at the top that says "JavaScript is disabled" and all the boxes show errors. i couldn't get it to work on Linux and had to dust off a Windows machine (and it still didn't work in firefox, it needed acrobat reader).
Re:Show HN: A playable game of Tetris inside a PDF by AlexanderTheGr8 on Thursday January 09, 2025 @01:55PM (#42648735)
I have faced this exact problem with Canadian govt forms. Evince doesn't support them. They are so specific about only adobe acrobat to fill out the forms. I can open them in firefox but can't update them properly The only option is to use my barely hanging on 10-yr old windows machine.

Let's hope that eventually they move on to a simpler web form.

Re:Show HN: A playable game of Tetris inside a PDF by ikari_pl on Thursday January 09, 2025 @02:42PM (#42649154)
Wait, did Acrobat actually end support for Linux? Od you just didn't want that particular machine to catch... capitalism?
Re:Show HN: A playable game of Tetris inside a PDF by necovek on Thursday January 09, 2025 @03:49PM (#42649677)
There is no recent version of Acrobat Reader for Linux, and old (was it 5.x beta?) versions rarely work on modern distros.
Re:Show HN: A playable game of Tetris inside a PDF by ars on Friday January 10, 2025 @02:17AM (#42653414)
Acrobat 9.5 works fine on Linux, if a little slow.

This Tetris game makes it crash though.

Re:Show HN: A playable game of Tetris inside a PDF by necovek on Friday January 10, 2025 @01:11PM (#42658187)
Oh, thanks, that's good to hear!

Edit: only now I see that's also from 2009 with updates into 2013. Do you where one can easily download the latest patched version?

Re:Show HN: A playable game of Tetris inside a PDF by ars on Sunday January 12, 2025 @03:15PM (#42676499)
Re:Show HN: A playable game of Tetris inside a PDF by nbenitezl on Sunday January 12, 2025 @05:14PM (#42677506)
In my case I install it from flathub.org (works from any distro):

https://flathub.org/apps/com.adobe.Reader

Re:Show HN: A playable game of Tetris inside a PDF by pavon on Thursday January 09, 2025 @07:03PM (#42651128)
Okular supports javascript in PDFs and works with many fillable forms.
Re:Show HN: A playable game of Tetris inside a PDF by martinflack on Thursday January 09, 2025 @01:41PM (#42648587)
> 1. The Javascript stops working when printed to physical paper.

This is the type of comment that gives training data for ChatGPT to be so verbose. Ha!

Re:Show HN: A playable game of Tetris inside a PDF by inetknght on Thursday January 09, 2025 @01:56PM (#42648740)
> The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work.

Science fiction tells us this is only temporary. Print away, those papers will turn into magic in just a few decades!

Re:Show HN: A playable game of Tetris inside a PDF by LeonenTheDK on Thursday January 09, 2025 @02:31PM (#42649049)
Just wait until we get this on e-paper.
Re:Show HN: A playable game of Tetris inside a PDF by debo_ on Thursday January 09, 2025 @02:25PM (#42649006)
I feel stupid for not getting the joke. It would have been nice if you explained it in the ... postscript.

(Yes this is a joke)

Re:Show HN: A playable game of Tetris inside a PDF by dmd on Thursday January 09, 2025 @03:33PM (#42649581)
Just don't try to do this in any less powerful display languages, or you'll really be in a PCL.
Re:Show HN: A playable game of Tetris inside a PDF by necovek on Thursday January 09, 2025 @03:50PM (#42649685)
> The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work.

I believe you need to rescan it into PDF to get it to work again.

Re:Show HN: A playable game of Tetris inside a PDF by ycombinatrix on Thursday January 09, 2025 @03:55PM (#42649718)
It might be possible to set up some kind of pdf quine using e.g. a QR code
Re:Show HN: A playable game of Tetris inside a PDF by lisper on Thursday January 09, 2025 @05:50PM (#42650666)
> The Javascript stops working when printed to physical paper.

It works for me. Maybe you need to upgrade your paper? What version are you using?

Re:Show HN: A playable game of Tetris inside a PDF by dheera on Friday January 10, 2025 @01:38AM (#42653214)
> Javascript

Oh, so that's what it is. Bleh. Ok.

I thought it was cooler and made use of the fact that PostScript is a Turing-complete language to write Tetris in PostScript.

(I never really understood the PDF format but I always assumed it's some kind of compressed PostScript)

Re:Show HN: A playable game of Tetris inside a PDF by atoav on Friday January 10, 2025 @03:14AM (#42653694)
3. I open it on my phone and it doesn't work at all. And that is a new phone with a current browser.
Re:Show HN: A playable game of Tetris inside a PDF by martin_a on Friday January 10, 2025 @04:26AM (#42654071)
Regarding #1: Your printer is just too slow. Try finding a printing company near you with a web feed machine, that should help with your FPS.
Re:Show HN: A playable game of Tetris inside a PDF by maurya_anand on Friday January 10, 2025 @09:23AM (#42655775)
"The Javascript stops working when printed to physical paper."

You need to upgrade your paper that supports a minimum FR of 60hz.

Re:Show HN: A playable game of Tetris inside a PDF by 4ggr0 on Friday January 10, 2025 @10:30AM (#42656488)
come on, it's 2025, we need 240hz (to play Tetris with 30FPS).
Re:Show HN: A playable game of Tetris inside a PDF by niqmk on Saturday January 11, 2025 @03:01AM (#42664188)
I actually printed it out and wanted to see if it worked or not.. LMAO
Re:Show HN: A playable game of Tetris inside a PDF by banzomaikaka on Thursday January 16, 2025 @05:08AM (#42723478)
thank god you warned the last 2 comments weren't serious