Programmatically export HTML5 with image links

3 posts, 0 answers
  1. Matthias
    Matthias avatar
    2 posts
    Member since:
    Jan 2020

    Posted 29 Jan 2020 Link to this post

    In my project, reports are processed and exported in HTML5. In the report many logos and images are used.
    For each HTML5-file logos and images are exported in seperate files with alphanumeric names.
    Is it possible to use a link to an already existing file instead of referencing files, which are created with every report.
    For example I want to use something like this:
    <img alt="" src="./path/image.jpg" style="position:absolute;width:1361px;height:147px;left:0px;top:0px;text-align:left;" />
    instead of this:
    <img alt="" src="f5b27bf7239b4114a779da44e94fde38" style="position:absolute;width:1361px;height:147px;left:0px;top:0px;text-align:left;" />

    Best Regards

    Matthias Keyser
  2. Matthias
    Matthias avatar
    2 posts
    Member since:
    Jan 2020

    Posted 12 Feb 2020 in reply to Matthias Link to this post

    Hi there,
    does anyone have a good solution here?
    When exporting the report, a large number of identical files are generated on the hard disk.
    There are now over 1,500,000 files that are redundant and not necessary.
    Best wishes
    Matthias Keyser
  3. Todor
    Todor avatar
    651 posts

    Posted 14 Feb 2020 Link to this post

    Hi Matthias,

    You may use the MHTML format, where the images get embedded as base64 strings. This will generate larger pages though.

    The Html5 rendering is meant for our Html5 Viewers and is not intended to generate custom Html5 pages. In this format, each image is indeed saved in a file with a unique name (GUID) and referred to in the corresponding tag. There is no mechanism to specify where the image should come from in the rendered page.

    You may log a new feature request for this requirement in our feedback portal. For example, to include an option in the device information settings that allows if the image is referred from and external source (e.g. a file) the 'src' attribute for the <img> tag to be the same source.

    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top