plutext / docx4j

JAXB-based Java library for Word docx, Powerpoint pptx, and Excel xlsx files

Home Page:https://www.docx4java.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add part for .wdp JPEG XR

plutext opened this issue · comments

ERROR org.docx4j.openpackaging.contenttype.ContentTypeManager - No subclass found for /word/media/hdphoto1.wdp; defaulting to binary

In Word (version 2402), the insert picture dialog supports emf, wml, jpg|jpeg, jfif, jpe, png, bmp, dib, rle, gif, emz, wmz, tif|tiff, svg, ico, webp.

if you add an image of type JPEG XR (jxr), Word converts it to png.

So you should convert your .jxr/.wdp image to png somehow, then add that.

I haven't experimented to see what Word does with a docx which has been made to contain a .jxr image.

It seems like the jxr format gained so little traction that Microsoft didn't bother to add it to Word.