- .NET for iOS, MacCatalyst Bindings for PSPDFKit version 14.2.1
The PSPDFKit SDK is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.
PSPDFKit Instant adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.
- PSPDFKit.NET (Android): PSPDFKit/dotnet-pdf-library-for-android
- PSPDFKit.NET for mobiles (iOS & Android): PSPDFKit/dotnet-pdf-library-for-mobiles
PSPDFKit offers support via https://pspdfkit.com/support/request/.
Are you evaluating our SDK? That's great, we're happy to help out! To make sure this is fast, please use a work email and have someone from your company fill out our sales form: https://pspdfkit.com/sales/
In order to build this binding project you need:
- Visual Studio for Mac 2022 17.4.3+
- .NET for iOS 17.2.8004/8.0.100 or higher +
- .NET for MacCatalyst 17.2.8004/8.0.100 or higher +
- Clone this repository to your computer.
- Right-Click on your project in Visual Studio and select "Manage NuGet Packages..."
- In the
Browse
section for "nuget.org" search for "PSPDFKit.dotnet":
- Select the following two iOS packages: PSPDFKit.dotnet.iOS.Model and PSPDFKit.dotnet.iOS.UI.
- Tap on "Add Packages" to add the NuGet packages to your project.
Now you are done and can skip to Using PSPDFKit in your project!
To use this C# binding you can only build the binding project on macOS, you will need to obtain the full PSPDFKit xcframework files by doing either ./build.sh
and let the build script download the frameworks and build the bindings or by ./build.sh --target DownloadDeps
which will only download the required frameworks.
We are using Cake as our build system.
- Run
./build.sh
(macOS) command from the root directory in terminal. - All the resulting dlls will be inside the
bin/
folder of each project directory. - Go to Step 3 - Using PSPDFKit in your project.
- Run
./build.sh --target DownloadDeps
(macOS) command from the root directory in terminal. - Open
PSPDFKit.dotnet.sln
located in the root folder. - Build the binding projects inside the
iOS
orMac
solution folders. - Get the dlls from the
bin
folder of each project. - Go to Step 3 - Using PSPDFKit in your project.
If you don't use nuget, add the generated PSPDFKit dlls as a reference to into your own .NET project and add the corresponding using statements depending on the dlls referenced into your project.
using PSPDFKit.Model;
using PSPDFKit.UI;
using PSPDFKit.Instant;
Also you do need to set your license key early on in your AppDelegate
, before accessing any other PSPDFKit classes. You can get your license key from your customer portal if you haven't done so already. Pass null
to use the trial version.
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
PSPDFKitGlobal.SetLicenseKey (null);
// ...
}
With PSPDFKit Instant, it’s easier than ever to add real-time collaboration features to your PSPDFKit-powered app, allowing your users to seamlessly share, edit, and annotate PDF documents across iOS, Android, and web. With just a few lines of code, PSPDFKit Instant gives your users a massive productivity boost.
For more information about Instant, please have a look at our website.
You can find two basic examples inside the Samples folder, porting the catalog is still in progress.
- Do
./build.sh --target DownloadDeps
from inside the root folder. - Open the
Samples/PSPDFKit.dotnet.Samples.sln
solution in Visual Studio. - Select the example project and device you want to run it on (alternatively you can also right-click on the project and select "Build
Project Name
").
- Tap on the triangle on the left to run the project.
If you experience a crash on your end it's very valuable for us to have as much information as possible to provide you with the best support experience. Such valuable information includes a stack trace of the crash. Here's a quick step-by-step guide, showing how to generate a stack trace in Visual Studio:
- In the Terminal app enter the following command:
touch ~/.mtouch-launch-with-lldb
. This will essentially let you use lldb to debug your application when it launches. - Launch your app in debug mode in Visual Studio for Mac.
- Open the Application Output window in Visual Studio. It will ask you to execute another command in the Terminal.
- Once lldb is set up in the terminal window, you can simply use it like you would in Xcode.
- To get a stack trace you need to type
bt all
.
If you want to remove lldb from your debug setup again you can simply run rm ~/.mtouch-launch-with-lldb
in your Terminal.
- Launch your app in debug mode in Visual Studio for Mac.
- Open your Activity Monitor app.
- In the Activity Monitor app search for your app name in the search bar. To give an example, if I want to attach to our PSPDFCatalog example app I need to search for "PSPDFCatalog".
- Double-Click on the process to view the information window.
- Now you need to identify the PID (Process ID) of your process. The PID is the number included in the round brackets in the window title, e.g. if the title says "PSPDFCatalog (73389)", then 73389 is your PID. Here's an example of how that looks:
- Now you need to open your Terminal app and enter the following command to attach lldb:
lldb -p YOUR-PID aux
. For the example case above this is what the full command would look like:lldb -p 73389 aux
. - Once lldb is set up in the terminal window, you can simply use it like you would in Xcode.
- To get a stack trace you need to type
bt all
.
Please ensure you signed our CLA so we can accept your contributions.