This commit is contained in:
17
docs/snippets/csharp/api/batch_extract_bytes_sync.md
Normal file
17
docs/snippets/csharp/api/batch_extract_bytes_sync.md
Normal file
@@ -0,0 +1,17 @@
|
||||
```csharp title="C#"
|
||||
using Kreuzberg;
|
||||
|
||||
var items = new List<BatchBytesItem>
|
||||
{
|
||||
new() { Content = await File.ReadAllBytesAsync("doc1.pdf"), MimeType = "application/pdf", Config = null },
|
||||
new() { Content = await File.ReadAllBytesAsync("doc2.txt"), MimeType = "text/plain", Config = null }
|
||||
};
|
||||
|
||||
var config = new ExtractionConfig { OutputFormat = OutputFormat.Text };
|
||||
var results = KreuzbergLib.BatchExtractBytesSync(items, config);
|
||||
|
||||
foreach (var result in results)
|
||||
{
|
||||
Console.WriteLine($"Content length: {result.Content.Length}");
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user