Files
fil/docs/snippets/ruby/ocr/ocr_extraction.md

13 lines
276 B
Markdown
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
```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
```