On Fri, 24 Sep 2010, Cédric Bosdonnat wrote:
I am too lazy to make a code snippet, but this shouldn't be too hard to get all the pictures from a doc file using HWPFDocument...

It's actually very easy, as the logic you described is already implemented in hwpf :)

HWPFDocument doc = new HWPFDocument(stream);
PicturesTable pictures = doc.getPicturesTable();
for(Picture picture : pictures.getAllPictures()) {
  // Do something useful
}

PictureTable.hasPicture(CharacterRun) is also worth a look, as it does the \0001 detection for you

Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to