docbook-apps

  • 1.  Embed images in HTMLHelp file

    Posted 12-15-2006 10:28
    How do I embed images in the resulting HTMLHelp file (.chm)? I use xsltproc
    to transform my docbook XML file and then compiles the resulting
    htmlhelp.hhp using hhc.exe.

    I don't want separate image files because:

    1. I want to distribute the HTMLHelp file
    2. The images are located on a network drive and thus I get absolute
    path's in my HTMLHelp file, which points to somewhere not accessible by the
    users of the HTMLHelp file

    TIA

    /Carpalia



  • 2.  Re: [docbook-apps] Embed images in HTMLHelp file

    Posted 12-15-2006 15:06
    Carpalia wrote:
    > How do I embed images in the resulting HTMLHelp file (.chm)? I use xsltproc
    > to transform my docbook XML file and then compiles the resulting
    > htmlhelp.hhp using hhc.exe.
    >
    > I don't want separate image files because:
    >
    > 1. I want to distribute the HTMLHelp file
    > 2. The images are located on a network drive and thus I get absolute
    > path's in my HTMLHelp file, which points to somewhere not accessible
    > by the
    > users of the HTMLHelp file

    You must use relative paths to images if you want to embed them into
    HTML Help.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz
    ------------------------------------------------------------------
    Profesionální školení a poradenství v oblasti technologií XML.
    Podívejte se na náš nove spuštený web http://DocBook.cz
    Podrobný prehled školení http://xmlguru.cz/skoleni/
    ------------------------------------------------------------------
    Nejbližší termíny školení:
    ** XML pro vývojáre 19.-22.3.2007 ** XML schémata 16.-18.4.2007 **
    ** XSL-FO 15.-16.5.2007 ** DocBook 26.-28.6.2007 **
    ------------------------------------------------------------------
    http://xmlguru.cz Blog mostly about XML for English readers
    ------------------------------------------------------------------




  • 3.  Re: [docbook-apps] Embed images in HTMLHelp file

    Posted 12-18-2006 08:36
    > > How do I embed images in the resulting HTMLHelp file (.chm)? I use xsltproc
    > > to transform my docbook XML file and then compiles the resulting
    > > htmlhelp.hhp using hhc.exe.
    > >
    > > I don't want separate image files because:
    > >
    > > 1. I want to distribute the HTMLHelp file
    > > 2. The images are located on a network drive and thus I get absolute
    > > path's in my HTMLHelp file, which points to somewhere not accessible
    > > by the
    > > users of the HTMLHelp file
    >
    > You must use relative paths to images if you want to embed them into
    > HTML Help.

    Thanks, but then I would have to copy all the images from the server
    holding the images. I found another solution, which is kind of a hack
    but works better in my situation. Btw. will that automatically make
    the files getting embedded? If true I think that information would be
    nice - e.g. at http://www.sagehill.net/docbookxsl/HtmlHelp.html and
    somewhere at http://www.dpawson.co.uk/docbook/. At least that's some
    of the main locations I've been searching and reading.

    My hack: When generating the docbook XML I create relative image
    paths. After the XSLT translation I append the list of absolute file
    paths to the images in the [FILES] section of the htmlhelp.hhp file.

    /Carpalia



  • 4.  Re: [docbook-apps] Embed images in HTMLHelp file

    Posted 12-18-2006 09:20
    Carpalia wrote:

    > My hack: When generating the docbook XML I create relative image
    > paths. After the XSLT translation I append the list of absolute file
    > paths to the images in the [FILES] section of the htmlhelp.hhp file.

    Yes, this also works. I forgot to mention that this is automatically
    supported by stylesheets, just set parameter htmlhelp.enumerate.images.

    http://docbook.sourceforge.net/release/xsl/current/doc/html/htmlhelp.enumerate.images.html

    I hope that my poor memory didn't cause to much additional work to you :-(

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz
    ------------------------------------------------------------------
    Profesionální školení a poradenství v oblasti technologií XML.
    Podívejte se na náš nove spuštený web http://DocBook.cz
    Podrobný prehled školení http://xmlguru.cz/skoleni/
    ------------------------------------------------------------------
    Nejbližší termíny školení:
    ** XML pro vývojáre 19.-22.3.2007 ** XML schémata 16.-18.4.2007 **
    ** XSL-FO 15.-16.5.2007 ** DocBook 26.-28.6.2007 **
    ------------------------------------------------------------------
    http://xmlguru.cz Blog mostly about XML for English readers
    ------------------------------------------------------------------




  • 5.  Re: [docbook-apps] Embed images in HTMLHelp file

    Posted 12-18-2006 12:11
    > > My hack: When generating the docbook XML I create relative image
    > > paths. After the XSLT translation I append the list of absolute file
    > > paths to the images in the [FILES] section of the htmlhelp.hhp file.
    >
    > Yes, this also works. I forgot to mention that this is automatically
    > supported by stylesheets, just set parameter htmlhelp.enumerate.images.
    >
    > http://docbook.sourceforge.net/release/xsl/current/doc/html/htmlhelp.enumerate.images.html
    >
    > I hope that my poor memory didn't cause to much additional work to you :-(

    No comments on that ;-) But thanks. It, however, turns out very odd.
    When I use your suggestion the file size grows from ~23MB to ~45MB
    _and_ the images are not inlined but referenced using the absolute
    file paths!?

    /Carpalia