Show HN: I am building a new Python library to read/write PDF files
github.com
Show HN: I am building a new Python library to read/write PDF files
1–10 of 126 posts
Re: Show HN: I am building a new Python library to read/write PDF files
#2And related: the best tools to generate PDFs from HTML.
Re: Show HN: I am building a new Python library to read/write PDF files
#3Re: Show HN: I am building a new Python library to read/write PDF files
#4Since you read&write, maybe also a use case of programmatically filling some form fields in an editable PDF form. Such pre-filling some of the fields for a particular Web site user in a dynamically-modified PDF form they download. But the source PDF form can be hand-crafted and maintained separately, like people often want to do, not generated from scratch by your code.
Re: Show HN: I am building a new Python library to read/write PDF files
#5Re: Show HN: I am building a new Python library to read/write PDF files
#6I wish you good luck, this file format has tripped up many, many a developer. It blew up on a pdf I had lying around:
ValueError: could not convert string to float: b'5.0.0'
104 0 obj > endobj
as it seems a string with nested parens jams up the parserRe: Show HN: I am building a new Python library to read/write PDF files
#7I never knew about the J number suffix in python: https://docs.python.org/3/reference/lexical_analysis.html#im... which it would appear is used to represent references: https://github.com/desgeeko/pdfsyntax/blob/main/tests/test_p... 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: ValueError: could not convert string to float: b'5.0.0' 104 0 obj > e…
Re: Show HN: I am building a new Python library to read/write PDF files
#8https://metacpan.org/pod/CAM::PDF
I have used it in the past.
Re: Show HN: I am building a new Python library to read/write PDF files
#9I wish you all the best! This space has a lot of stuff in it and they’re lacking in some aspect. And that’s not a admonishment, PDF is such a complicated format that there will never be a library that doesn’t come with asterisks — it’s just a matter of picking the thing you want your library to focus on and be good at and you can pretty easily be someone’s favorite lib.
Re: Show HN: I am building a new Python library to read/write PDF files
#10Neat. Another use case for which you might want to think about a sample is extracting data from filled PDF forms. (That use case is why I once had to write a PDF parser.) Since you read&write, maybe also a use case of programmatically filling some form fields in an editable PDF form. Such pre-filling some of the fields for a particular Web site user in a dynamically-modified PDF form they download. But the source PDF…