We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can use Table.SetEdge(...) to modify the edges of a range of cells. This wont work if I set the border color of a cell.
Take a look at this test code:
using System.Diagnostics; using MigraDoc.DocumentObjectModel; using MigraDoc.DocumentObjectModel.Tables; using MigraDoc.Rendering; Document document = new(); Section section = document.AddSection(); #region Table 1 - All good Table table = section.AddTable(); table.Borders.Visible = true; table.AddColumn(Unit.FromCentimeter(2)); table.AddColumn(Unit.FromCentimeter(2)); table.AddColumn(Unit.FromCentimeter(2)); table.AddColumn(Unit.FromCentimeter(2)); table.AddRow()[0].AddParagraph("Test"); table.AddRow()[1].AddParagraph("Test"); table.AddRow()[2].AddParagraph("Test"); table.AddRow()[3].AddParagraph("Test"); table.SetEdge(0, 0, table.Columns.Count, table.Rows.Count, Edge.Interior, BorderStyle.None, 0); #endregion section.AddParagraph(); #region Table 2 - If I color the table, SetEdge wont work properly Table table2 = section.AddTable(); table2.Borders.Visible = true; table2.AddColumn(Unit.FromCentimeter(2)); table2.AddColumn(Unit.FromCentimeter(2)); table2.AddColumn(Unit.FromCentimeter(2)); table2.AddColumn(Unit.FromCentimeter(2)); table2.AddRow()[0].AddParagraph("Test"); table2.AddRow()[1].AddParagraph("Test"); table2.AddRow()[2].AddParagraph("Test"); table2.AddRow()[3].AddParagraph("Test"); Color c = Color.Parse("#00FF00"); foreach (Row r in table2.Rows.OfType<Row>()) { foreach (Cell cell in r.Cells.OfType<Cell>()) { cell.Borders.Color = c; } } table2.SetEdge(0, 0, table2.Columns.Count, table2.Rows.Count, Edge.Interior, BorderStyle.None, 0); #endregion PdfDocumentRenderer pdfRenderer = new() { Document = document }; pdfRenderer.RenderDocument(); using FileStream outputStream = new("output.pdf", FileMode.Create); pdfRenderer.PdfDocument.Save(outputStream);
The second Table should have only outline borders like the first table but in green.
The second table has partially removed interior borders. Some in black and only some in green.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I can use Table.SetEdge(...) to modify the edges of a range of cells. This wont work if I set the border color of a cell.
Take a look at this test code:
Expected Behavior
The second Table should have only outline borders like the first table but in green.
Actual Behavior
The second table has partially removed interior borders. Some in black and only some in green.
Steps to Reproduce the Behavior
The text was updated successfully, but these errors were encountered: