PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Sep 27, 2024 3:13 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Problem with PageBreaks
PostPosted: Sat Jul 10, 2010 12:41 pm 
Offline

Joined: Sat Jul 10, 2010 12:29 pm
Posts: 1
Hello,

I am creating a report with PDFSharp and MigraDoc with dynamic content, i.e. depending on the content the report can fit on one page, or on several.

It looks like follows:


January
Name | Date | Company
<optional entry #1>
<optional entry #2>
...


February
Name | Date | Company
<optional entry #1>
<optional entry #2>
...


March ...


Sometimes the pagebreak occurs between the optional entries or between month and column heading (Name, Date, Company), for example:


July
<page break>
Name | Date | Company
<optional Entry #1>
...


Is there a way to fix this?


Help would be highly appreciated!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 12, 2010 8:04 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3110
Location: Cologne, Germany
Hi!

Set the "KeepWithNext" property of any paragraph to prevent a pagebreak directly after this paragraph.

So if you have n paragraphs you want to keep together, use "KeepWithNext" for the (n - 1) paragraphs at the start of this block.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group