I'm using docx4j on my project to extract DOCX content to xhtml.
It works as expected except for TOC.
My docx file contains a TOC :
Table des matières
Approbation du procès-verbal du Bureau du 00 mois 0000 (N°000) 4
Situation générale et financière 5
Exemple de Chapitre 6
Exemple de Section 6
Questions diverses 7
When I call Docx4J.toHTML, I've got this result :
- Code: Select all
<p class="En-ttedetabledesmatires Titre1 Normal DocDefaults "><span class="" style="font-family: 'Cambria';">Table des matières</span></p>
<p class="TM2 Normal DocDefaults "><a href="#_Toc472500769"><span class="Lienhypertexte Policepardfaut " style="font-family: 'Times New Roman';">Approbation du procès-verbal du Bureau du 00 mois 0000 (N°000)</span><span class="Policepardfaut "> </span><a href="#_Toc472500769"><span>1</span></a></a></p>
<p class="TM2 Normal DocDefaults "><a href="#_Toc472500770"><span class="Lienhypertexte Policepardfaut " style="font-family: 'Times New Roman';">Situation générale et financière</span><span class="Policepardfaut "> </span><a href="#_Toc472500770"><span>1</span></a></a></p>
<p class="TM2 Normal DocDefaults "><a href="#_Toc472500771"><span class="Lienhypertexte Policepardfaut " style="font-family: 'Times New Roman';">Exemple de Chapitre</span><span class="Policepardfaut "> </span><a href="#_Toc472500771"><span>1</span></a></a></p>
<p class="TM3 Normal DocDefaults "><a href="#_Toc472500772"><span class="Lienhypertexte Policepardfaut " style="font-family: 'Times New Roman';">Exemple de Section</span><span class="Policepardfaut "> </span><a href="#_Toc472500772"><span>1</span></a></a></p>
<p class="TM2 Normal DocDefaults "><a href="#_Toc472500773"><span class="Lienhypertexte Policepardfaut " style="font-family: 'Times New Roman';">Questions diverses</span><span class="Policepardfaut "> </span><a href="#_Toc472500773"><span>1</span></a></a></p>
Page number is always 1.
There is a solution to conserve the original page numbering of the docx TOC?
Thanks in adavance.
Regards