Saving an xlsx file to pdf file does not look correct. Most likely because the excel file has cells with Wrap Text.
Please see the instructions in the attached Program.cs file to recreate the issue.
Thanks
AsposeTest Print PDF.zip (526.3 KB)
Saving an xlsx file to pdf file does not look correct. Most likely because the excel file has cells with Wrap Text.
Please see the instructions in the attached Program.cs file to recreate the issue.
Thanks
AsposeTest Print PDF.zip (526.3 KB)
Please notice, we were able to reproduce the issue as you mentioned by using your template file and sample code. We found there is little difference regarding wrapped text for certain cells in the output PDF when comparing it with output XLSX. Some cells’ data in the output PDF are not wrapped where it should have wrapped data. We have logged a ticket with an id “CELLSNET-47970” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
@aferriere2,
Please check the pdf file(see AsposeCreated-20210412_093641.pdf) generated on our side, we can not see any wrap difference comparing to your shared “Manual Print To PDF From Excel File.pdf” in “Templates” sub folder.
Please highlight the issue and add more details about the issue with screenshots.
By the way, we can see the row height is different comparing our generated “AsposeCreated-20210412_093641.pdf” and your shared “Manual Print To PDF From Excel File.pdf”. Is it the issue?
AsposeCreated-20210412_093641.pdf (99.6 KB)
@ahsaniqbalsidiqui
Yes, that is the issue. In the Aspose created pdf file all rows are the same height and don’t match the row heights in the Aspose created excel or the “Manual Print To PDF From Excel File.pdf”.
In the Aspose created pdf file the row heights are not adjusting automatically based on the row height in the Aspose created excel file.
@aferriere2,
We have observed the difference and recorded with the ticket. We will analyze it and share our feedback soon.
Please auto-fit rows before saving to PDF:
e.g.
Sample code:
...
// Process the smart markers
designer.Process(true);
workbook.Worksheets[0].AutoFitRows(true);
filePath = $"{runHistoryFolder}AsposeCreated-{DateTime.Now.ToString("yyyyMMdd_HHmmss")}.xlsx";
...
Let us know your feedback.
Yes that works. Thanks
Good to know that it works for your needs. In the event of further queries or issue, feel free to write us back.