Free Support Forum - aspose.com

IsWordWrapped = false not respected on later pages

When I create a wide table and explicitly set the IsWordWrapped property to ‘false’ on every single cell, the value is not being applied after the page break for the columns. Please see attached reproducer.

        var doc = new Document();
        var page = doc.Pages.Add();
        var mytable = new Table {Broken = TableBroken.Vertical};
        page.Paragraphs.Add(mytable);
        mytable.ColumnWidths = "69.75 76.5 75 75 75 73.5 75 75 75 75 75 75";
        

        mytable.RepeatingRowsCount = 1;
        var numCols = 12;
        
        for (var rowCounter = 0; rowCounter <= 80; rowCounter++)
        {
            var row = mytable.Rows.Add();
            //Create rows in the table and then cells in the rows
            if (rowCounter == 0)
            {
                for (var colCounter = 0; colCounter < numCols; colCounter++)
                {
                    row.Cells.Add("Header " + colCounter);
                }
            }
            else
            {
                for (var colCounter = 0; colCounter < numCols; colCounter++)
                {
                        row.Cells.Add("row" + rowCounter.ToString() + ", col" + colCounter.ToString() + "longtext1longtext2longtext3longtext4longtext5").IsWordWrapped = false;
                }
            }
        }

        doc.Save("TextWrapTrueOnRepeatedCols.pdf");

I explicitly set IsWordWrapped=false for every cell I am creating. As you can see in the generated PDF, five columns fit before the the page break, and the text is correctly not wrapped for pages 1 and 2. Starting on page 3, which is the first page that the columns after the wide-table-break occur, the text-wrap property is not applied correctly to any of them.TextWrapNotRespectedAfterPageBreak.pdf (59.3 KB)

@dfactset

Thanks for contacting support.

We are looking into the scenario and will get back to you shortly.

@dfactset

We have tested the scenario in our environment by using your code snippet with Aspose.PDF for .NET 18.7 and were able to reproduce the issue that you have mentioned. Therefore, we have logged an issue as PDFNET-45112 in our issue tracking system. We will investigate the logged issue in details and keep you posted with its status of correction. Please be patient and spare us little time.

We are sorry for the inconvenience.