[Demo] Exporting HTML containing embedded images

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Demo] Exporting HTML containing embedded images

Post 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 4929 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
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

We implemented a support for images embedded in HTML in TRvHtmlImporter and TRvHtmlViewImporter.
This update is available for registered users.
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This feature of importers is now available in the trial version as well.
rafakwolf
Posts: 30
Joined: Tue Sep 27, 2011 11:39 am

Post by rafakwolf »

Hello...

Now is possible to import embedded images ?
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
Lana
Posts: 1
Joined: Thu Jun 29, 2017 1:03 pm
Contact:

Re: [Demo] Exporting HTML containing embedded images

Post by Lana »

Is that feature accessible now?
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: [Demo] Exporting HTML containing embedded images

Post 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.
Post Reply