Hi,
I’m using Aspose with a demo licence with the view to purchase asap. I’m attempting to sign a document and have this working using the following;
// pdfDocument holds the PDF file as a byte[]
System.IO.MemoryStream inputStream = new System.IO.MemoryStream(pdfDocument);
PdfFileSignature pdfSign = new PdfFileSignature();
pdfSign.BindPdf(inputStream);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(1, 1, 1, 1);
PKCS1 signature = new PKCS1(@“MyPFX.pfx”, “toto”);
pdfSign.Sign(1, “Signature Reason”, “Contact”, “Location”, false, rect, signature);
System.IO.MemoryStream outputStream = new System.IO.MemoryStream();
pdfSign.Save(outputStream);
This is all working as it should. If I add the pfx to the local key store and then create the PKCS1 from a stream to sign the document I get an error!
Is there any online documentation and/or examples for going this?
Many thanks
Mat