Platforms
Frameworks
Languages
This guide walks you through steps to integrate the Apryse Server SDK free trial into your project. We’ll use a C++ project as our example project throughout this guide. By the end, you’ll have built a simple PDF-generation application and be able to open, save, and close a PDF Doc.
This section helps you get started with one of our samples to see the output you can create when you integrate the Apryse Server SDK into your application. It also includes instructions on how to create a C++ project, then integrate Server SDK into the project. In the end, you’ll create and open a blank PDF within your project.
Before you start:
Apryse collects some data regarding your usage of the SDK for product improvement.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
A commercial license key is required for use in a production environment. Contact sales by filling out our licensing form if you want to purchase a commercial license key.
License keys are uniquely generated and strictly confidential. Don't publish or store them in any public location, including public GitHub repositories.
In this section, you will download and run the OfficeToPDFTest PDFNet sample module, which demonstrates the SDK's document-conversion capabilities. Upon successful completion, you will have converted a DOCX document to a PDF file while leveraging the MS Office-to-PDF conversion API. You can use this module as a reference implementation when integrating similar document-conversion functionality into your own applications. By running the sample, you can quickly:
PDFNetC64.zip file to the following location: C:\Users\YourName\PDFNetC64\PDFNetC64\Samples. Replace YourName with your user name.C:\Users\YourName... replace YourName with your user name.3. Before running the sample, you need to add your license key to the LicenseKey.h file. Open Visual Studio, select File > Open > File... and navigate to: C:\Users\Your Name\PDFNetC64\PDFNetC64\Samples\LicenseKey\CPP (CPP or CPPS folder, depending on your distribution).
4. Select the LicenseKey.h file and click Open.
5. In the LicenseKey.h file, scroll down to the line containing //#define LicenseKey “YOUR_PDFTRON_LICENSE_KEY”. Uncomment this line (remove the // ) and replace the words in quotes with the copy of your trial license key you generated when you completed the Prerequisites instructions above. Do not change any other information in this file.
6. Save your changes and close the LicenseKey.h file.
7. In Visual Studio, select File > Open > Project/Solution and navigate to: C:\Users\Your Name\PDFNetC64\PDFNetC64\Samples\OfficeToPDFTest\CPP (CPP or CPPS folder, depending on your distribution).
8. Select the OfficeToPDFTestVC2019.vcxproj file and click Open. If a Retarget Projects dialog displays, click OK.
9. From the Main menu, select Build > Build Solution. After building, the output pane shows Build Completed.
10. From the Main menu, select Debug > Start Without Debugging.
11. The sample code loads an Office document, converts the Office document to PDF, saves the resulting PDF, and outputs status messages to the console. For more details, you can look at additional OfficeToPDF sample code and the Convert MS Office (Word, Excel, PowerPoint) to PDF overview.
Once the sample has finished running, a command line window opens showing the demo mode is Done. Press any key to close the command line window.
12. Go to your File Explorer and navigate to: C:\Users\YourName\PDFNetC64\PDFNetC64\Samples\TestFiles\Output. You will see three output PDF files (Fishermen.pdf, the_rime_of_the_ancient_mariner.pdf, and the factsheet_Arabic.pdf).
13. Open the PDF files to see the converted output. You have successfully run the OfficeToPDFTest conversion sample!
14. Close the output PDF files.
This section provides steps to create a simple C++ project that uses the Apryse SDK and the PDFNet library to programmatically generate a blank PDF document. With these steps, you can learn how to set up your environment, import the required libraries, and run a script that produces a valid PDF file—all without manual intervention. This example provides a practical foundation for more advanced document‑generation workflows.
C:\Users\YourName\source\repos.Note the name and location of your new project – we will refer to it below in section 4. Run your project.
Before running the application, configure the following dependencies:
$(OutDir).C:\Users\YourName\PDFNetC64\PDFNetC64\Headers and then click Apply.C:\Users\YourName\PDFNetC64\PDFNetC64\Lib and then click Apply.PDFNetC.lib, click Apply and then click OK.This section helps you build a simple PDF-generation application.
C:\Users\YourName\PDFNetC64\PDFNetC64\Lib and copy the PDFNetC.dll file.C:\Users\YourName\source\repos\ApryseGetStarted\x64\Debug and paste the PDFNetC.dll file in this folder.4. Scroll down to the line containing PDFNet::Initialize(“YOUR_PDFTRON_LICENSE_KEY”); and replace the words in quotes with the copy of your trial license key. Save your changes and close the ApryseGetStarted.cpp file.
5. From the Main toolbar in Visual Studio, click on Build > Build Solution to compile the program. In the Output pane you will see Build: 1 succeeded.
6. Under the Main toolbar in Visual Studio, click on Debug > Start Without Debugging. The program runs and a command line window displays PDFNet is running in demo mode.
7. Press any key to close the command line window.
The sample code you just ran performs the following actions:
8. In File Explorer, navigate to the project’s output directory where the PDF file has been saved (this is the location you specified in section 2. Create a new PDFNet C++ project, step 4 above: C:\Users\YourName\source\repos\ApryseGetStarted\x64\Debug).
9. Open the linearized_output.pdf which you created by integrating the Apryse Server SDK.
Now that you have successfully run the OfficeToPDFTest sample (in section 1) and integrated the Apryse Server SDK C++ PDF Library into your application, you can try out 50+ samples depending on your needs.
10. To try additional samples, go to section 1. Run a PDFNet sample project > step 2 above and choose another sample to run.
Older versions of Visual Studio
Find out more about the Visual Studio versions we support.
Trouble setting dependencies
Set dependencies for the Apryse SDK in a startup project with Visual Studio.
This section helps you get started with one of our samples to see the output you can create when you integrate the Apryse Server SDK into your application. It also includes instructions on how to create a C++ project, then integrate Server SDK into the project. In the end, you’ll create and open a blank PDF within your project.
Before you start:
Apryse collects some data regarding your usage of the SDK for product improvement.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
A commercial license key is required for use in a production environment. Contact sales by filling out our licensing form if you want to purchase a commercial license key.
License keys are uniquely generated and strictly confidential. Don't publish or store them in any public location, including public GitHub repositories.
In this section, you will download and run the OfficeToPDFTest PDFNet sample module, which demonstrates the SDK's document-conversion capabilities. Upon successful completion, you will have converted a DOCX document to a PDF file while leveraging the MS Office-to-PDF conversion API. You can use this module as a reference implementation when integrating similar document-conversion functionality into your own applications. By running the sample, you can quickly:
PDFNetC64.tar.gz file, then select Extract to...The ApryseSamples folder is created and the tarball is extracted to the folder.
You can install the samples to another location if you prefer, but for this guide’s instructions, we used the location and name above.
5. Navigate to: /Home/ApryseSamples/PDFNetC64/Samples/LicenseKey/CPP/LicenseKey.h and double-click to open so you can add your license key to the LicenseKey.h file before running the sample. (Note that the folder may be named CPP or CPPS, depending on your distribution.)
6. Scroll down to the line containing //#define LicenseKey “YOUR_PDF_LICENSE_KEY”. Uncomment this line (remove the // ) and replace the words in quotes with the copy of your trial license key you generated when you completed the Prerequisites instructions above. Do not change any other information in this file.
7. Save your changes and close the LicenseKey.h file.
8. To run the sample, navigate to: /Home/ApryseSamples/PDFNetC64/Samples/OfficeToPDFTest/CPP, right-click on the CPP folder, then select Open in Terminal (CPP or CPPS folder, depending on your distribution).
9. The Linux terminal opens the OfficeToPDFTest sample. From the project directory, in the terminal, enter the following, then press Enter:
Then enter the following and press Enter:
10. When you run the ./OfficeToPDFTest command, the sample code loads an Office document, converts the Office document to PDF, saves the resulting PDF, and outputs status messages to the console. For more details, you can look at additional OfficeToPDF sample code and the Convert MS Office (Word, Excel, PowerPoint) to PDF overview.
Once the sample has finished running, you’ll see the status Done in the terminal.
11. In the terminal, type exit, then press Enter.
12. Navigate to: /Home/ApryseSamples/PDFNetC64/Samples/TestFiles/Output. You will see three output PDF files (Fishermen.pdf, the_rime_of_the_ancient_mariner.pdf, and the factsheet_Arabic.pdf).
13. Open the PDF files to see the converted output. You have successfully run the OfficeToPDFTest conversion sample.
14. Close the output PDF files.
This section provides steps to create a simple C++ project that you can, later, integrate with the Server SDK.
/Home/ApryseSamples/PDFNetC64/Samples.myApp folder and create a CPP folder (or CPPS depending on your distribution). To exit out of the Open Folder dialog box select Cancel.myAPP.cpp and press Enter./ApryseSamples/PDFNetC64/Samples/myApp/CPP and click Create File. The myApp.cpp file is created.Note the name and location of your new project – we will refer to it below in section 4. Run your project.
This section integrates the Apryse Server SDK and the PDFNet library to programmatically generate a blank PDF document. With these steps, you can learn how to set up your environment and import the required libraries.
myApp.cpp file:2. Scroll down to the line containing PDFNet::Initialize(“YOUR_PDFTRON_LICENSE_KEY”); and replace the words in quotes with the copy of your trial license key. Save your changes and close the file.
You’ll run the project to get a blank PDF as your output.
/Home/ApryseSamples/PDFNetC64/Samples/myApp/CPP, right-click on the CPP folder and select Open in Terminal.To run the application, enter the following and press Enter:
You will see a message in the terminal:
The sample code you just ran performs the following actions:
3. Navigate to: /Home/ApryseSamples/PDFNetC64/Samples/myApp/CPP.
4. Open the output.pdf which you created by integrating the Apryse Server SDK.
Now that you have successfully run the OfficeToPDFTest sample (in section 1) and integrated the Apryse Server SDK C++ PDF Library into your application, you can try out 50+ samples depending on your needs.
5. To try additional samples, go to section 1. Run a PDFNet sample project > step 4 above and choose another sample to run.
This section helps you get started with one of our samples to see the output you can create when you integrate the Apryse Server SDK into your application. It also includes instructions on how to create a C++ project, then integrate Server SDK into the project. In the end, you’ll create and open a blank PDF within your project.
Before you start:
Apryse collects some data regarding your usage of the SDK for product improvement.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
A commercial license key is required for use in a production environment. Contact sales by filling out our licensing form if you want to purchase a commercial license key.
License keys are uniquely generated and strictly confidential. Don't publish or store them in any public location, including public GitHub repositories.
In this section, you will download and run the OfficeToPDFTest PDFNet sample module, which demonstrates the SDK's document-conversion capabilities. Upon successful completion, you will have converted a DOCX document to a PDF file while leveraging the MS Office-to-PDF conversion API. You can use this module as a reference implementation when integrating similar document-conversion functionality into your own applications. By running the sample, you can quickly:
PDFNetCMac.zip file to unzip it.You can install the samples to another location if you prefer, but for this guide’s instructions, we used the location and name above.
4. Move the unzipped PDFNetCMac folder to the new ApryseSamples folder.
5. In your terminal, go to the Documents/ApryseSamples directory and remove the quarantine attribute from all files so the sample can run:
Instead of using the terminal, go to System Settings > Privacy & Security and click Open Anyway. For more, see opening an app on a Mac.
6. Open the Documents/ApryseSamples/PDFNetCMac/Samples/LicenseKey/CPP/LicenseKey.h file in Visual Studio Code. (Note that the folder may be named CPP or CPPS, depending on your distribution.)
7. Scroll down to the line containing //#define LicenseKey “YOUR_PDF_LICENSE_KEY”. Uncomment this line (remove the // ) and replace the words in quotes with the copy of your trial license key you generated when you completed the Prerequisites instructions above. Do not change any other information in this file.
8. Save your changes and close the LicenseKey.h file.
9. To run the sample, navigate to: /Documents/ApryseSamples/PDFNetCMac/Samples/OfficeToPDFTest/CPP, right-click on the CPP folder, then select New Terminal at Folder (CPP or CPPS folder, depending on your distribution).
10. The terminal opens the OfficeToPDFTest sample. From the project directory, in the terminal, enter the following, then press Enter:
Then enter the following and press Enter:
11. When you run the ./OfficeToPDFTest command, the sample code loads an Office document, converts the Office document to PDF, saves the resulting PDF, and outputs status messages to the console. For more details, you can look at additional OfficeToPDF sample code and the Convert MS Office (Word, Excel, PowerPoint) to PDF overview.
Once the sample has finished running, you’ll see the status Done in the terminal.
12. In the terminal, type exit, then press Enter.
13. Navigate to: /Documents/ApryseSamples/PDFNetCMac/Samples/TestFiles/Output. You will see three output PDF files (Fishermen.pdf, the_rime_of_the_ancient_mariner.pdf, and the factsheet_Arabic.pdf).
14. Open the PDF files to see the converted output. You have successfully run the OfficeToPDFTest conversion sample.
15. Close the output PDF files.
This section provides steps to create a simple C++ project that you can, later, integrate with the Server SDK.
/Documents/ApryseSamples/PDFNetCMac/Samples.myApp, create a folder named CPP (or CPPS depending on your distribution).CPP folder.myApp.cpp.This section integrates the Apryse Server SDK and the PDFNet library to programmatically generate a blank PDF document. With these steps, you can learn how to set up your environment and import the required libraries.
myApp.cpp file:2. Scroll down to the line containing PDFNet::Initialize(“YOUR_PDFTRON_LICENSE_KEY”); and replace the words in quotes with the copy of your trial license key. Save your changes and close the myApp.cpp file.
You’ll run the project to get a blank PDF as your output.
/Documents/ApryseSamples/PDFNetCMac/Samples/myApp/CPP, right-click on the CPP folder and select NewTerminal at Folder.To run the application, enter the following and press Enter:
You will see a message in the terminal:
The sample code you just ran performs the following actions:
3. Navigate to: /Documents/ApryseSamples/PDFNetCMac/Samples/myApp/CPP.
4. Open the output.pdf which you created by integrating the Apryse Server SDK.
Now that you have successfully run the OfficeToPDFTest sample (in section 1) and integrated the Apryse Server SDK C++ PDF Library into your application, you can try out 50+ samples depending on your needs.
5. To try additional samples, go to section 1. Run a PDFNet sample project > step 3 above and choose another sample to run.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales