There is a problem with text getting cutoff when using FoundationSans-Light.otf in combination with tab.ColumnAdjustment = ColumnAdjustment.AutoFitToContent; When using FreeSans.ttf everything is fine. If we take out AutoFitToContent everything works as expected.
In the reproducer I cannot add FoundationSans-Light.otf as this is a paid font.
With FoundationSans-ligth text is only "On 4-27-2015, CNBC and The Wall Street Journal reported that ISS recommended the shareholder of DuPont to vote in favor Trian’s two of four nominees, Nelson Peltz and John Mayers. Nelson Peltz then released a
statement to CNBC’s Scott Wapner acknowledging ISS’ support. Mr. Peltz further noted that ISS also believed that a change in DuPont’s board is necessary and said that aside from him and Mr. Mayers, ISS also said that
Bob Zatta and Art Winkleblack appeared to be well-qualified nominees. Same day, Reuters cited that sources to the matter said that DuPont was open to last minute settlement discussions with Trian regarding its proxy"
With FreeSans test is " On 4-27-2015, CNBC and The Wall Street Journal reported that ISS recommended the shareholder of DuPont to vote in favor Trian’s two of four nominees, Nelson Peltz and John Mayers. Nelson Peltz then
released a statement to CNBC’s Scott Wapner acknowledging ISS’ support. Mr. Peltz further noted that ISS also believed that a change in DuPont’s board is necessary and said that aside from him and Mr.
Mayers, ISS also said that Bob Zatta and Art Winkleblack appeared to be well-qualified nominees. Same day, Reuters cited that sources to the matter said that DuPont was open to last minute settlement
discussions with Trian regarding its proxy contest against the company."
using Aspose.Pdf;using Aspose.Pdf.Text;namespace Aspose{public class Program{public static void Main(string[] args){// Added documentDocument doc = new Document();//Open font repository (.ttf file) from where it is stored.Aspose.Pdf.Text.Font myFont = Aspose.Pdf.Text.FontRepository.OpenFont(“Fonts/FoundationSans-Light.otf”);//Add a page objectAspose.Pdf.Page page = doc.Pages.Add();//get PageInfovar pageInfo = page.PageInfo;//set properties of pagepage.SetPageSize(PageSize.PageLetter.Width, PageSize.PageLetter.Height);pageInfo.Margin.Left = 27;pageInfo.Margin.Bottom = 52;pageInfo.Margin.Right = 27;pageInfo.Margin.Top = 27;//Instantiate a table objectAspose.Pdf.Table tab = new Aspose.Pdf.Table();//the breaking linetab.ColumnAdjustment = ColumnAdjustment.AutoFitToContent;//add row to tableAspose.Pdf.Row row = tab.Rows.Add();//add cell to tableAspose.Pdf.Cell cell = row.Cells.Add();//Set with column widths of the tabletab.ColumnWidths = “100%”;TextFragment newText = new TextFragment(“On 4-27-2015, CNBC and The Wall Street Journal reported that ISS recommended the shareholder of DuPont to vote in favor Trian’s two of four nominees, Nelson Peltz and John Mayers. Nelson Peltz then released a statement to CNBC’s Scott Wapner acknowledging ISS’ support. Mr. Peltz further noted that ISS also believed that a change in DuPont’s board is necessary and said that aside from him and Mr. Mayers, ISS also said that Bob Zatta and Art Winkleblack appeared to be well-qualified nominees. Same day, Reuters cited that sources to the matter said that DuPont was open to last minute settlement discussions with Trian regarding its proxy contest against the company.\n”);var textState = newText.TextState;textState.Font = myFont;//freesanstextState.FontSize = 6;Paragraphs pgraph = new Paragraphs();pgraph.Add(newText);cell.Paragraphs.Add(newText);//add the table in paragraphs collectionpage.Paragraphs.Add(tab);doc.Save(“CutOffTextInTable.pdf”);}}}