Get started

Every X-Ray package is a NuGet package targeting net10.0. Install the all-in-one X-Ray package to get the whole family, or install the one member you need.

dotnet add package X-Ray

Installation

The all-in-one package and the individual members, requirements, and which packages bring native code.

Choose a package

Which package to use for a task or a file type, and when to combine two.

Cancellation and streaming

How every package takes a CancellationToken, reports cancellation and writes large results to streams.

A first extraction

X-Ray.Content reads the widest range of formats, so it is the usual starting point. This reads a document and prints it as Markdown:

using XRay.Content.Core;

var result = new Extractor().Extract(
    ExtractInput.FromUri("quarterly-report.pdf"),
    new ExtractionConfig { OutputFormat = OutputFormat.Markdown });

var doc = result.Results[0];
Console.WriteLine(doc.MimeType);   // application/pdf
Console.WriteLine(doc.Content);    // the document as Markdown

The X-Ray.Content section covers output formats, metadata, tables and the optional OCR pass. Each of the other packages has a section of its own with a quick start.