This is a migrated thread and some comments may be shown as answers.

Programmatically export HTML5 with image links

2 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matthias
Top achievements
Rank 1
Matthias asked on 29 Jan 2020, 04:52 PM
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 Answers, 1 is accepted

Sort by
0
Matthias
Top achievements
Rank 1
answered on 12 Feb 2020, 08:24 AM
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
0
Todor
Telerik team
answered on 14 Feb 2020, 03:52 PM

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.

Regards,
Todor
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
Tags
General Discussions
Asked by
Matthias
Top achievements
Rank 1
Answers by
Matthias
Top achievements
Rank 1
Todor
Telerik team
Share this question
or