https://bz.apache.org/bugzilla/show_bug.cgi?id=64693

--- Comment #4 from Lee <liyinsh...@huawei.com> ---
Hi, thank you for your reply!

I tried the newest code and use the PPTX2PNG -charset, but the embedded file
cannot be display, i cannot see the icon and title in the saved image file.



(In reply to Andreas Beeker from comment #3)
> fixed via r1881322
> 
> The problem with WMF is, that the bytes in the ExtTextOut records are
> depending on the used font and it usually configured to use the default
> charset which is depending on the system locale. [1]
> 
> Therefore I've introduced a charset option, which can be either set ...
> - via a rendering hint:
> graphics.setRenderingHint(Drawable.DEFAULT_CHARSET, Charset.forName("GBK"));
> - or directly set it in the HwmfPicture/HemfPicture via:
> HwmfPicture.setDefaultCharset(Charset.forName("GBK"))
> 
> The rendering hint is necessary to pass the option when rendering slides and
> no direct access to the Hwmf/Hemf classes is possible.
> The direct access to Hwmf/Hemf can be used, when extracting text from the
> records.
> 
> To simplify the handling, I've added a "-charset" option to PPTX2PNG - so in
> your case, you need to add "-charset GBK"
> 
> Apart of that I've fixed some deprecated API usage, detailed the output on
> GenericRecordJsonWriter on BufferedImages and fixed some of the image
> composition raster operations, i.e. the icon has a transparent background
> instead of a black one.
> 
> 
> 
> [1]
> https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/0d0b32ac-
> a836-4bd2-a112-b6000a1b4fc9

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to