OxidizePdf.NET.KernelMemory 0.1.0-preview

This is a prerelease version of OxidizePdf.NET.KernelMemory.
dotnet add package OxidizePdf.NET.KernelMemory --version 0.1.0-preview
                    
NuGet\Install-Package OxidizePdf.NET.KernelMemory -Version 0.1.0-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OxidizePdf.NET.KernelMemory" Version="0.1.0-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OxidizePdf.NET.KernelMemory" Version="0.1.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="OxidizePdf.NET.KernelMemory" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OxidizePdf.NET.KernelMemory --version 0.1.0-preview
                    
#r "nuget: OxidizePdf.NET.KernelMemory, 0.1.0-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OxidizePdf.NET.KernelMemory@0.1.0-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OxidizePdf.NET.KernelMemory&version=0.1.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OxidizePdf.NET.KernelMemory&version=0.1.0-preview&prerelease
                    
Install as a Cake Tool

OxidizePdf.NET.KernelMemory

A Microsoft Kernel Memory IContentDecoder backed by oxidize-pdf. Emits one KM partition per oxidize-pdf structure-aware chunk — heading context and source page preserved.

using Microsoft.KernelMemory;
using Microsoft.KernelMemory.Handlers;
using OxidizePdf.NET.KernelMemory;

var memory = new KernelMemoryBuilder()
    .WithOpenAIDefaults(apiKey)
    .WithOxidizePdf()
    .WithoutDefaultHandlers()
    .Build<MemoryServerless>();

// Register the ingestion steps, swapping the "partition" step for ours.
memory.Orchestrator.AddHandler<TextExtractionHandler>("extract");
memory.Orchestrator.AddHandler<OxidizeChunkPartitioningHandler>("partition");
memory.Orchestrator.AddHandler<GenerateEmbeddingsHandler>("gen_embeddings");
memory.Orchestrator.AddHandler<SaveRecordsHandler>("save_records");

await memory.ImportDocumentAsync(new Document("doc").AddFile("report.pdf"));

The custom partition handler makes oxidize-pdf's chunks land in the vector store 1:1; without it Kernel Memory re-chunks the text. AddHandler throws on duplicate step names, so the defaults are skipped (WithoutDefaultHandlers) and re-registered.

Required: WithOxidizePdf() alone is not enough — it only registers the decoder. You must also register OxidizeChunkPartitioningHandler on the partition step as shown above. Without it, Kernel Memory silently falls back to its default re-chunker and oxidize-pdf's structure-aware chunks are discarded.

PDF-only: this connector's partition handler supports PDF ingestion only. In a mixed-format KM instance it throws NotSupportedException for non-PDF files. The KM packages are exact-pinned ([0.98.250508.3]) because the handler reads KM's internal ExtractedContent artifact format.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview 98 6/29/2026