Live data from Hacker News

Ask HN: Why is the PDF format so inaccessible?

news.ycombinator.com

41–50 of 109 posts

Re: Ask HN: Why is the PDF format so inaccessible?

#41

Earlier quoted context omitted.

Hello. My project is essentially a replacement for a small subset of LaTeX. I use LaTeX for a lot of my own work but the massive amount of converters going from LaTeX to PDF is the reason I started this project in the first place.

Understood. Is your project open source? I'm curious to see what the solution looks like when you sort it out. I feel like there must be a lot of heavy lifting (but also a lot of cruft if all you care about is a narrow case) being done by pdflatex to get to an output pdf. It will be interesting to see what the minimal solution looks like.

Hello. It will be open source once I release it -- I am hoping by August, since I have the summer off by a stroke of luck.

Re: Ask HN: Why is the PDF format so inaccessible?

#42
post #32

The PDF spec is officially available here: http://www.adobe.com/go/pdfreference There’s also this book which provides a good introduction and overview and is useful for understanding how the format works (although the PDF reference itself is pretty decent too, as far as specs go): https://www.oreilly.com/library/view/developing-with-pdf/978... (You can find a PDF copy if you look around.) EDIT: There’s also https://w…

> The PDF spec is officially available here

I'm afraid that's the old 2008 spec, which specifies versions up to PDF 1.7.

The current standard is ISO 32000-2, released in 2020, which specifies PDF-2.0. I'd love to get my hands on it, but alas it's paywalled.

Re: Ask HN: Why is the PDF format so inaccessible?

#43
post #42
post #32

The PDF spec is officially available here: http://www.adobe.com/go/pdfreference There’s also this book which provides a good introduction and overview and is useful for understanding how the format works (although the PDF reference itself is pretty decent too, as far as specs go): https://www.oreilly.com/library/view/developing-with-pdf/978... (You can find a PDF copy if you look around.) EDIT: There’s also https://w…

> The PDF spec is officially available here I'm afraid that's the old 2008 spec, which specifies versions up to PDF 1.7. The current standard is ISO 32000-2, released in 2020, which specifies PDF-2.0. I'd love to get my hands on it, but alas it's paywalled.

PDF 2.0 isn’t very relevant currently, because there’s not a lot of software yet that fully supports it. On the other hand, there also hasn’t changed all that much since PDF 1.7. In any case, for generating PDFs it’s best to stick with 1.7 (or earlier) for the time being.

This page lists the major changes: https://www.loc.gov/preservation/digital/formats/fdd/fdd0004...

The FDIS of PDF 2.0 is available here for those who are curious: https://cdn.standards.iteh.ai/samples/75839/ad216d84afd34f96...

I don’t know if there are any significant changes between the FDIS and the published version, but it’s better to assume there may be some.

Re: Ask HN: Why is the PDF format so inaccessible?

#44

It's old, proprietary, modeled after the PostScript printer control language, from an era before XML, and never had the intention of being open.

> It's old, proprietary, modeled after the PostScript printer control language, from an era before XML, and never had the intention of being open.

I have the impression you have no direct contact, experience, or first-hand knowledge with PDF.

If age mattered (which it doesn't) then PDF's latest update was published on 2020, which is far fresher than XML's spec.

Nevertheless, it's absurd to compare a document format with a markup language. at most, you should compare ooxml with PDF, if that comparison mattered. If it did then you'd certainly be surprised when you'd discover that PDF is far simpler and more readable and easier to reason about than ooxml+XML.

Nevertheless what makes PDF complex is that it has about a dozen versions which support everything and the kitchen sink, including incremental document updates which can also be comprised of ad-hoc version updates.

Re: Ask HN: Why is the PDF format so inaccessible?

#46
post #27

Wouldn't that be nice. Not directly answering your question, but I suppose the solution is to just pick the closest thing and convert. HTML&CSS being the most full-featured/generic. Markdown simplest for basic 'word processing'. Latex good for more advanced such cases. Images good for others. Maybe ePub would suit your 'typographical' needs (I think it's a lot more open than PDF, and itself HTML based)?

> Not directly answering your question, but I suppose the solution is to just pick the closest thing and convert. HTML&CSS being the most full-featured/generic.

PDFs specify fixed format. You need some out-of-band info to generate PDFs from HTML.

> Maybe ePub would suit your 'typographical' needs (I think it's a lot more open than PDF, and itself HTML based)?

EPub is basically a zip with HTML+CSS+some metadata. Newer versions were based on HTML5 while older ones were based on XHTML.

Re: Ask HN: Why is the PDF format so inaccessible?

#47
post #32

The PDF spec is officially available here: http://www.adobe.com/go/pdfreference There’s also this book which provides a good introduction and overview and is useful for understanding how the format works (although the PDF reference itself is pretty decent too, as far as specs go): https://www.oreilly.com/library/view/developing-with-pdf/978... (You can find a PDF copy if you look around.) EDIT: There’s also https://w…

I've always found it amusing from a "bootstrapping" perspective that the PDF spec is itself a PDF. That said, if you're only writing and not reading existing ones, it's as straightforward or as complex as you want to make it. I wrote a little program many years ago to convert plaintext to PDF in <1kLoC of C --- and its output was actually often many times smaller than what the commercial PDF-generators do, because I…

Please make your code available on github!

Re: Ask HN: Why is the PDF format so inaccessible?

#48
post #18

From the title, I thought you meant inaccessible as in providing little to no affordances for users of assistive technology (you know, accessibility, a11y… alt text, semantic markup, that sort of thing)

Ah, sorry. That's not what I meant -- in hindsight it does feel a bit clickbaity. But it doesn't look like there's any way for me to edit the title on HN.

Re: Ask HN: Why is the PDF format so inaccessible?

#49
post #32

The PDF spec is officially available here: http://www.adobe.com/go/pdfreference There’s also this book which provides a good introduction and overview and is useful for understanding how the format works (although the PDF reference itself is pretty decent too, as far as specs go): https://www.oreilly.com/library/view/developing-with-pdf/978... (You can find a PDF copy if you look around.) EDIT: There’s also https://w…

Thank you for the books and the suggestions. I understand the warnings since I did not really provide any information on my project in the post. Essentially, I am writing a batteries included language to act as a replacement for LaTeX (or at the moment, a small subset of it). I cannot use any existing library since they do not work for my own PL and I do not want to go through PostScript -> PDF since the reason I started this project was because the time delay between saving a .tex file and seeing the output on my pdf reader was becoming very long.
Post reply on HN