Hi Andreas,

Thanks for answer.

The raw data was acquired from overriding the
AbstractWordConverter.processingImage()...
in the hwpf package, by calling picture.getContent(). I cannot
immediately figure
out how to reset the header after reading your code reference.

BTW, I was using a local compile of the POI modules from Github.  Is the
code considered out of date? I could not find the hwmf package in the
github code.

Thanks

Bing







2014-05-28 23:13 GMT+08:00 Andreas Beeker <[email protected]>:

> Hi Bing,
>
> maybe the wmfs are missing the wmf header, which can be chopped off, when
> the wmf is embedded [2]
> - so if the size is 22 bytes to big, this would be a good indication.
>
> I've started to implement wmf parsing a while ago and maybe you can
> recreate the header with the
> WmfPlaceableHeader class [1].
>
> Andi
>
> [1] http://svn.apache.org/repos/asf/poi/branches/wmf_render/
> src/scratchpad/src/org/apache/poi/hwmf/record/WmfPlaceableHeader.java
> [2] org.apache.poi.hssf.usermodel.HSSFWorkbook.addPicture()
>
>
> On 28.05.2014 12:29, Bing Ran wrote:
>
>> Hi,
>>
>> New to the list but I have pressing need to extract all the embedded
>> equation images from an Word 97 .doc file (not .docx).
>>
>> I know all those images are in WMF format. After I dumped the picture
>> content (from the Picture.getContent()) to a file, I found that the file
>> was not entirely a valid WMF or at least they did not have the correct
>> size
>> information.
>>
>> I'd appreciate it so much if someone can get me started on the right
>> track.
>>
>> Thanks!
>>
>> Bing
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to