4 ms·
Ask HN: Why has PDF not been replaced with HTML5?
Perhaps the answer is very obvious, but why is it that PDF has not been replaced by the HTML5 format for most on-device documents outside of programming?
Take for instance, company annual reports and pitch slides - you could make the usage of charts and data objects a whole lot more insightful by just giving the option to interact with the charts and choose your data selectively. The same goes for research papers - a small visual gif or video component would go a long way to show things compared to a series of sequential images, as would interactive charts - even the simple ones that you get from Excel.
- breckenedge 4y agoMomentum
- thesuperbigfrog 4y agoPDFs were designed for typesetting, printing, and publishing documents. "Based on the PostScript language, each PDF file encapsulates a complete description of a fixed-layout flat document, including the text, fonts, vector graphics, raster images and other information needed to display it." Source: https://en.wikipedia.org/wiki/PDF https://en.wikipedia.org/wiki/PDF HTML5 was not designed for typesetting and lacks such features. (For example, HTML does not specify page sizes.)
- fakedang 4y ago> PDFs were designed for typesetting, printing, and publishing documents. That is precisely my question! With increasing prevalence of documents being processed online, why hasn't it been the case that the HTML5 option appears as prevalent as the PDF option in say research articles? I guess a complete phase-out of PDF is not currently possible, but the provision of HTML5 alongside PDF should definitely be possible? I found some online options to convert Word documents to HTML5 too so it's clearly not technically impossible, is it?
- warrenm 4y agoPDF is well-known, and [effectively] universal It's also "fixed" - ie, probably as close to a WYSIWYG format as has ever been created (so far) HTML5 is ice ... but it's not a 1-for-1 replacement/equivalent
- thesuperbigfrog 4y ago>> With increasing prevalence of documents being processed online, why hasn't it been the case that the HTML5 option appears as prevalent as the PDF option in say research articles? Many research articles appear in printed journals. If a research publication uses online distribution rather than a printed journal, then perhaps HTML would make more sense. Traditionally research papers have been distributed as printed magazines and volumes, so PDF has been a common interchange format. >> I guess a complete phase-out of PDF is not currently possible, but the provision of HTML5 alongside PDF should definitely be possible? Yes. It in most cases it should be possible, it depends on the use case, target audience, and perhaps the traditions surrounding what is being published. >> I found some online options to convert Word documents to HTML5 too so it's clearly not technically impossible, is it? Probably not. It depends on how the documents are originally written and the "expressiveness" of the documents needs. Many research articles are written using TeX or LaTeX (https://en.wikipedia.org/wiki/LaTeX https://en.wikipedia.org/wiki/LaTeX) which, like PDF, was designed for typesetting. Microsoft Word and most similar modern word processing software will export to both HTML and PDF. Most LaTeX-based systems also support HTML and PDF output. Other word processing and document preparation software may have a range of output and exporting options depending on what it was designed for. It is more a question of what the target medium (web publishing, printing, ebook formats, etc.) is and what publishing format best fits the document's needs.
- fakedang 4y agoThanks for the extremely detailed response! Although, after reading most of the well-intentioned responses here, I now feel like an idiot. So I guess it's a matter of preference and medium too, although I felt that were an "HTML5 style" PDF possible, it would have been extremely useful in the fields I've published in. It's certainly better than filling up the page or the slide with a bunch of PNGs.
- warrenm 4y agoI addition to thesuperbigfrog's answer [0], PDF files tend to be static, and distributed in such a manner that you don't want them being changed without a relative high level of effort (yes, I know there are PDF editors) >a small visual gif or video component would go a long way to show things compared to a series of sequential images Tell me how a small GIF or video is going to work when you print a paper or collect it into a book or journal, please :) -------- [0] https://news.ycombinator.com/item?id=33787463 https://news.ycombinator.com/item?id=33787463
- fakedang 4y agoI guess I forgot to mention that with the greater prevalence of documents being online (including formal government documents which in fact penalize you for sending them in-paper documents), a lot of printing should not exist and should instead be on phones and tablets.
- warrenm 4y agoYou may wish there was less printing It may even be desirable overall But physical copies of papers, books, etc have a major place in peoples' lives (and will for beyond the foreseeable future) :) ...and gov't forms aren't going to have embedded videos or GIFs ;)
- fakedang 4y agoI guess that was my motivation to ask the question. :) It seems everyone around me (in the developed world) is using a tablet or an iPad or a laptop to read a document, with very little work printed out. I would argue that quite a few government forms for newly created agencies and even tax havens have migrated from plain PDF to forms with embedded JS, for buttons, etc. And with each passing year, books seem to have lesser impact in my life as well as that of my peers - most reading is done on a very portable tablet or desktop. Most reading that is done with a paperback is casual and light. And of course, reading seems to be a dying habit these days.
- 4y ago
- leephillips 4y agoResearch papers: you want your paper to look the same for everyone. Equations, tables, and many elements of typography need to be preserved among devices. PDF is the only format we have, aside from just distributing images, that does this; HTML certainly does not. It’s a shame, though, that there’s no standard for embedding video that works for everyone.
- fakedang 4y agoBut these are the same challenges for websites too, right? Layouts have to be preserved as much as is possible, and if that's not possible, adaptive to device OS and conditions. Can you give an example of how HTML5 does not do the task?
- warrenm 4y agoGive an example of how HTML5 is better than PDF for universality and consistency :)
- leephillips 4y agoHTML never does the task, and is not intended to. HTML/CSS is interpreted and rendered by a browser. It will look different on different devices, with different user settings, user CSS, etc., and with different browsers on the same device, even if the HTML/CSS validates and the rendering engines have no bugs, and even if the HTML author avoids reflow by using a rigid design. This is true just for a plain paragraph of prose. Now add equations, etc. Sometimes this nonuniformity is a benefit, but for some applications you need to control the presentation of your document.
- fakedang 4y agoI guess these are the reasons I was looking for. Thanks for taking the time to deal with my noob question. Upvoted! My next question is that why isn't it possible to agree to a standard presentation of prose and equations for HTML5 which mirrors a clean PDF-style presentation as much as possible (as is done with LateX), but I guess the answer to that is within that xkcd comic about standards.