We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

For converting Excel to PDF, row height cannot be adjusted to fit

I have the following settings for converting Excel to PDF:

sh.PageSetup.Orientation = PageOrientationType.Landscape;
sh.PageSetup.PageSize = PageSizeType.Paper10x11;
sh.PageSetup.FitTPagesTall = 0;
sh.PageSetup.FitTPagesWide = 1;

// sh.AutoFitRows();

With the settings, all the rows are at same height and multiple-line cells with wrapped text are not shown properly as seen in the attachment. The original Excel file actually displays texts correctly.

Please advise how I can fix the issue . Thank you.

Row-height.jpg (8.2 KB)Row-height2.jpg (7.8 KB)

Please share your sample file with us for our testing. We will reproduce the problem and provide our feedback after analysis.

Thanks. We found the issue. We thought Range.Copy(aRange) would copy everything. But actually the height & width are not copied.

We are glad to know that your issue is resolved. Please feel free to write us back if you have any other query in this regard.