You need to add a reference to ABCpdf from your Visual Studio
Project. This tells Visual Studio to link the ABCpdf assembly into
the build.
Typically you will do this by referencing the ABCpdf NuGet
package. Right click on 'Dependencies' and then select the 'Manage
NuGet Packages...' item, click on "Browse" and search for "ABCpdf -
you should see ABCpdf amongst the results from NuGet.org.
If you have run the full MSI installer, ABCpdf is placed in the
GAC, so under .NET 4 you can add a reference simply by looking in
the 'Assemblies > Extensions' section of the Reference Manager.
Just right click on 'References' in your project and 'Add
Reference' - you'll see "ABCpdf .NET" near the top of the
extensions list. .NET 5, .NET 6.0 and .NET 7.0 do not have a GAC,
so while you can add the relevant reference by browsing to the DLL
in the ABCpdf installation folder, it is probably easier to add a
NuGet reference.
If you are using .NET 7.0 your project target is "net7.0"
however since ABCpdf makes use of Windows specific features, more
commonly you will target "net7.0-windows". If you are using .NET
6.0 the equivalent is "net6.0" and "net6.0-windows". If you are
using .NET 5.0 the equivalent is "net5.0" and "net5.0-windows". If
you are using .NET Classic then your target will be "v4.0" or
later.
The ABCpdf NuGet package ships with the MSHTML and ABCChrome123
HTML conversion engines. If you want to use the ABCChrome117,
ABCChrome86 or ABCChrome65 HTML conversion engine, you will need to
reference the ABCChrome86 or ABCChrome65 NuGet packages in addition
to the ABCpdf one. Similarly for ABCGecko you will need to
reference the ABCGecko package. Similarly for ABCWebKit you will
need the ABCWebKit package. All these engines are installed by
default if you run the downloadable MSI installer.
You can mix and match the full MSI installer with the NuGet
packages. If you reference a different NuGet version in your
project then that version, rather than the MSI installed version,
is the one that will be used. Be careful as it can be confusing if
you have multiple different versions of ABCpdf in use.
If you are not using Visual Studio, you will need to consult the
documentation for your chosen development environment.
|