DLLs
 

ABCpdf .NET is made up of the following components.

ABCpdfCE7.DLL is the core engine. It incorporates our proprietary Direct to PDF technology and is designed for high performance PDF manipulation in a multithreaded environment.

ABCpdf.DLL is a .NET tier comprising the visible interface and less speed critical code. When the assembly is loaded it locates and loads the core engine establishing a direct high speed link between the two components.

PrintHook32.dll and PrintHook64.dll. These DLLs intercept the Microsoft XPS Document Writer to allow ABCpdf to import an extended range of documents.

ABCpdf supports the import of more image formats through the separate ABCImageMagick COM+ Application, which is not automatically installed and you can manually install with ABCImageMagick.msi.

The .NET tier is placed in the GAC so that you can reference ABCpdf .NET from any of your projects. However should you require you can always copy both DLLs to the bin directory of your application.

   

Copied DLLs. Visual Studio copies PresentationCore.dll and System.Printing.dll, which are referenced from ABCpdf, to your application/bin directory because they are platform-specific (32-bit vs 64-bit). This causes problems when your application is published or copied to a machine with a different platform.

To prevent the copying, you can directly reference the files and set Copy Local and Specific Version to False by adding the following lines to your project file (.csproj/.vbproj) under <ItemGroup> with other Reference elements:

<Reference Include="PresentationCore">
  <SpecificVersion>False</SpecificVersion>
  <Private>False</Private>
</Reference>
<Reference Include="System.Printing">
  <SpecificVersion>False</SpecificVersion>
  <Private>False</Private>
</Reference>

 


Refs
 

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.

If you are not using Visual Studio you will need to consult the documentation for your chosen development environment.

 

   

Names
 

There are four public namespaces in ABCpdf. You can reference these using the following directives.

[C#]
using WebSupergoo.ABCpdf7;
using WebSupergoo.ABCpdf7.Objects;
using WebSupergoo.ABCpdf7.Atoms;
using WebSupergoo.ABCpdf7.Operations;

[Visual Basic]
Imports WebSupergoo.ABCpdf7
Imports WebSupergoo.ABCpdf7.Objects
Imports WebSupergoo.ABCpdf7.Atoms
Imports WebSupergoo.ABCpdf7.Operations

The ABCpdf7 namespace contains the objects you will use for page layout. Most of the time it is the only namespace you will need.

The Objects namespace allows you to access and manipulate content you've already added. You may use this namespace for complex operations in which the standard page layout functionality requires some modification.

The Atoms namespace allows you low level access to the raw PDF data structures. You are unlikely to use objects from this namespace unless you are writing very low level code.

The Operations namespace allows you to perform complex operations with multiple parameters and callbacks.

 

   

Example
 

This is some simple example code. All it does is report the ABCpdf license information.

[C#]
Doc doc = new Doc();
Response.Write("License: " + doc.License + "<br>");

[Visual Basic]
Dim doc As New Doc()
Response.Write("License: " & doc.License & "<br>")

 

   

Security
 

ASP.NET operates under a restricted set of security permissions. It is quite common for the ASPNET user not to be able to create or write files.

So if you want to save a PDF file from your ASP.NET code it is quite likely that you will need to adjust the permissions on your destination directory to allow write access for the ASPNET user.