Hi,
I am trying to generate a PDFA1B compliant PDF file from an existing xlsx file using below mentioned Example-1 code. But it is not able generate the PDF with PDFA1B compliance. When I open a PDFA1B compliance PDF file with Adobe it shows up an information in blue bar saying “This file claims compliance with PDF/A standard and has been opened read-only to prevent modifications”.
This blue bar with information is NOT appearing on the top of the PDF with Example-1 Code. How ever it is able to show the blue bar with the mentioned info with Example-2 Code.
So could you please let me know why PdfCompliance.PdfA1b is not working Aspose.Cells.Rendering.PdfSecurity.PdfSecurityOptions as mentioned in the Example-1?
====================================================
Example 1: ( with Aspose.Cells.Rendering.PdfSecurity.PdfSecurityOptions )
==================================================
//Instantiate new workbook
Workbook workbook = new Workbook(filename);
PdfSaveOptions saveOption = new PdfSaveOptions();
//Set the compliance type
saveOption.Compliance = PdfCompliance.PdfA1b;
saveOption.SecurityOptions = new Aspose.Cells.Rendering.PdfSecurity.PdfSecurityOptions();
saveOption.SecurityOptions.OwnerPassword = “”;
saveOption.SecurityOptions.UserPassword = “”;
saveOption.SecurityOptions.PrintPermission = true;
saveOption.SecurityOptions.FullQualityPrintPermission = true;
saveOption.SecurityOptions.ExtractContentPermission = true;
String outputFileName = filename.Replace(".xlsx", “.pdf”);
//Save the file
workbook.Save(outputFileName, saveOption);
====================================================
Example 2: (Without Aspose.Cells.Rendering.PdfSecurity.PdfSecurityOptions)
==================================================
//Instantiate new workbook
Workbook workbook = new Workbook(filename);
PdfSaveOptions saveOption = new PdfSaveOptions();
//Set the compliance type
saveOption.Compliance = PdfCompliance.PdfA1b;
String outputFileName = filename.Replace(".xlsx", “.pdf”);
//Save the file
workbook.Save(outputFileName, saveOption);
Regards,
Sudhakar S.