This commit is contained in:
18
docs/snippets/csharp/image_extraction.md
Normal file
18
docs/snippets/csharp/image_extraction.md
Normal file
@@ -0,0 +1,18 @@
|
||||
```csharp title="C#"
|
||||
using Kreuzberg;
|
||||
|
||||
var config = new ExtractionConfig
|
||||
{
|
||||
Images = new ImageExtractionConfig
|
||||
{
|
||||
ExtractImages = true,
|
||||
TargetDpi = 200,
|
||||
MaxImageDimension = 2048,
|
||||
InjectPlaceholders = true, // set to false to extract images without markdown references
|
||||
AutoAdjustDpi = true
|
||||
}
|
||||
};
|
||||
|
||||
var result = await KreuzbergLib.ExtractFileAsync("document.pdf", config);
|
||||
Console.WriteLine($"Extracted: {result.Content[..Math.Min(100, result.Content.Length)]}");
|
||||
```
|
||||
Reference in New Issue
Block a user