News for hackers. Stuff that matters.
Re:PDF: Still unfit for human consumption, 20 years later by jcrawfordor on Monday August 10, 2020 @02:19PM (#24112311)
Any complaint about the PDF format tends to be hard to address because the PDF format is so complicated and so flexible---except, of course, for the argument that the PDF format is too complicated and flexible, which tends to be the one enduring criticism since it has lead to a history of various security, compatibility, and performance issues related to PDFs.

The major attempts to replace PDF have largely failed, though. DjVu is relatively limited in scope. Postscript (as a document display format) has never been well-supported on Windows and is increasingly poorly supported on Linux due to rarity. XPS is perhaps the most direct "PDF replacement" but is nearly equally complicated (being based on the MS Office OOXML formats, giving it a similar cursed heritage to PDF's basis in the Photoshop PSD format), and there was never really a compelling argument to switch to it.

What I don't get is the suggestion that PDF should be replaced by HTML. The purposes of the two formats are basically orthogonal and replacing one with the other is doomed to failure. The author's argument seems more akin to "print-layout documents should be replaced by hypertext," and perhaps this is true in some cases, but it's definitely a different matter and one that the author's arguments don't really support that well.

In my opinion, hopefully more humble than the author's, PDF's main downside is the remarkable unevenness of the quality of the creation and reading tools, considering its supposedly "reads everywhere" nature. The "reference implementation" is a commercial product and supports a huge list of features that are rarely or never supported by third-party commercial or open-source implementations. The Linux toolchain still widely used with PDF (e.g. Ghostscript) is decidedly outdated and hard to work with, but there's not a lot of momentum towards development of more modern tools. All of these issues are likely rooted in the basic fact that the PDF format is extremely complicated, and so thoroughly implementing it is a massive undertaking.

The author's complaints about performance in particular reflect the flexibility and complexity of the format. Web browsers have mostly switched over to using pdf.js to render PDFs, which is completely satisfactory for documents that consist of text or images (like scanned documents), but can be absolutely unusable when dealing with extremely vector-heavy PDFs like GIS exports.

Even printing PDFs can become rather frustrating as the complexity of the format means that parse-related printing issues are relatively common. Even Acrobat, for a long time, would munge certain characters when printing due to some sort of inconsistency with how different generators and readers implemented font embedding leading to Acrobat not being able to locate the embedded character font. This seemed most common with the letter "l" but maybe I'm imagining that... but also maybe it reflects some frightening detail of the format or implementation behavior.

One of the most common issues around PDF consistency comes down to file size... different PDF generators are prone to create representations of the same document that are significantly different sizes. Scanners are often an extreme example, some combination of not "knowing the tricks" for PDF optimization and a probably very low-performance compression implementation means that low-end network scanners often produce PDFs that are hilariously large. Opening them in Acrobat and using the "optimize file" tool can reduce file size by 90% without apparent visual impact... the whole fact that Acrobat has an "optimize" tool (and that Acrobat Distiller used to exist) speaks to the scale of this problem. Inspecting PDFs that are "optimized" by Acrobat can be an alarming experience, as well. You may remember that this played a strange role in Obama's birth certificate some years back, as Acrobat seems to normally split PDFs into all kinds of different layers and apply strange transformations to them when it "optimizes." It's hard to know how much of this is actually "best practice" versus just a result of Acrobat accumulating decades of eccentricities.

So the bottom line is... PDF is too complicated for its own good, but then so are a great deal of other formats in widespread usage, like modern webpages which require complex parsing of multiple formats to render, and a great deal of historic cruft brought along with them. I'm not sure that there's any sound technical argument that PDF or web pages are a "better format," it's all a matter of opinion over whether you prefer print-format documents or hypertext, and that's going to be very application-specific.

Re:PDF: Still unfit for human consumption, 20 years later by Thorentis on Tuesday August 11, 2020 @12:37AM (#24117201)
> PDF's main downside is the remarkable unevenness of the quality of the creation and reading tools

Funny enough, I think one of the reasons PDF became so popular, is because it was originally seen as a "difficult / impossible to modify file that can be downloaded as a file and read in a static way". The lack of editing tools in the most popular PDF reader for a long time (Acrobat Reader) was the reason it became such a widely used format. Especially compared to distributing a .doc or .docx where the user can easily accidentally change something.

Re:PDF: Still unfit for human consumption, 20 years later by ubermonkey on Tuesday August 11, 2020 @09:22AM (#24120004)
That's absolutely what we use it for. It's a "terminal" format for documentation we distribute to customers. We don't want to send out .docx.
Re:PDF: Still unfit for human consumption, 20 years later by aj7 on Wednesday August 12, 2020 @07:14AM (#24130781)
Exactly.
Re:PDF: Still unfit for human consumption, 20 years later by DrAwdeOccarim on Tuesday August 11, 2020 @06:34AM (#24118946)
That's why I use it at work. If I don't pay for my employees to get Acrobat Pro, or allow them to install software outside of a helpdesk tickets, then I know a PDF they generate using our lab management software is unadulterated. It's part of our data verification policy. It's not that I think my employees with change data nefariously, it's that they may want to edit the layout and accidentally change a numerical value.
Re:PDF: Still unfit for human consumption, 20 years later by frandroid on Wednesday August 12, 2020 @10:51AM (#24132575)
Don't these users have a recent version of MS Word?
Re:PDF: Still unfit for human consumption, 20 years later by davidgerard on Tuesday August 11, 2020 @07:33AM (#24119245)
LibreOffice Draw is pretty good for editing PDFs - if you have all the matching fonts. So I wouldn't go assuming people can't edit PDFs.
Re:PDF: Still unfit for human consumption, 20 years later by DrAwdeOccarim on Wednesday August 12, 2020 @06:33AM (#24130441)
They'd need to put in a ticket to get it installed, which I would need to approve. But also, this isn't to stop malice it's to stop accidental edits. I can't stop my employees from messing with things if they want to. That's where the trust part and common goals come into play.
Re:PDF: Still unfit for human consumption, 20 years later by drawkbox on Tuesday August 11, 2020 @08:29AM (#24119597)
The document can be tampersealed to help prevent or at least notify of that.

In a way a locked tampersealed document is a pretty decent template for parsing data as well. It is messy as PDFs always are but a decent lib and a consistent source with sealed docs can be used for decently verifiable scraping.

For instance some sort of license, certification or official document like tax forms, it can be generated with a common output, tampersealed and then reliably parsed after verification.

Re:PDF: Still unfit for human consumption, 20 years later by chipotle_coyote on Monday August 10, 2020 @04:38PM (#24113716)
> What I don't get is the suggestion that PDF should be replaced by HTML. The purposes of the two formats are basically orthogonal and replacing one with the other is doomed to failure.

Isn't "the purposes of the two formats are basically orthogonal" actually the entire point the article is making? Literally the first line of the summary:

> Research spanning 20 years proves PDFs are problematic for online reading. Yet they’re still prevalent and users continue to get lost in them.

From the second paragraph:

> The [PDF] format is intended and optimized for print. It’s inherently inaccessible, unpleasant to read, and cumbersome to navigate online.

The bolded statement in the second paragraph that's clearly meant to be the One Important Thing to Take Away:

> Do not use PDFs to present digital content that could and should otherwise be a web page.

Your comment here is eloquent, but the article's argument is not "print-layout documents should be replaced by hypertext," it's "print-layout documents are a poor fit for reading on screen-layout devices." When you conclude:

> It's all a matter of opinion over whether you prefer print-format documents or hypertext, and that's going to be very application-specific.

Aren't you essentially restating the article's thesis?

I don't want to read an article online that's a PDF for largely the same reason that I don't want to print the web version of the same article rather than a PDF. It's generally going to be clunky. The print page size and dimensions are not going to be my screen/window size and dimensions. I certainly don't want to read two- or three-column text on screen, which may require zooming in and out and scrolling back and forth on the same "print" page. And God help me if I'm trying to do that on my phone or iPad mini.

The article isn't saying "PDF is terrible and nobody should ever use it"; it's saying "PDFs were meant for specific applications and in nearly all circumstances, online reading is not it."

Re:PDF: Still unfit for human consumption, 20 years later by lmm on Tuesday August 11, 2020 @02:17AM (#24117637)
People who use PDFs generally do it because they want to have a fixed layout. If you tell those people to use HTML, they'll find a way to produce a non-reflowable webpage.
Re:PDF: Still unfit for human consumption, 20 years later by bryanrasmussen on Tuesday August 11, 2020 @03:30AM (#24118024)
Or they use them because they have a publishing flow implemented somewhere in the byzantine processes of their company that spits out a nice looking pdf at the end (and maybe a crappy looking 1999 html document)
Re:PDF: Still unfit for human consumption, 20 years later by chipotle_coyote on Tuesday August 11, 2020 @12:22PM (#24122108)
That's actually been more my experience, yes. :)
Re:PDF: Still unfit for human consumption, 20 years later by dragonwriter on Wednesday August 12, 2020 @09:55AM (#24132092)
People who use PDFs often do it because the content they use it for is of a type (often a series) that has long been produced in PDF, and the reasoning for that in many cases is because in the 1990s people would print it out and read it. In many cases, that's not how people use it now, but PDF is still used because that's the way it has always been done.
Re:PDF: Still unfit for human consumption, 20 years later by feteru on Wednesday August 12, 2020 @10:44AM (#24132502)
I use PDFs for engineering drawings of mechanical parts. It's been done for a long time and is a good fit. There's a specific sheet format and scale, and is meant to be able to be printed easily
Re:PDF: Still unfit for human consumption, 20 years later by jfk13 on Wednesday August 12, 2020 @10:50AM (#24132567)
...although you need to beware of printouts getting silently scaled. It's really common, when someone asks to print (e.g.) an A4-sized PDF to A4 paper, for the printer driver to rescale it so that the entire document (including margins) fits within the (slightly smaller) printable area of the device. "Shrink to fit [within printable area]" seems to be a common default setting.

(If you're using PDFs for precisely-scaled engineering drawings, I expect you're well aware of this and have a workflow that avoids scaling, but I see people trip over it all too often.)

Re:PDF: Still unfit for human consumption, 20 years later by dragonwriter on Wednesday August 12, 2020 @11:06AM (#24132766)
> I use PDFs for engineering drawings of mechanical parts. It's been done for a long time and is a good fit.

Good for you, but that doesn't change that most of the uses of PDF on the web aren't for applications like that.

Re:PDF: Still unfit for human consumption, 20 years later by scelerat on Tuesday August 11, 2020 @12:02PM (#24121857)
Granted, but a surprising number of people (still, in 2020) envision a very static, print-like experience for all web pages. i.e. yes, they "want" a fixed layout but in many cases their reasoning is mis- or uninformed.
Re:PDF: Still unfit for human consumption, 20 years later by GoblinSlayer on Wednesday August 12, 2020 @09:36AM (#24131935)
They use PDFs because of five monkeys experiment.
Re:PDF: Still unfit for human consumption, 20 years later by KineticLensman on Wednesday August 12, 2020 @10:04AM (#24132164)
This experiment, which apparently never happened [0], just means 'because tradition'.

[0] http://www.throwcase.com/2014/12/21/that-five-monkeys-and-a-...

Re:PDF: Still unfit for human consumption, 20 years later by GoblinSlayer on Wednesday August 12, 2020 @11:34AM (#24133081)
Serious documents are traditionally published in pdf format, that's why they are published in pdf format.
Re:PDF: Still unfit for human consumption, 20 years later by hhas01 on Tuesday August 11, 2020 @01:10PM (#24122764)
”> The [PDF] format is intended and optimized for print. It’s inherently inaccessible, unpleasant to read, and cumbersome to navigate online.”

PDF format is perfectly capable of holding structured text and other machine-readable/accessibility data, alongside the print-ready representation. Ask the developers of document authoring tools (starting with MS Office) and the various PDF generation libraries why they don’t include all that data as standard.

One can argue the appropriateness of a print-derived format in a constantly fluid digital world, but it does what it was designed to do and does it pretty well, and it could provide a lot more if developers and users could be bothered to do it.

And yes, HTML is its own exercise in awfulness that is equally bad at everything. I’d rather set my feet on fire that propagate that horror further.

Honestly, what we really need is a 21st-century Donald Knuth. I only wish she’d hurry up.

Re:PDF: Still unfit for human consumption, 20 years later by alanburger88 on Thursday August 13, 2020 @01:16PM (#24145693)
The use of PDF's is usually for it's immutability. Not all PDF's are created equal. Some are harder to change than others - but there are many tools and options to change them, if you need to.

However, it is possible to turn HTML5 into statement-of-record documents (Not PDF's),and make them immutable, encrypted and authenticated. A HTML5 document can have the features we need from PDF (immutability, encryption, authentication, pixel perfect print, etc.) while still allowing the resulting document to be interactive and responsive (work well mobile & web) in nature.

Effectively the best of both worlds.

Re:PDF: Still unfit for human consumption, 20 years later by mavhc on Tuesday August 11, 2020 @06:14AM (#24118840)
Tagged PDFs that allow reflow have existed for at least 8 years
Re:PDF: Still unfit for human consumption, 20 years later by chipotle_coyote on Tuesday August 11, 2020 @12:31PM (#24122223)
Properly tagging a PDF involves marking up literally every element in the document in a similar way that you'd mark up that document in HTML (e.g., everything must be described semantically; the tags are really designed for accessibility reasons and for helping screen readers). Sometimes it might be the right choice, but this doesn't change my basic argument: if the final destination of your document is intended to be a web site, then HTML is almost always the right delivery format.
Re:PDF: Still unfit for human consumption, 20 years later by gjvc on Tuesday August 11, 2020 @06:40AM (#24118976)
interesting. what's that format / feature called?
Re:PDF: Still unfit for human consumption, 20 years later by michieldotv on Tuesday August 11, 2020 @07:15AM (#24119148)
It's called just that: Tagged PDF. It was added to the ISO spec quite some time ago and allows you to annotate your documents structurally.
Re:PDF: Still unfit for human consumption, 20 years later by JadeNB on Monday August 10, 2020 @05:59PM (#24114512)
> What I don't get is the suggestion that PDF should be replaced by HTML.

What I don't get is the authors' assumption that replacing with HTML means replacing with HTML that correctly uses "color, contrast, document structure, tags, and much more", leaves users in "a familiar context", is not "excruciatingly slow to load both on desktop and mobile", correctly employs "chunking, using bullets, subheadlines, anchor links, and accordions", and "show[s] a standard navigation", as opposed to … all that stuff that's actually out there. I don't know about the authors, but, if you give me a choice between a typical web site's idea about the flashy, JavaScript-heavy, animated, ad-laden way that I want to consume information on one hand, and a PDF on the other hand, then I'll take the PDF every time.

Re:PDF: Still unfit for human consumption, 20 years later by Voliokis on Wednesday August 12, 2020 @02:48PM (#24135397)
I have to agree. People will have to pry PDF's out of my cold, dead fingers. No way in hell am I going to ever switch to a web-based format. A PDF means that I know what I'm getting. A static document that can't do any fuckery around preventing me from copying text or doing their own weird implementation of scrolling or breaking back/forwards navigation or anything else that modern websites love to do. If I get a PDF, I know what it is and the tools that I use to consume that PDF don't change just because the author of that PDF happened to find a new PDF framework and was so blinded by the shinyness that he just had to implement as much of it as he could. No, a PDF is a PDF. My PDF readers all behave in a consistent way and give me the exact same functionality and the same interface and show consistent performance behavior, whether it's a PDF from the year 2000 or a PDF from today, regardless of what eccentric tastes the author might have, and the author has zero say in how I interact with the PDF.

That's how I want it. I'm tired of new formats and new frameworks and new tools releasing every single year that pretend they're better. The best thing about PDF is that it doesn't change. Yes, whatever, Adobe adds new features, but any PDF ebook I download has nothing to do with that, nor that PDF scientific paper I downloaded this morning. I don't want random authors to be able to dictate how I interact with a medium, because the vast majority of them are, frankly, idiots when it comes to this domain and they have no sense of good user interface design.

Re:PDF: Still unfit for human consumption, 20 years later by JadeNB on Wednesday August 12, 2020 @03:00PM (#24135526)
> A static document that can't do any fuckery around preventing me from copying text or doing their own weird implementation of scrolling or breaking back/forwards navigation or anything else that modern websites love to do.

You can, and I do, hope for this, and it's often what you get, but it's not at all guaranteed by the format. For example, PDF allows JavaScript: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdf... . I think most readers other than Acrobat probably don't support it (which, of course, Adobe spins as a feature of Acrobat!), and not too many PDFs require it—although I do find that fillable PDFs, including from hopefully capable authors like the IRS, can be very finicky in anything other than Acrobat—but I fear it's only a matter of time until it becomes as difficult to "browse the PDF without JavaScript" as it currently is to browse the web without it.

> I don't want random authors to be able to dictate how I interact with a medium

On this score you're out of luck even now—if the author, intentionally or unintentionally, did a bad job creating the PDF, you're out of luck. This is one area where I'll give HTML the win: it is, or can be, good at things like dynamic reflow, whereas PDF not only isn't but, I believe, effectively can't be.

Re:PDF: Still unfit for human consumption, 20 years later by Voliokis on Thursday August 13, 2020 @06:09AM (#24141697)
> On this score you're out of luck even now—if the author, intentionally or unintentionally, did a bad job creating the PDF, you're out of luck. This is one area where I'll give HTML the win: it is, or can be, good at things like dynamic reflow, whereas PDF not only isn't but, I believe, effectively can't be.

I'm not sure what you mean. I've never had an ebook or paper have any influence on how my PDF reader works or how I interact with it.

Re:PDF: Still unfit for human consumption, 20 years later by JadeNB on Friday August 14, 2020 @05:52PM (#24163742)
> I'm not sure what you mean. I've never had an ebook or paper have any influence on how my PDF reader works or how I interact with it.

I was responding to a quote which I think, in retrospect, I misread:

> > I don't want random authors to be able to dictate how I interact with a medium

To me, random authors of PDF files do dictate how I interact with the content of the PDF file—I'm not sure whether or not to call that "the medium"—because they lay it out, and there is very little that I can do after the fact if, for example, I don't like their line breaks or their text layout, or if I want to be able to do a proper full text search, or cut and paste, etc. etc.

However, on re-reading (including your response above), it seems clear that what you meant, and what I should have understood, was not about being locked into the author's presentational choices, but about the UI of the PDF reader itself. I agree that what I said is irrelevant to this.

Re:PDF: Still unfit for human consumption, 20 years later by msla on Tuesday August 11, 2020 @12:57AM (#24117294)
> In my opinion, hopefully more humble than the author's, PDF's main downside is the remarkable unevenness of the quality of the creation and reading tools, considering its supposedly "reads everywhere" nature.

Improving the tooling will make PDFs load faster and (possibly) be easier to navigate. (Unless they're JPEGs stitched together in a booklet, in which case they're pretty much hopeless from a navigation standpoint in any event.) It won't, however, address the core concern, which you touch on here:

> What I don't get is the suggestion that PDF should be replaced by HTML. The purposes of the two formats are basically orthogonal and replacing one with the other is doomed to failure. The author's argument seems more akin to "print-layout documents should be replaced by hypertext," and perhaps this is true in some cases, but it's definitely a different matter and one that the author's arguments don't really support that well.

I mostly agree with you:

I think the arguments support it well enough: PDFs are sized for print, laid out for print, and fundamentally do not flow. HTML, despite the best efforts of some, is still malleable enough you can have a single page which gracefully resizes itself to a range of screens, a minor technical miracle the march of UX progress still hasn't fully taken from us.

My response to the author is this:

PDF looks the same on the screen as it does on the page. That is its blessing. That is its curse. Some people absolutely demand that as a hard requirement, and will not brook anything which adapts to different environments. If they didn't have PDFs, they'd go back to making websites where all of the content is in a series of JPEG images scaled to look right on their screens. I've seen it happen. Therefore, replacing PDF with HTML is not socially viable. It doesn't solve the "soft" problem, which is a harder constraint than any technical problem.

Re:PDF: Still unfit for human consumption, 20 years later by TheOtherHobbes on Wednesday August 12, 2020 @09:35AM (#24131925)
It's not just that some people demand it, it's that some PDF use cases require it. PDF is often used for semi-complex forms, and while of course you can design forms that reflow for mobile/HTML, the results are often... not great.

The meta-UX point is that a fixed layout allows you to use spatial relationships to indicate how fields are related. This is such an intuitive thing even inexperienced or amateur designers tend to do it by default.

Reflow doesn't allow this, and with some forms, reflow can literally make the layout - and the content - incomprehensible. There are workarounds, but it's often impossible to create a dynamic design that has the same mix of information density and spatial hinting as a static layout.

Re:PDF: Still unfit for human consumption, 20 years later by bryanrasmussen on Tuesday August 11, 2020 @03:34AM (#24118053)
>PDF's main downside is the remarkable unevenness of the quality of the creation and reading tools

I can't help but think that HTML's third downside is the remarkable unevenness of the its quality.

The second downside is the remarkable unevenness of the quality of the CSS that is used with it.

The primary downside is the remarkable dangerousness of much of the JavaScript that is found bound to the HTML, that if turned off means that you often see a message that this site requires you turn on our dangerous JavaScript. At the best you end up back with the second and third downsides moving up a level.

on edit: perhaps a little facetious, but given the problems with quality found with websites that probably most of us are aware of it seems a bit much to complain about the quality of PDF. Maybe this is just some silly whataboutism on my part though.

Re:PDF: Still unfit for human consumption, 20 years later by dvdkhlng on Tuesday August 11, 2020 @06:38AM (#24118967)
> The primary downside is the remarkable dangerousness of much of the JavaScript that is found bound to the HTML.

Are you aware that PDF format has also featured JavaScript support (and related vulnerabilities) for a long time now [1]?

[1] https://us-cert.cisa.gov/ncas/alerts/TA09-133B

Re:PDF: Still unfit for human consumption, 20 years later by bryanrasmussen on Tuesday August 11, 2020 @08:26AM (#24119575)
yes, although I forgot about it, never seem to have a use for it myself.
Re:PDF: Still unfit for human consumption, 20 years later by jabroni_salad on Tuesday August 11, 2020 @09:51AM (#24120212)
The finance industry loves it. Their bureaucracy ran on documents, and it still does, but now those documents can run code.
Re:PDF: Still unfit for human consumption, 20 years later by bXVsbGVy on Wednesday August 12, 2020 @11:20AM (#24132919)
> You may remember that this played a strange role in Obama's birth certificate some years back

Just to clarify, the issue with the compression algorithm used by the scanner, not with the PDF format itself.

There a few videos of David Kriesel explaining the bug for the curious: https://www.youtube.com/watch?v=c0O6UXrOZJo

Re:PDF: Still unfit for human consumption, 20 years later by bla3 on Tuesday August 11, 2020 @08:29AM (#24119589)
> Web browsers have mostly switched over to using pdf.js

As far as I know, Firefox is the only browser that uses pdf.js. Chrome uses PDFium, Safari uses the macOS system pdf libraries, and Edge probably does what Chrome does.

Re:PDF: Still unfit for human consumption, 20 years later by leephillips on Tuesday August 11, 2020 @09:58AM (#24120282)
I use qutebrowser, where the choices are: download or pdf.js.

I guess the extension to use pdf.js with Chrome is pretty popular.

Re:PDF: Still unfit for human consumption, 20 years later by leephillips on Monday August 10, 2020 @02:44PM (#24112589)
Interesting observations, but I don’t understand why you distinguish between PDF and hypertext, since of course PDF can contain hypertext.
Re:PDF: Still unfit for human consumption, 20 years later by jcrawfordor on Monday August 10, 2020 @02:46PM (#24112618)
That might be part of the problem. :)

Really though I might not be using the best term, esp. with the definition of hypertext being one of those things that's a little historic now. I'm mostly just comparing between print formats and formats where layout is done by the viewer to reflect user preferences (which is kind of a dead concept with HTML anyway, but...)

Re:PDF: Still unfit for human consumption, 20 years later by cryptonector on Monday August 10, 2020 @02:43PM (#24112574)
Not that the specification for the Web is less complex than that of PDF...
Re:PDF: Still unfit for human consumption, 20 years later by GoblinSlayer on Wednesday August 12, 2020 @09:58AM (#24132115)
There are simplified profiles: https://www.w3.org/TR/xhtml-basic/
Re:PDF: Still unfit for human consumption, 20 years later by akx on Tuesday August 11, 2020 @09:56AM (#24120262)
> heritage to PDF's basis in the Photoshop PSD format

Is that really so? PSDs are through and through binary, while PDFs smell more like PostScript with extras...

Re:PDF: Still unfit for human consumption, 20 years later by simonh on Tuesday August 11, 2020 @10:17AM (#24120466)
Quite right, PDF is mostly a 'flattened' subset of the PostScript format containing tokenised and interpreted data generated from the PostScript code, plus the subset of assets such as fonts that are actually used, in a bundle structure.

It also has some optimisations for it's specific use case, such as that individual pages are completely described independently, whereas in PostScript the code generating any page can affect the content of any succeeding page. This is why in PDF files you can easily re-order pages or efficiently jump directly to and render any page.

Re:PDF: Still unfit for human consumption, 20 years later by jondubois on Tuesday August 11, 2020 @02:44AM (#24117766)
The purposes of HTML and PDF are not orthogonal, there is a great deal of overlap.

The real advantage of PDF is that the images which are used inside the document are bundled into the same file... Whereas HTML has historically required the image files to be loaded from elsewhere which made it not portable. That said, now with HTML, you can define images with base64 data, so it could in fact replace PDF.

Re:PDF: Still unfit for human consumption, 20 years later by solarmist on Tuesday August 11, 2020 @02:51AM (#24117808)
The real advantage of PDF is that it is a final form document format. Truly WYSIWYG. Which is literally the anthesis of HTML which is completely separated (theoretically) from the display/formatting.
Re:PDF: Still unfit for human consumption, 20 years later by shkkmo on Tuesday August 11, 2020 @01:38PM (#24123168)
> Truly WYSIWYG.

PDFs are treated that way, but it isn't really true. Due to the complexity of the format, there are many PDFs that will display differently in different viewers.

Re:PDF: Still unfit for human consumption, 20 years later by solarmist on Tuesday August 11, 2020 @03:01PM (#24124434)
Sure, but in comparison to other formats and especially HTML it is 90%+ there.
Re:PDF: Still unfit for human consumption, 20 years later by jondubois on Tuesday August 11, 2020 @03:53PM (#24125174)
I don't agree with this view. HTML with CSS can support either fixed or fluid (and responsive) layouts... So it supports all the features required by PDF and more.

I don't see a problem with giving the document creator the option to go with a fluid or fixed layout and make the software default to fixed layout.

Re:PDF: Still unfit for human consumption, 20 years later by solarmist on Tuesday August 11, 2020 @06:01PM (#24126545)
"Supporting all the features required" and being able to rely on them on most platforms and in most readers are a very different thing.

HTML and CSS theoretically have these properties, but if you asked someone in the publishing industry to layout a book with them they would either quit on the spot or hate you until their dying breath. That or they're a masochist and want to see if they could actually do it because it is theoretically possible.

Re:PDF: Still unfit for human consumption, 20 years later by tabtab on Tuesday August 11, 2020 @05:05PM (#24125959)
Coordinate-based HTML/CSS implementation is too inconsistent across implementations and versions to be relied upon, especially with regard to fonts.

What are some good WYSIWYG vector standards, including the font department? It could be useful for a GUI markup standard also so that we can have platform-neutral GUI's and GUI's over HTTP.

The server side may still have a dynamic/flow layout engine, but calculated coordinates are sent to the client, keeping the client simpler and more predictable.

Re:PDF: Still unfit for human consumption, 20 years later by GoblinSlayer on Wednesday August 12, 2020 @10:16AM (#24132256)
But most publications don't need WYSIWYG.
Re:PDF: Still unfit for human consumption, 20 years later by solarmist on Thursday August 13, 2020 @11:35AM (#24144429)
Need is a relative term. Talk to any designer/artist who’s published something and they’ll disagree with you all day.
Re:PDF: Still unfit for human consumption, 20 years later by nyanpasu64 on Monday August 10, 2020 @05:56PM (#24114480)
> Web browsers have mostly switched over to using pdf.js to render PDFs, which is completely satisfactory for documents that consist of text or images (like scanned documents)

Except pdf.js is not satisfactory. Every now and then I come across a PDF file where text is invisible, because Firefox uses a blank font instead of an external font.

Re:PDF: Still unfit for human consumption, 20 years later by avasthe on Monday August 10, 2020 @11:42PM (#24116969)
> What I don't get is the suggestion that PDF should be replaced by HTML

If it is a limited subset, I am okay with it. With increasing ubiquity of mobile devices, reflowing PDF is hard. I rather like EPUB these days. Which consists of XHTML. And reader support is also fairly ubiquitous with many Open Source software supporting Epub.

Re:PDF: Still unfit for human consumption, 20 years later by Mikhail_Edoshin on Tuesday August 11, 2020 @12:03PM (#24121875)
I've read XPS specs [1] and from the looks of it it's a very sane format, which I cannot say about other Microsoft XML formats I've seen (such as MS Word XML). I'm not that familiar with PDF internals, but I really doubt XPS has much inessential complexity. And, being a new format, it has zero legacy issues. The common complaint against PDF is that it's hard to extract text from it, but with XPS it seems to be rather easy and can be done with the standard XML toolchain. Besides, it has a good support for document structure: it has not only document outline, but also stories, sections, tables, lists, figures, etc.

http://www.ecma-international.org/publications/standards/Ecm...

Re:PDF: Still unfit for human consumption, 20 years later by tonyedgecombe on Wednesday August 12, 2020 @03:14AM (#24129382)
I've read both specs and the PDF one leaves you feeling everything is somewhat vague and waiting to trip you up.

It doesn't help that nobody in Adobe could say no to every new feature that might possibly help to sell another upgrade to Acrobat.

Re:PDF: Still unfit for human consumption, 20 years later by Akronymus on Tuesday August 11, 2020 @10:05AM (#24120353)
It'd be awesome if it were possible to host (La)TeX files directly over the web.

Altough, for most people a non wysiwyg editor is too cumbersome.

Re:PDF: Still unfit for human consumption, 20 years later by dash2 on Tuesday August 11, 2020 @10:08AM (#24120376)
This would be a horrible nightmare. LaTeX is an atrocious mess that deserves to die. Source: personal experience trying to build a decent programmatic table creator for LaTeX.
Re:PDF: Still unfit for human consumption, 20 years later by CryoLogic on Tuesday August 11, 2020 @10:42AM (#24120745)
Most of the publishing industry still uses .docx, some of the more advanced publishers have moved over to ASCIIDoc - personally I think Markdown is the easiest to use for a big project (having written and published a technical book prior).
Re:PDF: Still unfit for human consumption, 20 years later by floatboth on Tuesday August 11, 2020 @11:55AM (#24121756)
Except for scientific publishing, where LaTeX is king.
Re:PDF: Still unfit for human consumption, 20 years later by bjoli on Tuesday August 11, 2020 @12:35PM (#24122286)
Most people I know use org mode with inline latex for stuff that needs to be latex.
Re:PDF: Still unfit for human consumption, 20 years later by Akronymus on Tuesday August 11, 2020 @10:30AM (#24120622)
Hence the (La) part being optional. Normal TeX isn't bad at all, from what I can see.
Re:PDF: Still unfit for human consumption, 20 years later by jgalt212 on Tuesday August 11, 2020 @10:04AM (#24120342)
> Scanners are often an extreme example

I have yet to find an Android scanner that doesn't make pdfs that weight less than 350K per page. I have tried MS Lens, CamScanner, and a few others I cannot recall at this time.

Has anyone had success in this arena?

Re:PDF: Still unfit for human consumption, 20 years later by kanox on Tuesday August 11, 2020 @04:17AM (#24118284)
What would it take to replace PDF with a zipped html?

As far as a I know the svg format has comparable capabilities for graphics, all that is missing is a "page model" for html which would have to be invented.

Re:PDF: Still unfit for human consumption, 20 years later by pbsurf on Tuesday August 11, 2020 @10:29AM (#24120610)
One way that SVG could be used for multipage documents is with a convention that the top-level <svg> tag is the document and child <svg> tags are the pages - this is what I do in my app. I also use the fact that gzip files can be created with independently decompressible blocks to create svgz files with page-level random read access [1].

But another barrier is that browsers refuse to support SVG fonts. One supposed reason for this, the lack of hinting support in SVG fonts, is less relevant now with high DPI displays - macOS no longer does hinting at all I believe. The additional effort to support SVG fonts is really minimal [2], so it seems strange that it's intentionally omitted.

[1] https://github.com/styluslabs/ulib/blob/master/miniz_gzip.h

[2] https://github.com/styluslabs/usvg

Re:PDF: Still unfit for human consumption, 20 years later by chriswarbo on Tuesday August 11, 2020 @05:16AM (#24118583)
Re:PDF: Still unfit for human consumption, 20 years later by dragonwriter on Wednesday August 12, 2020 @10:59AM (#24132677)
> What would it take to replace PDF with a zipped html

EPUB. It's already zipped HTML and supports fixed layout.

Or, perhaps more simply, maybe just HTML + paged.js.

> all that is missing is a "page model" for html which would have to be invented.

CSS paged media is already a thing. What else do you need?

Re:PDF: Still unfit for human consumption, 20 years later by achr2 on Tuesday August 11, 2020 @11:18AM (#24121195)
There are already page-break attributes for CSS.
Re:PDF: Still unfit for human consumption, 20 years later by Bombthecat on Tuesday August 11, 2020 @05:30AM (#24118659)
Maybe the author meant a html DSL language for documents? A bit like, i think, the ebook format i can't remember.
Re:PDF: Still unfit for human consumption, 20 years later by phre4k on Tuesday August 11, 2020 @06:30AM (#24118930)
Epub uses lots of XML.
Re:PDF: Still unfit for human consumption, 20 years later by dragonwriter on Wednesday August 12, 2020 @11:04AM (#24132737)
> Epub uses lots of XML.

EPUB3 uses an XML packaging document, and the XML serialization of HTML5, so it doesn't really use lots of XML as opposed to HTML.

Re:PDF: Still unfit for human consumption, 20 years later by greggman3 on Tuesday August 11, 2020 @08:37AM (#24119629)
I would argue essentially print is dead or should die. I read things one my phone, my tablet, and various monitor sizes with various sized windows. I think, though could be wrong, that's true for most people on the planet in 2020. Even poor people on the other side of the world probably read stuff on feature phones if nothing else.

The world has also gotten more international and a PDF designed for US Letter Size doesn't fit A4 paper used in many other countries.

PDFs is left over from the early 90s when print was still the main way we communicated. We didn't yet email each other, at least not the masses. We didn't have lots of different devices. Our screens were low-res so it was much easier to read paper than screens (some people might still find that true). Heck, when PDF came out in 93 most PCs still ran DOS.

Now-a-days though does nothing bet get in the way. Sure, some rare PDFs can be reflowed but basically PDF wasn't designed for that and it's certainly not used that way. We need a format that re-flows for all the various devices we might be reading something on. For the most part HTML seems to fit that bill. Maybe a version with better image/diagram embedding would be good but we arguably do not need something brand new from scratch.

TL:DR; the world changed. PDF is designed for the the world from 30yrs ago. May it rest in peace.

Re:PDF: Still unfit for human consumption, 20 years later by bepvte on Monday August 10, 2020 @03:03PM (#24112799)
I agree with the size complaint. Its unbelievably annoying when I have to embed a bitmap image in a pdf and turn some 75kb jpeg into a 26mb pdf for compat reasons
Re:PDF: Still unfit for human consumption, 20 years later by enriquto on Monday August 10, 2020 @05:49PM (#24114411)
This sounds like a very bad software for pdf creation. Notice that the pdf standard contains the jpeg and the png formats as subsets, so you can embed such images directly into a pdf file.
Re:PDF: Still unfit for human consumption, 20 years later by hnick on Monday August 10, 2020 @10:13PM (#24116543)
Yes, literally just copy everything between stream/endstream for a DCTDecode image and you can save it as a JPEG. Sounds like the tool's creator didn't know about that encoding.