How to Make a Windows Program in C# with ComPDFKit Conversion SDK
This section will help you to quickly get started with ComPDFKit Conversion SDK to make a Windows project in C# with step-by-step instructions, which include the following steps:
- Create a new Windows project in C#.
- Integrate ComPDFKit Conversion SDK into your project.
- Apply the license key.
Create a New Windows Project in C#
In this guide, we use Visual Studio 2017 to create a new Windows project.
- Fire up Visual Studio 2017, choose File -> New -> Project..., and then select Visual C# -> Windows Desktop -> Console App(.NET Framework) as shown in Figure 2-1.
Figure 2-1
- Choose the options for your new project as shown in Figure 2-2. Please make sure to choose .NET Framework 4.6.1 as the programming framework.
Figure 2-2
- Place the project to the location as desired. Then, click OK.
Add ComPDFKit Conversion SDK Package
1. Copy the all files in the "Lib" folder to the project folder.
2. Add ComPDFKit Conversion SDK dynamic library to References. In order to use ComPDFKit Conversion SDK APIs in the project, you must first add a reference to it.
- In Solution Explorer, right-click the project and click Add -> Reference…
- In the Add Reference dialog, click Browse tab, navigate to the project folder, select "ComPDFKit_Conversion.dll" dynamic library, and then click OK.
3. Add ComPDFKit Conversion SDK native library to the project. Add the "x64" and "x86" folder into the project. Please make sure to set the property "Copy to Output Directory" of "CPDFConverterNative.dll" and "opencv_world420.dll" to "Copy if newer". Otherwise, you should copy it to the same folder with the executable file manually before running the project.
4. Copy the "source" folder to the project folder. Add the "source" folder into the project. Please make sure to set the property "Copy to Output Directory" of the all files in the "source" folder to "Copy if newer". Otherwise, you should copy it to the same folder with the executable file manually before running the project.