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 - Can't get DPLSignFile to work
  FAQ FAQ  Forum Search   Register Register  Login Login

Can't get DPLSignFile to work

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


Joined: 12 May 17
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jomski Quote  Post ReplyReply Direct Link To This Post Topic: Can't get DPLSignFile to work
    Posted: 12 May 17 at 7:15AM
I'm using Trial Version of QuickPDF v13.12, and I can't seem to get DPLSignFile to work. This is the barest minimum code that I made and I'm still stuck.

I'm using the code below:
Quote
DEBENUPDFLIBRARYLIB1312_DllMain(GetModuleHandle(NULL), DLL_PROCESS_ATTACH, NULL);
int InstanceID = DPLCreateLibrary();
auto retValue = DPLUnlockKey(InstanceID,L"my_unlock_key");

retValue = DPLSignFile(InstanceID, L"C:\\Users\\jmante\\Documents\\Unsigned.pdf",
L"",
L"DIGITAL_SIGNATURE",
L"C:\\Users\\jmante\\Documents\\Signed.PDF",
L"C:\\Users\\jmante\\Documents\\MyOwn.pfx",
L"123456789",
L"To test digital signatures",
L"The World",
L"Contact me");

DPLReleaseLibrary(InstanceID);
DEBENUPDFLIBRARYLIB1312_DllMain(GetModuleHandle(NULL), DLL_PROCESS_DETACH, NULL);
    return 0;
}


DPLSignFile always returns 1 but when I check the file using Acrobat DC it looks exactly as the unsigned version. There is also no Signature Tab/Panel. 

Thanks in advance.


Edited by Ingo - 12 May 17 at 9:42AM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2599
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 17 at 9:45AM
Hi Jomski,

about signing files please first read here:
http://www.debenu.com/kb/advanced-options-signing-pdf-files/
...and in the developer guide.
Both should give help.

Cheers and welcome here,
Ingo
Cheers,
Ingo

Back to Top
jomski View Drop Down
Beginner
Beginner


Joined: 12 May 17
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jomski Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 17 at 11:42PM
Originally posted by Ingo Ingo wrote:

Hi Jomski,

about signing files please first read here:
http://www.debenu.com/kb/advanced-options-signing-pdf-files/
...and in the developer guide.
Both should give help.

Cheers and welcome here,
Ingo

Thanks Ingo! My next step after this is to add visual digital signature (which is also in the developer guide, very handy!). I will try this and see where this takes me.

Cheers!
Back to Top
jomski View Drop Down
Beginner
Beginner


Joined: 12 May 17
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jomski Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 17 at 2:01AM
I got it to work finally! And the problem is not in the Debenu Library. It's in the PDF I was trying to sign. 

Initially I'm trying to sign a temporary PDF file that was created by MS Word. I'm not sure what flags is MS-Word using but signing ANY PDF generated by MS Word ALWAYS fails. Very very frustrating!

I tried with another PDF file and it signed it perfectly, no problem at all.

Anyways. Thanks Ingo for the help.

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

Joined: 29 Oct 05
Status: Offline
Points: 2599
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 17 at 8:51AM
Hi,

after Load you can check the document properties (author/creator).
If it's MS Word you can do a LoadFromFile and a new SaveToFile (and then it's QuickPDF and should work for you ;-)

Cheers,
Ingo

Back to Top
jomski View Drop Down
Beginner
Beginner


Joined: 12 May 17
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jomski Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 17 at 11:44PM
Originally posted by Ingo Ingo wrote:

Hi,

after Load you can check the document properties (author/creator).
If it's MS Word you can do a LoadFromFile and a new SaveToFile (and then it's QuickPDF and should work for you ;-)


Ahh that's a neat trick. I will definitely keep that in mind! Thanks!
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