Eklenen Resimleri Yeniden Örnekle Excel den PDF ye Dönüştürme

Contents
[ ]

Aşağıdaki örnek kod, Aspose.Cells for Python via .NET API’si kullanılarak görevi nasıl gerçekleştireceğinizi açıklar. Örnek, Microsoft Excel dosyasını PDF dosyasına dönüştürürken dosyadaki resimleri sıkıştırır.

from aspose.cells import PdfSaveOptions, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Initialize a new Workbook
# Open an Excel file
workbook = Workbook(dataDir + "input.xlsx")
# Instantiate the PdfSaveOptions
pdfSaveOptions = PdfSaveOptions()
# Set Image Resample properties
pdfSaveOptions.set_image_resample(300, 70)
# Save the PDF file
workbook.save(dataDir + "OutputFile_out_pdf", pdfSaveOptions)