Integrating the PDF Generation SDK
Running Examples
- Open the solution file
Samples.slnin Visual Studio. - Select a sample project in the Solution Explorer and set it as the startup project.
- Build and run the example.
Alternatively, you can open a command-line tool in the project folder and run the example via commands:
dotnet runIntegrating ComPDF Generation into a Project
You can perform integration manually or via nuget as described below. This section will help you build a PDF generation application.
Manual Integration
Start a new instance of Visual Studio 2026 and create a new .NET Core console application (File > New > Project...), then click OK to confirm the creation.

Find the Solution Explorer on the right side of the screen, select the project, right-click on the project, and click the "Properties" option in the menu, which will open the properties tab.
Confirm that ".NET Core 2.1" (or a later version) is used as the target framework for the application.

Right-click "Dependencies" and then click "Add Project Reference", which will open the "Reference Manager" dialog. Click the option at the bottom of the dialog, find the corresponding "ComPDFGeneration.dll", select it, and click Add.

In the Solution Explorer, right-click the project and find the "Add" option under the submenu
Add an existing item....Navigate to the library location again, select the file type as
All Files (*.*)and selectCPDFGenerationNative.dll,libpng16.dll,zlib1.dll. Click "Add".Select the .dll in the Solution Explorer. A properties window will appear below; in it, change the build action to Content. Set the "Copy to Output Directory" to
Copy always.
Integration Using Nuget Package
Perform the first two steps of manual integration.
Right-click the project dependencies and click
Manage Nuget Packages..., which will open the Nuget Package Manager.Click the Browse tab near the top of the package manager, and enter in the search bar:
ComPDF_Generation.NetCoreSelect the
ComPDF_Generation.NetCorepackage, then click theInstallbutton in the panel containing package information. If prompted or if an external dialog opens for confirmation, click OK.After installation is complete, you will see a reference to the package under Dependencies in the Solution Explorer.