Loading ...
Sorry, an error occurred while loading the content.

Problems with images in PDF

Expand Messages
  • tomq42
    I m just experimenting with DITA in order to write some help files for our product. I mainly want to generate eclipse help (which I ve managed to do quite
    Message 1 of 5 , Feb 24, 2006
    • 0 Attachment
      I'm just experimenting with DITA in order to write some help files for
      our product. I mainly want to generate eclipse help (which I've
      managed to do quite easily which is good).
      However I'm having problems with the PDF generation.
      I can produce the PDf file no problem, but none of the images come out.

      It seems that the relative URLs from my topic files are just being
      copied into the fo file unmodified. However my source tree containing
      the topic files isn't flat. So I have, for example

      images/
      image1.gif
      tasks/
      task1.xml -- references ../images/image1.gif

      The above structure works fine for the HTML/Eclipse help as the HTML
      files are generated in the same structure as the XML files.
      However in the FO file, I still get a reference to
      ../images/image1.gif, whereas it should be just images/image1.gif as
      the structure in the output directory is

      book.fo
      images/
      image1.gif

      (images get copied magically by some part of the DITA2PDF ant task).

      Is there any way I can get round this?

      Many thanks.
      DITA seems great otherwise by the way.
    • Deborah Pickett
      ... Oddly enough, It Works For Me. I just tried a dita2pdf transformation on a piece of my own documentation and the image files were referenced properly. I m
      Message 2 of 5 , Feb 26, 2006
      • 0 Attachment
        --- In dita-users@yahoogroups.com, "tomq42" <tomq@...> wrote:
        > It seems that the relative URLs from my topic files are just being
        > copied into the fo file unmodified. However my source tree containing
        > the topic files isn't flat. So I have, for example
        >
        > images/
        > image1.gif
        > tasks/
        > task1.xml -- references ../images/image1.gif

        Oddly enough, It Works For Me. I just tried a dita2pdf transformation
        on a piece of my own documentation and the image files were referenced
        properly.

        I'm wondering if it has something to do with the location of your map.
        The toolkit is very picky about what directory the map is found in.
        Where does the map live in your directory hierarchy?
      • tomq42
        I ve got my map in the parent directory for reasons to do with eclipse help generation. My actual structure is book.ditamap user-guide/ images/ image1.gif
        Message 3 of 5 , Feb 27, 2006
        • 0 Attachment
          I've got my map in the parent directory for reasons to do with eclipse
          help generation.
          My actual structure is

          book.ditamap
          user-guide/
          images/
          image1.gif
          tasks/
          task1.xml

          But it doesn't seem to make a difference if I change that and move
          book.ditamap down a level.

          I'm slightly struggling to know how I'm supposed to set this stuff up.
          There don't seem to be any clear instructions on how to make use of
          DITA-OT in yur own project. I can run the build.xml file in the
          DITA-OT distribution fine, but when I try to do things myself in my
          own source tree, I run into all kinds of problems.
          For example I had to hack the java code because it was needing to find
          the messages.xml file in resource\messages.xml relative to the current
          directory, which is fine when your building the DITA-OT source, but
          that's not how I want to set up my source tree.

          Anyone got some simple tips on how to get DITA-OT (or indeed the IBM
          dita-132 -- not sure I understand the difference) set up so that it
          runs in my (arbitrarily aranged) source tree?



          --- In dita-users@yahoogroups.com, "Deborah Pickett"
          <deborah_pickett@...> wrote:
          >
          > --- In dita-users@yahoogroups.com, "tomq42" <tomq@> wrote:
          > > It seems that the relative URLs from my topic files are just being
          > > copied into the fo file unmodified. However my source tree containing
          > > the topic files isn't flat. So I have, for example
          > >
          > > images/
          > > image1.gif
          > > tasks/
          > > task1.xml -- references ../images/image1.gif
          >
          > Oddly enough, It Works For Me. I just tried a dita2pdf transformation
          > on a piece of my own documentation and the image files were referenced
          > properly.
          >
          > I'm wondering if it has something to do with the location of your map.
          > The toolkit is very picky about what directory the map is found in.
          > Where does the map live in your directory hierarchy?
          >
        • Deborah Pickett
          ... Yeah, that should work. Can you reduce the problem to a small document set and send/post the contents of the book_MERGED.xml file that gets left in the
          Message 4 of 5 , Feb 27, 2006
          • 0 Attachment
            --- In dita-users@yahoogroups.com, "tomq42" <tomq@...> wrote:
            > I've got my map in the parent directory for reasons to do with eclipse
            > help generation.
            > My actual structure is
            > book.ditamap
            > user-guide/
            > images/
            > image1.gif
            > tasks/
            > task1.xml

            Yeah, that should work. Can you reduce the problem to a small
            document set and send/post the contents of the book_MERGED.xml file
            that gets left in the temp directory?

            > But it doesn't seem to make a difference if I change that and move
            > book.ditamap down a level.

            That won't work (yet); the map needs to be at the root of the
            hierarchy. I get around that problem with this little kludge:

            foo.ditamap
            map/realmap.ditamap
            tasks/task1.xml
            images/image1.gif

            foo.ditamap contains only:
            <map>
            <topicref href="map/realmap.ditamap" format="ditamap"/>
            </map>

            and the real map is in the map/ directory.

            (map, tasks and images in my setup are symlinks to our pretend CMS,
            which is why I go through these hoops).

            > I'm slightly struggling to know how I'm supposed to set this stuff up.
            > There don't seem to be any clear instructions on how to make use of
            > DITA-OT in yur own project. I can run the build.xml file in the
            > DITA-OT distribution fine, but when I try to do things myself in my
            > own source tree, I run into all kinds of problems.
            > For example I had to hack the java code because it was needing to find
            > the messages.xml file in resource\messages.xml relative to the current
            > directory, which is fine when your building the DITA-OT source, but
            > that's not how I want to set up my source tree.

            You, sir, are preaching to the converted. There seems to be a common
            use case where the document tree and the DITA-OT tree might be a long
            way from each other, and support for it is IMHO lacking in all
            releases up to now. Feel free to join my jumping up and down.

            > Anyone got some simple tips on how to get DITA-OT (or indeed the IBM
            > dita-132 -- not sure I understand the difference) set up so that it
            > runs in my (arbitrarily aranged) source tree?

            Sourceforge bug 1431229 has a patch which fixes up the messages.xml
            problem, but the project leaders want to do it a slightly different
            way, and we're waiting for 1.2 to be out of the way before it goes in.
            There is a related patch 1326450 which won't work for 1.2 but
            probably expresses some of your sentiment.

            (Declared interests: all these patches and bug reports came from me.
            But feature request 1420935 didn't, and it looks pretty much the same.)

            IBM DITA 1.32 should be considered of historical interest only. It
            has been superseded by OASIS DITA 1.0.
          • tomq42
            If I create a simple example in the DITA-OT distribution directory with the layout of my big example, it does work. Trying with the same example in my source
            Message 5 of 5 , Mar 1, 2006
            • 0 Attachment
              If I create a simple example in the DITA-OT distribution directory
              with the layout of my big example, it does work.
              Trying with the same example in my source tree...

              That works. Strange.

              And now it does seem to work in my big example too. Which is a bit odd.

              It's possible that when I tried this before I still had some image
              references in my topic files which where explicit file names (I
              genertaed my topic files by copying and pasting text from Word into
              XMetal which generated image tags, but the images are in some Windows
              temporary file somewhere). I've seen that strange things happen in
              other places if references aren't all "within" a project (DITA seems
              to try and work out the root of the project by normalising paths with
              ../ in them at some points).
              Anyway for whatever reason, images now come out correctly and I can
              remove my kludhge to copy them to the "right" place before generating
              the PDF.

              Many thanks for your help anyway.


              --- In dita-users@yahoogroups.com, "Deborah Pickett"
              <deborah_pickett@...> wrote:
              >
              > --- In dita-users@yahoogroups.com, "tomq42" <tomq@> wrote:
              > > I've got my map in the parent directory for reasons to do with eclipse
              > > help generation.
              > > My actual structure is
              > > book.ditamap
              > > user-guide/
              > > images/
              > > image1.gif
              > > tasks/
              > > task1.xml
              >
              > Yeah, that should work. Can you reduce the problem to a small
              > document set and send/post the contents of the book_MERGED.xml file
              > that gets left in the temp directory?
              >
              > > But it doesn't seem to make a difference if I change that and move
              > > book.ditamap down a level.
              >
              > That won't work (yet); the map needs to be at the root of the
              > hierarchy. I get around that problem with this little kludge:
              >
              > foo.ditamap
              > map/realmap.ditamap
              > tasks/task1.xml
              > images/image1.gif
              >
              > foo.ditamap contains only:
              > <map>
              > <topicref href="map/realmap.ditamap" format="ditamap"/>
              > </map>
              >
              > and the real map is in the map/ directory.
              >
              > (map, tasks and images in my setup are symlinks to our pretend CMS,
              > which is why I go through these hoops).
              >
              > > I'm slightly struggling to know how I'm supposed to set this stuff up.
              > > There don't seem to be any clear instructions on how to make use of
              > > DITA-OT in yur own project. I can run the build.xml file in the
              > > DITA-OT distribution fine, but when I try to do things myself in my
              > > own source tree, I run into all kinds of problems.
              > > For example I had to hack the java code because it was needing to find
              > > the messages.xml file in resource\messages.xml relative to the current
              > > directory, which is fine when your building the DITA-OT source, but
              > > that's not how I want to set up my source tree.
              >
              > You, sir, are preaching to the converted. There seems to be a common
              > use case where the document tree and the DITA-OT tree might be a long
              > way from each other, and support for it is IMHO lacking in all
              > releases up to now. Feel free to join my jumping up and down.
              >
              > > Anyone got some simple tips on how to get DITA-OT (or indeed the IBM
              > > dita-132 -- not sure I understand the difference) set up so that it
              > > runs in my (arbitrarily aranged) source tree?
              >
              > Sourceforge bug 1431229 has a patch which fixes up the messages.xml
              > problem, but the project leaders want to do it a slightly different
              > way, and we're waiting for 1.2 to be out of the way before it goes in.
              > There is a related patch 1326450 which won't work for 1.2 but
              > probably expresses some of your sentiment.
              >
              > (Declared interests: all these patches and bug reports came from me.
              > But feature request 1420935 didn't, and it looks pretty much the same.)
              >
              > IBM DITA 1.32 should be considered of historical interest only. It
              > has been superseded by OASIS DITA 1.0.
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.