PDF Certificate Signature Visible

We just upgraded from version 17.9 to 18.8, and we noticed that when we sign with a certificate that although we have set it to be NOT visible it is appearing (visible) in the PDF viewer in the latest aspose PDF version; whereas in version 17.9 it was not visible. Basically, we don’t want that warning to show that says the signature is invalid because it is self signed, and in version 17.9 we were able to do that.

Is there a new property that we are not aware of to make it invisible again?

Original Code:

pdfSign = New PdfFileSignature(pdfDocument)

Dim signature As New Aspose.Pdf.Forms.PKCS7(New MemoryStream(PFX), PFXPassword)
signature.ShowProperties = False

Dim rect As New System.Drawing.Rectangle(0, 0, 0, 0)

pdfSign.Sign(1, “signature1”, “Reason”, “Contact”, “Location”, False, rect, signature)
pdfSign.Save(ms)

I went back, and downloaded every version between 17.9 and 18.8, and noticed that this broke starting in version 18.2. Please fix this as it’s not the expected behavior given the visibility being set to false. As you can see in the screencap below up to version 18.1, the signature panel doesn’t appear when it’s set to false as expected, but starting in version 18.2, the panel appears no matter what the property is set to.

signaturepanel.png (13.6 KB)

@davidmm

Thank you for contacting support.

Would you please share the PDF file having signature field signature1 along with generated PDF files displaying the difference that you have captured in the screenshot, so that we may investigate further to help you out.

Two files have been generated and named accordingly as we tested each aspose pdf version starting with the version we were currently using 17.9, and found that it broke starting in V18.2.

AsposePDF_V18_1.pdf (6.7 KB)
AsposePDF_V18_8.pdf (6.7 KB)

@davidmm

Thank you for sharing requested data.

Please also share the source PDF file which has signature1 field in it so that we may proceed further to help you out.

It is added programatically.

formEditor = New FormEditor(pdfDocument)

formEditor.AddField(FieldType.Signature, “signature1”, 1, 0, 0, 0, 0)

formEditor.SetFieldAppearance(“signature1”, Annotations.AnnotationFlags.Invisible And Annotations.AnnotationFlags.Hidden And Annotations.AnnotationFlags.Locked And Annotations.AnnotationFlags.LockedContents And Annotations.AnnotationFlags.NoView)

@davidmm

We have not been able to reproduce the issue in our environment. Warning is appearing in both cases. We have attached generated PDF files for your kind reference. Would you please create a sample application and share it with us along with the PFX file and its password so that we may investigate further to help you out.

Here is the full code we use. Try it again with both version 18.1 and 18.8 as we did a quick test before submitting to make sure the results are consistent on our end.

Here is the full code we use. Try it again with both version 18.1 and 18.8 as we did a quick test before submitting to make sure the results are consistent on our end.

addsigcode.zip (1.0 KB)

Attached is the same cert used to test with. The password is Mj5d6J8AyLm42Ris

cert.zip (1.9 KB)

@davidmm

Thank you for sharing the files.

We have tried to work with the code snippet shared by you but we are getting CryptographicException when commenting out the Catch statement before Finally statement. Attached is the screenshot for your kind reference Exception.jpeg. Would you please create a narrowed down sample application reproducing the issue so that we may proceed further to assist you.

I’ve never seen that error before as it should have worked. Anyways, I created a project for you. You need to replace the aspose license with yours, and add the asposepdf dll reference as well. I’ve taken care of the pfx and pdf file for you too to try to make it as plug and play as possible.

asposePDF.zip (264.9 KB)

@davidmm

Thank you for sharing requested data.

We have been able to reproduce the issue in our environment. A ticket with ID PDFNET-45262 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Will the fix be made in the next release?

@davidmm

The ticket has recently been logged under free support model so it will be scheduled on its due turn which can take some months to resolve. We will notify you as soon as the ticket will be resolved.

However, we also offer Paid Support, where issues are used to be investigated with higher priority. Our customers, who have paid support subscription, report their issue there which are meant to be investigated urgently. In case your reported issue is a blocker, you may please consider subscribing for Paid Support. For further information, please visit Paid Support FAQs.

What is the status for this bug?

@davidmm

Thank you for getting back to us.

We are afraid PDFNET-45262 is still pending for investigations owing to previously logged and critical tickets. It may take few more months to resolve. We will let you know as soon as some significant updates will be available. We appreciate your patience and comprehension in this regard.

It’s been almost 7 months since this bug was acknowledged. I understand there are other issues, but it’s not like a new bug as this used to work in previous releases, but broke with subsequent releases at a specific release.

@davidmm

Thank you for being patient.

We are afraid this ticket is still unresolved owing to previously logged and critical issues. However, we have raised its priority to next level while recording your concerns. We will try to schedule it soon and will update you once resolved. Please spare us some more time.

This is approaching one year since this issue was acknowledged. This is seriously poor service as 3 months would be acceptable, but 9 months is just ridiculous. We purchased a new license because we want to upgrade to the latest version, but can’t because this issue exists.

Who do we need to contact to escalate this to be fixed as it used to work in a prior version.