Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PDF digital signature #305

Open
Sobot opened this issue Apr 3, 2024 · 4 comments
Open

Support PDF digital signature #305

Sobot opened this issue Apr 3, 2024 · 4 comments
Labels

Comments

@Sobot
Copy link

Sobot commented Apr 3, 2024

Any chance of including the support for PDF digital signature? If you think this makes sense I could contribute with a pull request

https://helpx.adobe.com/acrobat/using/signing-pdfs.html

I would prepare a pull request for this that would implement a
org.xhtmlrenderer.simple.PDFSigner
similar as
org.xhtmlrenderer.simple.PDFRenderer

That would encapsulate https://api.itextpdf.com/iText5/java/5.5.13.3/com/itextpdf/text/pdf/security/MakeSignature.html

Or would you suggest a better aproach?

@asolntsev
Copy link
Contributor

@Sobot Hi. Thanks for the suggestion.
Well, may be. :)
I don't see any reasons why we should not do it. But I also don't see why it's needed.
Isn't it so that usually a "system" (like internet-bank) generates the PDF, and user should sign it?

@Sobot
Copy link
Author

Sobot commented Apr 4, 2024

Hi @asolntsev thank you for the reply.

I have a case where I need to generate digitally signed pdf to discourage users from editing them after downloading. And also verify that the pdf is generated by a trusted source.

Wanted to check if you think you think it would be possible do have alterative aproach by extending org.xhtmlrenderer.pdf.ITextRenderer or use it a a reference to a document to sign so I can leverage org.xhtmlrenderer.pdf.PDFCreationListener#onClose to autosign all documents?

@pbrant
Copy link
Member

pbrant commented Apr 4, 2024

@Sobot Using PDFCreationListener is the approach I'd recommend (and the approach we've taken in the past at work).

This does assume that you can use an invisible signature or at least can place the signature at a known, static location though.

@andreasrosdal
Copy link
Contributor

https://github.com/esig/dss - you can use this DSS (Digital Signature Service) to sign PDF files, even PDF files created by FlyingSaucer can be used as input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants