I have a problem with my automatic numbers in titles.
I have a simple html that I want to convert in word. I use a template that I update with the following java code (the html and the code are at the end of this message)
My problem is that, when I open the final word, the number in front of the title doesn’t have the same size as the title.
But, when I click at the end of the title and press “enter”, the size of the number is updated (which means that the word style is working).
I joined my template, and the final result in the attached zip file. It’s an easy docx template, where title1 has font-size 16px and automatic juridic numbers (it means that title2 have the numbers 1.1 and title3 have numbers 1.1.1, etc…)
HTML CODE :
In the zip file with the template and the final result
JAVA CODE :
Document doc = new Document(new ClassPathResource(wordTemplate).getInputStream());
DocumentBuilder builder = new DocumentBuilder(doc);
asposeTopic4Titles.zip (26.6 KB)