# `Perplexed.PdfConverter`
[🔗](https://github.com/agoodway/perplexed/blob/v0.2.0/lib/perplexed/pdf_converter.ex#L1)

The behaviour that turns PDF bytes into Markdown for a scrape.

Configure an implementation with `config :perplexed, pdf_converter:
Module`. Without one, PDF pages scrape as `{:error, :unsupported}`.

Failure atoms that mean no other scraper can help (`:needs_ocr`,
`:encrypted`, `:unsupported`) end the scrape ladder.

# `convert`

```elixir
@callback convert(binary(), filename :: String.t()) ::
  {:ok, String.t()} | {:error, atom()}
```

Converts PDF `binary` (fetched from a URL ending in `filename`) to Markdown.

# `convert`

```elixir
@spec convert(binary(), String.t(), keyword()) :: {:ok, String.t()} | {:error, atom()}
```

Converts `binary` with `opts[:pdf_converter]`, else the configured
converter.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
