PM > Install-Package XDoc.PDF

How to Start Tutorials Troubleshooting Main Operations Convert PDF Read PDF Edit PDF PDF Report Generator Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

PDF WinForms C# Library
How to create a new PDF view, edit, convert Windows Forms .NET application using C#?


Complete step by step tutorial to create a new WinForms app, download and install XDoc.PDF C# library to enable PDF read, view, edit, convert features.



XDoc.PDF for C# library is an easy to use PDF C# library to read, preview, view, navigate, text/image edit PDFs in .NET Windows Forms (Core and Framework) applications.

In the following tutorial will show you how to create a new WinForms .NET project, install XDoc.PDF into your .NET WinForms app using Visual Studio 2022.

Here we will:

  • Create a new Windows Forms (.NET Core) project using Visual Studio IDE
  • Download and install all dependant Nuget packages
  • Add XDoc.PDF dlls into the new WinForms project



Download and Install XDoc.PDF .NET WinForms C# library


  1. Download XDoc.PDF Windows Forms C# library
  2. Install C# library to view, edit, convert Adobe PDFs in .NET WinForms projects
  3. Step by Step Tutorial






How to create a new Windows Forms (.NET Core) project to manipulate PDF document using C#?



1. Start Visual Studio 2022 and select "Create a new project".



Create a new project with name "RasterEdgePDFWinFormDemo".

Select .NET 6.0 (Long-term support), and then press "Create".

Now, all auto-generated files could be found in the solution explorer.



2. Right-click "Dependencies" in the Solution Explorer, and select "Manage NuGet Packages".



Required packages:

  • System.Drawing.Common (>= Version 6.0.0)
  • System.IO.Packaging (>= Version 6.0.0)
  • Newtonsoft.Json (>= Version 11.0.2)
  • WaterTrans.GlyphLoader (>= Version 1.0.0)



Check "Packages" in the Solution Explorer to ensure the installation is success.



3. Add RasterEdge XDoc.PDF DLLs



Add all RasterEdge DLL references (add repired DLLs with prefix "RasterEdge" in file name).

Minimum Required DLLs

  • RasterEdge.Imaging.Basic
  • RasterEdge.Imaging.Basic.Codec
  • RasterEdge.Imaging.Processing
  • RasterEdge.Imaging.Drawing
  • RasterEdge.XImage.Raster
  • RasterEdge.XDoc.PDF



Please go to download package "/Bin", and choose .NET Standard 2.0 DLLs.

Copy all VC++ DLLs (both x86 and x64 versions) manually to the root of the project.



Required VC++ DLLs

Folder: x86 (VC++ DLLs for Win32)

  • ./x86/RasterEdge.Imaging.Font.Native.dll
  • ./x86/RasterEdge.XImage.Raster.Native.dll
  • ./x86/RasterEdge.XImage.AdvancedCleanup.Native.dll
  • ./x86/RasterEdge.XImage.OCR.Tesseract.Native.dll



Folder: x64 (VC++ DLLs for x64)

  • ./x64/RasterEdge.Imaging.Font.Native.dll
  • ./x64/RasterEdge.XImage.Raster.Native.dll
  • ./x64/RasterEdge.XImage.AdvancedCleanup.Native.dll
  • ./x64/RasterEdge.XImage.OCR.Tesseract.Native.dll



Set property "Copy to Output Directory" to "Copy Always" for ALL 8 VC++ DLLs.





Conclusion

Here you have created a new Windows Forms application with XDoc.PDF library integrated. You can enable more Adobe PDF file load, view, content search, edit, convert features in your .NET WinForms app.

RasterEdge have included more PDF on .NET WinForms tutorials, view herre: