PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Table Cell with huge amount of text

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
yogesh@performixinc.com



Joined: 01 Apr 2008
Posts: 4

PostPosted: Thu Apr 10, 2008 9:32 am    Post subject: Table Cell with huge amount of text Reply with quote

I am trying to add a table to the document.
This table has 2 columns and 2 rows (code shown below).

Assuming that table starts on Page-1 and if text in second
row and second column is really huge, I have following problems.

1) Second row of the table starts on Page-2, even though first
row hardly occupies any Page-1 height
2) Second row which starts on a new page, does not fit in one page,
so I expected it to continue on Page-3, but instead table gets
truncated on Page-2, without complete text and table border on
bottom row.

Is there way to get around both these problems?

Table table = new Table();
Column column = table.AddColumn(Unit.FromCentimeter(2));
column.Format.Alignment = ParagraphAlignment.Center;
column = table.AddColumn(Unit.FromCentimeter(5));

Cell cell;
// Add first Row
Row row = table.AddRow();
row.Shading.Color = Colors.PaleGoldenrod;
cell = row.Cells[0];
cell.AddParagraph("Itemus");
cell = row.Cells[1];
cell.AddParagraph("Descriptum");

// Add second Row
row = table.AddRow();
cell = row.Cells[0];
cell.AddParagraph("2");
cell = row.Cells[1];
cell.AddParagraph(HugeAmoutOfText);
table.SetEdge(0, 0, 2, 2, Edge.Box, BorderStyle.Single, 1, Colors.Black);
document.LastSection.Add(table);


Regards, Yoegsh
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Apr 10, 2008 10:18 am    Post subject: Reply with quote

It is by design that table cells will not break to the following page.

I have no idea for a workaround if you need PDF directly.
Your table might work if you create an RTF file.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
yogesh@performixinc.com



Joined: 01 Apr 2008
Posts: 4

PostPosted: Thu Apr 10, 2008 12:46 pm    Post subject: Reply with quote

I tried rendering same
MigraDoc.DocumentObjectModel.Document with
MigraDoc.RtfRendering.RtfDocumentRenderer
but unfortunately results are identical.
Back to top
View user's profile Send private message
Orestone



Joined: 24 Oct 2008
Posts: 7
Location: Brisbane, Australia

PostPosted: Mon Apr 06, 2009 6:49 am    Post subject: Reply with quote

Thomas Hoevel wrote:
It is by design that table cells will not break to the following page.

I have no idea for a workaround if you need PDF directly


I've just run in to this issue myself where a cell is too big to fit on a single page (God 'bless' Testers Evil or Very Mad )

Does a workaround for this kind of functionality fall in to the 'too hard basket'? This feature alone may be anough to stop our project from using it - and I have been blowing PdfSharp's trumpet hard!

Idea would it be possible to perform a TextMeasurement of the cell contents and then manually split it all up if you can determine that it is too big to fit on the page?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com