Learn how to convert Excel file to PDF on Linux: https://blog.aspose.com/2021/10/12/convert-excel-files-to-pdf-on-linux/
Last active
October 12, 2021 14:17
-
-
Save aspose-com-gists/b602d39a748d19d9a8bea05b56f83105 to your computer and use it in GitHub Desktop.
Convert Excel to PDF on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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