Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert Excel to PDF on Linux
// Load Excel file
Workbook workbook = new Workbook("workbook.xlsx");
// Define PdfSaveOptions
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
// Set the compliance type
pdfSaveOptions.Compliance = PdfCompliance.PdfA1b;
// Convert Excel to PDF
workbook.Save("output.pdf", pdfSaveOptions);
// Load the Excel file
Workbook workbook = new Workbook("SampleExcel.xls");
// Save the document in PDF format
workbook.Save("outputPDF.pdf", SaveFormat.Pdf);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment