Delphi Web Browser Yazdırma İşlemleri

procedure TForm1.Button1Click(Sender: TObject);
begin
  WebBrowser1.Navigate(‘https://ahmetaydinlik.com/‘);
end;

// Yazdır Dialog Penceresi Açmadan Yazdırma

procedure TForm1.Button2Click(Sender: TObject);
var
  vaIn, vaOut: OleVariant;
begin
  WebBrowser1.ControlInterface.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,
    vaIn, vaOut);
end;

// Yazdırma Dialog Penceres Açarak Yazdırma

procedure TForm1.Button3Click(Sender: TObject);
var
  vaIn, vaOut: OleVariant;
begin
  WebBrowser1.ControlInterface.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER,
    vaIn, vaOut);
end;

// Önizleme

procedure TForm1.Button4Click(Sender: TObject);
var
  vaIn, vaOut: OleVariant;
begin
  WebBrowser1.ControlInterface.ExecWB(OLECMDID_PRINTPREVIEW,
    OLECMDEXECOPT_DONTPROMPTUSER, vaIn, vaOut);
end;

// Sayfa ayarları dialogu açarak

procedure TForm1.Button5Click(Sender: TObject);
var
  vaIn, vaOut: OleVariant;
begin
  WebBrowser1.ControlInterface.ExecWB(OLECMDID_PAGESETUP, OLECMDEXECOPT_PROMPTUSER,
    vaIn, vaOut);
end;