Table Cell Margins

Technical support for Spire.Doc

Moderator: iceblue support

Table Cell Margins

Postby danielzborovski » Tue Jul 19, 2011 4:47 pm

How does one adjust the margins of a cell in a table?

Thank you!
danielzborovski
 
Posts: 3
Joined: Wed Jul 13, 2011 4:04 pm

Re: Table Cell Margins

Postby Justin Weng » Wed Jul 20, 2011 3:18 am

Dear danielzborovski,
Thanks for your inquiry.
I don't know what you mean?
Could you please tell us much more clear?
Justin
Technical Support / Developer,
e-iceblue Support Team
User avatar
Justin Weng
 
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am

Re: Table Cell Margins

Postby danielzborovski » Wed Jul 20, 2011 2:15 pm

I have cells in a table. I am putting paragraphs and images into these cells. When I open the doc in word, the table cells have blank space on the left of the cell contents. In Word, I can right click the table and adjust the table properties. Inside the table options it lists the left and right margins at 0.08". I need to set these to zero.
danielzborovski
 
Posts: 3
Joined: Wed Jul 13, 2011 4:04 pm

Re: Table Cell Margins

Postby Justin Weng » Thu Jul 21, 2011 3:11 am

Dear danielzborovski,
Thanks for your inquiry.
I think you want to set Paddings properties.
Code: Select all
 foreach (Section sec in doc.Sections)
            {
                foreach (Table table in sec.Tables)
                {
                    table.TableFormat.Paddings.Left = 0;
                    table.TableFormat.Paddings.Right = 0;
                }
            }

And there are also RowFormat and CellFormat to set Paddings properties.
If this solution can not solve your problem, please upload your original file and the result file which you did something in word to us.
Justin
Technical Support / Developer,
e-iceblue Support Team
User avatar
Justin Weng
 
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests