Hacker News new | ask | show | jobs
by gogopuppygogo 2064 days ago
https://en.wikipedia.org/wiki/PDF

It became open source in 2008 so it’s definitely here to stay.

1 comments

It is a format that doesn't know what it wants to be.

Is it an image?

Text?

Vector graphics?

Electronic forms?

How about all of the above.

It's basically digital paper and since paper can be all those things so can PDFs.
Can paper run ad-tracking analytics scripts though? ;-)
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-...
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.
It renders properly. HTML doesn't even know if it wants to be an application or a document.