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

Free Support Forum - aspose.com

Detecting text width

I am wondering if there is a way to detect unwrapped texts width within a table cell (Aspose.Pdf.Generator.Cell). I am unable to find a way to test if the text will expand further than the width of the cell, thus needing to reduce the text font size in order to make it fit. If there is another way of doing this please let me know

Aspose.Pdf.Generator.Cell cell = row.Cells.Add(“Large text string asdf asdf asdf asdf asdf asd f asdf adsf asdf end of string”);
while(cell.HasOverflowText()) //<-- This method doesn’t actually exist its just to show what I am trying to do
cell.DefaultCellTextInfo.FontSize -= 1;

Hi Brent,

Thanks for your inquriy. I am afraid the requested feature does not exist in Aspose.Pdf for .NET, so we have logged an enhancement ticket PDFNEWNET-40445 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

Furthermore, please note it is recommended to use new generator(Aspose.Pdf) as old generator(Aspose.Pdf.Generator) will be obsolete in near further and we are not making any changes(fixes/enhancement) in old generator.

We are sorry for the inconvenience caused.

Best Regards,