A customer of ours has stated that the PDFs we create with Aspose don’t fully comply with the ISO standard for PDF 1.7, the ISO 32000-1. They claim that the encryption parameters in the generated PDF are out of the standard’s scope. The encryption parameter in question is from Table 21 – Additional encryption dictionary entries for the standard security handler, Key R. According to the Adobe’s open source version of the document it should be between values 2-4, but Aspose PDFs have value 5.
A program they used generated the following error:
Expected encryption dictionary /R security revision number to be from 1 to 4. found /R=5
We tested their claim with a simple test program using Aspose.PDF 22.2 for .NET. See the code below. Any PDF produced with it has the same security revision issue.
Aspose.Pdf.Document pdf = new Aspose.Pdf.Document( filePath );
pdf.Encrypt( string.Empty, “XXX”, Aspose.Pdf.Facades.DocumentPrivilege.AllowAll, Aspose.Pdf.CryptoAlgorithm.AESx256, false );
using( var errStream = new MemoryStream() )
{
// Convert.
pdf.Convert( errStream, PdfFormat.v_1_7, ConvertErrorAction.Delete );
errStream.Flush();
errStream.Dispose();
}
pdf.Save( “ENCRYPTED_AESx256_v_1_7.pdf” );
Which ISO PDF standard revision do Aspose products conform to? How are you following the encryption dictionary values, especially the R key? Is Aspose fully compliant with the PDF ISO standard?