When converting from spreadsheet to PDF- some texts were cut off

Hi,


I’m using the aspose-cells 8.8.0 to convert a spreadsheet into PDF file, and I find some texts, such as “Objectives” or “Products Development”, have been cut-off. Could you please have a look? I have attached the test zip for you to reproduce.

Regards,

Feng

Hi Feng,


Thank you for contacting Aspose support.

I have noticed that the text is being trimmed at the bottom for the cells A4, A9, B15 & B22 in your shared spreadsheet as well. When you convert this spreadsheet without increasing the row heights, the text gets trimmed in the resultant image and PDF. Please check the attached snapshot for the comparison of the spreadsheet against the resultant PDF generated with your exact code.

As the problem is caused due to the row height, I would suggest you to call the Worksheet.autoFitRows method (as demonstrated below) before rendering the spreadsheet.

Java

Worksheet worksheet = doc.getWorksheets().get(0);
AutoFitterOptions options = new AutoFitterOptions();
options.setOnlyAuto(true);
worksheet.autoFitRows(options);

Hi Babar,


Thank you very much for the prompt reply.

I can confirm the autofit option has fixed this issue.

Regards,

Feng

Hi Feng,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is now resolved with the suggested autofit option. Let us know if you encounter any other issue, we will be glad to look into it and help you further.