This commit is contained in:
18
docs/snippets/swift/config/document_structure_config.md
Normal file
18
docs/snippets/swift/config/document_structure_config.md
Normal file
@@ -0,0 +1,18 @@
|
||||
```swift title="Swift"
|
||||
import Foundation
|
||||
import Kreuzberg
|
||||
import RustBridge
|
||||
|
||||
let configJson = """
|
||||
{
|
||||
"include_document_structure": true
|
||||
}
|
||||
"""
|
||||
|
||||
let config = try extractionConfigFromJson(configJson)
|
||||
let result = try extractFileSync("document.pdf", nil, config)
|
||||
|
||||
if let document = result.document() {
|
||||
print("Document nodes: \(document.nodes().count)")
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user