Resampling des images ajoutées Conversion Excel en PDF avec Node.js via C++

Contents
[ ]

Veuillez consulter le code d’exemple suivant qui décrit comment effectuer la tâche à l’aide de l’API Aspose.Cells. L’exemple convertit un fichier Microsoft Excel en un fichier PDF tout en compressant les images dans le fichier.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Initialize a new Workbook
// Open an Excel file
const workbook = new AsposeCells.Workbook(path.join(dataDir, "input.xlsx"));

// Instantiate the PdfSaveOptions
const pdfSaveOptions = new AsposeCells.PdfSaveOptions();
// Set Image Resample properties
pdfSaveOptions.setImageResample(300, 70);

// Save the PDF file
workbook.save(path.join(dataDir, "OutputFile_out_pdf"), pdfSaveOptions);