Document archiving is an essential requirement for organizations which are dependent on historical or sensitive data. In this electronic era, we are creating heaps of digital data and archiving them from time to time. It becomes important that these electronic documents are stored in a way that remains pertinent when referenced in future.
PDF/A is a specialized standard for digital preservation that defines guidelines for archiving PDF documents for future retrieval. This standard ensures long term sustenance of PDF documents with respect to their visual appearance and preserves display on all devices irrespective of the tool or the platform.
ActiveReports has always had support for exporting reports to PDF, and with the latest ActiveReports 7 Service Pack 1 release it has taken a step further and added support for PDF/A as well. This simply implies that reports created using ActiveReports can be exported to PDF/A documents and therefore can be archived for long term preservation. ActiveReports7 includes support for all the PDF Compliance levels and their versions listed below.
A report created using ActiveReports can be exported to any of these standards by just setting the Version property for the PDF Export Filter or PDF Rendering Extension to required PDF/A category.
Here are a few steps to create a PDF/A documents using ActiveReports7:
Following code snippets illustrate how to export an ActiveReports 7 report to PDF/A for different report types Export of Section Report to PDF/A format:
var rpt = new SectionReport1(); //SectionReport Object rpt.Run(); var pdfexport = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport(); //PDF ExportFilter pdfexport.Version = GrapeCity.ActiveReports.Export.Pdf.Section.PdfVersion.PDFA1a; //PDF-A Compliance version pdfexport.Export(rpt.Document, @"C:\\SectionReport_PDF-A.PDF");
Export of Page Report to PDF/A format:
var pageReport = new GrapeCity.ActiveReports.PageReport(); pageReport.Load(new System.IO.FileInfo("PageReport1.rdlx")); var pageDoc = new GrapeCity.ActiveReports.Document.PageDocument(pageReport); var settings = new GrapeCity.ActiveReports.Export.Pdf.Page.Settings(); settings.Version = GrapeCity.ActiveReports.Export.Pdf.Page.PdfVersion.PDFA2a; string exportFile = "myReport.pdf"; var myFile = new System.IO.FileInfo(exportFile); var renderingExtension = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension(); var provider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(myFile.Directory,"myReport"); pageDoc.Render(renderingExtension, provider, settings);