I need to include a table of contents with the text "Table Of Contents" before it in my document.
Here's my code:
DocumentBuilder builder = new DocumentBuilder(document);
builder.write("Table Of Contents");
The table of contents is only a few lines long, but it appears that the insertTableOfContents method reserves the entire page for it. When I include the "Table Of Contents" heading, another page is added so I end up with a blank page before the document body.
I'm attaching the created document.