Hacker News new | ask | show | jobs
by vosper 1020 days ago
What's a good alternative, for users and developers?

I don't have any love for PDF, but I'm actually not sure what's more cross-platform. Any browser will render PDF, so everyone already has a viewer on their computer. A browser will also print any document to PDF, and many other editors can export to PDF (though perhaps not import for editing)

It can't be replaced by an Office format, like docx, because even today apps like Pages can't render MS Office docs correctly half the time.

Doesn't seem like HTML would fly, either, given all the kinds of things that get embedded into PDF.

1 comments

HTML and various javascript libraries like mathjax or other libraries for charts and graphs.

> Doesn't seem like HTML would fly, either, given all the kinds of things that get embedded into PDF.

That's ironic. Browser PDF readers, at least open source ones, render PDFs as HTML using javascript. At least I'm sure about FF because I just checked that text from a native-digital pdf showed up in the DOM in developer tools.

> HTML and various javascript libraries like mathjax or other libraries for charts and graphs.

How do you email that to someone as an attachment? Can you embed all of that stuff into a single .html file?

Sure, epub.

You could (or maybe you can't, but ebook readers should allow you to) disable any network access without explicit confirmation, so the javascript can't do anything evil other than modify the ebook being displayed. If you can't do that, that's up to ebook readers to solve, and not a flaw with epubs.

> Can you embed all of that stuff into a single .html file?

Technically yes, but there are two problems.

First is that inline style and scripts are a potential security vulnerability.

Second is that if someone does not inline everything and instead references css/js from the web the document will stop rendering correctly when those resources go offline.