This commit is contained in:
12
docs/snippets/ruby/ocr/ocr_extraction.md
Normal file
12
docs/snippets/ruby/ocr/ocr_extraction.md
Normal file
@@ -0,0 +1,12 @@
|
||||
```ruby title="Ruby"
|
||||
require 'kreuzberg'
|
||||
|
||||
ocr_config = Kreuzberg::OcrConfig.new(
|
||||
backend: 'tesseract',
|
||||
language: 'eng'
|
||||
)
|
||||
|
||||
config = Kreuzberg::ExtractionConfig.new(ocr: ocr_config)
|
||||
result = Kreuzberg.extract_file_sync('scanned.pdf', config: config)
|
||||
puts result.content
|
||||
```
|
||||
Reference in New Issue
Block a user