Installation
Aspose.OCR for C++ is distributed as a NuGet package or as a downloadable file.
NuGet package
Aspose offers four options for Aspose.OCR for C++ NuGet package:
- Aspose.Ocr.Cpp - CPU-based OCR for Windows;
- Aspose.Ocr.Cpp-GPU - GPU-accelerated OCR for Windows (requires a CUDA capable GPU and NVIDIA CUDA Toolkit).
- Aspose.Ocr.Cpp-Linux - CPU-based OCR for Linux;
- Aspose.Ocr.Cpp-Linux-Gpu - GPU-accelerated OCR for Linux (requires a CUDA capable GPU and NVIDIA CUDA Toolkit).
There is no need to download and install any software - the package and all its dependencies can be added to your project directly from Microsoft Visual Studio. All packages are installed and updated in the same way, so they will later be referred as “Aspose.OCR for C++”.
Using NuGet Package Manager UI
NuGet Package Manager UI is the easiest way to install and update Aspose.OCR for C++ in your project.
Installing
- Open your solution or a project in Microsoft Visual Studio.
- Click Project menu and select Manage NuGet Packages.
Alternatively, you can right-click the project in Solution Explorer and select Manage NuGet Packages from the context menu. - Switch to Browse tab.
- Type “Aspose.Ocr.Cpp” (without quotes) in the search box.
- Select the version for the target platform from the list (you only need to install one package).
- Click Install button.
You can select a specific version to be installed. However, it is recommended to always use the latest version for new projects. - If prompted, confirm changes to the solution.
- If prompted, accept the license terms for installed packages.
Updating
- Open your solution or a project in Microsoft Visual Studio.
- Click Project menu and click Manage NuGet Packages.
Alternatively, you can right-click the project in Solution Explorer and select Manage NuGet Packages from the context menu. - Select Aspose.OCR for C++ package (depending on your installation option) from the list.
- Select the update version and click Update button.
- If prompted, confirm changes to the solution.
- If prompted, accept the license terms for update packages.
Using NuGet Package Manager Console
NuGet Package Manager Console lets you install and update Aspose.OCR for C++ in your project using PowerShell commands.
Installing
-
Open your solution or a project in Microsoft Visual Studio.
-
Click Tools menu, select NuGet Package Manager and click Package Manager Console.
-
Execute the command:
Install-Package Aspose.Ocr.Cpp
to install the latest version of Aspose.OCR NuGet package for Windows.Install-Package Aspose.Ocr.Cpp-GPU
to install the latest version of GPU-accelerated Aspose.OCR NuGet package for Windows.Install-Package Aspose.Ocr.Cpp-Linux
to install the latest version of Aspose.OCR NuGet package for Linux.Install-Package Aspose.Ocr.Cpp-Linux-Gpu
to install the latest version of GPU-accelerated Aspose.OCR NuGet package for Linux.
Updating
-
Open your solution or a project in Microsoft Visual Studio.
-
Click Tools menu, select NuGet Package Manager and click Package Manager Console.
-
Checks if there are newer versions available for any installed packages by executing a command
Get-Package -updates
. If an update is available, you will see something like this:Id Versions Description ProjectName -- -------- ----------- ----------- Aspose.OCR.Cpp {22.9.0} Aspose.OCR for C++ is a powerful yet... ConsoleApp1
-
Update Aspose.OCR for C++ to the latest version by executing a command
Update-Package [package name]
(depending on your platform).To update to a specific version, provide its name in the
-Version
parameter . For example:Update-Package Aspose.OCR.Cpp -Version 22.9.0
.
Downloadable
To use a downloaded Aspose.OCR component in your application:
- Extract the downloadable package.
- Copy lib and include folders into your project.
- Add Aspose.Ocr.Cpp.lib dependency to your project.
- Add lib/x64 folder to Additional Library Directories of your project.
- Add the path to include folder to Additional Include Directories of your project.
- Install the required dependencies to your project.
- Add
#include "aspose_ocr.h"
in your code.