Save Excel into PDF with Standard or Minimum Size

Save Excel into PDF with Standard or Minimum Size using Microsoft Excel

The following screenshot shows how to save Excel into PDF with Standard or Minimum size using Microsoft Excel.

todo:image_alt_text

Save Excel into PDF with Standard or Minimum Size using Aspose.Cells

The following sample code shows how you can save Excel into PDF with Standard or Minimum size using PdfSaveOptions.OptimizationType property.

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