This commit is contained in:
20
docs/snippets/swift/config/pdf_config.md
Normal file
20
docs/snippets/swift/config/pdf_config.md
Normal file
@@ -0,0 +1,20 @@
|
||||
```swift title="Swift"
|
||||
import Foundation
|
||||
import Kreuzberg
|
||||
import RustBridge
|
||||
|
||||
let configJson = """
|
||||
{
|
||||
"pdf_options": {
|
||||
"extract_images": true,
|
||||
"passwords": ["password123"],
|
||||
"extract_metadata": true
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
let config = try extractionConfigFromJson(configJson)
|
||||
let result = try extractFileSync("encrypted.pdf", nil, config)
|
||||
|
||||
print("Content length: \(result.content().toString().count)")
|
||||
```
|
||||
Reference in New Issue
Block a user