Page 1 of 1

how to add Number of style for text

PostPosted: Wed Nov 27, 2013 2:27 pm
by janice
hi ,all,i want to add style for text,just like
1. Hi
2. Here
3. There

how to add number of style for text with docx4j;
or what is the styleID of the number ?
how can i know the styleID of styles?
Where can I find the style sheet?
thanks

Re: how to add Number of style for text

PostPosted: Wed Nov 27, 2013 2:45 pm
by jason
Numbering happens via the numbering definitions part; w:numPr can either occur directly on a paragraph to be numbered, or in a style definition.

Regarding the numbering part, see:

http://webapp.docx4java.org/OnlineDemo/ ... ing_2.html

https://github.com/plutext/docx4j/blob/ ... sPart.java

You can upload a sample docx to the webapp (linked above) to generate code.

Before posting again, please make sure you have read/tried all the above.