IRONSOFTWAREHOME
OCR for PDF Stream
using IronOcr;
using IronPdf;
using System;


ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1> Iron Software </h1>");

var ocrTesseract = new IronTesseract();

using var ocrInput = new OcrInput();
ocrInput.LoadPdf(pdf.Stream);

var ocrResult = ocrTesseract.Read(ocrInput);

Console.WriteLine(ocrResult.Text);
Imports IronOcr
Imports IronPdf
Imports System

Dim renderer As New ChromePdfRenderer()
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf("<h1> Iron Software </h1>")

Dim ocrTesseract As New IronTesseract()

Using ocrInput As New OcrInput()
    ocrInput.LoadPdf(pdf.Stream)
    
    Dim ocrResult = ocrTesseract.Read(ocrInput)
    
    Console.WriteLine(ocrResult.Text)
End Using
NuGet Download
PM > Install-Package IronOcr
OCR for PDF Stream

OCR for PDF Stream

IronOCR also supports Stream.

In this example, IronPDF is used to create a PDF Stream that can later be used for text recognition by IronOCR.

Please note that IronOCR supports reading Stream as an input, and can also export results to a Stream, for example via SaveAsSearchablePdfStream.

Learn to Input PDFs with IronOCR in C#
View on GitHub

Ready to Get Started?

Nuget Downloads 6,236,385Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required