Posted 4 November 2020, 2:44 am EST
Which versions of ActiveReports, if any, create PDFs that are ADA compliant?
Forums Home / ActiveReports / ActiveReports v7+
Posted by: rkuehn on 4 November 2020, 2:44 am EST
Posted 4 November 2020, 2:44 am EST
Which versions of ActiveReports, if any, create PDFs that are ADA compliant?
Posted 4 November 2020, 3:23 pm EST
Hello,
What I understood, from ADA compliant, you are referring to 508 PDF compliance. If my understanding is correct then AR11 + supports the 508 PDF compliance.
You need to set the version property of PDF export to PDF/UA-1 to make a pdf 508 compliance.
If there is any bug occurs, then it will be fixed only in the latest version of the AR.
Thanks,
Mohit
Posted 10 November 2020, 10:54 am EST
https://www.grapecity.com/forums/ar-dev/activereports-and-ada-comp#hellowhat-i-understood-fro
Mohit,
Thanks for your response. Can you help me understand how setting that property in AR11+ makes the PDF generated by ActiveReports compliant? Or can you point me to resources explaining how that compliance is achieved?
Thanks in advance for your help!
Posted 10 November 2020, 6:24 pm EST
Hello,
You can use the following lines of code to make the generated PDF as 508 complaince.
For SectionReport,
// Create a Section report.
GrapeCity.ActiveReports.SectionReport rpt = new GrapeCity.ActiveReports.SectionReport();
// For the code to work, report.rpx must be placed in the bin\debug folder of your project.
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Application.StartupPath + "\\report.rpx");
rpt.LoadLayout(xtr);
rpt.Run();
GrapeCity.ActiveReports.Document.SectionDocument MyDocument = new GrapeCity.ActiveReports.Document.SectionDocument("rpt");
// Export the report in PDF format.
GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport PdfExport1 = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
PdfExport1.Version = GrapeCity.ActiveReports.Export.Pdf.Section.PdfVersion.PDFUA1;
PdfExport1.Export(MyDocument, Application.StartupPath + "\\PDFExpt.pdf");
For PageReport,
// Provide the page report you want to render.
System.IO.FileInfo rptPath = new System.IO.FileInfo(@"..\..\PageReport1.rdlx");
GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(rptPath);
// Create an output directory.
System.IO.DirectoryInfo outputDirectory = new System.IO.DirectoryInfo(@"C:\MyPDF");
outputDirectory.Create();
// Provide settings for your rendering output.
GrapeCity.ActiveReports.Export.Pdf.Page.Settings pdfSetting = new GrapeCity.ActiveReports.Export.Pdf.Page.Settings();
// Set the rendering extension and render the report.
GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension pdfRenderingExtension = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();
GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name));
// Overwrite output file if it already exists
outputProvider.OverwriteOutputFile = true;
pdfSetting.Version = GrapeCity.ActiveReports.Export.Pdf.Page.PdfVersion.PDFUA1;
pageReport.Document.Render(pdfRenderingExtension, outputProvider, pdfSetting);
Hope it helps.
Thanks,
Mohit