We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to indent Table- just like List indent

Hi,

I use Aspose.Words for Java, now I need to indent Table, just like List, we can indent List by below way:

DocumentBuilder docBuilder = null;

docBuilder.getListFormat().listIndent();

I need to indent Table when List indent, just like Table in List, as a item of List.

So far, I found List can’t contain a Table in Aspose, so I need implement this by my self.

My implementation is:
1, when List indent.
2, then I can indent Table by codes, but how can I indent the Table, I know the API Table.setLeftIndent(); can do this, but need a parameter “left indent distance”, so I don’t know how to deal with it.

Please advise.

Thanks,
Feng

Hi Feng,


Thanks for your inquiry. First of all please note that a list is represented by a Paragraph node in Aspose.Words DOM. Since Paragraph and Table nodes are Block Level Nodes, so a Paragraph can’t contain a Table as its Child Node. Secondly, I would suggest you use setLeftIndent property to set the Indent From Left.

Please let us know if you need more information, we are always glad to help you.

Best Regards,

Hi Awais,

I need to get the List indent value, how to get it in Aspose?

Thanks.

Hi Feng,


Thanks for your inquiry. I think, you can achieve this after reading the post by my colleague Alexey in the following thread:
http://www.aspose.com/community/forums/228242/list-indent/showthread.aspx#228242

I hope, this will help.

Best Regards,