com.elovirta.ooxml
com.elovirta.ooxml copied to clipboard
Sometimes images are not copied to the DOTM package [DOT 2.x]
If the DITA Map references all images like:
<keydef keys="testK" href="test.jpg" format="jpg"/>
and the topics reference it like:
<image keyref="testK"/>
it seems that the target "docx.package.media" is skipped because it looks at an images list file in the temporary files folder and that list file is empty.
:+1: Another one of our users had issues with this.
Here some test files to reproduce this: filter-image-test.zip
Unfortunately I forgot this bug and replaced all <image href="x"/>
with <image keyref="x"/>
.
:disappointed: :gun:
I also sometimes have issues with PNG files and normal href
links. JPG files work when not using keyref
.
<fig>
<title>Title</title>
<image href="media/image.jpg">
<alt>Alt</alt>
</image>
</fig>
This fix does not work as long as the "docx.package.media" still depends on the "docx.package.media.check" which looks at the old file size and sometimes it seems that the images file size is zero but there are still images to copy using the new image fileset mechanism.
Also on that
<delete>
<fileset dir="${dita.temp.dir}/docx/word/media">
<include name="**/*.mml"/>
<include name="**/*.svg"/>
</fileset>
</delete>
you should add a erroronmissingdir="false" in case there are no images in the project.