Aspose.PDF for .NET via COM Interop

Working with COM Interop

Aspose.PDF for .NET executes under the control of the .NET Framework and this is called managed code. Code written in all of the above languages runs outside the .NET Framework and it is called unmanaged code. Interaction between unmanaged code and Aspose.PDF occurs via the .NET facility called COM Interop.

Aspose.PDF objects are .NET objects, but when used via COM Interop, they appear as COM objects in your programming language. Therefore, it is best to make sure you know how to create and use COM objects in your programming language, before you start using Aspose.PDF for .NET.

Here are the topics that you will eventually need to master:

Register Aspose.PDF for .NET with COM Interop

You need to install Aspose.PDF for .NET and make sure it is registered with COM Interop (ensuring that it can be called from unmanaged code).

Pay attention that /codebase is necessary only if Aspose.PDF.dll is not in GAC, using this option makes regasm put path for assembly in registry.


ProgID stands for “programmatic identifier”. It is the name of a COM class that used to create an object. ProgIDs consist of the library name “Aspose.PDF” and the class name.

Type Library

Creating COM Objects

The creation of a COM object is similar to creation of a normal .NET object: