IWebViewPrintToFile Method Awesomium.NET 1.7.6Awesomium.NET
Prints this IWebView instance to a PDF file, asynchronously. You should generally use this method in response to a PrintRequest event.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

int PrintToFile(
	string outputDirectory,
	PrintConfig config
)

Parameters

outputDirectory
Type: SystemString
A writeable directory to write the file(s) to.
config
Type: Awesomium.CorePrintConfig
The configuration settings to use.

Return Value

Type: Int32
Returns a unique request identifier that you can use later to identify this specific request (see PrintFailed and PrintComplete). May return 0 if this method fails prematurely.
Exceptions

ExceptionCondition
InvalidOperationException The member is called on an invalid view. (See: IsLive)
DirectoryNotFoundException The specified output directory outputDirectory, does not exist.
ArgumentExceptionoutputDirectory is a zero-length string, contains only white space, or contains one or more of the invalid characters defined in GetInvalidPathChars. -OR- The system could not retrieve the absolute path.
SecurityException The caller does not have the required permissions.
ArgumentNullExceptionoutputDirectory is null (Nothing in Visual Basic).
NotSupportedExceptionoutputDirectory contains a colon (":") that is not part of a volume identifier (for example, "c:\").
PathTooLongException The acquired full path to the specified outputDirectory, exceeds the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
See Also

Reference