Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4583990
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:17:31+00:00 2026-05-21T21:17:31+00:00

first of, I don’t know much about XSL. I am using a app called

  • 0

first of, I don’t know much about XSL.

I am using a app called DITA to generate pdfs. One of the things it requires is an overwrite of an xsl file; to add custom styling.

I am trying to add an external graphic using a relative path. It doesn’t work, unless I supply the full path.

Does not work:

<fo:block text-align="center" width="100%">
  <fo:external-graphic src="../../images/logo.png"/>
</fo:block>

Does work:

<fo:block text-align="center" width="100%">
  <fo:external-graphic src="/absolute/path/to/images/logo.png"/>
</fo:block>

I looked on the web, it said to use “file:image.png” and other website said to use “url(image.png)”, but neither worked.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:17:32+00:00Added an answer on May 21, 2026 at 9:17 pm

    This is an old question but something that is often misunderstood when working with DITA-OT.
    The important thing to know is that the external-graphic path is relative to the DITA-OT artwork.dir.

    I can think of two ways to do add the logo.

    The easy way

    Copy logo.png into the arwork diretory

    DITA-OT/demo/fo/cfg/common/artwork/logo.png
    

    Change your xsl graphic path to

    <fo:block text-align="center" width="100%">
      <fo:external-graphic src="Configuration/OpenTopic/cfg/common/artwork/logo.png"/>
    </fo:block>
    

    The harder way

    It is possible to change the artwork directory from which DITA takes it’s pictures as well as the output directory which will be used by FOP to render the PDF.

    open the build.xml file

    DITA-OT/demo/fo/build.xml
    

    Artwork root

    Define the root directory where DITA should copy the artwork to
    The default is

    <property name="artwork.dir" value="${dita.map.output.dir}"/>
    

    Which will set the root to where your final PDF will be saved.

    Artwork destination

    Define the path where the files should be stored relative to the artwork root directory

    <copy todir="${coreArtworkDestinationDir}/Configuration/OpenTopic"
    

    By default it will create the folders /Configuration/OpenTopic and then copy everything in there including sub directories.
    Make sure to change the destination twice. The two places you have to edit are only a few lines apart.

    Artwork source

    Define where the original artwork is saved so that DITA-OT can copy the files to the destination.
    The first line points to the default artwork that come with DITA-OT and should not be changed.

    <fileset dir="${basedir}" includes="cfg/common/artwork/**/*.*"/>
    

    The second one is intended for customizing thus being the one that should be used for customization.

    <fileset dir="${customization.dir}" includes="common/artwork/**/*.*"/>
    

    The path is relative to DITA-OT/demo/fo/Customization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off I don't know much about regex and need to buy a book
i newbie this my first project,I don't know how to resolve any problems about
first post don't hurt me :) I am using a BorderLayout with the usual
First of all I don't know if this is the right approach. I want
I don't understand why atoi() is working for every entry but the first one.
I am trying to delete a row using the DataTables plugin. First I don't
First I don't know the term of Proxy Methods are true way to describe
I am using an UISegmentedControl with two sections: the first is Don't Remember Password
Okay I will first admit I don't know the proper terminology for all this
I am currently developing WCF Publish Subscribe Service. For the first I don't know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.