Live data from Hacker News

Show HN: Tetris in a PDF

th0mas.nl

91–100 of 238 posts

Re: Show HN: Tetris in a PDF

#92

"It was a bit tricky to find a union of features that work in both engines [..]" I am curious what the constraints are to make this work and in which environments it does? Does it work in PDF viewers outside the browser? Is there documentation what is available in which environment? What is enabled by default, can be switched on or off?

I barely looked at Adobe Reader so not sure about that one, it definitely does not work with this PDF though, likely because it's not compliant in several ways. Besides that I wouldn't be surprised if it supports all the required JS APIs and more, just possibly behind some permission prompts. It might work in Foxit as I believe it supports some scripting. Most of the other native PDF renderers are more static, as far…

I got the same conclusions. Unless I misunderstood, Pdfium is based on Foxit so that should work. And as both pdf.js and pdfium decided to implement only a thin part of the adobe js sdk, then there are good chances that it works there too.

Re: Show HN: Tetris in a PDF

#93

Earlier quoted context omitted.

Excel for games and PowerPoint for stick animations. You'd spend hours in CAD class just creating PowerPoint animations and not doing any CAD. I regret this decision now and wish that I had paid some attention. 3D printers are cool and I have no idea how to design objects for it.

>> I do wish I did pay some attention to CAD now. I want a 3D printer and have no idea how to design objects for it. Get Solvespace: https://solvespace.com/index.pl Do the tutorials. If/when you outgrow it, the concepts will carry over to FreeCAD which otherwise has a steeper learning curve but has more capabilities.

An aside, but I found FreeCAD to be a real pain. The dependency tracking across sketches is really quite horrid. If I have sketch2 linked to sketch1, and I delete a line in sketch1, it will arbitrarily reassign all the sketch2->sketch1 dependencies. Maybe they fixed that since I've used it, but I've transferred over to Onshape for all my hobby stuff...

EDIT: looks like they finally addressed the topological naming problem, I guess I better give it a second chance!

Re: Show HN: Tetris in a PDF

#95
post #7

Not just web browsers, Acrobat (and probably other PDF readers) have supported executing Javascript in PDFs for decades.

Which makes sense, why would browsers randomly add JS to PDF if it wasn’t already part of the standard?

Re: Show HN: Tetris in a PDF

#96

Playable where? It doesn't work in the Adobe Chrome PDF viewer, or in Preview.

Sadly, Adobe Acrobat Viewer cannot load it, but if go to Chrome and choose Open.. That should use chrome PDF to display it in the browser (depending on your settings maybe) which worked for me.

Re: Show HN: Tetris in a PDF

#98
post #72
post #68

This is horrifying, PDFs should not be able to execute code.

One should reject all PDF:s except /a-standards compliant ones.

Maybe if one enjoys endless conversations with unhappy customers. Easier to simply isolate the PDF rendering/parsing and move on.

Re: Show HN: Tetris in a PDF

#100
post #79

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…

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)

Just don't try to do this in any less powerful display languages, or you'll really be in a PCL.
Post reply on HN