Using ABBYY FineReader Engine in .NET Core

To run your .NET Core application in different operating systems and containers, ABBYY FineReader Engine provides you with the ready-to-use .NET Core wrapper for the Engine library. This wrapper allows you to directly access the ABBYY FineReader Engine API, which is the same for all platforms with some minor exceptions.

Important! In this release, the .NET Core wrapper does not support working with InprocLoader and OutprocLoader objects.

To use your application in containers, include it with .NET Core Runtime in the container image. See details for deploying ABBYY FineReader Engine in Docker container in Running ABBYY FineReader Engine 12 inside a Docker container.

Adding ABBYY FineReader Engine library to a .NET Core project

ABBYY FineReader Engine includes the FREngine.DotNet.Interop.dll file, which contains the .NET Core wrapper for FineReader Engine. You can find this file in the Bin or Bin64 folder of the installation folder. You should add FREngine.DotNet.Interop.dll to the dependencies assembly in your project and redistribute it with your ABBYY FineReader Engine-based application.

Important! The only supported version of .NET Core is 3.1.

Loading and unloading ABBYY FineReader Engine

To initialize the Engine object, set the path to FREngine.dll with the SetFREnginePath method of the static FREngine class, then use the InitializeEngine function of the same class. To unload the Engine object, use the DeinitializeEngine function.

C# code

Collecting garbage

All ABBYY FineReader Engine objects in the .NET Core wrapper are derived from the IDisposable interface, which is responsible for releasing the resources allocated for objects. Implementing this interface ensures the collecting of the garbage automatically when an object is no longer needed. It is necessary to use the using statement for finishing with the objects, especially with heavy objects related to the document processing, synthesis, or export, such as IFRDocument, IFRPages, PDFExportParams, etc. (see the example below):

С# code

In case you prefer not to use the using statement, explicitly call the Dispose method.

Samples

See the Hello code sample illustrating ABBYY FineReader Engine functioning in .NET Core.

9/17/2024 3:14:40 PM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.