This commit is contained in:
18
docs/snippets/csharp/config/document_structure_config.md
Normal file
18
docs/snippets/csharp/config/document_structure_config.md
Normal file
@@ -0,0 +1,18 @@
|
||||
```csharp title="Document Structure Config (C#)"
|
||||
using Kreuzberg;
|
||||
|
||||
var config = new ExtractionConfig
|
||||
{
|
||||
IncludeDocumentStructure = true
|
||||
};
|
||||
|
||||
var result = KreuzbergLib.ExtractFileSync("document.pdf", config);
|
||||
|
||||
if (result.Document is not null)
|
||||
{
|
||||
foreach (var node in result.Document.Nodes)
|
||||
{
|
||||
Console.WriteLine($"[{node.Content.NodeType}]");
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user