PDFsharp & MigraDoc Foundation

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

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Nov 22, 2007 2:36 pm 
Offline

Joined: Thu Nov 22, 2007 2:29 pm
Posts: 2
Location: Cologne, Germany
Hallo,

Ich have a long Table, which takes several Pages. Everything works fine, but now i need:

I want to add a header of this Table (just a row with titles of all Columns) on each new Page, that is generated to show the whole Table - it it possible with MigraDoc?? Is there an example?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Nov 26, 2007 9:09 am 
Offline
PDFsharp Guru
User avatar

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

Here's how to do it:
Code:
      Row row = table.AddRow();
      row.HeadingFormat = true;


Rows and columns with HeadingFormat will be repeated on every new page.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Dec 03, 2007 11:09 am 
Offline

Joined: Thu Nov 22, 2007 2:29 pm
Posts: 2
Location: Cologne, Germany
Cool!
Thank you!!

Grüsse aus Köln :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 09, 2009 10:34 am 
Offline

Joined: Mon Apr 06, 2009 6:25 am
Posts: 3
Hi,
I have a Problem: I had tried this Solution but it doesn't work.

My Code:
Code:
row5 = table5.AddRow();
                        row5.HeadingFormat = true;
                        cell5 = row5.Cells[0];
                        cell5.AddParagraph().AddFormattedText("Name", TextFormat.Bold);
                        cell5 = row5.Cells[1];
                        cell5.AddParagraph().AddFormattedText("Vorname", TextFormat.Bold);
                        cell5 = row5.Cells[2];
                        cell5.AddParagraph().AddFormattedText("Telefon", TextFormat.Bold);
                        cell5 = row5.Cells[3];
                        cell5.AddParagraph().AddFormattedText("Plz", TextFormat.Bold);
                        cell5 = row5.Cells[4];
                        cell5.AddParagraph().AddFormattedText("Ort", TextFormat.Bold);
                        cell5 = row5.Cells[5];
                        cell5.AddParagraph().AddFormattedText("Strasse", TextFormat.Bold);
                        cell5 = row5.Cells[6];
                        cell5.AddParagraph().AddFormattedText("Hausnummer", TextFormat.Bold);
                        cell5 = row5.Cells[7];
                        cell5.AddParagraph().AddFormattedText("E-Mail", TextFormat.Bold);   


After the page break, the row was not repeated
What is wrong?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 14, 2009 8:14 am 
Offline

Joined: Mon Apr 06, 2009 6:25 am
Posts: 3
Maybe is my Problem in the title:

Code:
                        Cell cell5;
                        Row row5;
                        row5 = table5.AddRow();
                        row5.KeepWith = 2;
                        cell5 = row5.Cells[0];
                        cell5.MergeRight = 3;
                        cell5.Format.Font.Bold = false;
                        paragraph = cell5.AddParagraph();
                        paragraph.AddFormattedText("Adressen", "Heading2");
                        paragraph.AddBookmark("Adressen");
                        paragraph.Format.OutlineLevel = OutlineLevel.Level2;
                        row5 = table5.AddRow();
                        row5 = table5.AddRow();
                        row5.HeadingFormat = true;
                        cell5 = row5.Cells[0];
                        cell5.AddParagraph().AddFormattedText("Name", TextFormat.Bold);
                        .
                        .
                        .
                       


Does anyone have a solution for my problem?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Apr 15, 2009 10:31 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
Heading rows are the first rows of a table.

I think you can't make row 5 a heading row if rows 1 through 4 are no heading rows.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Apr 15, 2009 10:38 am 
Offline

Joined: Mon Apr 06, 2009 6:25 am
Posts: 3
is there then a way to keep a paragraph (title for the table) together with the table on the same page? paragraph.keeptogther und paragraph.keepwithnext don't work...


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

All times are UTC


Who is online

Users browsing this forum: TH-Soft and 62 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