poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Beeker <kiwiwi...@apache.org>
Subject Re: Getting contents out of HemfComment.EmfCommentDataWMF ?
Date Mon, 08 Apr 2019 22:09:20 GMT
Hi Tim,

please use the getWMFData() method:

HemfPicture emf = new HemfPicture((InputStream)...);
for (HemfRecord r : emf.getRecords()) {
    if (r instanceof EmfComment) {
        EmfCommentData hc = ((EmfComment)r).getCommentData();
        if (hc instanceof EmfCommentDataWMF) {
            EmfCommentDataWMF hcWmf = (EmfCommentDataWMF)hc;
            HwmfPicture wmf = new HwmfPicture(new ByteArrayInputStream(hcWmf.getWMFData()));
            List<HwmfRecord> bla = wmf.getRecords();
        }
    }
}


Best wishes,
Andi


Mime
View raw message