Salva Excel in PDF con dimensione standard o minima
Contents
[
Hide
]
Per impostazione predefinita, Aspose.Cells salva Excel in PDF con dimensione Standard. Tuttavia puoi anche salvarlo con Dimensione minima usando il filePdfSaveOptions.OptimizationType proprietà. Accetta i seguenti valori
Salva Excel in PDF con dimensione standard o minima utilizzando Microsoft Excel
Lo screenshot seguente mostra come salvare Excel in PDF con dimensioni standard o minime utilizzando Microsoft Excel.
Salva Excel in PDF con dimensione standard o minima utilizzando Aspose.Cells
Il seguente codice di esempio mostra come salvare Excel in PDF con la dimensione standard o minima utilizzandoPdfSaveOptions.OptimizationTypeproprietà.
This file contains hidden or 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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
String dataDir = Utils.getDataDir(SaveExcelToPDF.class); | |
// Load excel file into workbook object | |
Workbook workbook = new Workbook(dataDir + "sample.xlsx"); | |
// Save into Pdf with Minimum size | |
PdfSaveOptions opts = new PdfSaveOptions(); | |
opts.setOptimizationType(PdfOptimizationType.MINIMUM_SIZE); | |
workbook.save(dataDir + "output.pdf", opts); |