News for hackers. Stuff that matters.
Re:Show HN: I am building a new Python library to read/write... by newsclues on Thursday November 17, 2022 @08:02PM (#33648387)
PDF has always seemed to be a janky Adobe product.

Should a modern, open version of PDF be created knowing that how it evolved from the original concept in 1991? Shouldn't we at some point say, we need to start over and created PDF2?

Re:Show HN: I am building a new Python library to read/write... by jahewson on Thursday November 17, 2022 @08:43PM (#33648730)
Re:Show HN: I am building a new Python library to read/write... by copperbrick25 on Thursday November 17, 2022 @09:29PM (#33649107)
Sadly XPS is not supported by most software, I'd love to use something better than PDF, but even LibreOffice can't export as OXPS.
Re:Show HN: I am building a new Python library to read/write... by userbinator on Thursday November 17, 2022 @09:52PM (#33649358)
Anything related to XML is arguably even worse.
Re:Show HN: I am building a new Python library to read/write... by mdaniel on Friday November 18, 2022 @12:55PM (#33658754)
I know it's fun to hate on XML, but as compared to inventing a new pseudo-text-pseudo-binary format, its parsing mechanics are well understood

I'm not claiming all of PDF's woes are related to its encoding, but it's not zero, either. Start from the fact that XML documents have XML Schema allowing one to formally specify what can and cannot appear where. The PDF specification is a bunch of English which makes for shitty constraint boundaries

Re:Show HN: I am building a new Python library to read/write... by macintux on Thursday November 17, 2022 @08:44PM (#33648744)
It does seem like that would be a good opportunity to weed out some of the insecure aspects of the format.

Unfortunately in practice it would mean that everyone would have to support both PDF and PDF2.

Re:Show HN: I am building a new Python library to read/write... by steampilot on Thursday November 17, 2022 @08:48PM (#33648765)
I think it's not too late to create a modern open-source alternative to PDF. I find it unacceptable that something that has become so widely used doesn't have proper free tools for editing. Society shouldn't be limited by income if they want (have?) to use PDFs, or else suffer from a bad experience. The other bigger problem with PDF is that a lot of the times it's used for something for which it wasn't made to be used for. Anything that is expected to be consumed on both mobile and desktop devices should never use PDFs. Government forms should not use PDFs with hacky embedded scripts either.
Re:Show HN: I am building a new Python library to read/write... by mdaniel on Thursday November 17, 2022 @08:56PM (#33648828)
I know this is likely a case of "you know what I meant," but there already is a PDF 2.0: https://www.pdfa.org/resource/iso-32000-pdf/
Re:Show HN: I am building a new Python library to read/write... by manv1 on Friday November 18, 2022 @12:35AM (#33650791)
It was a fight between DiskPaper and PDF. PDF won because the tools were better and it was cross-platform.

And PDF is a subset of PostScript, the product that made Adobe and the DTP industry.

It's janky because the goal was to render identically everywhere. If you think it's easy look at the code abortion that is CSS.