WebBrowserExtensions.PrintToPdfAsync Method (IChromiumWebBrowserBase, String, PdfPrintSettings) (original) (raw)

WebBrowserExtensionsPrintToPdfAsync Method (IChromiumWebBrowserBase, String, PdfPrintSettings)

Version 118.6.80

Asynchronously prints the current browser contents to the PDF file specified. The caller is responsible for deleting the file when done.

Namespace: CefSharp
Assembly: CefSharp (in CefSharp.dll) Version: 118.6.80.0 (118.6.80.0)

Syntax

public static Task PrintToPdfAsync( this IChromiumWebBrowserBase browser, string path, PdfPrintSettings settings = null )

public: [ExtensionAttribute] static Task^ PrintToPdfAsync( IChromiumWebBrowserBase^ browser, String^ path, PdfPrintSettings^ settings = nullptr )

Parameters

browser

Type: CefSharpIChromiumWebBrowserBase
The ChromiumWebBrowser instance this method extends.

path

Type: SystemString
Output file location.

settings (Optional)

Type: CefSharpPdfPrintSettings
(Optional) Print Settings.

Return Value

Type: TaskBoolean
A task that represents the asynchronous print operation. The result is true on success or false on failure to generate the Pdf.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IChromiumWebBrowserBase. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference