إعادة عينات الصور المضافة تحويل Excel إلى PDF

Contents
[ ]

يرجى الاطلاع على الكود النموذجي التالي الذي يصف كيفية إجراء المهمة باستخدام واجهة برمجة التطبيقات Aspose.Cells. النموذج يحول ملف Microsoft Excel إلى ملف PDF مع ضغط الصور في الملف.

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