PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Nov 30, 2020 2:13 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Jun 05, 2020 8:02 pm 
Offline

Joined: Mon May 18, 2020 6:44 am
Posts: 11
I have a table within a textFrame so that I am able to create two tables next to each other.
On the right table, I need two headers labeled "Date" and "Invoice". On the next row underneath in each cell of course is the date and invoice data. But, underneath that data, I need another header labeled "Account" and of course on the next row inside a cell, I need that account data. So in total I have 3 headers which I need two on top with the data in each cells, and then I need another header underneath those data.

My code so far:

Code:
 //textFrame for "Bill To" info
            TextFrame billFrame = section.AddTextFrame();
            billFrame.Height = "5.0cm";
            billFrame.Width = "6.0cm";
            billFrame.Left = ShapePosition.Right;
           

            table = billFrame.AddTable();
            table.Borders.Width = 0.75;

            column = table.AddColumn(Unit.FromCentimeter(3.5));
            column.Format.Alignment = ParagraphAlignment.Left;

            column = table.AddColumn(Unit.FromCentimeter(3.5));
            column.Format.Alignment = ParagraphAlignment.Left;

            //putting table inside billFrame
            row = table.AddRow();
            row.HeadingFormat = true;
            cell = row.Cells[0];
            row.Shading.Color = Colors.Gray;
            cell.AddParagraph("Date");
            cell.Format.Font.Bold = true;

            cell = row.Cells[1];
            cell.AddParagraph("Invoice");
            cell.Format.Font.Bold = true;

           

            //define row and data of "Bill To" table
            row = table.AddRow();

            cell = row.Cells[0];
            cell.AddParagraph("04/30/2020");

            cell = row.Cells[1];
            cell.AddParagraph("2000498");

            row = table.AddRow();

            cell = row.Cells[0];
            cell.AddParagraph("Account");
           


Within the table, I don't want the vertical line to go all the way down into the "Account" header since it is a header. How do i get rid of it?


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 06, 2020 4:58 pm 
Offline

Joined: Mon May 18, 2020 6:44 am
Posts: 11
Using MergeRight = 1; I was able to have no vertical line within the cell.


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

All times are UTC


Who is online

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