Using latest ASPOSE.Cells .NET (20.7.0.0), the Save method throws an exception dealing with certain XLSX documents.
using (var TempDocument = new Aspose.Cells.Workbook(@“c:\test\test.xlsx”))
{
TempDocument.Save(@“c:\test\test.pdf”, Aspose.Cells.SaveFormat.Pdf);
}
This normally works, but fails with the following XLSX document: https://www.dropbox.com/s/0pr7neuurfpjhxw/test.xlsx?dl=0
I have tested your scenario/ case by converting your template file to PDF with Aspose.Cells for .NET v20.7.6, it works and I do not get exception. However, both pictures are not rendered but only text in the cells. Did you get the same issue, please confirm?
It does not crash, but it is not showing those images. Other images seem to rendered to PDF correctly, but images like in that sample are not. Is there something in those images that is not supported?
@jay_bp,
We have observed the issue that images are not rendered to PDF. This issue is logged in our database for further investigation. We will write back here once any update is ready to share.
This issue is logged as: CELLSNET-47533 - Images in the Excel file are not rendered to PDF
@jay_bp,
This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-47533”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.
The issues you have found earlier (filed as CELLSNET-47533) have been fixed in Aspose.Cells for .NET v20.8. This message was posted using Bugs notification tool by Amjad_Sahi
Hi, I just downloaded and tried 20.8.0.0 and it still does not render the images in the PDF, for the XLSX in this thread. Was this supposed to fix this?
thx
You need to set some PDF options regarding EMF image rendering (to show those images) while converting your file to PDF file format. See the following sample code for your reference:
e.g Sample code:
@jay_bp,
I have tried using the latest version Aspose.Cells for .NET 20.8 but could not observe any issue as the images are rendered in the output PDF. You may ensure that latest version is used during the testing. For your reference, I have tried the following sample code:
using (var TempDocument = new Aspose.Cells.Workbook(path + "test.xlsx"))
{
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.EmfRenderSetting = EmfRenderSetting.EmfPlusPrefer;
TempDocument.Save(path + @"test1.pdf", pdfSaveOptions);
}