Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - How do I detect that a PDF has a digital signature
  FAQ FAQ  Forum Search   Register Register  Login Login

How do I detect that a PDF has a digital signature

 Post Reply Post Reply
Author
Message
AnnD View Drop Down
Beginner
Beginner


Joined: 30 Jan 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote AnnD Quote  Post ReplyReply Direct Link To This Post Topic: How do I detect that a PDF has a digital signature
    Posted: 11 Feb 13 at 9:28PM
In my application I am adding some modifications to a PDF file.  I don't want to invalidate the digital signature, so I want to skip the modification if a file has a digital signature.  How do I determine if the file has a digital signature using the QuickPDF api?

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 13 at 10:14AM
Hi Ann!
 
That's not possible with QuickPDF-functionality:
What i can imagine is ...
Read the complete pdf-content into a string and check for
special tags having to do with signatures.
Before you should have a look (with notepad) into a pdf
without and with signature to see the differences.
Only an idea ... perhaps it works ;-)
 
Cheers and welcome here,
Ingo
 
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 13 at 7:10AM

You may want to try the following code

            bool hasSig = false;
            for (int i = 1; i <= QP.FormFieldCount(); i++)
                if (QP.GetFormFieldType(i) == 6)     // FormFieldType = Signature
                    hasSig = true;

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 13 at 1:41PM
Good to know.
Should be something for the guides or samples?
Nobody will have the idea to check the formfield-types ;-)
 
Cheers, Ingo
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store