Page 1 of 1

[Demo] Exporting HTML containing embedded images

Posted: Thu Feb 04, 2016 8:40 pm
by Sergey Tkachenko
Note (2023-02-21): since TRichView 21, this is a built-in feature, see viewtopic.php?p=42283#p42283

This demo saves HTML files containing images embedded directly inside <img src>, without external image files.
imagesinhtml.zip
(12.34 KiB) Downloaded 1857 times
There are two versions of this demo.
The first demo can be used in all versions of Delphi, it requires DIMime http://www.yunqa.de/delphi/products/mime/index
The second demo can be used in Delphi XE7 and newer (currently: XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo). It uses base64 encoding procedures included in Delphi library.

Info: see https://en.wikipedia.org/wiki/Data_URI_scheme

[+] History of updates
2018-Apr-21: for compatibility with TRichView 17.3
[+] Old versions
https://www.trichview.com/support/files ... inhtml.zip - for TRichView 17.2 and older

Posted: Wed Aug 03, 2016 2:04 pm
by Sergey Tkachenko
We implemented a support for images embedded in HTML in TRvHtmlImporter and TRvHtmlViewImporter.
This update is available for registered users.

Posted: Fri Aug 05, 2016 2:35 pm
by Sergey Tkachenko
This feature of importers is now available in the trial version as well.

Posted: Tue Jan 03, 2017 5:05 pm
by rafakwolf
Hello...

Now is possible to import embedded images ?

Posted: Wed Jan 04, 2017 12:48 pm
by Sergey Tkachenko
Both RvHtmlImporter and RvHtmlViewImporter components support it.

If you use Delphi XE7 or newer, it works automatically.
If you use Delphi XE6 or older:
- download and unpack DIMime http://www.yunqa.de/delphi/products/mime/index
- for RvHtmlImporter: remove dot from {.$DEFINE RVUSEDMIME} in rvhtmlimport.pas
- for RvHtmlViewImporter: remove dot from {.$DEFINE RVUSEDMIME} in rvHtmlViewImport.pas

Re: [Demo] Exporting HTML containing embedded images

Posted: Thu Jun 29, 2017 1:08 pm
by Lana
Is that feature accessible now?

Re: [Demo] Exporting HTML containing embedded images

Posted: Thu Jun 29, 2017 6:56 pm
by Sergey Tkachenko
Yes, it is.

Re: [Demo] Exporting HTML containing embedded images

Posted: Tue Feb 21, 2023 12:46 pm
by Sergey Tkachenko
This example is obsolete.

Since TRichView v21, this is a built-in feature that does not require third-party units.
Just include rvhtmlsioInlineImages in RichView.HTMLSaveProperties.ImageOptions.