Access violation when trying to add a digital signature

If you are a Delphi developer and have any questions about using our products from Delphi here is the place to post them.
Post Reply
Philippe
Posts: 3
Joined: Thu Aug 11 2005

Access violation when trying to add a digital signature

Post by Philippe »

Hello all

I'm using Delphi 7 with an evaluation version of PDF Creator Developer Pro.
My whishes are the following :
- open an existing PDF
- crypt it (40 or 128 bits)
- digitally sign it
- save it

I'm currently comparing PDF Creator with other components in order to sign PDF in batch mode (service).

When I try this with PDF creator, I get an access violation during the DigitalSignature call.

Here is my source code :

PDF1.SetLicenseKey(AMYUNI_LICENCE_COMPANY, AMYUNI_LICENCE_KEY);
PDF1.Open(txtFileName.Text, '') ;
PDF1.Encrypt128('owner', 'user', -64);
PDF1.DigitalSignature('Test signature', 'Test purpose', '', '', 1, 100, 100, 400, 200, 1 + 4 + 32) ;
PDF1.Save(txtFileName.Text + '.signed.pdf', acFileSaveAll);



If I remove the DigitalSignature line call, all is OK and I get a new crypted pdf file.

Do you know what is wrong ?

Thanks in advance
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

The error message is occur because DigitalSignature() function can not access or find the digital signature.

The Digital Signatures option uses the Microsoft signature handler (PPKMS digital signatures types) and the resulting signed documents are viewable in Adobe Reader (windows) versions 4.0 and higher.

Also, the digital signature option of the PDF Converter functions with digital certificates when are store in the “My” or “Personal” store.

Hope this helps?
Philippe
Posts: 3
Joined: Thu Aug 11 2005

Post by Philippe »

Thanks for your answer.

It's very strange, because Acrobat 6 full is installed on my PC, and I can sign documents directly in Acrobt with my certificate.
I tried DigitalSignature() method with different values of parameters (names, stores, ...) but the result is always the same : error.

I tried on another PC (XP) too, as my own developement PC is on NT4, but it doesn't work better.

From the interactive program PDF Creator, if I open y document and try to interactively sign it, the certificate is present in the combo box. I select it, but the when I click on the Sign button, nothing is done, and no signature is set on the document.

Is that a limit of the evaluation version ?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Which version of the PDF Creator you are using? I tried to use the PDFCreactiveXDoc.exe to generate a pdf file, encrypt it and add to it a digital signature and it works perfectly.

I am using version 2.0d myself.
Philippe
Posts: 3
Joined: Thu Aug 11 2005

Post by Philippe »

I used 2.0d too, I think... But, as we were evaluating different solutions, we chose another product, which works well on NT4 and W2K, is fully compatible with our certificates and don't cost so much (Delphi, Acrobat SDK and Acrobat 6/7).

Thanks to all persons who tried to resolve my problem.
Post Reply