- Reading comments from a metafile. Small example how to read comments:
WmfMetafile wfile = new WmfMetafile(file);
MetafileComment[] comments = wfile.getComments();
for(int i = 0; i < comments.length; i++) {
System.out.println("comment " + comments[i].getRecordIndex() + ": " +
Charset.defaultCharset().decode(ByteBuffer.wrap(comments[i].getCommentData())).toString());
}
- Rendering text in different charsets. Aspose.Metafiles should select right charset automatically but it is possible to override it through rendering hints.
Fixed:MetafileCharsetCollection cc = new MetafileCharsetCollection();
Charset charset = (Charset)Charset.availableCharsets().get("windows-1251");
cc.SetCharset(MetafileCharsetCollection.DEFAULT_CHARSET, charset);
renderingHints.put(MetafileCharsetCollection.METAFILES_CHARSET_COLLECTION, cc);
- 3862 – Aspose.Metafiles didn’t work with Aspose.Total for Java license.
No related posts.