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

Can you determine if it's the first line on the page?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1772
Page 1 of 1

Author:  DaveR [ Mon Sep 05, 2011 12:02 pm ]
Post subject:  Can you determine if it's the first line on the page?

I'm printing a number of variable length paragraphs. Each one has a title line above it. If the paragraph starts somewhere down the page then I want a blank line before the title, but if the title is going to print on the first line of the page I don't want a blank line before it. Is it possible to test for the first line? I'm using MigraDoc.

Author:  Thomas Hoevel [ Mon Sep 05, 2011 2:06 pm ]
Post subject:  Re: Can you determine if it's the first line on the page?

No, you can't test for the first line.

You can set SpaceAfter on the previous paragraph. With both paragraphs on one page, SpaceAfter is used to dertermine the space between them. If a page break occurs before the second paragraph, SpaceAfter will have no effect on its position and it will be right at the start of the page.

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