使用标准大小或最小大小将Excel保存为PDF

使用 Microsoft Excel 将 Excel 保存为标准或最小尺寸的 PDF

以下截图展示了如何使用 Microsoft Excel 将 Excel 保存为标准或最小尺寸的 PDF

todo:image_alt_text

使用 Aspose.Cells 将 Excel 保存为标准或最小尺寸的 PDF

以下示例代码展示了如何使用 PdfSaveOptions.OptimizationType 属性将 Excel 保存为标准或最小尺寸的 PDF

// 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);