> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/uwp/print/printing.md).

# Printing a document with UWP

Learn how to optimize printing with Apryse's UWP PDF library. Follow step-by-step instructions to register and customize print options effortlessly. Master printing management for your documents today

Apryse's UWP PDF library supports printing. The library handles all the hard work, you simply have to tell it to register and what options you would like to be available.

1. First, we have to add a PDFPrintManager. Declare another member variable in MainPage.xaml.cs next to MyToolManager.The PDFPrintManager is a singleton, so let's grab it at the bottom of MainPage's constructor, under OpenButton.Click.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
pdftron.PDF.PDFViewCtrl MyPDFViewCtrl;
pdftron.PDF.Tools.ToolManager MyToolManager;
pdftron.PDF.PDFPrintManager MyPrintManager;
```

{% endcode %}
{% endtab %}
{% endtabs %}

MyPrintManager = pdftron.PDF.PDFPrintManager.GetInstance();

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

````sh
2. Now, we need to add localized string options. Because the printer options are handled by the library, it needs to provide the option of localization. Inside the Lib folder there is a folder called strings that contains the string resources for American English (en-US).

Right click on PDFNetSample, select **Add** -> **New Folder**. Name this folder strings. The right click on the strings folder, again select **Add** -> **New Folder**. Name this folder en-US. From the downloaded package, go to the folder Lib -> strings -> en-US and drag the file Printing.resw into the en-US folder you created in the Sample project.

![localizedstrings](./img/localizedstrings.bmp)
Adding localized strings to the project for Printing.

Once done, your solution explorer should show look as follows.

![solutionwithlocalizedstrings](./img/solutionwithlocalizedstrings.bmp)
Solution explorer with localized strings.

Also, we need to tell the PDFPrintManager where to find this resource. In the constructor for MainPage, we can add the following two lines of code below where the PDFPrintManager is initialized.

```csharp

Windows.ApplicationModel.Resources.ResourceLoader loader = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView("Printing");
MyPrintManager.SetResourceLoader(loader);
````

{% endcode %}
{% endtab %}
{% endtabs %}

At this point, printing should be added to the sample.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/uwp/print/printing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
