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.
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
[Demo] Exporting HTML containing embedded images
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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
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
Is that feature accessible now?
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: [Demo] Exporting HTML containing embedded images
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.
Since TRichView v21, this is a built-in feature that does not require third-party units.
Just include rvhtmlsioInlineImages in RichView.HTMLSaveProperties.ImageOptions.