Menu

SVG files missing

Anonymous
2015-12-16
2015-12-17
  • Anonymous

    Anonymous - 2015-12-16

    A colleague created a Debian package to install the latest 2.1.5
    release. The catalog stuff was more work than expected but seems to work
    now.

    But now we have an issue with SVG images and HTML output.

    <inlinemediaobject>
    <imageobject>
    <imagedata fileref="project_icon.svg" format="SVG"/>
    </imageobject>
    </inlinemediaobject>

    The svg file is copied into the destination folder. If I copy the file
    manually everything works.

    PDF works fine.

    What's going wrong?

     
  • Stefan Knorr

    Stefan Knorr - 2015-12-16

    A short while ago, SVGs on the web didn't work well. (I. e. IE did not have SVG support. Note that even with IE 11, SVG support is still fiddly. I think, finally Edge can now correctly scale SVGs without a ViewBox.)

     

    Last edit: Stefan Knorr 2015-12-16
  • Frank Sundermeyer

    DAPS currently does not support SVG images for HTML output, only for FO (PDF). The inlinemediaobject should look like this in order to be supported by DAPS:

    <inlinemediaobject>
      <imageobject role="fo">
        <imagedata fileref="project_icon.svg" format="SVG"/>
      </imageobject>
        <imageobject role="html">
        <imagedata fileref="project_icon.png" format="PNG"/>
      </imageobject>
    </inlinemediaobject>
    

    (IIRC the format attribute can also be left out)

    Note that this does not require to have a file named "project_icon.png" (this would rather be counterproductive). DAPS automatically takes care of converting project_icon.svg into png.

    If you would like to have SVG support for HTML, please create an anhacement request at https://github.com/openSUSE/daps/issues . A proper implementation requires a conceptual change in the way images are handled, so having an issue for tracking would be good.

    If you need SVG support fast and do not mind that all referenced files are copied in SVG and PNG format to the HTML images directory, it's a one-line fix - see the attached patch for /usr/share/daps/make/images.mk.

    BTW: We are currently trying to improve the support for Debian/Ubuntu (catalog handling and JAVA stuff considerably differs compared to SUSE). I would also love to offer Debian/Ubuntu builds in the SUSE build service. If you are interested in helping me, please contact me bei PM (fs@suse.de). That would really be appreciated.

     

    Last edit: Stefan Knorr 2015-12-16
  • Stefan Knorr

    Stefan Knorr - 2015-12-16

    Actually, the quick fix seems like a good idea to me: that way, you can easily drop in something like SVGeezy that automatically replaces your SVGs with PNGs in incompatible browsers.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.