This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/ocr/usage/image-to-searchable-pdf.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Converting images to searchable PDFs | Nutrient .NET SDK

Image files can contain text that users can’t search or copy. OCR converts that text into a searchable layer while preserving the original visual content.

This guide shows how to:

  • Convert an image to PDF
  • Run OCR on the PDF
  • Save a searchable PDF output

Project setup

Install:

  • The core Nutrient Native SDK package
  • GdPicture.Resources for OCR language and recognition resources

Prepare the project

Register the SDK license before running conversion or OCR operations. For setup details, refer to the getting started with .NET SDK guide.

using GdPicture14;
LicenseManager licence = new LicenseManager();
licence.RegisterKEY("");

Set up document processing components

Use:

  • GdPictureDocumentConverter for image-to-PDF conversion
  • GdPicturePDF for OCR processing
using GdPicturePDF pdf = new GdPicturePDF();
using GdPictureDocumentConverter converter = new GdPictureDocumentConverter();

Convert the image to PDF

Load the source image and create an intermediate PDF:

converter.LoadFromFile(@"input.png");
converter.SaveAsPDF(@"output_intermediary.pdf");

Apply OCR

Load the intermediate PDF and run OCR on all pages:

pdf.LoadFromFile(@"output_intermediary.pdf", true);
pdf.OcrPages("*", 0, "eng", "", "", 200);

OcrPages parameters:

  • "*" — Process all pages
  • 0 — Default OCR mode
  • "eng" — English OCR language
  • "", "" — No allowlist or denylist
  • 200 — Processing DPI

Save the searchable PDF

Save the OCR result:

pdf.SaveToFile(@"output_with_ocr.pdf");

The output preserves page appearance and adds searchable text.

Handle errors

Conversion and OCR methods return GdPictureStatus values. Use those values in your error handling path. For details, refer to the handling errors with .NET SDK guide.

Conclusion

This workflow converts an image into a searchable PDF by combining PDF conversion and OCR.