Hi list,
I'm developing my own DITA to WordprocessingML DITA-OT plug-in by referencing Jarno's com.elovirta.ooxml plug-in.
Now I have reached image processing and noticed that I need the image size that can be obtained using DITA-OT org.dita.dost.module.ImageMetadataModule class. So I inserted following target in build.xml.
<target name="ah.wml.image-metadata" description="Read image metadata">
<pipeline message="Read image metadata." taskname="image-metadata" tempdir="${dita.temp.dir}">
<module class="org.dita.dost.module.ImageMetadataModule">
<param name="outputdir" location="${output.dir}"/>
</module>
</pipeline>
</target>
Here is excerpt of my DITA-OT log file. DITA-OT fails to get image size from the bird.tif file.
preprocess:
ah.wml.image-metadata:
[image-metadata] Processing D:\SVN\pdf5\testdata-ooxml\20170907-image\temp\wml\cImageTest.dita
[image-metadata] Reading file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/bird.tif
[image-metadata] Image file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/bird.tif format not supported
[image-metadata] Reading file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/flower.gif
[image-metadata] Reading file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/tys125f.jpg
However com.elovirta.ooxml plug-in succeeded this step:
preprocess:
docx.image-metadata:
[image-metadata] Processing D:\SVN\pdf5\testdata-ooxml\20170907-image\temp\docx\cImageTest.dita
[image-metadata] Reading file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/bird.tif
[image-metadata] Reading file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/flower.gif
[image-metadata] Reading file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/image/tys125f.jpg
The result of both plug-ins are as follows:
My plug-in:
<image href="image/bird.tif" id="image_v11_stg_dbb" placement="inline" class="- topic/image " xtrf="file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/cImageTest.dita" xtrc="image:1;10:60"/>
com.elovirta.ooxml plug-in
<image href="image/bird.tif" id="image_v11_stg_dbb" placement="inline" class="- topic/image " xtrf="file:/D:/SVN/pdf5/testdata-ooxml/20170907-image/cImageTest.dita" xtrc="image:1;10:60" dita-ot:image-width="80" dita-ot:image-height="100" dita-ot:horizontal-dpi="72" dita-ot:vertical-dpi="72"/>
Could you tell my what is wrong with my plug-in to get the image size?
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/