Convert Image to Searchable PDF using C#

This short tutorial explains how to convert image to searchable PDF using C#. A sample code is provided to transform an image to readable PDF using C# along with the programming steps and IDE settings. A few code enhancements are shared at the end for creating a custom output.

Steps to Convert JPG to Readable PDF using C#

  1. Set up the environment to use Aspose.OCR for .NET for reading text from the image
  2. Apply the license to avoid a watermark in the output file
  3. Instantiate the text recognition engine
  4. Add the source image to the list for scanning
  5. Run the recognition process on the list of added images
  6. Go through each recognized result from the scanned images
  7. Save the result into a PDF in readable format

The given steps explain the process for changing an image to searchable PDF using C#. Instantiate the recognition engine, prepare a list of images to be processed, and run the engine. Iterate through each result, save it to a PDF file, and display the appropriate image to the user.

Code to Convert Image to Readable PDF using C#

This code demonstrates how to convert JPG to searchable PDF using C#. If your source image contains text other than in the English language, use the DocumentRecognitionSettings to specify the OCR language along with other parameters. If the source images are low-contrast or faded scans, enable the AutoContrast option to improve accuracy.

This article describes the process to extract text from an image and save it in a PDF file. To remove noise from an image, refer to the article Remove Noise from Image using C#.