Hacker News new | ask | show | jobs
by giantDinosaur 2064 days ago
Can paper run ad-tracking analytics scripts though? ;-)
2 comments

Have a single copy of the paper in a place with a sign in sheet and now you're tracking everyone who looks at it.
can pdf?
Given that PDFs can embed JavaScript, they can embed ad tracking software, yes. And Linux VMs. And a port of WinAmp.
I don’t think any of that is possible with the JavaScript APIs exposed (if any) by common PDF readers. I’ve tried to do useful things with JavaScript in a PDF and failed utterly. https://stackoverflow.com/questions/32597283/can-javascript-...
Paizo uses JS to trigger map layers (for RPG products)
Tracking is one possible problem. The other is, that JavaScript can modify the document itself, so a part of a contract for example might print out differently depending on conditions.

That's why PDF/A for archiving was created which disallows various components, cf. https://en.wikipedia.org/wiki/PDF%2FA

I didn't know they could embed javascript. That's horrifying.
Fortunately many PDF viewers don't run them.