[]
The GcPdf packages are fully supported on Visual Studio 2017 or later for Windows, Visual Studio for MAC, and Visual Studio Code for Linux and are compatible with the following:
GcPdf references are available through NuGet, a Visual Studio extension that adds the required libraries and references to your project automatically. To work with GcPdf, you need to have following references in your application:
Reference | Purpose |
---|---|
To use GcPdf in an application, you need to reference (install) just the GrapeCity.Documents.Pdf package. It will pull in the required infrastructure packages. | |
To render barcodes, install the GrapeCity.Documents.Barcode (aka GcBarcode) package. It provides extension methods allowing to render barcodes when using GcPdf. | |
GrapeCity.Documents.Imaging provides image handling. You do not need to reference it directly. | |
On a Windows system, you can optionally install GrapeCity.Documents.Common.Windows. It provides support for font linking specified in the Windows registry, and access to native Windows imaging APIs, improving performance and adding some features (e.g. TIFF support). | |
GrapeCity.Documents.DX.Windows is an infrastructure package used by GrapeCity.Documents.Common.Windows. You do not need to reference it directly. |
In order to use GcPdf in a .NET Core, ASP.NET Core, .NET Framework application (any target that supports .NET Standard 2.0), install the NuGet packages in your application using the following steps:
Open Visual Studio for Windows.
Create a .NET Core Console/.NET Framework Windows Forms Application.
Right-click the project in Solution Explorer and choose Manage NuGet Packages.
In the Package source on top right, select nuget.org.
Click Browse tab on top left and search for "GcDocs".
On the left panel, select GcDocs.Pdf
On the right panel, click Install.
In the Preview Changes dialog, click OK and choose I Accept in the next screen.
(Optional)If you want to add barcodes in your PDF file, you need to install the package GrapeCity.Documents.Barcode using the steps 5 to 8 above.
This adds all the required references of the package to your application. After this step, follow the steps in the Quick Start section.
Open Visual Studio for MAC.
Create a .NET Core Console/.NET Framework Windows Forms Application.
In tree view on the left, right-click Dependencies and choose Add Packages.
In the Search panel, type "GrapeCity.Documents".
From the list of packages displayed in the left panel, select GrapeCity.Documents.Pdf (and GrapeCity.Documents.Barcode if you want to render barcodes in your Pdfs) and click Add Packages.
Click Accept.
This automatically adds references of the package and its dependencies to your application. After this step, follow the steps in the Quick Start section.
Open Visual Studio Code.
Install Nuget Package Manager from Extensions.
Create a folder "MyApp" in your Home folder.
In the Terminal in Visual Studio Code, type "cd MyApp
"
Type command "dotnet new console
"Observe: This creates a .NETCore application with MyApp.csproj file and Program.cs.
Press Ctrl+Shift+P. A command line opens at the top.
Type command: ">
"Observe: "Nuget Package Manager: Add Package" option appears.
Click the above option.
Type "Grapecity" and press Enter.Observe: GrapeCity packages get displayed in the dropdown.
Choose GrapeCity.Documents.Pdf.
(Optional) Repeat above steps to add GrapeCity.Documents.Barcode if you want to add barcodes to your PDF.Observe: The packages would be added to your .csproj file.
Type following command in the Terminal window: "dotnet restore
"
This adds references of the package to your application. After this step, follow the steps in the Quick Start section.