We are currently using Aspose.Cells to read excel-files uploaded by our users, and have now gotten new requirements where we have to store a pdf-versjon of the excel file. I have experimented with the “save to pdf”-function in Aspose.Cells 4.8, but have found an issue: In some cases values in hidden columns are rendered in the pdf, overlapping the values in the adjacent visible column.
Also, I noticed that controls with the PrintObject property set to false are still rendered to the pdf, even though they do not appear when printing from Excel.
I have attached a zip-file with an example excel file with the “B” column hidden, where the contents of some of the cells in “B” are rendered in the “C” column in the pdf. Also, there is two ComboBox controls with different PrintObject settings, only one of the is shown on print preview in Excel, but both appear in the pdf.
Here is the unit-test code I used to convert it:
public void TestPdf()
Aspose.Cells.License license = new Aspose.Cells.License();
string filnavn = @“C:\xls2pdf-test\test4.xls”;
FileStream fs = new FileStream(filnavn, FileMode.Open);
Aspose.Cells.Workbook x = new Aspose.Cells.Workbook();
x.Save(filnavn + “.pdf”, Aspose.Cells.FileFormatType.Pdf);
Thank you for considering Aspose.
rune:In some cases values in hidden columns are rendered in the pdf, overlapping the values in the adjacent visible column
Please try the attached latest version of Aspose.Cells as I tested your template file with it and it works fine (resultant file attached).
rune:Also, I noticed that controls with the PrintObject property set to false are still rendered to the pdf, even though they do not appear when printing from Excel.
We have found your mentioned issue. We will look into it and get back to you soon. You issue has been registered in our issue tracking system with issue id CELLSNET-11901.
Thank You & Best Regards,
Hi, and thanks for the quick response!
I’ve now run my test again with the latest version you attached, and it worked fine for me as it did for you Looks like this was a bug in 220.127.116.11 which you already had solved since then.
Good to hear you are looking into the other issue as well.
Please try the attached version, we have fixed your issue.
The attached version works great. Thanks!