Using the following code:
public void AppendContent(BaseParagraph content)
{
_pdfDocument.Pages.Last().Paragraphs.Add(content);
}
How would I know if that action has caused a new page to be added? or query if the page is currently overflowing or not. I need this to determine page numbers.
There is a content.IsInNewPage;
method but this is always false.
Note that the processParagraphs
code cannot be called at this point as the document is still being constructed and causes rendering issues later on.
It is easy to replicate, just have hundreds of text fragments being added in a loop to the last available page.