• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading a document using XWPF as compared to HWPF

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone would like to help this out.
I am reading a document with HWPF(using range) and it returns some 300 paragraphs.
But when i read the same document with macro enabled for XWPF, it returns different number of paragraphs (around 100).
Can anybody tell me why is this discrepancy.
HWPF : Range range = doc2.getRange();
Map<String, MFLplcHoldrOccurances> mflPlcHoldrMap = new HashMap<String, MFLplcHoldrOccurances>();
List<String> xistPlcHoldrPargrafDletdLst = new ArrayList<String>();
int paracount = range.numParagraphs(); // some 300 paragraphs

XWPF : Iterator<XWPFParagraph> itPara = doc2.getParagraphsIterator();
int sizy = doc2.getParagraphs().size(); // some 100 paragraphs

Any suggestion will be highly appreciated


 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic