PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 5:06 am

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: Thu May 24, 2018 8:13 pm 
Offline

Joined: Thu May 24, 2018 8:05 pm
Posts: 9
I have a situation where I need to know when a table has one too many rows to fit on a 8.5"x11" page rendered from a MigraDoc Document. What I do is add rows to the table using .AddRow, make a clone of the document, render it, and get a page count. When the page count = 2 then I know that I have added one too many rows. What I can't figure out, though, is how to get rid of that extra row so that my table will fit on one page. Is it possible to do this?

Thanks,

Darren


Top
 Profile  
Reply with quote  
PostPosted: Thu May 24, 2018 8:37 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 905
Location: CCAA
dhaverstick wrote:
Is it possible to do this?
It's bally simple.
Just call the "RemoveObjectAt" method of the "Rows" property of your "Table".

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Fri May 25, 2018 11:54 am 
Offline

Joined: Thu May 24, 2018 8:05 pm
Posts: 9
TH-Soft, that did the trick. Thanks!!!

Darren


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: Google [Bot] and 25 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