ByteScout PDF Viewer SDK - C# - PDF Viewer Control Hosted in WPF - ByteScout

ByteScout PDF Viewer SDK – C# – PDF Viewer Control Hosted in WPF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Viewer SDK – C# – PDF Viewer Control Hosted in WPF

PDF viewer control hosted in WPF in C# using ByteScout PDF Viewer SDK

Tutorial: how to do PDF viewer control hosted in WPF in C#

We’ve created and updating regularly our sample code library so you may quickly learn PDF viewer control hosted in WPF and the step-by-step process in C#. PDF viewer control hosted in WPF in C# can be implemented with ByteScout PDF Viewer SDK. ByteScout PDF Viewer SDK is the visual component that you can use to quickly create your own pdf viewer application or add pdf vieweing functionality into your existing app. into your WinForms application. Includes support for selection using mouse, returns coordinates, you may add custom painting on top of pdf displayed.

You will save a lot of time on writing and testing code as you may just take the code below and use it in your application. This C# sample code should be copied and pasted into your application’s code editor. Then just compile and run it to see how it works. Enjoy writing a code with ready-to-use sample C# codes to add PDF viewer control hosted in WPF functions using ByteScout PDF Viewer SDK in C#.

ByteScout PDF Viewer SDK is available as free trial. You may get it from our website along with all other source code samples for C# applications.

Try ByteScout PDF Viewer SDK today: Get 60 Day Free Trial or sign up for Web API

App.xaml.cs
      
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Threading.Tasks; using System.Windows; namespace PdfViewerInWpf { /// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App : Application { } }

Try ByteScout PDF Viewer SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

MainWindow.xaml.cs
      
using System; using System.Drawing; using System.Windows; namespace PdfViewerInWpf { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { // Load a sample document on startup pdfViewerControl1.InputFile = "sample.pdf"; } private void menuItemOpen_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog { Filter = "PDF Files (*.pdf)|*.pdf|All Files (*.*)|*.*" }; bool? result = dlg.ShowDialog(); if (result == true) pdfViewerControl1.InputFile = dlg.FileName; } } }

Try ByteScout PDF Viewer SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout PDF Viewer SDK page

Explore ByteScout PDF Viewer SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

prev
next