This commit is contained in:
20
docs/snippets/swift/config/config_ocr.md
Normal file
20
docs/snippets/swift/config/config_ocr.md
Normal file
@@ -0,0 +1,20 @@
|
||||
```swift title="Swift"
|
||||
import Foundation
|
||||
import Kreuzberg
|
||||
import RustBridge
|
||||
|
||||
let configJson = """
|
||||
{
|
||||
"ocr": {
|
||||
"backend": "tesseract",
|
||||
"language": "eng"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
let config = try extractionConfigFromJson(configJson)
|
||||
let result = try extractFileSync("scanned.pdf", nil, config)
|
||||
|
||||
print("Content length: \(result.content().toString().count)")
|
||||
print("Tables detected: \(result.tables().count)")
|
||||
```
|
||||
Reference in New Issue
Block a user