Secure PDF/A file using PdfFileSecurity by Aspose.PDF for .NET - output is not PDFA compliant

Hi,

We are trying to protect PDF/A-1b file using Aspose.Pdf.Facades.PdfFileSecurity:
var privilege = Aspose.Pdf.Facades.DocumentPrivilege.ScreenReaders;
var fileSecurity = new Aspose.Pdf.Facades.PdfFileSecurity();
fileSecurity.BindPdf(inputFile);
fileSecurity.SetPrivilege(privilege);
fileSecurity.Save(outputFile);
fileSecurity.Close();
The input file ProtectDocument Vision v1 - PDFA-1b.pdf (49.5 KB) is PDF/A-1b compliant, however the output file ProtectDocument Vision v1 - PDFA-1b.pdf.pdf (49.6 KB) is not.

Whether the PdfFileSecurity supports the PDF/A formats or the described behavior is expected?

Best regards
Valeriy

@uaprogrammer

Thanks for contacting support.

We have tested the scenario in our environment while using Aspose.Pdf for .NET 17.9 and were able to notice that compliance was lost after applying the security to PDF document. Hence we have logged an issue as PDFNET-43368 in our issue tracking system. We will further investigate the issue and keep you updated with the status of its correction. Please be patient and spare us little time.

We are sorry for this inconvenience.

Hi,

Would you be so kind to provide us with status on the PDFNET-43368 issue?

Best regards,

Oleh

@uaprogrammer

We are afraid that earlier logged issue could not get resolved due to other high priority issues in the queue. We will surely inform you as soon as there are some certain updates regarding its resolution. Please spare us little time.

We are sorry for the inconvenience.

Hi,

Could you inform us if there are any updates regarding the issue?

BR
Oleh

@uaprogrammer

We regret to share that issue is not yet resolved. We will certainly inform you as soon as it is resolved or we have some updates regarding its resolution ETA. Please give us some time.

We are sorry for the inconvenience.

Hello,

Could you provide me with the updates regarding the issue’s status in Aspose?

Thank you in advance.

Best regards, Oleh

@uaprogrammer

We are afraid that the ticket PDFNET-43368 is not yet resolved. We have recorded your concerns and will surely update you once it is fixed. We highly appreciate your patience and cooperation in this regard. Please give us some time.

We are sorry for the inconvenience.

Hi,

Could you inform us if there are any updates regarding the issue?

BR
Oleh

@uaprogrammer

We are afraid that the issue is not yet resolved. We will certainly inform you once it is fixed. Please give us some time.

We apologize for the inconvenience.

We are using the latest version of aspose. Still, we are facing the same issue.
We tried following things:

  1. We used Aspose.Words.Saving.PdfSaveOptions to apply both pdf encryption and compliance. In this case compliance applied and all encryption future went away.
    Document doc = new Document("Test.docx"); var options = new PdfSaveOptions(); PdfEncryptionDetails encryptionDetails = new PdfEncryptionDetails("password", "sathish"); encryptionDetails.Permissions = PdfPermissions.DisallowAll; options.EncryptionDetails = encryptionDetails; options. Compliance = PdfCompliance.PdfA1b; doc.Save("Transformed.pdf", options);
  2. As we lost encryption in above step we tried to apply encryption using below code this time we lost Compliance.
    PdfFileSecurity security = new PdfFileSecurity(); DocumentPrivilege privilege = DocumentPrivilege.ForbidAll; privilege.ChangeAllowLevel = 3; privilege.AllowPrint = false; privilege.AllowCopy = false; privilege.AllowFillIn = false; privilege.AllowModifyAnnotations = false; security.BindPdf(pdfDocument); security.SetPrivilege(privilege); security. Save("out.pdf");

@sarathisathish90

Have you tried to apply security first and then convert the document into PDF/A using Aspose.PDF for .NET 23.4? If issue is still persisting, please share your sample PDF with us so that we can test it using the latest version and address the issue accordingly.

We request that you create an inquiry in Aspose.Words category where you will be assisted accordingly.