Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

How to Make a Windows Program in C# with ComPDF Conversion SDK

Create a New Windows Project

  1. 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.

    image-20250605154713289 Figure 2-1

  2. 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.

    image-20250605154815466 Figure 2-2

  3. Place the project to the location as desired. Then, click OK.

Add ComPDF Conversion SDK Package

  1. Copy all files in the "lib" folder to the project folder.

  2. Add ComPDF Conversion SDK dynamic library to References. In order to use ComPDF Conversion SDK APIs in the project, you must add the reference to the project first.

  • In Solution Explorer, right-click the project and click Add -> Reference…

image-20250605154936992

  • In the Add Reference dialog, click the Browse tab, navigate to the project folder, select "cpdfconversionsdk_dotnet.dll" dynamic library, and then click OK.

image-20250605155643091

  1. Add ComPDF Conversion SDK 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 "cpdfconversionsdk.dll" and "opencv_world4100.dll" to Copy if newer. Otherwise, you should copy it to the same folder with the executable file manually before running the project.image-20250605161132258