No illustrations in Word generated document
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 38
- Joined: Mon Dec 05, 2022 3:24 pm
No illustrations in Word generated document
Hi all,
In our validation process, we want to generate docx file so that reviewers can validate (and eventually modify) the documents.
Our main output are PDF and HTML but for the review, MS Word may be easier to use (for reviewers that do not have Oxygen licenses).
Our first test with very basic document was correct but the document I generate this morning has illustrations (*.svg) and these illustrations did not appear in the MS Word document.
I used the default DITA Map MS Office Word transformation scenario. I also tried to modify it, adding the path of Inkscape in the inkscape.exec parameter without anything better.
Do you have a idea on how to get the pictures in the generated document?
Thank you in advance for your help,
ML
<oXygen/> XML Editor 24.1, build 2022030807
In our validation process, we want to generate docx file so that reviewers can validate (and eventually modify) the documents.
Our main output are PDF and HTML but for the review, MS Word may be easier to use (for reviewers that do not have Oxygen licenses).
Our first test with very basic document was correct but the document I generate this morning has illustrations (*.svg) and these illustrations did not appear in the MS Word document.
I used the default DITA Map MS Office Word transformation scenario. I also tried to modify it, adding the path of Inkscape in the inkscape.exec parameter without anything better.
Do you have a idea on how to get the pictures in the generated document?
Thank you in advance for your help,
ML
<oXygen/> XML Editor 24.1, build 2022030807
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: No illustrations in Word generated document
Hi,
You cannot embed the SVGs directly inside the Word document.
So you have this alternative you tried of setting the inkscape.exec parameter in order to convert on the fly SVG to EMF while publishing to Word.
On my side I downloaded Inkscape 1.2.1 and set the inkscape.exec parameter to point to C:\Users\my_user_name\Downloads\inkscape-1.2.1\bin\inkscape.exe.
Then I also needed to modify this build file "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/plugins/com.elovirta.ooxml/build.xml" and make the changes I proposed here:
https://github.com/jelovirt/com.elovirt ... /issues/98
Regards,
Radu
You cannot embed the SVGs directly inside the Word document.
So you have this alternative you tried of setting the inkscape.exec parameter in order to convert on the fly SVG to EMF while publishing to Word.
On my side I downloaded Inkscape 1.2.1 and set the inkscape.exec parameter to point to C:\Users\my_user_name\Downloads\inkscape-1.2.1\bin\inkscape.exe.
Then I also needed to modify this build file "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/plugins/com.elovirta.ooxml/build.xml" and make the changes I proposed here:
https://github.com/jelovirt/com.elovirt ... /issues/98
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 38
- Joined: Mon Dec 05, 2022 3:24 pm
Re: No illustrations in Word generated document
Radu,
Thank you so much! It works like a charm!
Just one issue, modifying the build.xml file convert all the SVG of my project in EMF. It works but it takes more than 20' for a 5 pages document and this document raises 200Mo! The document I want to convert is in the middle of a big project with more than 50 different documents...
Did you have an idea on how to force it to convert only the SVG needed?
I tried to change the path>fileset>include parameter:
It convert only the files I have filtered but this filter is a bit violent. And I do not understand how to filter with the SVG embeded only in the topics contained in the ditamap I am converting...
Hope you can help me... Sorry, I'm a technical writer and definitely not a specialist of the publication part
ML
Thank you so much! It works like a charm!
Just one issue, modifying the build.xml file convert all the SVG of my project in EMF. It works but it takes more than 20' for a 5 pages document and this document raises 200Mo! The document I want to convert is in the middle of a big project with more than 50 different documents...
Did you have an idea on how to force it to convert only the SVG needed?
I tried to change the path>fileset>include parameter:
Code: Select all
<target name="docx.svg2emf" if="inkscape.exec" unless="docx.inkscape.skip">
<mkdir dir="${dita.temp.dir}/docx/word/media"/>
<for param="svg.file">
<path>
<fileset dir="${user.input.dir}">
<include name="**/20*.svg"/> <!-- to convert only the 20***.svg files -->
</fileset>
</path>
Hope you can help me... Sorry, I'm a technical writer and definitely not a specialist of the publication part

ML
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: No illustrations in Word generated document
Hi,
It's hard without knowing the exact project structure you have but...
Are the SVG images referenced using direct references <image href> or indirect <image keyref> references?
If you publish for example the DITA Map to HTML are all the images also copied to the output folder?
Do you have a DITA Map which refers to only a few DITA topics, right? Is it possible those few DITA topics refer to other topics which in turn refer to others? In this case the publishing engine might navigate the entire graph of references and collect referenced image paths from all directly and indirectly referenced topics.
Regards,
Radu
It's hard without knowing the exact project structure you have but...
Are the SVG images referenced using direct references <image href> or indirect <image keyref> references?
If you publish for example the DITA Map to HTML are all the images also copied to the output folder?
Do you have a DITA Map which refers to only a few DITA topics, right? Is it possible those few DITA topics refer to other topics which in turn refer to others? In this case the publishing engine might navigate the entire graph of references and collect referenced image paths from all directly and indirectly referenced topics.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 38
- Joined: Mon Dec 05, 2022 3:24 pm
Re: No illustrations in Word generated document
Hi Radu,
SVG are referenced using href...
Publishing in HTML leads to a different situation, all the SVG are not copied but there is a mass of other topic absolutely not related that are present.
Pretty sure you're right and there is one topic that reference something that create all these dependencies... As I am not the writer of the common/generic topics, I have to analyse the situation.
But you help me clarifying the issue!
Thank you again,
ML
SVG are referenced using href...
Publishing in HTML leads to a different situation, all the SVG are not copied but there is a mass of other topic absolutely not related that are present.
Pretty sure you're right and there is one topic that reference something that create all these dependencies... As I am not the writer of the common/generic topics, I have to analyse the situation.
But you help me clarifying the issue!
Thank you again,
ML
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service