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!
![]() |
SignFile stack overflow exception |
Post Reply
|
| Author | |
jreed
Beginner
Joined: 01 Nov 12 Location: Indianapolis Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: SignFile stack overflow exceptionPosted: 01 Nov 12 at 10:13PM |
|
Hi,
I keep getting a stack overflow exception when I try to sign a PDF. For testing purposes I'm using the PFX file that came with the Demo application = qpl_test.pfx Here's a snippet from the code that does the signing. The code is in a Class Library project named Foundation.PDF.dll which is referenced by a test console application. Note: All other QuickPDF functions are working fine (i.e. filling form values). _______ _library = new PDFLibrary(@"3rd/DebenuPDFLibraryDLL0911.dll"); _library.UnlockKey(Qpdf.Default.LicenseKey); if (_library.Unlocked() == 0) throw new Exception("License unlock failed. Please update the LicenseKey setting"); var result = _library.SignFile(inputFileName, openPassword, signatureFieldName, outputFileName, pfxFileName, pfxPassword, reason, location, contactInfo); _______ The variables in the call to sign file are as follows: in order inputFileName="test.pdf" openPassword="" signatureFieldName="Signature_Employee" outputFileName="signed.pdf" pfxFileName="qpl_test.pfx" pfxPassword="testing" reason="Employee Signature" location="Office" contactInfo="user@user.com" The exception I'm getting reads: An unhandled exception of type 'System.StackOverflowException' occurred in Foundation.PDF.dll The exception occurs in PDFLibrary class: public int SignFile(string InputFileName, string OpenPassword, string SignatureFieldName, string OutputFileName, string PFXFileName, string PFXPassword, string Reason, string Location, string ContactInfo) { if (dll == null) return 0; else return dll.DebenuPDFLibrarySignFile(instanceID, InputFileName, OpenPassword, SignatureFieldName, OutputFileName, PFXFileName, PFXPassword, Reason, Location, ContactInfo); } What can I do? I've tried different editors to make the test pdf with a signature field (Adobe XI, Nitro PDF). Any help would be greatly appreciated. Thanks, Jeremy
|
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 Nov 12 at 9:37AM |
|
Jeremy, Andrew.
|
|
![]() |
|
jreed
Beginner
Joined: 01 Nov 12 Location: Indianapolis Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 Nov 12 at 12:48PM |
|
Andrew,
I just tried what you suggested; still getting the stack overflow exception. My test project can be downloaded from here. (VS 2010 C# .Net 4 - target x86) The test PDF files are in the zip. That said, here are some new findings. I've narrowed it down to a specific file that had its
form created using Nitro PDF 8 Pro. The I9-adobeXITest.pdf is the original I-9 with just a signature filed added, no other form input fields. QuickPDF signs this file without issue. So what is it that is wrong with nitroTest.pdf? As far as I can tell the only difference between it and I9-adobeXITest.pdf is that nitroTest.pdf has several form fields and I9-adobeXITest.pdf only has one field = signature. Jeremy |
|
![]() |
|
jreed
Beginner
Joined: 01 Nov 12 Location: Indianapolis Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 Nov 12 at 5:24PM |
|
Ok,
So I completely recreated the PDF form using Adobe XI Pro, but now I have more problems. If I just save the form from Adobe XI and try to fill and sign it, the resulting document is corrupted and when opened results in Acrobat stating there was an error opening the file (code 14 = corrupt). So I saved the file As Optimized support Acrobat version 4.0+ and the code 14 error went away. However, I can either fill the form fields or sign the file, but not both. If I fill it and sign it, the signature is just gone. If I don't fill the fields and just sign it, the file is signed correctly. For the life of me I can't figure this out. The only thing I can see that is different after filling the form fields and calling qp.SaveToFile() is that QuickPDF added Helvetica and ZapfDingbats fonts (not sure why???). Please help, I've already wasted a full day and a half on this tool. I'm going to have to move on to another product soon. Thanks, Jeremy
|
|
![]() |
|
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