PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 15, 2024 6:30 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: Fri Aug 24, 2012 9:38 am 
Offline

Joined: Thu Aug 23, 2012 4:59 pm
Posts: 2
Location: D-53520 Winnerath, Germany
Hello,

I'm using MigraDoc in an ASP.NET app for dynamically creating PDF files and delivering them to the user/browser. In general everything works fine so far.
But as our textual content is being loaded from a database there happened to exist some very lengthy textblocks which won't fit onto one page. The layout consists of a dynamically created table with 2, 3 or 4 columns. My problem is that I wasn't able so far to find any options or switches to force MigraDoc do render a pagebreak at the proper position within these "oversized" textblock-rows. Instead it renders the table together with the text down through the footer to the very edge of the page. And on the next page it starts with the next row of the table, leaving the remainder of the row before being swallowed up somewhere.

Is there any chance to get this behavior changed without starting to manually calculate textlength, pagelength, space in layout, etc. ?

Regards,
Dietmar Jagonak


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 26, 2012 9:56 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 343
Hi!

There are no automatic pagebreaks within table rows (only automatic pagebreaks between table rows).

In our app, tables can have a comments column that can contain large amounts of text. We used a little trick: a "logical row" spans two physical table rows, the second row is reserved for the comments only (spanning the width of the page except for the first centimeter).
Maybe you can avoid your problem by changing the widths of columns, the size of the font, or using our trick. Or show the first 1000 characters only and add a link to an appendix with the complete text.

When a single table row needs more than a full page, a table is IMHO not the best way to display the text. Maybe a different format will look better (and avoid the MigraDoc limitation).

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 27, 2012 8:17 pm 
Offline

Joined: Thu Aug 23, 2012 4:59 pm
Posts: 2
Location: D-53520 Winnerath, Germany
Hi,

thank you for this enlightening answer.
In fact this table based layout has not been my idea. But the customer originally wanted his PDF layout to be as similar as possible to the browser layout. Now that we discussed the matter and the problem he decided to completely change PDF layout so that there will be no need anymore for a multi column table.

Regards,
Dietmar Jagonak


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: Baidu [Spider] and 33 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