Plugins

DotNetBrowser supports Chromium plugins. This guide describes how to get the information about all the installed and available Chromium plugins, enable or disable a specified plugin on a web page, and other actions.

Use IPlugins to get information about all the available plugins and enable/disable plugins on a web page. By default, all plugins are enabled.

Installed plugins

To get the information about all the installed and available plugins, use the code sample below:

foreach (Plugin plugin in engine.Plugins.AvailablePlugins)
{
    string name = plugin.Name;
    string description = plugin.Description;
    string version = plugin.Version;
}

Filtering plugins

Every time when a web page needs to access a plugin, the AllowPluginHandler is used. In this handler, you can instruct the web page whether the requested plugin is allowed.

The following example demonstrates how to deny all plugins with the application/pdf MIME type:

engine.Plugins.AllowPluginHandler = 
    new Handler<AllowPluginParameters, AllowPluginResponse>(p =>
    { 
        // Get plugin MIME types.
        IEnumerable<MimeType> pluginMimeTypes = p.Plugin.MimeTypes;
        // Deny all plugins with the "application/pdf" MIME type.
        if (pluginMimeTypes.Contains(MimeType.ApplicationPdf))
        {
            return AllowPluginResponse.Deny();
        }
        return AllowPluginResponse.Allow();
    });

PDF

DotNetBrowser supports the built-in Chromium PDF Viewer plugin. You can display a PDF file available on a remote web server using URL of the PDF file, or a PDF file located in your local file system:

Chromium PDF Viewer

Adobe Flash

DotNetBrowser supports Adobe Flash PPAPI plugin. To display Flash content, download and install Adobe Flash Player. Flash content is displayed in the windowless mode, so make sure that the Flash content you display on the web page has the wmode=opaque attributed.

Windows

Download Adobe PPAPI Flash Player installer for your operating system:

Download Adobe Flash Player

Run the downloaded installer and follow the instructions to install the Adobe PPAPI Flash plugin. DotNetBrowser automatically locates the installed Flash PPAPI plugin and use it to display the Flash content.

NPAPI Plugins

Since version 49, Chromium does not support any of NPAPI plugins, including Microsoft Silverlight, DotNetBrowser does not support them as well.

ActiveX

Since ActiveX is not supported by Chromium, DotNetBrowser does not support it as well.

Go Top