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!
Problems on adding digital signature |
Post Reply |
Author | |
yuen
Beginner Joined: 19 Apr 17 Status: Offline Points: 4 |
Post Options
Thanks(0)
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); |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 |
|
yuen
Beginner Joined: 19 Apr 17 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
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. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 |
|
yuen
Beginner Joined: 19 Apr 17 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
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 ... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store