ICoreWebView2PrintSettings2

Undocumented in source.

Members

Functions

get_Collation
HRESULT get_Collation(COREWEBVIEW2_PRINT_COLLATION* value)

Printer collation. See COREWEBVIEW2_PRINT_COLLATION for descriptions of collation. The default value is COREWEBVIEW2_PRINT_COLLATION_DEFAULT.

get_ColorMode
HRESULT get_ColorMode(COREWEBVIEW2_PRINT_COLOR_MODE* value)

Printer color mode. See COREWEBVIEW2_PRINT_COLOR_MODE for descriptions of color modes. The default value is COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT.

get_Copies
HRESULT get_Copies(INT32* value)

Number of copies to print. Minimum value is 1 and the maximum copies count is 999. The default value is 1.

get_Duplex
HRESULT get_Duplex(COREWEBVIEW2_PRINT_DUPLEX* value)

Printer duplex settings. See COREWEBVIEW2_PRINT_DUPLEX for descriptions of duplex. The default value is COREWEBVIEW2_PRINT_DUPLEX_DEFAULT.

get_MediaSize
HRESULT get_MediaSize(COREWEBVIEW2_PRINT_MEDIA_SIZE* value)

Printer media size. See COREWEBVIEW2_PRINT_MEDIA_SIZE for descriptions of media size. The default value is COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT.

get_PageRanges
HRESULT get_PageRanges(LPWSTR* value)

Page range to print. Defaults to empty string, which means print all pages. If the Page range is empty string or null, then it applies the default.

get_PagesPerSide
HRESULT get_PagesPerSide(INT32* value)

Prints multiple pages of a document on a single piece of paper. Choose from 1, 2, 4, 6, 9 or 16. The default value is 1.

get_PrinterName
HRESULT get_PrinterName(LPWSTR* value)

The name of the printer to use. Defaults to empty string. If the printer name is empty string or null, then it prints to the default printer on the user OS.

put_Collation
HRESULT put_Collation(COREWEBVIEW2_PRINT_COLLATION value)

Set the Collation property.

put_ColorMode
HRESULT put_ColorMode(COREWEBVIEW2_PRINT_COLOR_MODE value)

Set the ColorMode property.

put_Copies
HRESULT put_Copies(INT32 value)

Set the Copies property. Returns E_INVALIDARG if an invalid value is provided and the current value is not changed.

put_Duplex
HRESULT put_Duplex(COREWEBVIEW2_PRINT_DUPLEX value)

Set the Duplex property.

put_MediaSize
HRESULT put_MediaSize(COREWEBVIEW2_PRINT_MEDIA_SIZE value)

Set the MediaSize property.

put_PageRanges
HRESULT put_PageRanges(LPCWSTR value)

Set the PageRanges property.

put_PagesPerSide
HRESULT put_PagesPerSide(INT32 value)

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

put_PrinterName
HRESULT put_PrinterName(LPCWSTR value)

Set the PrinterName property. If provided printer name doesn't match with the name of any installed printers on the user OS, ICoreWebView2PrintCompletedHandler handler will return errorCode as S_OK and printStatus as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE.

Inherited Members

From ICoreWebView2PrintSettings

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.

put_Orientation
HRESULT put_Orientation(COREWEBVIEW2_PRINT_ORIENTATION orientation)

Sets the Orientation property.

get_ScaleFactor
HRESULT get_ScaleFactor(double* scaleFactor)

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

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.

get_PageWidth
HRESULT get_PageWidth(double* pageWidth)

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

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.

get_PageHeight
HRESULT get_PageHeight(double* pageHeight)

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

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.

get_MarginTop
HRESULT get_MarginTop(double* marginTop)

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

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.

get_MarginBottom
HRESULT get_MarginBottom(double* marginBottom)

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

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.

get_MarginLeft
HRESULT get_MarginLeft(double* marginLeft)

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

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.

get_MarginRight
HRESULT get_MarginRight(double* marginRight)

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

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.

get_ShouldPrintBackgrounds
HRESULT get_ShouldPrintBackgrounds(BOOL* shouldPrintBackgrounds)

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

put_ShouldPrintBackgrounds
HRESULT put_ShouldPrintBackgrounds(BOOL shouldPrintBackgrounds)

Set the ShouldPrintBackgrounds property.

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_ShouldPrintSelectionOnly
HRESULT put_ShouldPrintSelectionOnly(BOOL shouldPrintSelectionOnly)

Set the ShouldPrintSelectionOnly property.

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.

put_ShouldPrintHeaderAndFooter
HRESULT put_ShouldPrintHeaderAndFooter(BOOL shouldPrintHeaderAndFooter)

Set the ShouldPrintHeaderAndFooter property.

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.

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.

get_FooterUri
HRESULT get_FooterUri(LPWSTR* footerUri)

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

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.

Meta