This commit is contained in:
23
docs/snippets/csharp/pdf_config.md
Normal file
23
docs/snippets/csharp/pdf_config.md
Normal file
@@ -0,0 +1,23 @@
|
||||
```csharp title="C#"
|
||||
using Kreuzberg;
|
||||
|
||||
var config = new ExtractionConfig
|
||||
{
|
||||
PdfOptions = new PdfConfig
|
||||
{
|
||||
ExtractImages = true,
|
||||
ExtractMetadata = true,
|
||||
Passwords = new List<string> { "password1", "password2" },
|
||||
Hierarchy = new HierarchyConfig
|
||||
{
|
||||
Enabled = true,
|
||||
KClusters = 6,
|
||||
IncludeBbox = true,
|
||||
OcrCoverageThreshold = 0.5f
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var result = await KreuzbergLib.ExtractFileAsync("document.pdf", config);
|
||||
Console.WriteLine($"Content: {result.Content[..Math.Min(100, result.Content.Length)]}");
|
||||
```
|
||||
Reference in New Issue
Block a user