DITA to pdf loses images

Post here questions and problems related to editing and publishing DITA content.
IsleofGough
Posts: 34
Joined: Fri Dec 02, 2016 9:55 pm

DITA to pdf loses images

Post by IsleofGough »

I have a simple DITA file that looks like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA 1.3 Task//EN" "technicalContent/dtd/task.dtd" [
]>
<task id="id223PDG00Y5Z"
    xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/">
<title>my title</title>
<shortdesc>description</shortdesc>
<taskbody><steps><step><cmd>Details of step 1.</cmd>
<info><image href="../../../../Pictures/image1.jpg"  scale="30"/></info></step>
<step><cmd>Details of step 2.</cmd>
<info><image href="../../../../Pictures/image2.jpg"  scale="30"/></info></step>
<step><cmd>Details of step 3.</cmd>
<info><image href="../../../../Pictures/image3.jpg"  scale="30"/></info></step>
</steps></taskbody></task>
When I create a pdf, it cannot find the images. I can output from FrameMaker without problems. Any suggestions?
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: DITA to pdf loses images

Post by chrispitude »

Hi IsleofGough,

I have some questions:
  • Do both PDF transformations in Oxygen (XSL-FO and HTML5/CSS) exhibit this behavior?
  • Are the image files at a higher directory level than the ditamap you are publishing?
  • What version of Oxygen are you using?
  • Do you see any errors in the transformation log?
  • If you remove the @scale attribute, does the image appear?
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: DITA to pdf loses images

Post by julien_lacour »

Hello,

In addition to what chrispitude says, if the images are in a folder higher in the hierarchy than the transformed ditamap you must run the transformation with the fix.external.refs.com.oxygenxml DITA parameter set to 'true' (in the scenario editing dialog).

Regards,
Julien
IsleofGough
Posts: 34
Joined: Fri Dec 02, 2016 9:55 pm

Re: DITA to pdf loses images

Post by IsleofGough »

Moving the image directory to a subdirectory of topics did fix the issue. Unfortunately, the scale parameter doesn't seem to affect the pdf output if done with XSL-FO but fine with the HTML-CSS method. Thanks.
Last edited by IsleofGough on Mon Apr 04, 2022 7:52 pm, edited 1 time in total.
Post Reply