Unsatisfactory OCR result output from IronOCR
IronOCR did not give a satisfying result? What to do?
OCR accuracy can vary depending on the input document, including its resolution, text size, layout, image quality, and preprocessing configuration.
A configuration that works well for one document may not produce the same results for another. If IronOCR returns missing, incorrect, or garbled characters, try the troubleshooting steps below.
1. Check the PDF rasterization DPI
When loading a PDF, IronOCR rasterizes each page before performing OCR. By default, LoadPdf() uses 200 DPI.
For documents containing small or dense text, increasing the rasterization DPI can improve character recognition.
Try loading the PDF at 300 DPI:
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadPdf("document.pdf", 300);
var result = ocr.Read(input);
Console.WriteLine(result.Text);
A higher DPI provides more detail for character recognition but also increases memory usage and processing time. Therefore, 300 DPI is a useful starting point when the default resolution does not provide satisfactory results.
If 300 DPI resolves the recognition issue, additional image preprocessing may not be necessary.
2. Do not rely only on the overall confidence score
An OCR result can have a reasonable page-level confidence while still containing an incorrectly recognized character or field.
For example, a page containing thousands of correctly recognized characters may still have a single important number or identifier recognized incorrectly without significantly lowering the overall page confidence.
Use confidence scores as a general indicator of OCR quality but validate critical fields separately when accuracy is important.
3. Apply preprocessing only when needed
If increasing the DPI does not resolve the issue, inspect the source document and apply filters appropriate to its condition.
For example:
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadPdf("document.pdf", 300);
input.DeNoise();
input.Deskew();
var result = ocr.Read(input);
Console.WriteLine(result.Text);
Common preprocessing options include:
DeNoise()for noisy or grainy imagesDeskew()for tilted or incorrectly aligned scansBinarize()for documents with poor foreground/background contrastEnhanceResolution()for low-resolution inputSharpen()to improve text edges
Avoid applying every filter by default. Filters modify the input image, and unnecessary preprocessing can sometimes reduce recognition accuracy on already clean documents.
For digitally generated or high-quality PDFs, first try increasing the PDF rasterization DPI without additional preprocessing.
4. Try Advanced Scan for difficult or structured documents
For more complex documents, IronOCR also provides Advanced Scan methods powered by PaddleOCR.
These methods can be useful for noisy images, screenshots, structured documents, passports, license plates, and other inputs where the standard Tesseract-based OCR does not provide satisfactory results.
For example:
using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadPdf("document.pdf", 300);
var result = ocr.ReadDocumentAdvanced(input);
Console.WriteLine(result.Text);
Other specialized methods include:
ReadDocumentAdvanced()ReadLicensePlate()ReadPassport()ReadPhoto()ReadScreenShot()
IronOCR version note
Starting with IronOCR 2025.11.31, IronOcr.Extensions.AdvancedScan was combined into the main IronOcr package.
For recent IronOCR versions, you do not need to install a separate IronOcr.Extensions.AdvancedScan package to use these methods.
If you are using an older IronOCR version, refer to the documentation for the Advanced Scan package requirements applicable to that release.
5. Consider the accuracy/performance trade-off
Increasing DPI generally gives the OCR engine more detail to work with, but it also requires more resources.
For example:
input.LoadPdf("document.pdf", 300);
may improve the recognition of small characters compared with the default 200 DPI, while also increasing:
- Processing time
- Memory consumption
- Rasterized image size
For applications processing many documents, test different DPI values with representative samples and choose a setting that provides an appropriate balance between accuracy and performance.
Recommended troubleshooting order
When OCR output is inaccurate, try the following:
- Increase PDF rasterization DPI, starting with 300 DPI.
- Test the document again without unnecessary preprocessing filters.
- Apply only the preprocessing filters that match the actual condition of the document.
- Validate critical fields independently rather than relying only on page-level confidence.
- Try
ReadDocumentAdvanced()or another Advanced Scan method for complex or structured documents.
If the issue persists after these steps, please contact Iron Software Support and provide:
- Your IronOCR version
- Target framework
- Operating system and architecture
- A minimal reproduction code sample
- The source document or a representative sanitized sample
- The expected text and the actual OCR output
This information will help us reproduce the behavior and recommend the most appropriate configuration for your document type.