unit View.PDF;

interface

uses
  System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
  WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.WebCtrls, Vcl.StdCtrls,
  WEBLib.StdCtrls;

type
  TFViewPDF = class(TWebForm)
    wbcPDFPreview: TWebBrowserControl;
    btnClose: TWebButton;
    procedure btnCloseClick(Sender: TObject);
  private
    { Private declarations }
  public
    procedure LoadPDF(const AUrl: string);
  end;

var
  FViewPDF: TFViewPDF;

implementation

{$R *.dfm}

procedure TFViewPDF.btnCloseClick(Sender: TObject);
begin
  Close;
end;

procedure TFViewPDF.LoadPDF(const AUrl: string);
begin
  if Assigned(wbcPDFPreview) then
    wbcPDFPreview.URL := AUrl
  else
    ShowMessage('wbcPDFPreview is not initialized');
end;


end.