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 - Problems on adding digital signature
  FAQ FAQ  Forum Search   Register Register  Login Login

Problems on adding digital signature

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


Joined: 19 Apr 17
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote yuen Quote  Post ReplyReply Direct Link To This Post Topic: Problems on adding digital signature
    Posted: 19 Apr 17 at 11:54AM
Hi,
I'm trying to add digital signature on some pdfs but my program terminate in DPLSignFileA without warning.
I work with DebenuPDFLibraryLIB0916, MFC on Visual studio 2012.
I have no idea what is wrong.
Please help.

Here is what I did:

CString inputFileName = "C:\\Temp\\test.pdf";
    CString openPassword = "";
    CString signatureFieldName = "Signature1";
    CString outputFileName = "C:\\Temp\\Signed.pdf";
    CString pfxFileName = "C:\\Temp\\aaa.pfx";
    CString pfxPassword = "aaa";
    CString reason = "";
    CString location = "";
    CString contactInfo = "";

    CStringW strLicenseKey(LICENCEKEY_DEBENU_PDFLIB);
    int m_InstanceID = DPLCreateLibrary();
    int iResult = DPLUnlockKey(m_InstanceID, (WCHAR*)(LPCUWSTR)strLicenseKey);

    int ret = DPLSignFileA(m_InstanceID, (char*)(LPCTSTR)inputFileName,
                                        (char*)(LPCTSTR)openPassword,
                                        (char*)(LPCTSTR)signatureFieldName,
                                        (char*)(LPCTSTR)outputFileName,
                                        (char*)(LPCTSTR)pfxFileName,
                                        (char*)(LPCTSTR)pfxPassword,
                                        (char*)(LPCTSTR)reason,
                                        (char*)(LPCTSTR)location,
                                        (char*)(LPCTSTR)contactInfo);


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

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 Apr 17 at 6:51PM
Hi Yuen,

what is function LastErrorCode telling you?
You should insert it directly after your problem function call.
If this doesn't give you any idea you should search here:
http://www.debenu.com/docs/pdf_library_reference/Search.php
with the tag "search".

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
yuen View Drop Down
Beginner
Beginner


Joined: 19 Apr 17
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote yuen Quote  Post ReplyReply Direct Link To This Post Posted: 20 Apr 17 at 1:21PM
Ingo,

Thank you for reply.
Unfortunately, the problem function terminate before returning value,
so I couldn't get the result of GetLastError().
If I set parameter pfxFileName to be empty or wrong paths,
the function ends properly and returns error value.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 Apr 17 at 5:12PM
Hi :)

so some of your pdfs are protected?
How are the security settings?
Is there a master-password (not the user password)?
Try decrypt before signing...

Cheers,
Ingo

Back to Top
yuen View Drop Down
Beginner
Beginner


Joined: 19 Apr 17
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote yuen Quote  Post ReplyReply Direct Link To This Post Posted: 21 Apr 17 at 4:05AM
Hi

I tried to use DLL Edition instead of LIB Edition then it works fine.
So I guess my pdfs are not protected.

The error I got in LIB Edition is 0xC0000005: Access violation.
I guess some of my setting in my IDE are incorrect but other function works well or ...
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