Files
fil/docs/snippets/csharp/api/batch_extract_files_sync.md

22 lines
495 B
Markdown
Raw Normal View History

2026-06-01 23:40:55 +02:00
```csharp title="C#"
using Kreuzberg;
var items = new List<BatchFileItem>
{
new() { Path = "document1.pdf", Config = null },
new()
{
Path = "document2.pdf",
Config = new FileExtractionConfig { ForceOcr = true }
}
};
var config = new ExtractionConfig { OutputFormat = OutputFormat.Text };
var results = KreuzbergLib.BatchExtractFilesSync(items, config);
foreach (var result in results)
{
Console.WriteLine($"Content length: {result.Content.Length}");
}
```