Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Mon Feb 06, 2023 7:50 am
Hi Team,
Please let me know how to add beginning space before text inside the cell .
Below code is not working.
Table table = section.addTable();
table.getTableFormat().getPaddings().setLeft(0.8f);
Thanks in advance
-

pr20080798
-
- Posts: 159
- Joined: Wed Jan 20, 2021 1:15 pm
Mon Feb 06, 2023 9:57 am
Hello,
Thanks for your inquiry.
For your requirement, I need sometime to investigate, however, I'll give you feedback after investigating asap.
Sincerely
Abel
E-iceblue support team
-


Abel.He
-
- Posts: 1010
- Joined: Tue Mar 08, 2022 2:02 am
Tue Feb 07, 2023 2:01 am
Hello,
Thanks for your patiently waiting.
For your requirement, you can refer to the following code.
- Code: Select all
//Create a table cell
TableCell cell1 = new TableCell(doc);
//Add a paragraph
Paragraph para1 = cell1.addParagraph();
//Append text in the paragraph
para1.appendText("Row 1, Cell 1");
//Set the distance between text and border in the cell to 10f
para1.getFormat().setLeftIndent(10.f);
If you have any issue, just feel free to contact us.
Sincerely
Abel
E-iceblue support team
-


Abel.He
-
- Posts: 1010
- Joined: Tue Mar 08, 2022 2:02 am