> 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/xamarin/get-started/forms.md).

# Integrate Apryse SDK into your Xamarin.Forms application

Learn how to integrate a free trial of the Apryse SDK into your Xamarin.Forms app. Get step-by-step instructions, project structure insights, and customization tips. Start your trial today! The Apryse

Welcome to Apryse. This guide will show you how to get started with integrating a free trial of the Apryse SDK into your Xamarin.Forms application. We will clone the [Xamarin.Forms sample repository](https://github.com/ApryseSDK/xamarin-forms-sample/), [walk through the project structure](https://docs.apryse.com), and show you how to customize the Apryse components of your Xamarin.Forms app. Your free trial includes unlimited trial usage and support from solution engineers.

<a href="https://github.com/ApryseSDK/xamarin-forms-sample" class="button primary">Get the Xamarin.Forms source code</a>

## Prerequisites

* Latest version of Visual Studio

{% hint style="info" %}
**No trial license key required.**

The trial of Apryse Mobile SDK does not require a trial key. A commercial license key is required for use in a production environment. Please [contact sales](https://apryse.com/form/contact-sales) to purchase a commercial key or if you need any other license key assistance.
{% endhint %}

{% hint style="warning" %}
**Keep your license keys confidential.**

License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
{% endhint %}

## Initial setup

1. Clone the [Xamarin.Forms sample](https://github.com/ApryseSDK/xamarin-forms-sample/) by executing

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

```sh
git clone https://github.com/ApryseSDK/xamarin-forms-sample.git
```

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

1. Open `CustomRenderer.sln` in Visual Studio.

You are now ready to [run the sample](https://docs.apryse.com). If you want to run the UWP sample as well, follow the steps below:

### Optional, for UWP only

1. [Download](/uwp/get-started/integration.md) and extract the UWP project.
2. Run the `PDFNetUWPApps.vsix` from `/PDFNetUWPApps/Lib` to install PDFNet SDK for UWP.
3. From the UWP download package, copy the `/Samples/PDFViewCtrlTools_VS2015` folder to the Xamarin.Forms sample folder `ContentPage`.
4. Find the existing `PDFNet SDK for UWP` reference in the CustomRenderer.UWP sample and delete it.

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

```sh
![Delete existing](img/remove-existing.png)
```

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

1. Right click the `CustomRenderer.UWP` project and add a reference to the PDFNet SDK for UWP extension that was installed from the download package.

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

```sh
![Add Reference](img/add-reference.png)
![Select Apryse for UWP](img/sdk-uwp.png)
```

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

## Sample overview

After initial setup, your `xamarin-forms-sample/ContentPage` folder should look like this(assuming you followed UWP integration steps):

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

```sh
xamarin-forms-sample
├── ContentPage
│   ├── CustomRenderer
│   ├── Droid
│   ├── iOS
│   ├── packages
│   ├── PDFViewCtrlTools_VS2015
│   ├── UWP
│   └── CustomRenderer.sln
└── ...
```

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

Notable files and directories include:

| File/Folder Name         | Description                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------ |
| CustomRenderer           | Contains the declaration for the shared Xamarin.Forms page                           |
| Droid                    | Contains custom renderer for Xamarin.Android                                         |
| iOS                      | Contains custom renderer for Xamarin.iOS                                             |
| packages                 | Contains the dependencies for the project                                            |
| PDFViewCtrlTools\_VS2015 | Annotation and UI tools project for UWP sample that was imported from Apryse UWP SDK |
| UWP                      | Contains custom renderer for UWP                                                     |
| CustomRenderer.sln       | The Visual Studio solution file for the entire sample                                |

## Run the sample

The process of running the sample is the same for all samples you want to run.

1. Right click the solution `CustomRenderer` and click `Restore NuGet Packages` to install the project dependencies.
2. Build the solution by right clicking `CustomRenderer` and selecting `Build Solution`. 3. Run the project sample of your choice. Regardless of which project you ran, you will see a selection screen pop up which asks you to run either the Basic Viewer or the Advanced Viewer.

![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-b827c29af2468f3dc5603aec1d48471d578c3f68%2F56988a5346a875ce625757daf1316d8c345f3356-550x357.png?alt=media)

For reference, this is how the Basic Viewer should look on all three platforms:

| Android                                                                                                                                                                                                                                        | iOS                                                                                                                                                                                                                                             | UWP                                                                                                                                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-438e84e1900828118906e0701a20842cff99c369%2F65e0a5e4a154f924e8761e4118e9a3760ce294c6-540x960.png?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-05b8769e9181a093ccbe02da6067ce3660d03030%2Fe89565a63c0e0ce6a32f2c6acd705fc883a405c9-519x1124.png?alt=media) | ![](https://653871032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjsBtuYmcKhWOdM9VCg4%2Fuploads%2Fgit-blob-d8644355393cb78f886e795f67b0491ff31aa252%2F7b6907f60dba4234d5a2d41547ff55ea6809cc16-540x959.png?alt=media) |

{% hint style="info" %}
\*\* For a more involved guide on how to integrate Apryse SDK into a Xamarin.Forms project, check out this guide for the advanced viewer and this guide for the basic viewer . \*\*
{% endhint %}

{% hint style="info" %}
\*\* You can view the source code for this project here. \*\*
{% endhint %}


---

# 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/xamarin/get-started/forms.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.
