ICoreWebView2PrintSettings

Undocumented in source.

Members

Functions

get_FooterUri
HRESULT get_FooterUri(LPWSTR* footerUri)

The URI in the footer if ShouldPrintHeaderAndFooter is TRUE. The default value is the current URI.

get_HeaderTitle
HRESULT get_HeaderTitle(LPWSTR* headerTitle)

The title in the header if ShouldPrintHeaderAndFooter is TRUE. The default value is the title of the current document.

get_MarginBottom
HRESULT get_MarginBottom(double* marginBottom)

The bottom margin in inches. The default is 1 cm, or ~0.4 inches.

get_MarginLeft
HRESULT get_MarginLeft(double* marginLeft)

The left margin in inches. The default is 1 cm, or ~0.4 inches.

get_MarginRight
HRESULT get_MarginRight(double* marginRight)

The right margin in inches. The default is 1 cm, or ~0.4 inches.

get_MarginTop
HRESULT get_MarginTop(double* marginTop)

The top margin in inches. The default is 1 cm, or ~0.4 inches.

get_Orientation
HRESULT get_Orientation(COREWEBVIEW2_PRINT_ORIENTATION* orientation)

The orientation can be portrait or landscape. The default orientation is portrait. See COREWEBVIEW2_PRINT_ORIENTATION.

get_PageHeight
HRESULT get_PageHeight(double* pageHeight)

The page height in inches. The default height is 11 inches.

get_PageWidth
HRESULT get_PageWidth(double* pageWidth)

The page width in inches. The default width is 8.5 inches.

get_ScaleFactor
HRESULT get_ScaleFactor(double* scaleFactor)

The scale factor is a value between 0.1 and 2.0. The default is 1.0.

get_ShouldPrintBackgrounds
HRESULT get_ShouldPrintBackgrounds(BOOL* shouldPrintBackgrounds)

TRUE if background colors and images should be printed. The default value is FALSE.

get_ShouldPrintHeaderAndFooter
HRESULT get_ShouldPrintHeaderAndFooter(BOOL* shouldPrintHeaderAndFooter)

TRUE if header and footer should be printed. The default value is FALSE. The header consists of the date and time of printing, and the title of the page. The footer consists of the URI and page number. The height of the header and footer is 0.5 cm, or ~0.2 inches.

get_ShouldPrintSelectionOnly
HRESULT get_ShouldPrintSelectionOnly(BOOL* shouldPrintSelectionOnly)

TRUE if only the current end user's selection of HTML in the document should be printed. The default value is FALSE.

put_FooterUri
HRESULT put_FooterUri(LPCWSTR footerUri)

Set the FooterUri property. If an empty string or null value is provided, no URI is shown in the footer.

put_HeaderTitle
HRESULT put_HeaderTitle(LPCWSTR headerTitle)

Set the HeaderTitle property. If an empty string or null value is provided, no title is shown in the header.

put_MarginBottom
HRESULT put_MarginBottom(double marginBottom)

Sets the MarginBottom property. A margin cannot be less than zero. Returns E_INVALIDARG if an invalid value is provided, and the current value is not changed.

put_MarginLeft
HRESULT put_MarginLeft(double marginLeft)

Sets the MarginLeft property. A margin cannot be less than zero. Returns E_INVALIDARG if an invalid value is provided, and the current value is not changed.

put_MarginRight
HRESULT put_MarginRight(double marginRight)

Set the MarginRight property.A margin cannot be less than zero. Returns E_INVALIDARG if an invalid value is provided, and the current value is not changed.

put_MarginTop
HRESULT put_MarginTop(double marginTop)

Sets the MarginTop property. A margin cannot be less than zero. Returns E_INVALIDARG if an invalid value is provided, and the current value is not changed.

put_Orientation
HRESULT put_Orientation(COREWEBVIEW2_PRINT_ORIENTATION orientation)

Sets the Orientation property.

put_PageHeight
HRESULT put_PageHeight(double pageHeight)

Sets the PageHeight property. Returns E_INVALIDARG if the page height is less than or equal to zero, and the current value is not changed.

put_PageWidth
HRESULT put_PageWidth(double pageWidth)

Sets the PageWidth property. Returns E_INVALIDARG if the page width is less than or equal to zero, and the current value is not changed.

put_ScaleFactor
HRESULT put_ScaleFactor(double scaleFactor)

Sets the ScaleFactor property. Returns E_INVALIDARG if an invalid value is provided, and the current value is not changed.

put_ShouldPrintBackgrounds
HRESULT put_ShouldPrintBackgrounds(BOOL shouldPrintBackgrounds)

Set the ShouldPrintBackgrounds property.

put_ShouldPrintHeaderAndFooter
HRESULT put_ShouldPrintHeaderAndFooter(BOOL shouldPrintHeaderAndFooter)

Set the ShouldPrintHeaderAndFooter property.

put_ShouldPrintSelectionOnly
HRESULT put_ShouldPrintSelectionOnly(BOOL shouldPrintSelectionOnly)

Set the ShouldPrintSelectionOnly property.

Meta