Suppress OCR Overlay on Existing Native Text in Searchable PDF Output

TRẦN NGỌC UYỂN NHI 40 Reputation points
2026-07-16T12:14:22.67+00:00

Hi Azure Document Intelligence team,

I noticed that when using the prebuilt-read model with output=pdf, the generated searchable PDF adds an OCR text layer, even if parts of the document already contain extractable native text.

This means pages with existing text end up containing two overlapping text layers—the original text and the OCR overlay—which can lead to duplicate search results and inaccurate text selection. The issue is particularly noticeable on mixed pages that contain both native text and scanned image regions, since there is currently no way to OCR only the image regions.

Is there a reason this behavior isn't supported today? Are there any plans to provide an option to suppress the OCR overlay where native text already exists?

A service-side option such as:

"ignoreExistingText": true

would allow the service to skip generating OCR text in regions that already contain extractable text, while still recognizing text from scanned images. This would eliminate duplicate text layers and avoid the need for clients to implement complex preprocessing, rasterization, and PDF reconstruction logic.

This is a well-understood problem in the PDF tooling space. Some products already expose an IgnoreExistingText option for their OCR APIs, so it would be great to see similar functionality available in Azure Document Intelligence.

Azure Document Intelligence in Foundry Tools
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-07-16T12:14:49.7466667+00:00

    There is no supported service-side option today to suppress the OCR overlay when a PDF page or region already contains native text.

    For searchable PDF output, only prebuilt-read supports output=pdf, and the documented API surface requires submitting the document and requesting PDF output. The accepted Microsoft Q&A guidance states that the service does not inspect the input PDF for an existing text layer first, and there is no request parameter such as a native-text skip flag, region mask, or partial-page OCR option. Any page sent through searchable PDF generation receives an embedded OCR text layer.

    For mixed pages, the same guidance recommends client-side handling:

    1. Detect whether each page already has extractable native text.
    2. Send only image-only pages for OCR/searchable PDF generation.
    3. For mixed pages, flatten or rasterize the page first to remove the existing text layer, then run prebuilt-read with output=pdf.
    4. Reassemble the final PDF so each page has only one coherent text layer.

    That recommendation aligns with the current product behavior that OCR is applied to the submitted page content and there is no built-in option to disable OCR only for image regions while preserving native paragraph text.

    The available context does not describe any announced plan or roadmap item for an ignoreExistingText-style feature.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.