Print Page | Close Window

How to identify signed acroform (Signature)

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3686
Printed Date: 29 Apr 24 at 12:18PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to identify signed acroform (Signature)
Posted By: zannydive
Subject: How to identify signed acroform (Signature)
Date Posted: 19 Mar 19 at 10:44AM
Hi all  ,
I'm testing Debenu SDK library , if I load a pdf that contain some acroforms .I'd like to understand how identify if an acroform type signature it's digitally signed or not.

There is a way to do it?

Br
Marco 



Replies:
Posted By: Ingo
Date Posted: 19 Mar 19 at 11:40AM
Hi Marco,


i think function GetSignProcessResult could help:
https://www.debenu.com/docs/pdf_library_reference/GetSignProcessResult.php

If this won't work regarding your needs, this sample will give you an idea about how to extract form content checking the type (to find signature content):
https://www.debenu.com/kb/programmatically-extract-form-field-data-pdf-files/


Cheers and welcome here,
Ingo




-------------
Cheers,
Ingo



Posted By: zannydive
Date Posted: 19 Mar 19 at 6:10PM
Hi Ingo,
thanks for the answer, GetSignProcessResult seems that it's related at the process when you sign .
About this sample https://www.debenu.com/kb/programmatically-extract-form-field-data-pdf-files/ it what I used but seems that there are no info about how to identify if the acroform signature was signed or not.
I didn't found an exposed method that provide this info. In others pdf library there is but I have difficult to find in debenu.

Have you some idea how to do it?

Br
Marco


Posted By: Ingo
Date Posted: 19 Mar 19 at 7:08PM
Hi Marco,

if you extract a pdf-form and if there is signature content (check the form field type... look into the sample) ... then a signature is used.
If there isn't signature content then not.
Another way can be do it by yourself.
It's easy. Drectly read the raw pdf content into a stream or string and check for relevant signature syntax. Open a relevant pdf with Notepad will give you an idea what i'm meaning... ;-)



-------------
Cheers,
Ingo



Posted By: zannydive
Date Posted: 24 Mar 19 at 1:10AM
Hi Indingo,
thanks for the answer.
Probably i'm mistaking to expose my question.
If I have a pdf that contain Acroform type Signature using the sample I'm able to identify that it's an Signature Acroform .
I'm not able to understand via code if the Signature acroform identified it's Digital Signed or Not.
I need understand because if it's not I can Sign Digitally otherwise i should prevent the Digital Signature.

Do you know if it's exposed a method for identify it? Or do you know how to do?
Thanks again for the Help
BR
Marco


Posted By: Ingo
Date Posted: 24 Mar 19 at 5:59PM
I fear i'm not understanding but...
With QuickPDF you can check:
If there's a content then it's digitally signed.
Without content there's only a field for (future) digitally signing.
The library doesn't offer a direct functionality to check the signature.
Foxit/Debenu says this:
http://www.quickpdflibrary.com/faq/verify-a-signature.php





-------------
Cheers,
Ingo



Posted By: zannydive
Date Posted: 25 Mar 19 at 2:55PM
Hi Indingo,
thanks for the clafirication and yes you understand correctly.
I'm newbie on Debenu Library .

Currently form the pdf I can Identify if there are a signature :
if(DPL.GetFormFieldType(y)==6) // it's signature
>If there's a content then it's digitally signed.
Checking the sample i didn't see nothing about the content.. I checked the value
and it's alwasy empty if the acroform it's signed or not.
Do you know how to have access at the content? Have you some sample?

Thanks again for the help.
Br
Marco




Posted By: Ingo
Date Posted: 25 Mar 19 at 8:12PM
for me content is the value ;-)
But it sounds interesting for me so if you want, you can send me one or two of your signed samples and i'll try to develope a routine for this purpose.



-------------
Cheers,
Ingo



Posted By: zannydive
Date Posted: 25 Mar 19 at 9:16PM
Hi Ingo,
I prepared 1 pdf that contain 2 signature field:
Title-->DigitalSignatureField_0 it's signed
Title--> DigitalSignatureFiled_1 it's not signed.

Below the result of mine analysys:
=========================================
AcroForm Name: DigitalSignatureField_0
AcroForm Type: Signature
AcroForm Value:
AcroForm Page: 2
AcroForm Height: 40.875
AcroForm Width: 203.625
AcroForm Top: 565.5
AcroForm Left: 57.375
=========================================
AcroForm Name: DigitalSignatureField_1
AcroForm Type: Signature
AcroForm Value:
AcroForm Page: 2
AcroForm Height: 40.875
AcroForm Width: 202.875
AcroForm Top: 723
AcroForm Left: 58.125
=========================================

You can download from this dbox link :
https://www.dropbox.com/s/zsvastc3hfwll5a/Test_Signature.pdf?dl=0

Thanks for the help.

Br
Marco


Posted By: zannydive
Date Posted: 30 Mar 19 at 2:26PM
Hi Ingo,
have you had the opportunity to check?

Br
Marco


Posted By: Ingo
Date Posted: 31 Mar 19 at 10:35PM
Hi Marco,

i think you know that's only a user-user-forum here.
So sometimes you have to wait for an answer some days...
I've checked  the file now...

There are two form fields in the document.
The formfield types are both "signature".
The first has form field caption "DigitalSignatureField_0" with much content in the relevant form field value.
The second has form field caption "DigitalSignatureField_1" but there's no content in the relevant form field value.
My resume:
There are two signature fields in the document.
The first signature field is signed - the second is empty.

Try the functionalities from QuickPDF and you can get this facts by yourself ;-)





-------------
Cheers,
Ingo



Posted By: zannydive
Date Posted: 01 Apr 19 at 3:16PM
Hi Ingo,
thanks for the answer.
I didn't know that was user to user.. sorry.
I use string AcroFieldValue = DPL.GetFormFieldValueByTitle(AcroFieldTitle) but i'm not able to obtain any info.
If you have time could you tell me which functionality you had used for retrive the field value?

Thanks for the help.
Br
Marco


Posted By: zannydive
Date Posted: 01 Apr 19 at 3:32PM
Hi Ingo,
sorry... my fault.. I identify and the infor are provide correcly.
Thanks for all help




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk