Print Page | Close Window

Signed PDF info

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=3270
Printed Date: 15 Jan 26 at 4:46PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Signed PDF info
Posted By: Chopinke
Subject: Signed PDF info
Date Posted: 19 Feb 16 at 3:51PM
Hi,

I can't seem to find the function to determine if a PDF is digitally signed and the function to retrieve digital signature information to display to the user. I would like to display some information from what Adobe Reader displays in the Signatures panel.

Thanks!



Replies:
Posted By: Ingo
Date Posted: 19 Feb 16 at 8:16PM
Hi,

actually there isn't a function to check if there's an existing signature but you can do it yourself.
There are always some special tags in the pdf-source if there's an existing signature.

You can read the complete pdf-file from disc into a string.
Then you can convert it (for better search results) to upper cases.
Then you can search (with "Pos") for these special signatures.
I've done it with Delphi XE5 but you can do it similar with any other language.

// . . .
          textkomplett := LoadFileToStr2(FName);
          uppercontent := UpperCase(textkomplett);
          If ( ( ( Pos('/TYPE /SIG', uppercontent) > 0 ) and
                 ( Pos('/FT /SIG', uppercontent) > 0 ) ) or
               ( ( Pos('/TYPE/SIG', uppercontent) > 0 )  and
                 ( Pos('/FT/SIG', uppercontent) > 0 ) )  or
               ( Pos('/SIGFLAGS', uppercontent) > 0 ) )  Then
               sign_ja := '1';
// . . .



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



Posted By: Chopinke
Date Posted: 22 Feb 16 at 7:51AM
Thanks for the info, so it has to be manually. I found a reference:

https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf

I am working with DXE7, so I need to find a way to also verify the substring DSS.




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