Rifacimento Immagini Aggiunte Conversione da Excel a PDF con Node.js tramite C++

Contents
[ ]

Si prega di consultare il codice di esempio seguente che descrive come eseguire il compito utilizzando l’API Aspose.Cells. L’esempio converte un file Microsoft Excel in un file PDF comprimendo le immagini nel file.

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