Last active
April 23, 2024 05:04
-
-
Save aspose-com-gists/178bc3fec13d83a9cd3503272220172d to your computer and use it in GitHub Desktop.
Excel to PDF conversion with Aspose.Cells for .NET
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
// Create and initialize an instance of Workbook | |
Workbook book = new Workbook(input); | |
// Create and initialize an instance of PdfSaveOptions | |
PdfSaveOptions saveOptions = new PdfSaveOptions(); | |
// Set AllColumnsInOnePagePerSheet to true | |
saveOptions.AllColumnsInOnePagePerSheet = true; | |
// Save Workbook to PDF fromart by passing the object of PdfSaveOptions | |
book.Save("output.pdf", saveOptions); |
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 file in Workbook object | |
Workbook workbook = new Workbook(input); | |
// Define PdfSaveOptions | |
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); | |
// Set PDF creation time | |
options.CreatedTime = DateTime.Now; | |
// Save the file | |
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 file in Workbook object | |
Workbook workbook = new Workbook(input); | |
// Define PdfSaveOptions | |
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); | |
// Set the compliance type | |
pdfSaveOptions.Compliance = PdfCompliance.PdfA1b; | |
// Save the file | |
workbook.Save("output.pdf", pdfSaveOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment