Signing PDF (Dynamic and Static) programmatically from Java

739 views
Skip to first unread message

tarekahf

unread,
Jan 8, 2021, 3:32:23 PM1/8/21
to JSignPdf
I wanted to know if you can direct me or point me to some samples.

I need to write a program in Java that will sign a PDF (Dynamic and Static) on the server when submitting a PDF from a web page.

I saw some samples on GIT under:


And I am just wondering if I am on the right path.

If you have any other tips and info I really appreciate it if you can share with me such details.

Can I depend on the samples under JSignPDF-itxt? Is there any other library that will help in signing the PDF (Dynamic and Static)?

Thank you.
Tarek

Josef Cacek

unread,
Jan 11, 2021, 1:34:12 AM1/11/21
to JSignPdf forum
Hi Tarek,

there are several options nowadays.
When the JSignPdf project started, there was just one open-source
option - iText library. So I used it. People behind the iText project
relicensed the new versions with a licensing model I don't like.
Therefor I still use fork of the old version with few bug fixes. The
source code of my iText fork lives in the jsignpdf-itxt as you
already know.
I recommend using some standard library for your purpose:

Apache PDFBox - open-source project backed by Apache Software Foundation:
https://pdfbox.apache.org/
https://github.com/apache/pdfbox/tree/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature


If you are fine with current iText library licensing (commercial
and/or AGPL), then have a look at
https://kb.itextpdf.com/home/it7kb/examples/digital-signatures-chapter-4

OpenPDF library is a fork of the older iText version with more
permissive licensing (LGPL, MPL):
https://github.com/LibrePDF/OpenPDF
https://github.com/LibrePDF/OpenPDF/blob/master/openpdf/src/test/java/com/lowagie/text/pdf/PdfSignatureAppearanceTest.java

-- Josef

pá 8. 1. 2021 v 21:32 odesílatel tarekahf <tare...@gmail.com> napsal:
> --
> You received this message because you are subscribed to the Google Groups "JSignPdf" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jsignpdf+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jsignpdf/13dc7bbf-016b-46cd-a3ac-7b117db2b56fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages