I’m trying to create a table with a dashed border, but it seems not to work.
Simple example:
Document doc = new Document();
Page page = doc.Pages.Add();
GraphInfo borderStyle = new GraphInfo()
{
Color = Color.Pink,
DashArray = new int[] { 5, 5 },
LineWidth = 1.0f,
};
var container = new Table
{
Border = new BorderInfo(BorderSide.All, borderStyle)
};
Cell cell = new Cell()
{
Alignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center
};
cell.Paragraphs.Add(new TextFragment("hello"));
container.Rows.Add().Cells.Add(cell);
page.Paragraphs.Add(container);
doc.Save(@"C:\temp\test.pdf");