PDFsharp & MigraDoc Foundation http://forum.pdfsharp.de/ |
|
Cell padding http://forum.pdfsharp.de/viewtopic.php?f=2&t=812 |
Page 1 of 1 |
Author: | sbilo [ Mon Jul 27, 2009 8:17 pm ] |
Post subject: | Cell padding |
How can I pad some space around the left side of a table cell contents? With the code below the contents of the cell gets pushed up too close against the left border: // Create a new style called CELL based on style Normal style = document.Styles.AddStyle("CELL", "Normal"); style.Font.Name = "Arial"; style.Font.Size = 8; style.ParagraphFormat.Font.Color = Colors.Black; style.ParagraphFormat.Borders.Left.Width = .1; // add a row row = table.AddRow(); cell = row.Cells[0]; cell.AddParagraph("some text"); thanks |
Author: | Thomas Hoevel [ Tue Jul 28, 2009 9:05 am ] |
Post subject: | Re: Cell padding |
The table has properties BottomPadding, LeftPadding, etc. To get the Normal style: Code: style = document.Styles["Normal"]; Paragraphs can be left aligned, right aligned, center aligned, or justified. Just set the Alignment property of the ParagraphFormat. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |