Re:Show HN: I am building a new Python library to read/write...
by mdaniel on Thursday November 17, 2022 @07:39PM
(#33648173)
This is tangential to your submission, but PDF is the file format I use for exercising any library that claims to be a declarative file format (ala https://github.com/kaitai-io/kaitai_struct_formats#readme )
Re:Show HN: I am building a new Python library to read/write...
by BiteCode_dev on Friday November 18, 2022 @01:40AM
(#33651162)
J is for complex numbers. While math.sqrt(-1) raises an exception, cmath.sqrt(-1) returns 1j.
Re:Show HN: I am building a new Python library to read/write...
by lordgrenville on Friday November 18, 2022 @05:32AM
(#33652836)
Parent was referring to "references" in the PDF spec (eg 42 0 R)
Re:Show HN: I am building a new Python library to read/write...
by fgeiger on Friday November 18, 2022 @04:53AM
(#33652551)
The PDF format is diverse enough for such a new project to still have plenty of incompatibilities. If you wanted to find many of them quickly, you might want to have a look at the documents used as test cases in other projects, such as pdf.js:
Re:Show HN: I am building a new Python library to read/write...
by jonnycomputer on Friday November 18, 2022 @07:49AM
(#33653833)
Valuable practical, actionable advice
I wish you good luck, this file format has tripped up many, many a developer. It blew up on a pdf I had lying around:
as it seems a string with nested parens jams up the parser