Hi,
This means writeExternalSignature() was called with a null argument.
That method is called if signatureInterface is set, but
signatureInterface.sign() has returned is null.
So you need to find out why your sign() method has returned null.
Tilman
Am 02.07.2020 um 08:07 schrieb Okan Konur:
Hello, hope you are well.
We are trying to get PADES working with PDFBox.
I am working on
CreateSignature.java
I checked out the trunk version of examples signature directory.
Then changed the Loader class reference with the 2.0 branch version, after
I realized the loader class is new. I am working with latest
pdfbox-2.0.20.jar.
My problem is at the document.saveIncremental(output) line.
I get the following exception:
Exception in thread "main" java.lang.NullPointerException
at org.apache.pdfbox.util.Hex.getBytes(Hex.java:83)
at
org.apache.pdfbox.pdfwriter.COSWriter.writeExternalSignature(COSWriter.java:792)
at
org.apache.pdfbox.pdfwriter.COSWriter.doWriteSignature(COSWriter.java:745)
at
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1150)
at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:452)
at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1386)
at
org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1392)
at CreateSignature.signDetached(CreateSignature.java:157)
at CreateSignature.signDetached(CreateSignature.java:96)
at CreateSignature.main(CreateSignature.java:180)
I can post the source code but it is mostly the same with the repo version.
I just changed the keystore and pdf file path.
Can you kindly point me in the right direction?
Thanks
Okan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org