I'm using Aspose.Cells to create a report to be exported to both Excel and PDF. In cell A1, I have some text that I've given a font size of 20. When I save this workbook to a PDF file, the top half of the text is getting cut off.
Here's a screenshot of the PDf file:
I tried adjusting the height of the first row using AutoFitRow(int), but that's not fixing my problem. My code to reproduce this is very short:
static void Main(string[] args)
{
Program.Licenses(); //only sets licenses
var wb = new Aspose.Cells.Workbook();
var ws = wb.Worksheets[0];
var cell = ws.Cells[0, 0];
cell.Value = "Text is cutoff";
var style = cell.GetStyle();
style.Font.Size = 20;
cell.SetStyle(style);
ws.AutoFitRow(1); //doesn't prevent text cutoff
wb.Save(@"C:\Users\guest\Desktop\file2.pdf", Aspose.Cells.SaveFormat.Pdf);
}
What am I doing wrong that is causing the top half of my text to be cutoff? the text is also getting cut off if I export to Tiff or XPS. It looks fine however if I export to XLSX.
Version Information:
- Aspose.Cells.DLL: Runtime Version = v2.0.50727, Version = 8.1.2.0
- Aspose.Pdf.DLL: Runtime Version = v4.0.30319, Version 9.5.0.0