I like this job of announcing new features. We have been doing it in this blog “informally” either just before the next release or just after it. Today I felt like it is time to “acknowledge” this as an activity that we will do on a regular basis.
It’s only been a week since Aspose.Words for .NET 9.4 and already our next version shceduled for some time in October is shaping up. The features that were in the works are being integrated into the trunk and I get to spend some time reviewing them.
So far I posted about the new feature that allows to split HTML and EPUB into parts. I was particularly impressed with how much difference it made to viewing generated EPUB books on my iPod.
Yesterday I got to review another new feature that allows you to add a digital signature to PDF documents generated by Aspose.Words. I found it very easy to use and just had to post about it. Here is how you do it:
// Load a document in any format supported by Aspose.Words. Document doc = new Document(@”C:\MyDocument.docx”); // Create the save options that will cause the digital signature to be attached. PdfSaveOptions options = new PdfSaveOptions(); // Optional. I justed wanted to check that the document still complies to PDF/A-1b options.Compliance = PdfCompliance.PdfA1b; // You need to load your certificate or get it from the storage. X509Certificate2 cert = new X509Certificate2(@”C:\MyCertitifcate.pfx”, “my cert password”); // Set this object in the options. options.DigitalSignatureDetails = new PdfDigitalSignatureDetails( cert, // Your certificate. “Меня попросили!”, // optional, reason for signing. I type in Russian to check Unicode strings go okay. “Москва Товарная”, // optional, location of signing. new DateTime(2010, 9, 12)); // time of signing. doc.Save(@”C:\MyDocument Out.pdf”, options);
In this version Aspose.Words creates a PKCS#7 signature over the whole PDF document and uses the “Adobe.PPKMS” filter and “adbe.pkcs7.sha1” subfilter when creating a digital signature. The signature has no visual appearance on the page.
Let us know if you are interested in other signature types or their visual appearances.