URGENT! Need the ability to re-sign PDF ASAP

Hello,

I'm currently working with a customer to implement pdf document resigning using Aspose.PDF for .NET.Currently the only facility that I see Aspose.PDF supporting in this vien is a call to completely obliterate a signature field with a given field name (PdfFileSignature.RemoveSignature ( System.String)). This does not help as we want to re-sign the document in the same location with a signature field of the same name.

There are two paths I can see that would support this need.

The first path would be to have an Aspose.PDF interface that simply removes the signature data from the existing signature field and open that existing field back up for resigning.

The other path would be to have an Aspose.PDF interface that would return the rectangle of a signature field when given the signature field name. This would enable the user to delete the old signature field and then add a new field of the same dimensions back into the document at the same location with the same name as the field that was deleted.

The later approach could be used internally to implement the first approach.

This is an immediate need. Please help!

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

Please use SignatureField class of Aspose.Pdf DOM to get the Signature Field from your existing PDF document and replace it. You may check the following sample code regarding how to get the Signature Field using Aspose.Pdf DOM. You can use SignatureField.Signature property to get the signature and SignatureField.Rect property to get the position of the signature in the file.

//open document

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document("input.pdf");

//open document

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document("input.pdf");

// Sample Signature field

SignatureField signatureField1 = (SignatureField)pdfDocument.Form["Sinature1"];

//Get Signature

Signature sign = signatureField1.Signature;

//Get Position

Aspose.Pdf.Rectangle rect = signatureField1.Rect;

Please do let us know in case you need any further assistance or you face any issue.

Thank You & Best Regards,

How would someone go about getting the page number assocaited with the signature field?

atoth:

How would someone go about getting the page number assocaited with the signature field?

Hi,

I am afraid the requested feature is currently not
supported but for the sake of implementation, I have logged this requirement in
our issue tracking system under New Features list as PDFNEWNET-34519. We will further investigate this requirement in
details and will keep you updated on the status of a correction. <o:p></o:p>

We apologize for your inconvenience.

Hi,


Thanks for your patience.

Please try using Field.PageIndex property to get page number information (this property is not signature-specific and is applicable for field of any type)

[C#]

//document 34519 contains signature
named “Signature1”
<o:p></o:p>

Document doc = new Document("c:/pdftest/34519.pdf");

Console.WriteLine((doc.Form["Signature1"] as Field).PageIndex);

The issues you have found earlier (filed as PDFNEWNET-34519) have been fixed in Aspose.Pdf for .NET 7.6.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.