تحويل ملف XLS الذي يحتوي على صور أو رسومات إلى 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);
try
{
// Get the template excel file path.
string designerFile = dataDir + "SampleInput.xls";
// Specify the pdf file path.
string pdfFile = dataDir + "Output.out.pdf";
// Open the template excel file
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(designerFile);
// Save the pdf file.
wb.Save(pdfFile, SaveFormat.Pdf);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.ReadLine();
}