There are two files on a local IIS 7 on Windows 7:
- An SVG file
eff.svg
- A base HTML document of following structure:
<html> <head> <style type="text/css"> html, body {width:100%; height:100%; margin:0} img.eff {width:100%; height:100%} </style> </head> <body> <img src="eff.svg" class="eff" /> </body> </html>
When I view this document with Internet Explorer 11, it shows me the embedded SVG.
When I view this document with Delphi's TWebBrowser
component on the same machine, in the same user account, IE shows me a standard browser's image placeholder instead of image.
unit WbDemoMain;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.OleCtrls, SHDocVw;
type
TForm1 = class(TForm)
wb1: TWebBrowser;
procedure FormShow(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
wb1.Navigate('http://localhost/EFF/eff.html');
end;
end.
When I reference the image directly with
wb1.Navigate('http://localhost/EFF/eff.svg');
it shows the image.
How to view an embedded SVG image with TWebBrowser
?