maven - How to get all headers in a XWPFDocument -


i'm trying extract headers in docx file have. code use:

 fileinputstream fs = new fileinputstream(new file("myfile.docx"));  xwpfdocument doc = new xwpfdocument(opcpackage.open(fs));  list<xwpfheader> list = doc.getheaderlist(); 

and if do:

system.out.println(list.size()); 

it prints out 0, have 4 headers in document. way have succeeded extract text document using following code:

 xwpfwordextractor wx = new xwpfwordextractor(doc);    string text = wx.gettext();    system.out.println("text = "+text ); 

this structure of document:

enter image description here

any ideas on problem might be?


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -