X-Ray
Pure C# NuGet packages for .NET 10: extract content from documents for search and LLMs, render office documents to PDF and images, and read Photoshop, email, iCalendar, PostScript/XPS and OneNote files, without installing an office suite or any other application.
What X-Ray is
X-Ray is a family of .NET libraries from Curiosity for working with
the files people actually have: Office documents, PDFs, email, Photoshop files, scans,
PostScript, notebooks. Each package is written in managed C# and targets net10.0. Where a
package needs a native library (SkiaSharp for rasterising, HarfBuzz for shaping, PDFium for
OCR), that dependency is in an optional package or an opt-in code path, so the core of each
package runs anywhere .NET runs.
Several members are ports of established engines rather than new designs: X-Ray.Content
follows the Rust xberg extraction engine, X-Ray.Office follows LibreOffice's layout, and
X-Ray.Psd follows the PSD engine of the Patchy image editor. Each port is checked against its
reference implementation's output.
dotnet add package X-Ray # the whole family
dotnet add package X-Ray.Content # or only the member you need
The packages
X-Ray.Content
Text, Markdown, HTML, Djot and JSON from 90+ formats: Office, PDF, HTML, email, archives, ebooks, data files. Metadata, tables, images and a structured element tree, for search indexes and LLM pipelines.
X-Ray.Office
Reads Word, Excel and PowerPoint documents, modern and legacy (docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, rtf) and renders them to PDF and images with LibreOffice's layout rules.
X-Ray.Psd
Photoshop PSD and PSB: the layer tree, compositing to PNG or JPEG, and all text. Optional X-Ray.Psd.Skia and X-Ray.Psd.Text add Skia interop and type-layer re-rendering.
X-Ray.Email
Outlook .msg, .eml and Compound File Binary containers: read, create, edit and convert between MSG and EML, with an HTML preview and attachments as files.
X-Ray.Ics
iCalendar and vCalendar files: events, to-dos, time zones, recurrence expansion, extraction of an appointment to HTML, text and Markdown, and a writer.
How the packages fit together
| Package | Answers | Output |
|---|---|---|
| X-Ray.Content | "What does this document say?" | Text and markup, metadata, tables, an element tree |
| X-Ray.Office | "What does this document look like?" | PDF pages and raster images |
| X-Ray.Psd, X-Ray.Email, X-Ray.Ics, X-Ray.PS, X-Ray.OneNote | "Give me the object model of this one format." | A typed document model, plus rendering or conversion where the format has one |
X-Ray.Content is the broad one: it covers many formats at the level a search index or a language model needs. The format packages go deep on one family of files each, with a full object model, writing where it makes sense (email), and rendering.
The X-Ray package installs every
member. It contains no code.