C#

using DotNetBrowser;
using DotNetBrowser.Events;
using DotNetBrowser.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace PrintSample
{
    class XPSPrintHandler : PrintHandler
    {
        public PrintStatus OnPrint(PrintJob printJob)
        {
            PrintSettings printSettings = printJob.PrintSettings;
            printSettings.PrinterName = "Microsoft XPS Document Writer";
            printSettings.Landscape = false;
            printSettings.PrintBackgrounds = false;
            printSettings.ColorModel = ColorModel.COLOR;
            printSettings.DuplexMode = DuplexMode.SIMPLEX;
            printSettings.DisplayHeaderFooter = true;
            printSettings.Copies = 1;
            printSettings.PaperSize = PaperSize.ISO_A4;

            List<DotNetBrowser.PageRange> ranges = new List<DotNetBrowser.PageRange>();
            ranges.Add(new DotNetBrowser.PageRange(0, 3));
            printSettings.PageRanges = ranges;

            printJob.PrintJobEvent += delegate(object sender, PrintJobEventArgs e)
            {
                Console.WriteLine("Printing is finished successfully: " + e.Success);
            };            
            return PrintStatus.CONTINUE;
        }
    }

    public class WindowMain : Window
    {
        private Button printButton;
        private WPFBrowserView browserView;
        private Grid layout;

        public WindowMain()
        {          
            layout = new Grid();
            ColumnDefinition gridCol1 = new ColumnDefinition();
            layout.ColumnDefinitions.Add(gridCol1);
            RowDefinition gridRow1 = new RowDefinition();
            gridRow1.Height = new GridLength(45);
            RowDefinition gridRow2 = new RowDefinition();

            layout.RowDefinitions.Add(gridRow1);
            layout.RowDefinitions.Add(gridRow2);

            Content = layout;

            printButton = new Button();
            printButton.Content = "Print";
            printButton.Height = 23;
            printButton.Click += printButton_Click;
            Grid.SetRow(printButton, 0);
            Grid.SetColumn(printButton, 0);

            browserView = new WPFBrowserView(BrowserFactory.Create());            
            Grid.SetRow(browserView, 1);
            Grid.SetColumn(browserView, 0);

            layout.Children.Add(printButton);
            layout.Children.Add(browserView);


            Width = 1024;
            Height = 768;

            browserView.Browser.PrintHandler = new XPSPrintHandler();
            this.Loaded += WindowMain_Loaded;            
        }

        void WindowMain_Loaded(object sender, RoutedEventArgs e)
        {
            browserView.Browser.LoadURL("http://www.teamdev.com/services");
        }

        void printButton_Click(object sender, RoutedEventArgs e)
        {
            browserView.Browser.Print();
        }

        [STAThread]
        public static void Main()
        {
            Application app = new Application();

            WindowMain wnd = new WindowMain();
            app.Run(wnd);

            var browser = wnd.browserView.Browser;
            wnd.browserView.Dispose();
            browser.Dispose();            
        }
    }
}

VB.NET

Imports DotNetBrowser
Imports DotNetBrowser.Events
Imports DotNetBrowser.WPF
Imports System.Windows
Imports System.Windows.Controls

Module PrintSample
    Class XPSPrintHandler
        Implements PrintHandler

        Public Function OnPrint(ByVal printJob As PrintJob) As PrintStatus _
            Implements PrintHandler.OnPrint
            Dim printSettings As PrintSettings = printJob.PrintSettings
            printSettings.PrinterName = "Microsoft XPS Document Writer"
            printSettings.Landscape = False
            printSettings.PrintBackgrounds = False
            printSettings.ColorModel = ColorModel.COLOR
            printSettings.DuplexMode = DuplexMode.SIMPLEX
            printSettings.DisplayHeaderFooter = True
            printSettings.Copies = 1
            printSettings.PaperSize = PaperSize.ISO_A4
            Dim ranges As List(Of DotNetBrowser.PageRange) = New List(Of DotNetBrowser.PageRange)()
            ranges.Add(New DotNetBrowser.PageRange(0, 3))
            printSettings.PageRanges = ranges
            AddHandler printJob.PrintJobEvent, sub(ByVal sender As Object, ByVal e As PrintJobEventArgs)
                Console.WriteLine("Printing is finished successfully: " & e.Success)
            End sub

            Return PrintStatus.CONTINUE
        End Function
    End Class

    Public Class WindowMain
        Inherits Window

        Private printButton As Button
        Private browserView As WPFBrowserView
        Private layout As Grid

        Public Sub New()
            layout = New Grid()
            Dim gridCol1 As ColumnDefinition = New ColumnDefinition()
            layout.ColumnDefinitions.Add(gridCol1)
            Dim gridRow1 As RowDefinition = New RowDefinition()
            gridRow1.Height = New GridLength(45)
            Dim gridRow2 As RowDefinition = New RowDefinition()
            layout.RowDefinitions.Add(gridRow1)
            layout.RowDefinitions.Add(gridRow2)
            Content = layout
            printButton = New Button()
            printButton.Content = "Print"
            printButton.Height = 23
            AddHandler printButton.Click, AddressOf printButton_Click
            Grid.SetRow(printButton, 0)
            Grid.SetColumn(printButton, 0)
            browserView = New WPFBrowserView(BrowserFactory.Create())
            Grid.SetRow(browserView, 1)
            Grid.SetColumn(browserView, 0)
            layout.Children.Add(printButton)
            layout.Children.Add(browserView)
            Width = 1024
            Height = 768
            browserView.Browser.PrintHandler = New XPSPrintHandler()
            AddHandler Me.Loaded, AddressOf WindowMain_Loaded
        End Sub

        Private Sub WindowMain_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            browserView.Browser.LoadURL("http://www.teamdev.com/services")
        End Sub

        Private Sub printButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
            browserView.Browser.Print()
        End Sub

        <STAThread>
        Public Shared Sub Main()
            Dim app As Application = New Application()
            Dim wnd As WindowMain = New WindowMain()
            app.Run(wnd)
            Dim browser = wnd.browserView.Browser
            wnd.browserView.Dispose()
            browser.Dispose()
        End Sub
    End Class
End Module