The OpenD Programming Language

ICoreWebView2_16.PrintToPdfStream

Provides the Pdf data of current web page asynchronously for the provided settings. Stream will be rewound to the start of the pdf data.

See ICoreWebView2PrintSettings for description of settings. Passing nullptr for printSettings results in default print settings used.

The async PrintToPdfStream operation completes when it finishes writing to the stream. At this time the ICoreWebView2PrintToPdfStreamCompletedHandler is invoked. Only one Printing operation can be in progress at a time. If PrintToPdfStream is called while a PrintToPdfStream or PrintToPdf or Print or ShowPrintUI job is in progress, the completed handler is immediately invoked with E_ABORT. This is only for printing operation on one webview.

\snippet AppWindow.cpp PrintToPdfStream

Meta