You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by np...@hjf.org on 2016/04/28 15:33:52 UTC

Re: WELCOME to users@pdfbox.apache.org

Hello!

I wanted to test digital signature using PDFBox. I downloaded 
pdfbox-app-2.0.1.jar 7.9MB on my local computer. In Netbeans 8.1, I 
created new project and from main class I am calling 
TestCreateSignature.testCreateVisibleSignature(). I generated new pfx key 
using Adobe reader DC and used that for my test. New (output) PDF is 
getting generated but when I open the PDF it says that the signature is 
invalid. How can I get this to work? At this time, I am using PDFBox just 
for testing to see if we can use it for real life. I am attaching my input 
and output pdfs. One more thing, I had to change following code from 
CreateSignatureBase.java, as was not getting compiled in Netbeans.

Original Code:



Modified Code:



Any help would be greatly appreciated!

Thanks

Naresh





From:   users-help@pdfbox.apache.org
To:     npunjabi@hjf.org
Date:   04/28/2016 08:54 AM
Subject:        WELCOME to users@pdfbox.apache.org



Hi! This is the ezmlm program. I'm managing the
users@pdfbox.apache.org mailing list.

I'm working for my owner, who can be reached
at users-owner@pdfbox.apache.org.

Acknowledgment: I have added the address

   npunjabi@hjf.org

to the users mailing list.

Welcome to users@pdfbox.apache.org!

Please save this message so that you know the address you are
subscribed under, in case you later want to unsubscribe or change your
subscription address.


--- Administrative commands for the users list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

To subscribe to the list, send a message to:
   <us...@pdfbox.apache.org>

To remove your address from the list, send a message to:
   <us...@pdfbox.apache.org>

Send mail to the following for info and FAQ for this list:
   <us...@pdfbox.apache.org>
   <us...@pdfbox.apache.org>

Similar addresses exist for the digest list:
   <us...@pdfbox.apache.org>
   <us...@pdfbox.apache.org>

To get messages 123 through 145 (a maximum of 100 per request), mail:
   <us...@pdfbox.apache.org>

To get an index with subject and author for messages 123-456 , mail:
   <us...@pdfbox.apache.org>

They are always returned as sets of 100, max 2000 per request,
so you'll actually get 100-499.

To receive all messages with the same subject as message 12345,
send a short message to:
   <us...@pdfbox.apache.org>

The messages should contain one line or word of text to avoid being
treated as sp@m, but I will ignore their content.
Only the ADDRESS you send to is important.

You can start a subscription for an alternate address,
for example "john@host.domain", just add a hyphen and your
address (with '=' instead of '@') after the command word:
<us...@pdfbox.apache.org>

To stop subscription for this address, mail:
<us...@pdfbox.apache.org>

In both cases, I'll send a confirmation message to that address. When
you receive it, simply reply to it to complete your subscription.

If despite following these instructions, you do not get the
desired results, please contact my owner at
users-owner@pdfbox.apache.org. Please be patient, my owner is a
lot slower than I am ;-)

--- Enclosed is a copy of the request I received.

Return-Path: <np...@hjf.org>
Received: (qmail 64707 invoked by uid 99); 28 Apr 2016 12:54:41 -0000
Received: from pnap-us-west-generic-nat.apache.org (HELO 
spamd1-us-west.apache.org) (209.188.14.142)
    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2016 12:54:41 
+0000
Received: from localhost (localhost [127.0.0.1])
                 by spamd1-us-west.apache.org (ASF Mail Server at 
spamd1-us-west.apache.org) with ESMTP id 275F1C6E41
                 for 
<us...@pdfbox.apache.org>; 
Thu, 28 Apr 2016 12:54:41 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org
X-Spam-Flag: NO
X-Spam-Score: -0.296
X-Spam-Level:
X-Spam-Status: No, score=-0.296 tagged_above=-999 required=6.31
                 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1,
                 RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.996] 
autolearn=disabled
Received: from mx2-lw-eu.apache.org ([10.40.0.8])
                 by localhost (spamd1-us-west.apache.org [10.40.0.7]) 
(amavisd-new, port 10024)
                 with ESMTP id MJIfuKrs6nVT
                 for 
<us...@pdfbox.apache.org>;
                 Thu, 28 Apr 2016 12:54:39 +0000 (UTC)
Received: from sharp.hjf.org (sharp.hjf.org [144.83.16.155])
                 by mx2-lw-eu.apache.org (ASF Mail Server at 
mx2-lw-eu.apache.org) with ESMTPS id 9F2FF5F472
                 for 
<us...@pdfbox.apache.org>; 
Thu, 28 Apr 2016 12:54:38 +0000 (UTC)
Received: from pps.filterd (sharp.hjf.org [127.0.0.1])
                 by sharp.hjf.org (8.15.0.59/8.15.0.59) with SMTP id 
u3SCs7MJ014535
                 for 
<us...@pdfbox.apache.org>; 
Thu, 28 Apr 2016 08:54:31 -0400
Received: from koch.hjf.org (koch.hjf.org [144.83.123.20])
                 by sharp.hjf.org with ESMTP id 22k1y88kp6-1
                 for 
<us...@pdfbox.apache.org>; 
Thu, 28 Apr 2016 08:54:31 -0400
In-Reply-To: <14...@pdfbox.apache.org>
References: <14...@pdfbox.apache.org>
To: 
users-sc.1461847727.bkjlgaallhimphdnjjlh-npunjabi=hjf.org@pdfbox.apache.org
MIME-Version: 1.0
Subject: Re: confirm subscribe to users@pdfbox.apache.org
X-KeepSent: 803E75BE:4DF81DCE-85257FA3:0046E31E;
 type=4; name=$KeepSent
X-Mailer: IBM Notes Release 9.0.1FP4 June 08, 2015
Message-ID: 
<OF...@hjf.org>
From: npunjabi@hjf.org
Date: Thu, 28 Apr 2016 08:54:30 -0400
X-MIMETrack: Serialize by Router on koch/hq/hjf(Release 8.5.3FP6|November 
21, 2013) at
 04/28/2016 08:54:31,
                 Serialize complete at 04/28/2016 08:54:31
Content-Type: multipart/alternative; boundary="=_alternative 
0046E22985257FA3_="
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, 
definitions=2016-04-28_07:,,
 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 
suspectscore=4
 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam
 adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000
 definitions=main-1604280182




Re: WELCOME to users@pdfbox.apache.org

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 28.04.2016 um 15:33 schrieb npunjabi@hjf.org:
> I am attaching my input and output pdfs. 

Attachments don't go through on this mailing list. But it isn't needed, 
as your modified code is likely incorrect, as this line from 
CMSProcessableInputStream is missing:


this(new ASN1ObjectIdentifier(CMSObjectIdentifiers.data.getId()), is);


Re: WELCOME to users@pdfbox.apache.org

Posted by np...@hjf.org.
Thanks Tilman!

Signature behind the jpg image is good!! I will see how if my team likes 
it.

Regards

Naresh



From:   Tilman Hausherr <TH...@t-online.de>
To:     users@pdfbox.apache.org
Date:   04/28/2016 12:45 PM
Subject:        Re: WELCOME to users@pdfbox.apache.org



Am 28.04.2016 um 18:28 schrieb npunjabi@hjf.org:
> Sorry, the image didn't show up on the email. but its kind of same as 
seen
> in the following link
>
> 
https://issues.apache.org/jira/secure/attachment/12736070/acrosigned_signed.pdf


Indeed, we can't do something like that yet.

https://issues.apache.org/jira/browse/PDFBOX-3198

Nevertheless, the signatures we do are still real signatures, they're 
just not as nice. (Btw there are invisible signatures too).

Tilman

>
> Thanks!
>
>
>
> From:   npunjabi@hjf.org
> To:     users@pdfbox.apache.org
> Date:   04/28/2016 12:24 PM
> Subject:        Re: WELCOME to users@pdfbox.apache.org
>
>
>
> Thanks Tilman!
>
> I am new to Digital signature area; so following is the Text Signature?
>
>
>
> We wanted to test if above signature can be applied using PDFBox.
>
> Thanks for your help!!
>
> Naresh
>
>
>
> From:        Tilman Hausherr <TH...@t-online.de>
> To:        users@pdfbox.apache.org
> Date:        04/28/2016 12:07 PM
> Subject:        Re: WELCOME to users@pdfbox.apache.org
>
>
>
> Am 28.04.2016 um 17:57 schrieb npunjabi@hjf.org:
>> Hi Tilman,
>>
>> Thank you so much for your reply. my test code was from PDFBox 2.0.0;
>> which I replaced with PDFBox 2.0.1; now I am not getting "Invalid
>> Signature" message anymore. I do see the stamp "Original" in my signed
>> PDF, the signature is on that stamp.jpg; I wanted to see the actual
>> digital signature, trying to figure out how to remove the stamp and
>> display the actual "Digital Signature". I am kind of new to Netbeans
>> and java as such.
> Is this a question?
>
> Or maybe a misunderstanding - we don't support text signatures yet, that
> you may have seen elsewhere. The stamp is the visual part of the
> signature. In Adobe Reader, click on it and you will see more details.
>
> There is a proposal for a text signature in a JIRA issue but it is
> incomplete.
>
> Tilman
>
>>
>> Regards
>>
>> Naresh
>>
>>
>>
>> From: Tilman Hausherr <TH...@t-online.de>
>> To: users@pdfbox.apache.org
>> Date: 04/28/2016 11:43 AM
>> Subject: Re: WELCOME to users@pdfbox.apache.org
>> 
------------------------------------------------------------------------
>>
>>
>>
>> Hi,
>>
>> There must be some problem, because this is the top of
>> CMSProcessableInputStream:
>>
>> class CMSProcessableInputStream implements CMSTypedData
>>
>> that file is in
>> PDFBox
>>
> 
reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java
>> Did you include that file in your project?
>>
>> Tilman (Netbeans user too)
>>
>>
>>
>> Am 28.04.2016 um 15:33 schrieb _npunjabi@hjf.org_
>> <ma...@hjf.org>:
>> Hello!
>>
>> I wanted to test digital signature using PDFBox. I downloaded
>> _pdfbox-app-2.0.1.jar_
>> <http://apache.mesi.com.ar/pdfbox/2.0.1/pdfbox-app-2.0.1.jar> 7.9MBon
>> my local computer. In Netbeans 8.1, I created new project and from
>> main class I am calling
>> TestCreateSignature.testCreateVisibleSignature(). I generated new pfx
>> key using Adobe reader DC and used that for my test. New (output) PDF
>> is getting generated but when I open the PDF it says that the
>> signature is invalid. How can I get this to work? At this time, I am
>> using PDFBox just for testing to see if we can use it for real life. I
>> am attaching my input and output pdfs. One more thing, I had to change
>> following code from CreateSignatureBase.java, as was not getting
>> compiled in Netbeans.
>>
>> Original Code:
>>
>>
>>
>> Modified Code:
>>
>>
>>
>> Any help would be greatly appreciated!
>>
>> Thanks
>>
>> Naresh
>>
>>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org




Re: WELCOME to users@pdfbox.apache.org

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 28.04.2016 um 18:28 schrieb npunjabi@hjf.org:
> Sorry, the image didn't show up on the email. but its kind of same as seen
> in the following link
>
> https://issues.apache.org/jira/secure/attachment/12736070/acrosigned_signed.pdf

Indeed, we can't do something like that yet.

https://issues.apache.org/jira/browse/PDFBOX-3198

Nevertheless, the signatures we do are still real signatures, they're 
just not as nice. (Btw there are invisible signatures too).

Tilman

>
> Thanks!
>
>
>
> From:   npunjabi@hjf.org
> To:     users@pdfbox.apache.org
> Date:   04/28/2016 12:24 PM
> Subject:        Re: WELCOME to users@pdfbox.apache.org
>
>
>
> Thanks Tilman!
>
> I am new to Digital signature area; so following is the Text Signature?
>
>
>
> We wanted to test if above signature can be applied using PDFBox.
>
> Thanks for your help!!
>
> Naresh
>
>
>
> From:        Tilman Hausherr <TH...@t-online.de>
> To:        users@pdfbox.apache.org
> Date:        04/28/2016 12:07 PM
> Subject:        Re: WELCOME to users@pdfbox.apache.org
>
>
>
> Am 28.04.2016 um 17:57 schrieb npunjabi@hjf.org:
>> Hi Tilman,
>>
>> Thank you so much for your reply. my test code was from PDFBox 2.0.0;
>> which I replaced with PDFBox 2.0.1; now I am not getting "Invalid
>> Signature" message anymore. I do see the stamp "Original" in my signed
>> PDF, the signature is on that stamp.jpg; I wanted to see the actual
>> digital signature, trying to figure out how to remove the stamp and
>> display the actual "Digital Signature". I am kind of new to Netbeans
>> and java as such.
> Is this a question?
>
> Or maybe a misunderstanding - we don't support text signatures yet, that
> you may have seen elsewhere. The stamp is the visual part of the
> signature. In Adobe Reader, click on it and you will see more details.
>
> There is a proposal for a text signature in a JIRA issue but it is
> incomplete.
>
> Tilman
>
>>
>> Regards
>>
>> Naresh
>>
>>
>>
>> From: Tilman Hausherr <TH...@t-online.de>
>> To: users@pdfbox.apache.org
>> Date: 04/28/2016 11:43 AM
>> Subject: Re: WELCOME to users@pdfbox.apache.org
>> ------------------------------------------------------------------------
>>
>>
>>
>> Hi,
>>
>> There must be some problem, because this is the top of
>> CMSProcessableInputStream:
>>
>> class CMSProcessableInputStream implements CMSTypedData
>>
>> that file is in
>> PDFBox
>>
> reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java
>> Did you include that file in your project?
>>
>> Tilman (Netbeans user too)
>>
>>
>>
>> Am 28.04.2016 um 15:33 schrieb _npunjabi@hjf.org_
>> <ma...@hjf.org>:
>> Hello!
>>
>> I wanted to test digital signature using PDFBox. I downloaded
>> _pdfbox-app-2.0.1.jar_
>> <http://apache.mesi.com.ar/pdfbox/2.0.1/pdfbox-app-2.0.1.jar> 7.9MBon
>> my local computer. In Netbeans 8.1, I created new project and from
>> main class I am calling
>> TestCreateSignature.testCreateVisibleSignature(). I generated new pfx
>> key using Adobe reader DC and used that for my test. New (output) PDF
>> is getting generated but when I open the PDF it says that the
>> signature is invalid. How can I get this to work? At this time, I am
>> using PDFBox just for testing to see if we can use it for real life. I
>> am attaching my input and output pdfs. One more thing, I had to change
>> following code from CreateSignatureBase.java, as was not getting
>> compiled in Netbeans.
>>
>> Original Code:
>>
>>
>>
>> Modified Code:
>>
>>
>>
>> Any help would be greatly appreciated!
>>
>> Thanks
>>
>> Naresh
>>
>>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: WELCOME to users@pdfbox.apache.org

Posted by np...@hjf.org.
Sorry, the image didn't show up on the email. but its kind of same as seen 
in the following link

https://issues.apache.org/jira/secure/attachment/12736070/acrosigned_signed.pdf

Thanks!



From:   npunjabi@hjf.org
To:     users@pdfbox.apache.org
Date:   04/28/2016 12:24 PM
Subject:        Re: WELCOME to users@pdfbox.apache.org



Thanks Tilman! 

I am new to Digital signature area; so following is the Text Signature? 



We wanted to test if above signature can be applied using PDFBox. 

Thanks for your help!! 

Naresh 



From:        Tilman Hausherr <TH...@t-online.de> 
To:        users@pdfbox.apache.org 
Date:        04/28/2016 12:07 PM 
Subject:        Re: WELCOME to users@pdfbox.apache.org 



Am 28.04.2016 um 17:57 schrieb npunjabi@hjf.org:
> Hi Tilman,
>
> Thank you so much for your reply. my test code was from PDFBox 2.0.0; 
> which I replaced with PDFBox 2.0.1; now I am not getting "Invalid 
> Signature" message anymore. I do see the stamp "Original" in my signed 
> PDF, the signature is on that stamp.jpg; I wanted to see the actual 
> digital signature, trying to figure out how to remove the stamp and 
> display the actual "Digital Signature". I am kind of new to Netbeans 
> and java as such.

Is this a question?

Or maybe a misunderstanding - we don't support text signatures yet, that 
you may have seen elsewhere. The stamp is the visual part of the 
signature. In Adobe Reader, click on it and you will see more details.

There is a proposal for a text signature in a JIRA issue but it is 
incomplete.

Tilman

>
>
> Regards
>
> Naresh
>
>
>
> From: Tilman Hausherr <TH...@t-online.de>
> To: users@pdfbox.apache.org
> Date: 04/28/2016 11:43 AM
> Subject: Re: WELCOME to users@pdfbox.apache.org
> ------------------------------------------------------------------------
>
>
>
> Hi,
>
> There must be some problem, because this is the top of 
> CMSProcessableInputStream:
>
> class CMSProcessableInputStream implements CMSTypedData
>
> that file is in
> PDFBox 
> 
reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java
>
> Did you include that file in your project?
>
> Tilman (Netbeans user too)
>
>
>
> Am 28.04.2016 um 15:33 schrieb _npunjabi@hjf.org_ 
> <ma...@hjf.org>:
> Hello!
>
> I wanted to test digital signature using PDFBox. I downloaded 
> _pdfbox-app-2.0.1.jar_ 
> <http://apache.mesi.com.ar/pdfbox/2.0.1/pdfbox-app-2.0.1.jar> 7.9MBon 
> my local computer. In Netbeans 8.1, I created new project and from 
> main class I am calling 
> TestCreateSignature.testCreateVisibleSignature(). I generated new pfx 
> key using Adobe reader DC and used that for my test. New (output) PDF 
> is getting generated but when I open the PDF it says that the 
> signature is invalid. How can I get this to work? At this time, I am 
> using PDFBox just for testing to see if we can use it for real life. I 
> am attaching my input and output pdfs. One more thing, I had to change 
> following code from CreateSignatureBase.java, as was not getting 
> compiled in Netbeans.
>
> Original Code:
>
>
>
> Modified Code:
>
>
>
> Any help would be greatly appreciated!
>
> Thanks
>
> Naresh
>
>





Re: WELCOME to users@pdfbox.apache.org

Posted by np...@hjf.org.
Thanks Tilman!

I am new to Digital signature area; so following is the Text Signature?



We wanted to test if above signature can be applied using PDFBox. 

Thanks for your help!!

Naresh



From:   Tilman Hausherr <TH...@t-online.de>
To:     users@pdfbox.apache.org
Date:   04/28/2016 12:07 PM
Subject:        Re: WELCOME to users@pdfbox.apache.org



Am 28.04.2016 um 17:57 schrieb npunjabi@hjf.org:
> Hi Tilman,
>
> Thank you so much for your reply. my test code was from PDFBox 2.0.0; 
> which I replaced with PDFBox 2.0.1; now I am not getting "Invalid 
> Signature" message anymore. I do see the stamp "Original" in my signed 
> PDF, the signature is on that stamp.jpg; I wanted to see the actual 
> digital signature, trying to figure out how to remove the stamp and 
> display the actual "Digital Signature". I am kind of new to Netbeans 
> and java as such.

Is this a question?

Or maybe a misunderstanding - we don't support text signatures yet, that 
you may have seen elsewhere. The stamp is the visual part of the 
signature. In Adobe Reader, click on it and you will see more details.

There is a proposal for a text signature in a JIRA issue but it is 
incomplete.

Tilman

>
>
> Regards
>
> Naresh
>
>
>
> From: Tilman Hausherr <TH...@t-online.de>
> To: users@pdfbox.apache.org
> Date: 04/28/2016 11:43 AM
> Subject: Re: WELCOME to users@pdfbox.apache.org
> ------------------------------------------------------------------------
>
>
>
> Hi,
>
> There must be some problem, because this is the top of 
> CMSProcessableInputStream:
>
> class CMSProcessableInputStream implements CMSTypedData
>
> that file is in
> PDFBox 
> 
reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java
>
> Did you include that file in your project?
>
> Tilman (Netbeans user too)
>
>
>
> Am 28.04.2016 um 15:33 schrieb _npunjabi@hjf.org_ 
> <ma...@hjf.org>:
> Hello!
>
> I wanted to test digital signature using PDFBox. I downloaded 
> _pdfbox-app-2.0.1.jar_ 
> <http://apache.mesi.com.ar/pdfbox/2.0.1/pdfbox-app-2.0.1.jar> 7.9MBon 
> my local computer. In Netbeans 8.1, I created new project and from 
> main class I am calling 
> TestCreateSignature.testCreateVisibleSignature(). I generated new pfx 
> key using Adobe reader DC and used that for my test. New (output) PDF 
> is getting generated but when I open the PDF it says that the 
> signature is invalid. How can I get this to work? At this time, I am 
> using PDFBox just for testing to see if we can use it for real life. I 
> am attaching my input and output pdfs. One more thing, I had to change 
> following code from CreateSignatureBase.java, as was not getting 
> compiled in Netbeans.
>
> Original Code:
>
>
>
> Modified Code:
>
>
>
> Any help would be greatly appreciated!
>
> Thanks
>
> Naresh
>
>




Re: WELCOME to users@pdfbox.apache.org

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 28.04.2016 um 17:57 schrieb npunjabi@hjf.org:
> Hi Tilman,
>
> Thank you so much for your reply. my test code was from PDFBox 2.0.0; 
> which I replaced with PDFBox 2.0.1; now I am not getting "Invalid 
> Signature" message anymore. I do see the stamp "Original" in my signed 
> PDF, the signature is on that stamp.jpg; I wanted to see the actual 
> digital signature, trying to figure out how to remove the stamp and 
> display the actual "Digital Signature". I am kind of new to Netbeans 
> and java as such.

Is this a question?

Or maybe a misunderstanding - we don't support text signatures yet, that 
you may have seen elsewhere. The stamp is the visual part of the 
signature. In Adobe Reader, click on it and you will see more details.

There is a proposal for a text signature in a JIRA issue but it is 
incomplete.

Tilman

>
>
> Regards
>
> Naresh
>
>
>
> From: Tilman Hausherr <TH...@t-online.de>
> To: users@pdfbox.apache.org
> Date: 04/28/2016 11:43 AM
> Subject: Re: WELCOME to users@pdfbox.apache.org
> ------------------------------------------------------------------------
>
>
>
> Hi,
>
> There must be some problem, because this is the top of 
> CMSProcessableInputStream:
>
> class CMSProcessableInputStream implements CMSTypedData
>
> that file is in
> PDFBox 
> reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java
>
> Did you include that file in your project?
>
> Tilman (Netbeans user too)
>
>
>
> Am 28.04.2016 um 15:33 schrieb _npunjabi@hjf.org_ 
> <ma...@hjf.org>:
> Hello!
>
> I wanted to test digital signature using PDFBox. I downloaded 
> _pdfbox-app-2.0.1.jar_ 
> <http://apache.mesi.com.ar/pdfbox/2.0.1/pdfbox-app-2.0.1.jar> 7.9MBon 
> my local computer. In Netbeans 8.1, I created new project and from 
> main class I am calling 
> TestCreateSignature.testCreateVisibleSignature(). I generated new pfx 
> key using Adobe reader DC and used that for my test. New (output) PDF 
> is getting generated but when I open the PDF it says that the 
> signature is invalid. How can I get this to work? At this time, I am 
> using PDFBox just for testing to see if we can use it for real life. I 
> am attaching my input and output pdfs. One more thing, I had to change 
> following code from CreateSignatureBase.java, as was not getting 
> compiled in Netbeans.
>
> Original Code:
>
>
>
> Modified Code:
>
>
>
> Any help would be greatly appreciated!
>
> Thanks
>
> Naresh
>
>


Re: WELCOME to users@pdfbox.apache.org

Posted by np...@hjf.org.
Hi Tilman,

Thank you so much for your reply. my test code was from PDFBox 2.0.0; 
which I replaced with PDFBox 2.0.1; now I am not getting "Invalid 
Signature" message anymore. I do see the stamp "Original" in my signed 
PDF, the signature is on that stamp.jpg; I wanted to see the actual 
digital signature, trying to figure out how to remove the stamp and 
display the actual "Digital Signature". I am kind of new to Netbeans and 
java as such.

Regards

Naresh



From:   Tilman Hausherr <TH...@t-online.de>
To:     users@pdfbox.apache.org
Date:   04/28/2016 11:43 AM
Subject:        Re: WELCOME to users@pdfbox.apache.org



Hi,

There must be some problem, because this is the top of 
CMSProcessableInputStream:

class CMSProcessableInputStream implements CMSTypedData

that file is in
PDFBox 
reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java

Did you include that file in your project?

Tilman (Netbeans user too)



Am 28.04.2016 um 15:33 schrieb npunjabi@hjf.org:
Hello! 

I wanted to test digital signature using PDFBox. I downloaded 
pdfbox-app-2.0.1.jar 7.9MB on my local computer. In Netbeans 8.1, I 
created new project and from main class I am calling 
TestCreateSignature.testCreateVisibleSignature(). I generated new pfx key 
using Adobe reader DC and used that for my test. New (output) PDF is 
getting generated but when I open the PDF it says that the signature is 
invalid. How can I get this to work? At this time, I am using PDFBox just 
for testing to see if we can use it for real life. I am attaching my input 
and output pdfs. One more thing, I had to change following code from 
CreateSignatureBase.java, as was not getting compiled in Netbeans. 

Original Code: 



Modified Code: 



Any help would be greatly appreciated! 

Thanks 

Naresh 



Re: WELCOME to users@pdfbox.apache.org

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

There must be some problem, because this is the top of 
CMSProcessableInputStream:

class CMSProcessableInputStream implements CMSTypedData

that file is in
PDFBox 
reactor\examples\src\main\java\org\apache\pdfbox\examples\signature\CMSProcessableInputStream.java

Did you include that file in your project?

Tilman (Netbeans user too)



Am 28.04.2016 um 15:33 schrieb npunjabi@hjf.org:
> Hello!
>
> I wanted to test digital signature using PDFBox. I downloaded 
> pdfbox-app-2.0.1.jar 
> <http://apache.mesi.com.ar/pdfbox/2.0.1/pdfbox-app-2.0.1.jar> 7.9MBon 
> my local computer. In Netbeans 8.1, I created new project and from 
> main class I am calling 
> TestCreateSignature.testCreateVisibleSignature(). I generated new pfx 
> key using Adobe reader DC and used that for my test. New (output) PDF 
> is getting generated but when I open the PDF it says that the 
> signature is invalid. How can I get this to work? At this time, I am 
> using PDFBox just for testing to see if we can use it for real life. I 
> am attaching my input and output pdfs. One more thing, I had to change 
> following code from CreateSignatureBase.java, as was not getting 
> compiled in Netbeans.
>
> Original Code:
>
>
>
> Modified Code:
>
>
>
> Any help would be greatly appreciated!
>
> Thanks
>
> Naresh