Hi support,
Please note that if you insert a footnote in the header or footer, you get error message when you try to save the document, and not in the try&catch block that inserts the footnote. Same happends for comments.
Here is my code for footnotes :
Document doc = null;
try
{
doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveToHeaderFooter(HeaderFooterType.HEADER_FIRST);
builder.write("Header text");
int footnoteType = FootnoteType.FOOTNOTE;
builder.insertFootnote(footnoteType, "myFootnote");
}
catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
try
{
doc.save("C:\Temp\TRS\docFootnoteCrash.doc");
}
catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
Is this expected behavior ?
Regards,
Milan