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 spec is pretty amazing and very readable, for anyone wondering if they should look into it. My top tip for understanding PDFs is to take one that you have a decompress it then open with a text editor. mutool clean -d in.pdf out.pdf What you'll find is very approachable for a developer. It's a tree of nodes of different types. Some are dictionaries, some are streams of other data. All of them are documented in the…
Ask HN: Why is the PDF format so inaccessible?
71–80 of 109 posts
Re: Ask HN: Why is the PDF format so inaccessible?
#72I had to recreate some PDFs at work that were created by "iText by Lowagie" which must have been a java library at the time. I redid it with the FPDF library for php, and it worked out fine. I tried some new features of tcpdf, and it wasn't much work to convert. Using inkscape to make an EPS out of an svg was also challenging. I know that postscript and PDF is based on a forth stack machine, if I really had to get th…
Re: Ask HN: Why is the PDF format so inaccessible?
#73Most of the best, most comprehensive PDF libraries are written for Java. There are libraries for other languages but they tend to be incomplete or flawed. There’s also some great paid libraries for C#, but if you want free, I’d recommend looking into Apache PDFBox.
I recently had this revelation. I remember how easy it was doing this in java a decade ago...and how underwhelmed I was finding a library to achieve the same in Python. There seems to be no clear winning library in Python and some havent been maintained for years on.
Re: Ask HN: Why is the PDF format so inaccessible?
#74The fact that you have to pay to see the standard should tell you everything you need to know.
Re: Ask HN: Why is the PDF format so inaccessible?
#75My previous startup worked with parsing PDFs, trying to apply NLP to the texts within PDFs - extracting titles, paragraphs, tables, bullet points etc. Oh my that was a nightmare. Sure we were doing difficult things, so that made us unique, but it was a slog. Working with different dimensions, pages upside down, sentences spanning across multiple pages etc etc. I've also recently worked on a small tool called scholars…
A printing format is something finished, that you don't go back from. Or you can try to go back from, but you get a lot of pain in return. Hence your previous startup problems.
Re: Ask HN: Why is the PDF format so inaccessible?
#76As for libraries, it seems PDFKit is the dominant one. https://github.com/foliojs/pdfkit As to why it’s so inaccessible…because Adobe created this monstrosity to do just about everything. Text, fonts, vector graphics, raster graphics, forms, color spaces, JavaScript, encryption, signatures, 3D artwork, video, audio, Flash, and probably more. It’s bonkers as to what it can possibly include, and it was developed during…
You can embed flash in PDF?!?
Re: Ask HN: Why is the PDF format so inaccessible?
#77The 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…
When did this happen? I swear some years ago I looked and it was a $300 standard?
Re: Ask HN: Why is the PDF format so inaccessible?
#78Earlier quoted context omitted.
The PDF specification, hosted by Adobe, free for you to download… (pay attention, this is a big PDF) https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/p... Adobe specifically negotiated to make this freely available. From the document: This document you are now reading is a copy of the ISO 32000-1 standard. By agreement with ISO, Adobe Systems is allowed to offer this version of the ISO standard as a free PD…
> Very straightforward format. The spec is 756 pages. For the 2008 spec. How is that very straightforward? My god. Even the 2003 version clocks in at 696 pages and apparently includes "Interactive Forms", "Movies" and "Sounds". Here's the link https://web.archive.org/web/20101214132912/http://partners.a... How is that _straightforward_?
I do agree that writing a reader would be brutal.
Re: Ask HN: Why is the PDF format so inaccessible?
#79Create blank pdf with Adobe as your base, then add what you want to it using pdfmarks and distilling.
I spent a very, very long time diving into the rabbit hole that is pdf to come to this conclusion.
There are lots of libraries out there, but none I came across that met my needs would do named destinations, for one example. I think there might be some very expensive ones that might, but pdfmarks will get you sorted.
Here is the manual, if you search around there are few other references.
https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/...
Re: Ask HN: Why is the PDF format so inaccessible?
#80As for libraries, it seems PDFKit is the dominant one. https://github.com/foliojs/pdfkit As to why it’s so inaccessible…because Adobe created this monstrosity to do just about everything. Text, fonts, vector graphics, raster graphics, forms, color spaces, JavaScript, encryption, signatures, 3D artwork, video, audio, Flash, and probably more. It’s bonkers as to what it can possibly include, and it was developed during…
You can embed flash in PDF?!?
This part of the reason it's such a security nightmare.