I was wondering if it is possible to create a “Table of Contents” dynamicly in the conversion process.
I’ve written a PHP script which puts some html together then adds the footer and header using the sdfield tag(<div title=“footer”>
) to a HTML file. Then I convert the HTML file to a DOC file (using
<center><sdfield type=PAGE subtype=RANDOM format=PAGE>14</sdfield>/<sdfield type=DOCSTAT subtype=PAGE format=PAGE>14</sdfield></center>
</div>soffice --headless --convert-to doc:“MS Word 97”
) because that is the result we’re aiming for.
The file is nearly perfect to our requirements except for the missing “Table of contents” (preferably on page 3). However at this point i’m lost. Is there a special tag I can use here? Or is it possible to use some sort of document as a template so that i can insert the table tag beforehand?