Hello there!
I have a document with several text frames and a table.
Table rows are generated depending on the date in the database, so sometimes there are so many rows that they cannot fit on a single page.
There are more text frames below the table so there is a possibility that even if the table fits on a single page, those frames below won't.
In that case there should be a page break, and all the content that doesn't fit on the first page goes to second. Unfortunatelly, my pdf document after rendering looks like this:
http://screencast.com/t/YzA3ODkwIt is a single page and not all the content fits there.
A piece of code I use to render the document is:
Code:
private static byte[] _GetRenderedPdfBytes(Document document)
{
using (var pdfStream = new MemoryStream())
{
var pdfRenderer = new PdfDocumentRenderer(true, PdfFontEmbedding.Always)
{
Document = document
};
pdfRenderer.RenderDocument();
pdfRenderer.PdfDocument.Save(pdfStream);
return pdfStream.ToArray();
}
}
Is there a way to have automatic page breaks where needed to avoid this issue?
Thanks!