Create AES Encrypted PDFs in C# and VB .NET

by Andy C Tue, July 31 2012, 2:48 PM (US Eastern Time)

We recently released an update that introduces AES-256 bit and AES-128 bit encryption to our .NET PDF creation and merging library. We have offered encryption since 2002, but this was limited to RC4-40 bit and RC4-128 bit security until this release. We have also restructured the API a bit in order to easily accommodate new encryption methods in the future.

Encryption is now handled by 4 classes in a new ceTe.DynamicPDF.Cryptography namespace:

All security classes allow restrictions to be placed on a PDF to restrict printing, modification, copying content or updating/adding text annotations or form fields. The 128-bit and higher classes allow restrictions to be placed on a PDF to restrict filling in existing form fields, extracting text and graphics for accessibility purposes, modifying the pages included, high resolution printing or leaving the XMP metadata unencrypted. The AES classes also add the ability to encrypt only file attachments.

The C# code to add AES-256 bit encryption to a new document is very straight forward:

Document document = new Document();
Page page = new Page();
page.Elements.Add(new Label("AES-256 bit encrypted PDF.", 0, 0, 500, 15));
document.Pages.Add(page);
// Add the encryption
Aes256Security security = new Aes256Security("ownerpassword", "userpassword");
security.AllowHighResolutionPrinting = false;
// Set other encryption options
document.Security = security;
// Output the PDF
document.Draw("MyPDF.pdf");

More...

Tags: , , , ,

DynamicPDF Core Suite for .NET v7.0.1 Release

by Robbie W Mon, July 16 2012, 1:12 PM (US Eastern Time)

The 7.0.1 update of DynamicPDF Core Suite for .NET (Generator, Merger and ReportWriter) has now been released on our website (download it here).  This update addresses a few bug fixes, enhancements and depreciated items but the functionality that takes center stage here is the new encryption algorithms that have been added.  Version 7.0.1 has added support for AES 128-bit and 256-bit encryption algorithms as well as crypt filters.  We will elaborate on these new encryption features in a future post but for now, take a look at the Help Library's page:

More detailed information regarding v7.0.1 can be found here:

Are there any new features that you would like to see in our DynamicPDF components? Let me know by commenting below.

Tags: , , , , ,