My HTML file is generated outside LibreOffice, but I want to have page number when opened in LibreOffice Writer.
The page numbers added in LibreOffice has the format of
<div title="footer">
<p style="margin-top: 0.2in; margin-bottom: 0in"><font color="#b2b2b2"><i>
<sdfield type=PAGE subtype=RANDOM format=PAGE>14</sdfield> of <sdfield type=DOCSTAT subtype=PAGE format=PAGE>14</sdfield></i></font></p>
</div>
What code should I add to my HTML file to dynamically generate the page numbers when opened in LibreOffice?