PSPDFKit for Windows

The SDK You Love,
Now for Windows

Combines fast, native rendering with the flexibility of our Web SDK to offer a great experience and a component that’s easy to integrate and customize.

Windows

Powerful Features

PDF rendering, navigation, searching, annotation, and form filling capabilities.

Easy to Integrate

Packaged as a native UWP PDF library component for easy integration with your app.

Drop-In UI

A fluid, adaptable UI based on fast Edge web technology, ready to go out of the box.

Features

Seamlessly integrate these PDF features into your Windows apps:

PSPDFKit for Windows – UWP PDF Library - PDF Viewing Feature

PDF Viewing

A fast and smooth viewing experience — even with large documents. Supports both single- and double-page layouts and page rotation. Intuitive document navigation via scrolling, pagination, pan, and zoom.


PSPDFKit for Windows – UWP PDF Library - Forms Feature

Forms

Full support for PDF AcroForms, so your users can view, fill out, and submit forms with ease.


PSPDFKit for Windows – UWP PDF Library - Highlight Text Feature

Highlight Text

Easily mark up text on a document via an intuitive highlight menu with support for highlighting, strikethrough, and underlining.


PSPDFKit for Windows – UWP PDF Library - Freehand Drawing Feature

Freehand Drawing

Draw anywhere on a document. Move and resize, and change appearance — including color, thickness, and opacity.


PSPDFKit for Windows – UWP PDF Library - Text Annotation Feature

Text Annotation

Add text anywhere on a document. Move and resize, and change appearance – including font, size, alignment, and color.


PSPDFKit for Windows – UWP PDF Library - Note Annotation Feature

Note Annotation

Add longer comments, which can be collapsed or expanded, to a document. Change appearance with a variety of shapes and colors.


PSPDFKit for Windows – UWP PDF Library - Stamp Annotations Feature

Stamp Annotations NEW

Place stamps on a PDF with our predefined stamp templates, or let your users create their own using the stamp annotation builder UI. Easily swap out the default stamp templates with your own.


PSPDFKit for Windows – UWP PDF Library - Search Feature

Search

Quickly search documents with a fluid and fast search experience, including intuitive keyboard shortcuts for power users.


PSPDFKit for Windows – UWP PDF Library - Mouse and Touch Feature

Mouse and Touch

Handles input via mouse, keyboard, and touch to support a wide range of use cases and devices.


PSPDFKit for Windows – UWP PDF Library - Sidebar Feature

Sidebar NEW

Choose from four sidebar options — Thumbnails, Outline, Annotations, or Bookmarks — to get an overview of the content in a document. Show and hide the sidebar at any time, resize it, or expand it into a full gallery view.


PSPDFKit for Windows – UWP PDF Library - Printing Feature

Printing

Print and export documents, including all annotations. Use the system print dialog to allow for full control of the output.


Additional Features

In addition to the UI layer, the PSPDFKit for Windows UWP PDF Library provides comprehensive API access for building advanced PDF workflows into your application.

  • Signing documents
  • Page creation and organization
  • Document and page actions
  • Watermarking
  • Full-text search
  • Importing/exporting annotations
  • Bookmarks and outlines
  • Batch processing of documents

Architecture

Web UI, Native Speed

PSPDFKit for Windows offers the best of both worlds — the speed and stability of our C++ PSPDFKit Core running natively, and the flexibility and features of our Web SDK UI.

Integration

PSPDFKit for Windows can be integrated with just a few lines of code, and it comes with a rich API, which allows for complete customization.

Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<Page
    x:Class="BasicExample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BasicExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ui="using:PSPDFKit.UI"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Page.Resources>
        <x:String x:Key="license">YOUR LICENSE GOES HERE</x:String>
    </Page.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="52"/>
        </Grid.RowDefinitions>
        <ui:PdfView Grid.Row="0" Name="PdfView" License="{StaticResource license}" InitializationCompletedHandler="PdfViewInitializationCompletedHandler"/>
        <Button Content="Open PDF" HorizontalAlignment="Left" Margin="10" Grid.Row="1" Name="Button_OpenPDF" Click="Button_OpenPDF_Click"/>
    </Grid>
</Page>

Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// This loads a PDF from `Assets` as soon as the PdfView is ready
private async void PdfViewInitializationCompletedHandler(PdfView sender, Document args)
{
    try
    {
        var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/document.pdf"));
        if (file == null) return;

        await sender.OpenStorageFileAsync(file);
    }
    catch (Exception e)
    {
        var messageDialog = new MessageDialog(e.Message);
        await messageDialog.ShowAsync();
    }
}

// This loads a PDF from a file picked by the user in the UI.
private async void Button_OpenPDF_Click(object sender, RoutedEventArgs e)
{
    // Open a Picker so the user can choose a PDF
    var picker = new FileOpenPicker
    {
        ViewMode = PickerViewMode.Thumbnail,
        SuggestedStartLocation = PickerLocationId.DocumentsLibrary
    };
    picker.FileTypeFilter.Add(".pdf");

    var file = await picker.PickSingleFileAsync();
    if (file == null) return;

    // Open and display it in the PSPDFKit PdfView
    var documentSource = DocumentSource.CreateFromStorageFile(file);
    await PdfView.Controller.ShowDocumentAsync(documentSource);
}
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Imports Windows.Storage
Imports Windows.Storage.Pickers
Imports PSPDFKit.Document
Imports PSPDFKit.Pdf
Imports PSPDFKit.UI

Public NotInheritable Class MainPage
    Inherits Page

    Private Async Sub PdfViewInitializationCompletedHandler(sender As PdfView, args As Document)
        Dim file As StorageFile
        file = Await StorageFile.GetFileFromApplicationUriAsync(New Uri("ms-appx:///Assets/document.pdf"))

        If file IsNot Nothing Then
            Await sender.OpenStorageFileAsync(file)
        End If
    End Sub

    Private Async Sub Button_OpenPDF_Click(sender As Object, e As RoutedEventArgs)
        Dim picker As New FileOpenPicker
        picker.FileTypeFilter.Add(".pdf")

        Dim file = Await picker.PickSingleFileAsync
        If file IsNot Nothing Then
            Dim documentSource As DocumentSource
            documentSource = DocumentSource.CreateFromStorageFile(file)
            Await PdfView.Controller.ShowDocumentAsync(documentSource)
        End If
    End Sub
End Class
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This loads a PDF from `Assets` as soon as the PdfView is ready
void MainPage::PdfViewInitializationCompletedHandler(UI::PdfView^ sender, Pdf::Document^ args)
{
    const auto path = ref new Uri("ms-appx:///Assets/document.pdf");

    create_task(StorageFile::GetFileFromApplicationUriAsync(path))
        .then([this](StorageFile^ file)
        {
            if (file == nullptr) return;

            PdfView->OpenStorageFileAsync(file);
        });
}

// This loads a PDF from a file picked by the user in the UI.
void MainPage::Button_OpenPDF_Click(Platform::Object^ sender, RoutedEventArgs^ e)
{
    // Open a Picker so the user can choose a PDF
    FileOpenPicker^ openPicker = ref new FileOpenPicker();
    openPicker->ViewMode = PickerViewMode::Thumbnail;
    openPicker->SuggestedStartLocation = PickerLocationId::PicturesLibrary;
    openPicker->FileTypeFilter->Append(".pdf");

    create_task(openPicker->PickSingleFileAsync())
        .then([this](StorageFile^ file)
        {
            if (file == nullptr) return;

            // Open and display it in the PSPDFKit PdfView
            const auto documentSource = DocumentSource::CreateFromStorageFile(file);
            PdfView->Controller->ShowDocumentAsync(documentSource);
        });
}
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<Page
    x:Class="AdvancedExample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AdvancedExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="52"/>
        </Grid.RowDefinitions>
        <WebView Margin="10"
                 Name="MainWebView"
                 NavigationStarting="MainWebView_NavigationStarting"
                 NavigationCompleted="MainWebView_NavigationCompleted"
                 Source="ms-appx-web:///Assets/pspdfkit/index.html"/>
        <Button Content="Open PDF" HorizontalAlignment="Left" Margin="10" Grid.Row="1" Click="Button_OpenPDF_Click"/>
    </Grid>
</Page>

Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
public sealed partial class MainPage : Page
{
    private const string CssLocation = "ms-appx-web:///Assets/pspdfkit/windows.css";
    private Controller _controller;

    public MainPage()
    {
        InitializeComponent();

        // Get your license...
        var pspdfkitLicense = "YOUR LICENSE GOES HERE";
        // And initialize the SDK with it.
        Sdk.Initialize(pspdfkitLicense);
    }

    // Once the WebView is ready create an instance of the API and initialize it with the WebView
    private void MainWebView_NavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args)
    {
        // This is the location of the standard CSS for Windows
        // You may provide your own CSS. See The CSS section here https://pspdfkit.com/api/web/css-General.html

        // We need to attach a Controller to the WebView
        _controller = new Controller(sender, new Uri(CssLocation));
    }

    private async void MainWebView_NavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args)
    {
        // The WebView has loaded the UI so we can display a PDF now.
        try
        {
            var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/document.pdf"));
            if (file == null) return;

            await _controller.ShowDocumentAsync(DocumentSource.CreateFromStorageFile(file));
        }
        catch (Exception e)
        {
            var messageDialog = new MessageDialog(e.Message);
            await messageDialog.ShowAsync();
        }
    }

    private async Task<StorageFile> PickPDF()
    {
        var picker = new FileOpenPicker
        {
            ViewMode = PickerViewMode.Thumbnail,
            SuggestedStartLocation = PickerLocationId.DocumentsLibrary
        };
        picker.FileTypeFilter.Add(".pdf");

        return await picker.PickSingleFileAsync();
    }

    private async void Button_OpenPDF_Click(object sender, RoutedEventArgs e)
    {
        var file = await PickPDF();
        if (file == null) return;

        // Open and display it in the PSPDFKit PDFView
        await _controller.ShowDocumentAsync(DocumentSource.CreateFromStorageFile(file));
    }
}

Check out our Guides and API docs for more examples.

Compatibility:

Windows 10

Windows Server 2016

Works with Universal Windows Platform (UWP) and C# apps, supporting both desktop computers and Microsoft Surface devices (x86/x64). Applications can be submitted to the Windows Store.

For compatibility with Windows Vista/7/8/8.1, consider using PSPDFKit for Web Standalone with the Chromium Embedded Framework instead.

Requirements:

Visual Studio

Packaged as a Windows Runtime Component for Visual Studio 2017.

“PSPDFKit handles all the heavy lifting involved in viewing and annotating PDF files. Thank you for such a wonderful product!”


“The Windows UWP product has evolved fairly quickly and just in time for Directorpoint. It has been an absolute pleasure - especially the great customer support!”


“What we really appreciate with PSPDFKit is the polish of this product. A great amount of time has been spent on the details.”

Martin Destagnol
Martin Destagnol
Head of Mobile Engineering
Box

Get In Touch

If you think PSPDFKit for Windows – UWP PDF Library could be for you, our team will help find the best solution for your project.