TTMSFNCWebBrowser PDF Viewing Toolbar

Hi,
I was wondering if there is a way to influence the toolbar while viewing a PDF in a TTMSFNCWebBrowser?
Is it possible to set/hide/disable options, or intercept their functionality?
Can set the Zoom level on start ?

TIA
John

This is currently not possible. The API is still experimental and not yet available in the current release.
In the future, when the DLLs and webbrowser is updated, we can expose a way to manipulate the toolbar and work with the PDF.

OK. Thx Pieter.
I understand.
Let's hope that functionality will be available soon :slight_smile:

Hello, Can you say when this will be possible? Thanks

We have exposed the APIs now, the next version of TMS FNC Core will have the APIs available for Windows. Please contact us via support email if you want an incremental source update. After acquiring the latest source files, you should be able to execute the following code:

uses
  FMX.TMSFNCWebBrowser.Win;

procedure TForm33.FormCreate(Sender: TObject);
var
  c: ICoreWebView2Controller;
  w: ICoreWebView2;
  s: ICoreWebView2Settings;
  s7: ICoreWebView2Settings7;
  p: COREWEBVIEW2_PDF_TOOLBAR_ITEMS;
begin
  c := ICoreWebView2Controller(TMSFNCWebBrowser1.NativeBrowser);
  if c.get_CoreWebView2(w) = S_OK then
  begin
    if w.get_Settings(s) = S_OK then
    begin
      if s.QueryInterface(IID_ICoreWebView2Settings7, s7) = S_OK then
      begin
        s7.put_HiddenPdfToolbarItems(COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT or
          COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE or COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR);
      end;
    end;
  end;

  TMSFNCWebBrowser1.LoadFile('Demo_PDF.pdf');
end;