Camille B. wrote:
when transforming 2 different docx files containing images, image files
are named the same on the output which is a major issue on our system
where files are physically at the same place.
I'm sorry but I don't see how this could happen. May be you made a
customization which causes this issue.
By default, all images files are created by w2x in a folder called
<output_file_basename>_files/. Example: converting "foo.docx" to
"out/foo.html" also automatically creates folder "out/foo_files/".
The basename of an image file created by w2x is taken from attributes
found in the DOCX file. Special efforts are made to use the most
meaningful basenames possible.
However in many cases, the proper attributes are missing from the DOCX
file hence w2x fallbacks to the image file names specified in the
"media/" folder found inside the DOCX file, which are always
"image1.png", "image2.png", "image3.png", ..., "image22.emf", etc.
Also note that when an image file having the same basename exists in
folder <output_file_basename>_files/, then "-2", "-3", "-4", etc, are
inserted into the basename (e.g. "image22-2.emf") to prevent overwriting
an existing image.
Therefore what you describe is in principle impossible to achieve when
you use w2x out of the box.
---
PS: The version you use has a bug (reported by Fabito) which has been
fixed in v1.2.3 to be released this month. I suspect the workaround you
made to cause the issue you are reporting.
With v1.2.3, "-p convert.resource-directory ." works as expected.
$ w2x -p convert.resource-directory . foo.docx out/foo.html
$ ls -C out/
expand-tabs.js image14.png image19.png image23.emf image8.png
image10.png image15.png image1.jpeg image2.jpeg image9.png
image11.png image16.png image20.png image3.jpeg foo.html
image12.png image17.png image21.png image6.png
image13.png image18.png image22.emf image7.png
--
XMLmind Word To XML Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/w2x-support