Page 1 of 1

DITA to pdf loses images

Posted: Sat Apr 02, 2022 4:48 am
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?

Re: DITA to pdf loses images

Posted: Sun Apr 03, 2022 3:49 pm
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?

Re: DITA to pdf loses images

Posted: Mon Apr 04, 2022 11:42 am
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

Re: DITA to pdf loses images

Posted: Mon Apr 04, 2022 7:45 pm
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.