Convert Image to Searchable PDF File with OCR using C++

Image to PDF OCR C++

Images and scanned documents may contain textual information that you might need to process further. For this, performing OCR operations on such images may prove to be helpful. You can extract text from such images and save it as a searchable PDF file. To that end, this article will teach you how to convert images to searchable PDF files using C++.

C++ API for Converting Images to Searchable PDF Files

Aspose.OCR for C++ is an optical character recognition API that can reliably perform OCR operations on images and scanned documents. The API also enables you to convert images to searchable PDFs. You can either install the API through NuGet or download it directly from the Downloads section.

PM> Install-Package Aspose.OCR.Cpp

Convert Image to Searchable PDF File using C++

Aspose.OCR for C++ provides you the ability to convert JPEG, BMP, and PNG images to searchable PDF files. To achieve this, please follow the steps given below:

The following sample code shows how to create a searchable PDF file from an image using C++:

Screenshot of the source image and output PDF file
Screenshot of the source image and output PDF file

Convert Skewed Image to Searchable PDF File using C++

The API also provides the ability to perform OCR operations on skewed images. The following are the steps to convert a skewed image to a searchable PDF file:

The following are the steps to convert a skewed image to a searchable PDF file using C++:

Screenshot of the source image and output PDF file
Screenshot of the source image and output PDF file

Get a Free License

In order to try the API without evaluation limitations, you can request a free temporary license.

Conclusion

In this article, you have learned how to convert images to searchable PDF files using C++. With Aspose.OCR for C++ API, you can convert JPEG, BMP, and PNG images to PDF format. The API provides many additional features that you can explore in detail by visiting the official documentation. In case of any questions, please feel free to reach us on our free support forum.

See Also