This commit is contained in:
21
docs/snippets/csharp/api/batch_extract_files_sync.md
Normal file
21
docs/snippets/csharp/api/batch_extract_files_sync.md
Normal file
@@ -0,0 +1,21 @@
|
||||
```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}");
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user