GetPrintBitmap method

Returns a pointer to bitmap specified by a control to use when Windows Internet Explorer 9 prints a page.

Internet Explorer 9



HRESULT retVal = object.GetPrintBitmap(ppPrintBitmap);


ppPrintBitmap [out, retval]

Type: IUnknown

The bitmap to be used when the page is printed.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


The returned IUnknown pointer ppPrintBitmap should succeed when QueryInterface is called with IID_IWICBitmap. This interface allows an ISurfacePresenter control to change the DPI of bitmaps for printing. For example, a higher resolution image can be sent to the printer than the bitmap that is displayed on the screen. If the call succeeds and an IWICBitmap is returned, it will be used when the page is printed.

If the call does not succeed or an IWICBitmap is not returned, then Internet Explorer 9 will use the last presented bitmap for ISurfacePresenter controls that are using IViewObjectPresentSite::SetCompositionMode set to VIEW_OBJECT_COMPOSITION_MODE_SURFACEPRESENTER. For ISurfacePresenter controls with composition mode set to VIEW_OBJECT_COMPOSITION_MODE_LEGACY, or other controls on the page, then IViewObject::Draw is called.