We are using the PDFEncryptionDetails capability to secure a PDF and prevent changes. This works good for us, but one environment suddenly is taking approximately 20 seconds to process this step regardless of the size of the Word document. All other environments take less than one second to process this code. I am wondering if the server this is running on (IIS 8) has RC4 encryptions disabled, could this be causing the latency? Here’s a code snippet where we save the PDF:
Aspose.Words.Document doc = new Aspose.Words.Document(wordDoc);
doc.Save(outStream, getPDFSaveOptions());
private Aspose.Words.Saving.PdfSaveOptions getPDFSaveOptions()
{
Aspose.Words.Saving.PdfSaveOptions pdfSaveOptions = new Aspose.Words.Saving.PdfSaveOptions();
pdfSaveOptions.UpdateFields = false;
Aspose.Words.Saving.PdfEncryptionDetails encryptionDetails =
new Aspose.Words.Saving.PdfEncryptionDetails("", Guid.NewGuid().ToString(), Aspose.Words.Saving.PdfEncryptionAlgorithm.RC4_128);
encryptionDetails.Permissions = Aspose.Words.Saving.PdfPermissions.DisallowAll;
pdfSaveOptions.EncryptionDetails = encryptionDetails;
return pdfSaveOptions;
}