Bilder für die Umwandlung von Excel in PDF neu anordnen

Bilder für die Umwandlung von Excel in PDF neu anordnen

Bitte beachten Sie den folgenden Beispiellcode, der beschreibt, wie die Aufgabe mithilfe der Aspose.Cells-API ausgeführt wird. Das Beispiel konvertiert eine Microsoft Excel-Datei in eine PDF-Datei und komprimiert dabei die Bilder in der Datei.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(ResampleImagesforExceltoPDFConversion.class);
// Initialize a new Workbook
// Open an Excel file
Workbook workbook = new Workbook(dataDir + "Book1.xlsx");
// Instantiate the PdfSaveOptions
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
// Set Image Resample properties
pdfSaveOptions.setImageResample(300, 70);
// Save the PDF file
workbook.save(dataDir + "output.pdf", pdfSaveOptions);