PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon May 28, 2018 3:23 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri May 11, 2018 6:40 pm 
Offline

Joined: Fri May 11, 2018 6:28 pm
Posts: 1
As part of a project I am building a table that contains 6 columns and an unspecified number of rows (generated programatically.) I am running into an issue where I can't get a cell to display a right border when two conditions are met:
1. The cell is merged via merge right.
2. The cell merge carries to the last column.

In my case I am taking a cell in the first row (cell[2]) and merging it right 3 cells (for a total of 4). This carries to the last column.

If I merge it one column less it works fine. As it does when I apply a border to a cell in the last column without merging.

My work around right now is to create an additional column of a very small size and simply never use it. But I imagine I'm doing something wrong.

Code:
            Table tbl = new Table();
            tbl.AddColumn("1.0in");
            tbl.AddColumn("1.0in");
            tbl.AddColumn("1.0in");
            tbl.AddColumn("1.0in");
            tbl.AddColumn("1.0in");
            tbl.AddColumn("1.0in");

            Row tRow = tbl.AddRow();
            tRow.Cells[0].Borders.Width = 0.5;      // Works
            tRow.Cells[1].Borders.Width = 0.5;      // Works
            tRow.Cells[2].MergeRight = 3;
            tRow.Cells[2].Borders.Width = 0.5;      // No right border


Any help is appreciated.

Edit: The document has a width of 7.5in so the table is NOT exceeding the page edge.


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

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 2 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:  
Powered by phpBB® Forum Software © phpBB Group