PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

TextFrame to fill rest of the page
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2820
Page 1 of 1

Author:  stormwild [ Wed May 21, 2014 3:40 am ]
Post subject:  TextFrame to fill rest of the page

Hi

I have a Migradoc document with the a section that has some paragraphs and then a textframe which also contains paragraphs.

The text frame has a gray background color.

The paragraphs above the text frame may be variable.

Is there anyway to have the text frame fill the rest of the page regardless of the lenght of its preceding content?

Code:
Document document = new Document();
Section section = document.AddSection();
section.AddParagraph("Paragraph1");
section.AddParagraph("Paragraph2");
section.AddParagraph("Paragraph3");
...
TextFrame textFrame = section.AddTextFrame();
textFrame.FillFormat.Color = Colors.WhiteSmoke;
textFrame.Height = (Rest of the remaining vertical space of the page)
textFrame.AddParagraph("Paragraph in text frame");

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/