This demo uses the DevExpress Spreadsheet Document API to convert an Excel document to a tagged (accessible) and archive PDF file. You can process the sample file or supply your own document. To do the latter, select Upload a File in the file selection drop-down menu.
Review and modify Export Settings as necessary. Click Convert to PDF to convert the workbook and download the result.
Sample document
InvestmentPortfolio.xlsx
Export Settings
using DevExpress.Spreadsheet;
using DevExpress.XtraPrinting;
Stream ConvertToPdf(Stream inputStream, PdfACompatibility pdfAConformance, PdfUACompatibility pdfUACompatibility,
string author, string title, string subject, string keywords) {
using var workbook = new Workbook();
workbook.LoadDocument(inputStream);
var outputStream = new MemoryStream();
var exportOptions = new PdfExportOptions() {
PdfACompatibility = pdfAConformance,
PdfUACompatibility = pdfUACompatibility
};
exportOptions.DocumentOptions.Author = author;
exportOptions.DocumentOptions.Title = title;
exportOptions.DocumentOptions.Subject = subject;
exportOptions.DocumentOptions.Keywords = keywords;
workbook.ExportToPdf(outputStream, exportOptions);
outputStream.Position = 0;
return outputStream;
}