Images fail to appear in ODT output

bburns
Posts: 4

Images fail to appear in ODT output

Tue Aug 29, 2017 12:59 am

When I generate an ODF file, the images in my map don't show. I can unzip the ODF and see that a binary is embedded, but the images don't render properly. I'm using the org.dita.odt plugin with OT1.8 and Oxygen 19.

Has anyone found a workaround for this issue?
Bill Burns
Content Architect | Healthwise
bburns@healthwise.org | www.healthwise.org
208.331.6917 (office) | 208.345.1897 (fax)

Healthwise helps people make better health decisions.
bogdan
Posts: 13

Re: Images fail to appear in ODT output

Thu Aug 31, 2017 12:05 pm

Hi Bill,

I tried to reproduce the problem using Oxygen 19.0 (build id 2017033118), built-in DITA-OT 1.8, built-in Flowers DITA project, built-in DITA Map ODF transformation scenario. I opened the generated ODT file with Apache OpenOffice Writer and it worked just fine.

Please try to replicate my test scenario on your computer to see if you get the same result. Just a small note: please try to delete the output directory between two consecutive transformations.

Best Regards,
Bogdan Goreci
oXygen XML Editor and Author Support
GSejourne
Posts: 15

Re: Images fail to appear in ODT output

Tue Apr 10, 2018 5:40 pm

I'm hitting the same issue, using <oXygen/> XML Editor 18.1, build 2017020917
Trying to generate an ODT file from DITA source, through Oxygen, gives me the ODT file, but no images are present inside.

I could provide the build log, but no errors/warnings whatsoever.

* One thing I noticed in the log, is that the copy-image target does not seem to do anything.
* The temporary build file temp/odt/image.list is properly populated
* The temporary directory does not contain the image files however (they're not copied to the temp directory)
* Viewing the XML content of the generated ODT file gives this for a PNG image:

Code: Select all

<text:p text:style-name="Standard"><text:line-break/>
                <text:span text:style-name="T2">Figure 1. Exemple de rapport de compte
                    utilisateur</text:span>
                <text:line-break/>
                <draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char"
                    svg:width="6in" svg:height="0.0161in" draw:z-index="0">
                    <draw:image loext:mime-type=""/>
                </draw:frame><text:s/>
            </text:p>
Radu
Posts: 5858

Re: Images fail to appear in ODT output

Wed Apr 11, 2018 4:30 pm

Hi,

Sorry for the delay, I will add an internal issue and try to investigate this problem on our side.
The ODF output is no longer an officially supported output by the DITA OT but maybe we can make this work, if I find a workaround for this I'll update this forum thread.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GSejourne
Posts: 15

Re: Images fail to appear in ODT output

Fri Apr 13, 2018 2:36 pm

Hi,

Thanks Radu,

I usually don't build the output using Oxygen, (this is all automated through CI builds), but I've been unable to get the https://github.com/dita-ot/org.dita.odt to work on a recent DITA-OT framework, and that's the reason I tested through Oxygen.

If you have any advice on where I could get an updated plugin, this would do as well on my side.

-Guillaume
GSejourne
Posts: 15

Re: Images fail to appear in ODT output

Fri Apr 13, 2018 3:37 pm

If it helps:
I just tried building ODT output from Oxygen, but this time, forcing the use of "DITA-OT" framework (instead of DITA-OT2.x by default).
(In the build config, I set dita.dir=${frameworksDir}/dita/DITA-OT
And it works. I now have the images inside the resulting ODT document.
Still broken with default ODT output though...
Radu
Posts: 5858

Re: Images fail to appear in ODT output

Mon Apr 16, 2018 2:01 pm

Hi,

DITA OT 2.x changed the way in which image sizes are computed.
From what I tested, in the small sample project I created the images are included in the ODF file (you can open the result ODF file in Oxygen in the Archive Browser and look for the images there) but when the images are referenced, their height is not correctly computed.
If you open the XSLT stylesheet:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.odt\xsl\xslodt\dita2odt-img.xsl

at line 278 it has something like:

Code: Select all

 <xsl:attribute name="svg:width">


which should be replaced with:

Code: Select all

 <xsl:attribute name="svg:height">


This seemed to start showing the images on my side.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Costin
Posts: 434

Re: Images fail to appear in ODT output

Thu Apr 26, 2018 5:09 pm

Hello,

Just to update the thread, I wanted to let you know that this problem has been resolved in the latest maintenance build of Oxygen 20.0, 2018042410 (released today, April 26th):
DITA-OT Publishing: Fixed an issue where DITA to Open Document Format publishing did not display referenced images.

You can download it from our web site:
http://www.oxygenxml.com/download.html

The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2018042410

You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml

To upgrade:
- For Windows and Linux you can install the new build in the same folder as the previous installation, it will automatically upgrade it.
Before you upgrade, if you have added files or made changes to any of the files from the Oxygen installation folder(especially the frameworks folder), you may want to create a backup of them because they will be overwritten during the upgrade procedure. Custom frameworks will be preserved but we recommend backing them up anyway, just to be safe.
- For Mac OS X you will have to either move the old folder from Applications to a different location and put the new version of Oxygen in its place, or install in a different folder. You can then copy any files you may have changed from the old folder (if any) to the new folder.

The Oxygen preferences will be preserved since they are located elsewhere (user home folder).

Let us know if you encounter further problems with this new build.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 2 guests