Relationship to PyPDF2 #127
Replies: 1 comment 2 replies
-
Hi @MartinThoma, Thanks a lot for reaching out! Good to hear that someone's picked up PyPDF2. As you might've noticed in the README, I started this project by forking a subset of the (at the time, unmaintained) PyPDF2 codebase---it's been massively refactored since, but PyPDF2 provided me with a significant headstart back when I started out, and I'm grateful for that. Now, with regard to the matter at hand: pyHanko is a library that specialises in signing-related tasks (and document encryption, but that's arguably not nearly as important). It doesn't try to be a general-purpose PDF manipulation toolkit, and that was a conscious choice:
Here's a non-exhaustive list of often-overlooked things that you (arguably) need even if you don't care about signature validation:
Finally, there's the fact that the PDF landscape has changed quite a bit since 2008, when PDF 1.7 was standardised as ISO 32000-1. Not only is there a PDF 2.0 spec now (ISO 32000-2), but also various "satellite" standards relating to PDF signing have popped up in the meantime: PAdES (+ national variants thereof); soon we'll also have extensions to algorithm usage stemming from ISO/TS 32001, ISO/TS 32002... Somebody needs to stay on top of all that. Granted, I'm biased because I'm directly involved with PDF standards development efforts, so maybe take that with a grain of salt. Briefly put, my position is the following: keeping the signing stuff in one place, in a separate, single-issue library, is better for everyone involved. If you would like to add digital signing features to PyPDF2, I would strongly recommend adding this project as an optional (!) dependency to PyPDF2 instead of trying to roll your own implementation. Of course, since pyHanko is MIT-licenced, you're welcome to recycle bits and pieces and upstream those into PyPDF2---as long as you abide by the licence terms, go wild! All I'm saying is: developing and maintaining a good digital signing toolkit is not as easy as it sounds ;). As for moving to the |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm the new maintainer of PyPDF2 👋
Some PyPDF2 users want to digitally sign PDFs - which seems to be supported by pyHanko.
I was now wondering if it makes sense for PyPDF2 to integrate that feature or if we can just reference to pyHanko. The workflow for the user could be to manipulate the PDF in the desired way with PyPDF2, save it, and then sign it with pyHanko. Would there be any disadvantage?
Another thing I wanted to point out is that the newly created https://github.com/py-pdf GithubOrganization might also be a good place for pyHanko. It might lead a bit more attention to pyHanko. Let me know what you would think about this :-)
Beta Was this translation helpful? Give feedback.
All reactions