You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Mark Beardsley <ma...@tiscali.co.uk> on 2011/04/16 08:39:46 UTC

Re: how to get picture's width and height of word07

Have had a play with this but made no progress at all I am afraid. Currently,
I am focusing on identifying the underlying class that ought to contain the
information relating to the image's dimensions but, again, have not found
that. The approach I am looking at currently, is grabbing the raw xml markup
from the body of the document and parsing that using the parse(String)
method from the appropriate lower level class - when I can find it of
course. As a fallback, it would be possible to parse the xml manually to
extract the information but this would require my knowing how the dimensions
are expressed. By this, I mean that I have examined the markup and rather
large numbers are used to express the images height and width. I am guessing
that Micrsosoft are using some arcane measuring system - maybe even pixels -
and so I need to nail this down first and then convert it into inches or
centimetres.

Will post again if I make any progress.

Yours

Mark B

PS This must all be regarded as an ugly hack IMO. It would be better to find
the 'correct' approach to parse the image information when the document is
initially parsed. Perhaps you could consider looking into this yourself with
an eye to contributing a patch to the project?

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/how-to-get-picture-s-width-and-height-of-word07-tp4300572p4307032.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org