We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Support AESx128 as PdfEncryptionAlgorithm

I use Aspose.Words 19.12 to convert word document to PDF. I want to encrypt the PDF file by this code:

var document = new Aspose.Words.Document(sourceFilePath);
var pdfSaveOption = new Aspose.Words.Saving.PdfSaveOptions();
var ownerPassword = Guid.NewGuid().ToString("N");
var pdfSecurityDetails = new Aspose.Words.Saving.PdfEncryptionDetails(string.Empty, ownerPassword, Aspose.Words.Saving.PdfEncryptionAlgorithm.RC4_128);

pdfSecurityDetails.Permissions = Aspose.Words.Saving.PdfPermissions.DisallowAll;
pdfSaveOption.EncryptionDetails = pdfSecurityDetails;

document.Save(resultFilePath, pdfSaveOption);

How I can encrypt the PDF by the AESx128 algorithm?

@freydoonk

Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we logged this feature request as WORDSNET-5101 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-5101) have been fixed in this Aspose.Words for .NET 22.3 update also available on NuGet.