This commit is contained in:
15
docs/snippets/elixir/config/tesseract_config.md
Normal file
15
docs/snippets/elixir/config/tesseract_config.md
Normal file
@@ -0,0 +1,15 @@
|
||||
```elixir title="Elixir"
|
||||
config_json = Jason.encode!(%{
|
||||
"ocr" => %{
|
||||
"backend" => "tesseract",
|
||||
"language" => "eng+deu",
|
||||
"tesseract_config" => %{
|
||||
"psm" => 6,
|
||||
"oem" => 3
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
{:ok, result} = Kreuzberg.extract_file_sync("scanned.pdf", "application/pdf", config_json)
|
||||
IO.puts("OCR text: #{result.content}")
|
||||
```
|
||||
Reference in New Issue
Block a user