Unplanned
Last Updated: 09 Apr 2020 13:39 by ADMIN
Amit
Created on: 09 Apr 2020 13:39
Category: WordsProcessing
Type: Bug Report
0
WordsProcessing: PDF Export: Next paragraph after a FieldCharacter in a footer is not exported to PDF

This results in a missing paragraph. For example, having a table with three cells and Page field in the footer of a document and exporting it to PDF, will not export the last paragraph. 

As a workaround add new run after the last field character in the cell's table before exporting the document to PDF.

                BlockCollection footerContent = this.document.Sections.First().Footers.Default.Blocks;
                Table footerTable = footerContent.First() as Table;
                var cells = footerTable.Rows.Last().Cells.Where(x => x.EnumerateChildrenOfType<FieldCharacter>().Any());
                foreach (var cell in cells)
                {
                    cell.Blocks.AddParagraph().Inlines.AddRun();
                }

0 comments