PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 2:19 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Mar 20, 2013 6:21 pm 
Offline

Joined: Wed Mar 06, 2013 3:53 pm
Posts: 22
I am using Migradoc. The user has the option to create PDF or Word (RTF) so I can't use PdfSharp.

I have a report, that is variable content based on available input data. There are various sections with the report, as seen below. The problem is, that since the data is variable, we never know when a page break will be. But sometimes the section header will print, then a page break, then the section. Is there any way to tell Migradoc, not to print the section title if there is only 2 lines left on the page? Alternately, is there a way to tie this section header to the paragraph, so they will always print on the same page? The section text is never more than 2 or 3 lines, and it's generally followed by a variable data table.

Section Title 1

section text
section text
section text

[table data]
[table data]
[table data]

Section Title 2

section text
section text
section text

[table data]
[table data]
[table data]

Section Title 3
___________________________________________________<this is a page break automatically inserted by MigraDoc>
section text
section text
section text

[table data]
[table data]
[table data]


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 21, 2013 9:07 am 
Offline
PDFsharp Guru
User avatar

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

Activate KeepWithNext for all titles (this works for paragraphs followed by paragraphs, but not for paragraphs followed by tables - so it should work for your case).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 21, 2013 4:03 pm 
Offline

Joined: Wed Mar 06, 2013 3:53 pm
Posts: 22
PERFECT!!! THANKS!!!

Now I know what option to look for, I see you have answers this several times. So I'm sorry to be a broken record.

Thanks very much.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 49 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