Get the text out of your documents without sending them anywhere.

Extractor runs inside your own Doconut application, with no network calls and no AI models. Documents never leave your server, and on the same Doconut version the same document always gives the same JSON, so results are easy to test, compare and index.

From your code, a widget or your own page.

Call it from C# in a background job, drop the ready-made widget into a page, or build your own interface on the documented endpoints.

From your C# code

Extract a file path, stream or byte array in one call and work with the result as objects.

With the ready-made widget

Users drop a file, see every extracted block and download the result as JSON or Markdown.

From your own interface

Three documented endpoints cover upload, extraction and download.

The widget works on its own or next to a Doconut viewer.

Structured text you can rely on

Ordered blocks with their page and position, document metadata, and a clear report of anything hidden.

Deterministic JSON

The same document gives the same JSON on the same Doconut version, so results are easy to test and compare.

Readable Markdown

A Markdown copy of the same result, with headings, lists and tables, and anchors that link each block back to the document.

Optional OCR

Install the optional OCR package and pages without a text layer, such as scans, are read too. Pages that already have text are not sent to OCR.

Hidden content reported apart

Hidden text, comments, tracked changes, hidden sheets and speaker notes are listed separately, never mixed into the extracted text.

Jump to the source

Click an extracted block and the Doconut viewer goes to its page and highlights it.

No silent truncation

If a document is larger than the page or cell limits, extraction stops with an error instead of returning part of it.

Doconut Extractor widget with Download JSON and Download Markdown options

JSON for your code, Markdown for people.

Every extraction gives you both views of the same result.

Deterministic JSON

The source of truth for your pipeline: a stable layout and the same output for the same input.

Readable Markdown

A clean copy with headings, lists and tables, plus anchors that point back to each block.

Extract document text in C#.

Register Extractor inside AddDoconut, resolve DocumentExtractor from dependency injection and call ExtractAsync. This excerpt combines the documented registration and basic extraction snippets; the surrounding application supplies builder, app, ct and the required imports.

Program.cs
builder.Services.AddDoconut(options =>
{
    options.LicensePath = "Doconut.Viewer.lic";
    options.AddPlugin<Doconut.Plugins.Extractor.ExtractorPlugin>();
});

var extractor = app.Services.GetRequiredService<DocumentExtractor>();
ExtractionResult result = await extractor.ExtractAsync("contract.docx", ct: ct);
Open the live demo
Extracted table block highlighted on its page in the Doconut viewer

Choose the package for your Doconut application.

Install the Extractor package at the same version as its matching Doconut core package. OCR requires the optional engine package for that framework.

.NET 8

Doconut.NET8.Extractor; optional OCR: Doconut.NET8.Engines.Ocr. Windows and glibc-based Linux x64 (not Alpine/musl).

.NET 6

Doconut.NET6.Extractor; optional OCR: Doconut.NET6.Engines.Ocr. Windows and glibc-based Linux x64 (not Alpine/musl).

.NET Standard

Doconut.NETStandard.Extractor; optional OCR: Doconut.NETStandard.Engines.Ocr.

.NET Framework 4.7.2

Doconut.NETFramework.Extractor; optional OCR: Doconut.NETFramework.Engines.Ocr.

License the Extractor capability.

Extractor requires a license granting the Extractor capability. Place Doconut.Viewer.Extractor.lic beside Doconut.Viewer.lic.

Evaluation

Temporary Demo/NFR licenses are accepted and produce output with an evaluation watermark.

Production

A paid license granting Extractor, used within its version window, produces output without the evaluation watermark.

Startup validation

AddDoconut() throws at startup for a missing license, a legacy TRIAL file, a license without Extractor or a paid license outside its version window.

License deployment

Supply the license through LicenseStream, LicenseContent or LicensePath, in that precedence order. Restart the application after changing the license.

Extractor Plugin pricing

Choose the license that matches how you deploy document text extraction in your Doconut application.

LicensePriceBest forIncludes
Developer License
$299
One developer building or maintaining a Doconut extraction integration.Licensed access to the Extractor plugin for development and project implementation.
Site License
$899
A production deployment owned by one organization.Document text extraction for site-level deployments that need predictable commercial coverage.
SDK License
$1,999
Teams embedding Doconut into redistributed or multi-client software.Broader licensing for SDK-style distribution and customer-facing product scenarios.

Prices shown are for the Extractor plugin add-on. Final licensing terms depend on your Doconut license type and deployment model.

Buy Extractor Plugin

Where the Extractor fits

Any .NET application that needs the text inside its documents.

Indexing PDF, Word and Excel content for search in your own application.
Feeding document text into your own processing pipeline as JSON.
Reading scanned pages with the optional OCR package.
Pulling tables out of spreadsheets with their sheet names and cell ranges.
Checking documents for hidden text, comments or tracked changes before sharing them.
Letting users click from an extracted block to its place in the document.

Extraction runs on your own server; no document is sent to an external service.

Document text extraction SDK for .NET FAQ

API details for PDF extraction, document to Markdown workflows and OCR integration.

How do I extract text from PDF, Word and Excel in C#?

Resolve DocumentExtractor from dependency injection and call DocumentExtractor.ExtractAsync with a supported document. The Extractor documentation names PDF, Word and Excel inputs. The returned ExtractionResult contains ordered blocks, metadata, hidden content information and warnings; use ExtractionResult.ToJson() or ExtractionResult.ToMarkdown() for output.

How do I convert PDF to JSON in C# with deterministic output?

Call DocumentExtractor.ExtractAsync with the PDF, then call ExtractionResult.ToJson() on the result. For the same input and SDK version, ToJson() produces identical JSON byte for byte. For pages processed by OCR, this guarantee also requires the same OCR engine version.

How do I convert a document to Markdown in .NET?

Call DocumentExtractor.ExtractAsync, then use ExtractionResult.ToMarkdown() to create a readable view of the extracted result. The Markdown begins with YAML front matter and places a <!-- ref:<id> --> anchor before each block for viewer linking. ExtractionResult.ToJson() remains the source of truth.

How do I integrate OCR into a .NET document processing app?

For .NET 8, install Doconut.NET8.Engines.Ocr alongside Doconut.NET8.Extractor and use ExtractOptions.Ocr = OcrMode.Auto. OcrMode.Auto processes only pages without a native text layer; OcrMode.Off disables OCR. Check ExtractionResult.Warnings for ExtractionWarningCodes.OcrUnavailable when pages without text could not be read.

Does the extractor work in an air-gapped environment?

DocumentExtractor.ExtractAsync processes documents entirely on your server without network calls or AI models, and the document stays on your host. For scanned pages, install the optional OCR engine package and use ExtractOptions.Ocr = OcrMode.Auto. ExtractionResult.Warnings reports ExtractionWarningCodes.OcrUnavailable if OCR cannot read pages because the engine is missing, unlicensed or unavailable on the platform.

Does document text extraction include hidden text or spreadsheet comments?

Doconut Extractor reports hidden text, comments, tracked changes and hidden spreadsheet sheets, rows and columns through ExtractionResult.Hidden rather than ExtractionResult.Blocks. ExtractOptions.IncludeHidden is reserved and does not enable extraction of that content into Blocks. ExtractOptions.CheckVisibility controls render-based visibility checks for PDF and XPS; if rendering fails, ExtractionWarningCodes.VisibilityUnchecked warns that some visually hidden text may remain.

Can I extract text from a password-protected document in C#?

Use DocumentExtractor.ExtractAsync with ExtractOptions.Password to supply a document password through the C# API. The Extractor widget does not accept a password, so use the C# API for this workflow.

What happens when a document exceeds the extraction limits?

ExtractOptions.MaxPages defaults to 500, and ExtractOptions.MaxCells defaults to 1,000,000 for spreadsheets. Exceeding either limit fails extraction instead of returning a truncated result. MaxCells counts cells in the used ranges of visible sheets, including empty cells within those ranges.

Prova, costruisci, acquista

Vedi il funzionamento prima di installare qualsiasi cosa

Turn PDF, Word and spreadsheet files into structured JSON or Markdown on your own server, without sending them to an external service. The live demo shows the Viewer and the Annotation, Search, Converter and Signer plugins on sample documents.

La demo live funziona su documenti di esempio. Nessuna registrazione, nessuna installazione.

Aggiungilo al tuo progetto

Inizia con il pacchetto NuGet, poi segui la guida di configurazione per il tuo framework.

dotnet add package Doconut.NET8.Extractor
Leggi la guida di configurazione