I would like to apply PDF converter with the digital signing features using PowerBuilder.
I used a standard .p12 certificate for the digital signing and the certificate worked well with digisign_test.exe. However, upon signing the pdf file, I encountered the following signature error in pdf. Please help. Thanks.
Error in PDF
Signature is invalid:
There are errors in the formatting or information contained in this signature (Unexpected byte range values defining scope of signed data.)
Signer's identity has not yet been verified
Code
boolean result1
// create the new ole object.
doc1 = create oleobject
// Connect the doc1 ole object to the cdintf interface of CDIntf.dll
doc1.ConnectToNewObject("cdintfEx.document")
doc1.SetLicenseKey("LicenseTo", "ActivationCode")
// Open the pdf file to which the Passwords shall be added
doc1.Open ("C:\test.pdf")
// Digital signing
result1 = doc1.DigitalSignature ("TestCert", "Approved", "C:\test.jpg", "Hong Kong", 1, 100, 100, 400, 300, 1 + 2 + 4 +

// save the opened document.
doc1.Save ("C:\test_sgined.pdf")
// Destroy doc1 object
Destroy doc1