Platforms
Frameworks
Languages
Platform Specifics
File format support
Welcome to Apryse. .NET Core for the Apryse SDK is cross-platform and supported on Windows, Linux and macOS. To get started, choose your preferred platform from the tabs below.
This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into .NET Core applications on Windows. Your free trial includes unlimited trial usage and support from solution engineers.
.NET Core cross-platform development
workload and MSBUILD
are part of your installation.This guide will use Visual Studio 2017. If you would like to use the NuGet integration for Windows x64 please make sure you have Visual Studio 2017 or later.Note: Apryse SDK is multi-targeting. Target Frameworks : .NET Core 2.1+
, .NET Standard 2.1
, .NET 5
, .NET 6
, .NET 7
, .NET 8
.A commercial license key is required for use in a production environment. Please fill out our licensing form if you do not have a valid license key.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
1. Extract the folder from the .zip file.
This article uses PDFNET_BASE
 as the path into the folder that you extracted.
2. Get your Apryse trial key.
Navigate to the location of extracted contents. Find and enter the Samples
folder (PDFNET_BASE/Samples
). Here you can find sample code for a large number of features supported by the Apryse SDK.
Run a specific sample
1. Find the sample you want to run and navigate into the CS
folder inside.
2. Open a Command Prompt here and run:
Alternatively, you can open the project in Visual Studio, Set as Startup Project
and run it (F5).
Run all samples
1. Download the runall_dotnet.bat
zip and extract the file into the PDFNET_BASE/Samples
folder.
2. Double click the file in this location to run all the .NET Core samples.
You can follow a manual or nuget integration as described below.
This section will help you build the "Apryse Hello World" application. It is easy to integrate the rest of Apryse SDK if you are able to open, save and close a PDFDoc.
1. Open a new instance of Visual Studio 2017 and create a new .NET Core console application project (File > New > Project...
). You can find this under the Visual C# menu.
Click on OK and allow the IDE to create the project.
2. Find the Solution Explorer on the right side of the screen. Select the project and press Alt + Enter
. This will open the properties tab.
Alternatively, you can right click on the project and find the properties option.
Select .NET Core 2.1 (or above) as the target framework for your application.
If you are using a Windows x64 machine for your .NET Core development, you can use NuGet package manager to get the Apryse SDK. Otherwise, please integrate the SDK manually.
3. Right click on project Dependencies and click on Add Reference. This will open the Reference Manager dialog. Click on the Browse...
option at the bottom of the dialog. Navigate to PDFNET_BASE/Lib
and select PDFNetDotNetCore.dll
and click Add.
Click OK on the Reference Manager and continue.
4. In the Solution Explorer, select the project and press Shift + Alt + A
. With this you can Add an Existing Item.
Alternatively, you can right click on the project and find the Add an existing item...
option under the Add
submenu.
Once again, navigate to PDFNET_BASE/Lib
. Choose the file type as All Files (*.*)
and select PDFNetC.dll
. Click on Add.
5. Select PDFNetC.dll in the solution explorer. A properties window should appear below. In it, change the Build Action setting to Content
and the Copy to Output Directory setting to Copy always
. To avoid errors, use the drop-down menus available for those fields.
This section will go through the nuget integration steps.
1. Perform the first 2 steps of integrating manually.
2. Right click on project Dependencies and click on Manage NuGet Packages...
. This will open the NuGet Package Manager.
3. Click on the Browse
tab near the top of the package manager. In the search bar enter:
4. Select the PDFTron.NET.x64
package by Apryse Systems Inc. and click on the Install
button in the panel with the package information. If you're prompted or an external dialog is opened for confirmation, click on Ok
.
5. Get your Apryse trial key.
Replace the contents of Program.cs
with:
Run the program using the Local Windows Debugger. The program will give the following output in the console:
You should see an output file produced at the location of your project. If you used .NET Core 2.1, then by default it will be in the following folder:
This guide will help you set up Apryse SDK serverless Azure functions. Your free trial includes unlimited trial usage and support from solution engineers.
In this particular guide, we will demonstrate how to set up an Azure function to use Apryse SDK.
First, create an Azure function using this guide.
Next, edit your csproj to include PDFNetC.dll
and reference PDFTronDotNet.dll
from the download package.
Once you have followed the initial setup instructions, you can begin calling Apryse SDK APIs in your Azure function source. For example:
You can update C# script of your Azure function project with the following code or download the source code from our github repository. This snippet shows how to process a request sent from a client to convert an office document to PDF and send the output to client.
The last step is to publish your Azure function and have it running and its url ready. Make sure to set Settings/Configuration/General settings/Platform
to 64-bit
in Azure portal.
In order to use this Azure function to convert an office document to PDF, the client needs to post
a REST API request to the server. The request must include json
data structured as in C# code above.
Upon receiving a client's request, a response will be sent back to the client including the base64 encoded pdf output using the same json structure. All the client needs to do now is decode the encoded data into pdf. That's it!
You can access the sample python code on Github. After cloning the repository and installing necessary packages, please refer to /client/README.txt
for detailed instructions. Navigate to the client
folder, run the following command, and see the reponse to client's request in the console and check the output in the output
folder:
The client will send a REST API request to convert /input/simple-word_2007.docx
to pdf and the server will send back the encoded data, which will then be saved as pdf in the output
folder.
You can experiment with your own office document by putting it inside input
folder:
We have shown how to set an Azure function using Apryse SDK. You can now experiment making your own functions, URLs, and can fully utilize Apryse SDK. If your have any questions, please don't hesitate to contact us!
This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into .NET Core applications on Linux. Your free trial includes unlimited trial usage and support from solution engineers.
.NET Core 3.1+
, .NET Standard 2.1
, .NET 5
, .NET 6
, .NET 7
, .NET 8
.Download Linux 64-bit Apryse SDK
Download Linux 64-bit ARM Apryse SDK
Download Linux 32-bit Apryse SDK
Note: For Alpine Linux specific details, please consult Alpine Linux guide.
A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
tar xvzf PDFNetC64.tar.gz
or tar xvzf PDFNetCArm64.tar.gz
or tar xvzf PDFNetCAlpine64.tar.gz
or tar xvzf PDFNetC.tar.gz
.Run a specific sample
CS
folder in the sample you want to run(e.g. /Samples/AddImageTest/CS
and executeRun all samples
/Samples
and make a new file named runall_dotnetcore.sh
. Open up the file and paste the shell script from Github into it.then run the script using:
The tests will run one by one.
This section will show you how to use our SDK to create a simple Apryse "Hello World!" application. It will create a document with one blank page and save it as a linearized PDF in its running directory.
=======
This guide will assume your project is named myApp.
Next, you can edit Program.cs
.
Program.cs
in your favorite text editor and add the necessary headers:output.pdf
:Your final program should look like this:dotnet run
. If all goes well, your console should output:Check the output.pdf
that the program output in the same directory. It should be a PDF with one blank page.
This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into .NET Core applications on macOS. Your free trial includes unlimited trial usage and support from solution engineers.
.NET Core 2.1+
, .NET Standard 2.1
, .NET 5
, .NET 6
, .NET 7
, .NET 8
.Download the SDK
A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
Run a specific sample
CS
folder in the sample you want to run(e.g. /Samples/AddImageTest/CS
and executeRun all samples
/Samples
and confirm there is a file named runall_dotnetcore.sh
. Give yourself execute permissions for this script by executingthen run the script using:
The tests will run one by one.
This section will show you how to use our SDK to create a simple Apryse "Hello World!" application using command line. It will create a document with one blank page and save it as a linearized PDF in its running directory. If you use Visual Studio for Mac
, you can follow the Mac get started instructions instead. Otherwise, you can use the following steps from the terminal.
This guide will assume your project is named myApp.
Next, you can edit Program.cs
.
Program.cs
in your favorite text editor and add the necessary headers:output.pdf
:Your final program should look like this:dotnet run
. If all goes well, your console should output:Check the output.pdf
that the program output in the same directory. It should be a PDF with one blank page.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales