This commit is contained in:
19
docs/snippets/elixir/getting-started/basic_usage.md
Normal file
19
docs/snippets/elixir/getting-started/basic_usage.md
Normal file
@@ -0,0 +1,19 @@
|
||||
```elixir title="Elixir"
|
||||
defmodule BasicUsage do
|
||||
def extract_with_default_config do
|
||||
# Use default configuration (nil)
|
||||
config = nil
|
||||
|
||||
case Kreuzberg.extract_file_sync("document.pdf", nil, config) do
|
||||
{:ok, content} ->
|
||||
IO.puts("Extracted content:")
|
||||
IO.puts(content)
|
||||
:ok
|
||||
|
||||
{:error, reason} ->
|
||||
IO.puts("Extraction failed: #{reason}")
|
||||
:error
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
Reference in New Issue
Block a user