com.elovirta.ooxml icon indicating copy to clipboard operation
com.elovirta.ooxml copied to clipboard

Sometimes images are not copied to the DOTM package [DOT 2.x]

Open raducoravu opened this issue 8 years ago • 5 comments

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.

raducoravu avatar Mar 22 '16 06:03 raducoravu

:+1: Another one of our users had issues with this.

raducoravu avatar Sep 12 '16 07:09 raducoravu

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:

stefan-jung avatar Nov 08 '16 09:11 stefan-jung

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>

stefan-jung avatar Nov 08 '16 10:11 stefan-jung

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.

raducoravu avatar Apr 10 '17 07:04 raducoravu

Also on that part:

<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.

raducoravu avatar Apr 14 '17 11:04 raducoravu