# `PDFRedlines`
[🔗](https://github.com/EnaiaInc/pdf_redlines/blob/v0.7.2/lib/pdf_redlines.ex#L1)

Fast PDF redline extraction via a Rust NIF (MuPDF).

This module wraps the native NIF results into Elixir structs for
a stable public API.

# `extract_redlines`

```elixir
@spec extract_redlines(Path.t(), keyword() | map()) ::
  {:ok, PDFRedlines.Result.t()} | {:error, term()}
```

Extract redlines from a PDF file path.

## Options

Pass a keyword list or map to tune detection thresholds. Supported keys:

- `:red_r_min`
- `:red_g_max`
- `:red_b_max`
- `:blue_r_max`
- `:blue_g_max`
- `:blue_b_min`
- `:formatting_bar_height_max`
- `:formatting_bar_width_min`
- `:line_bar_height_max`
- `:line_bar_width_min`
- `:stroke_line_y_tolerance`
- `:stroke_line_width_min`
- `:line_break_height_ratio`
- `:same_line_y_tolerance`
- `:merge_x_gap_max`
- `:merge_line_height_min_ratio`
- `:merge_line_height_max_ratio`
- `:margin_end_ratio`
- `:margin_start_ratio`
- `:pair_x_gap_max`
- `:page_width_fallback`
- `:line_height_fallback`

# `extract_redlines_from_binary`

```elixir
@spec extract_redlines_from_binary(binary(), keyword() | map()) ::
  {:ok, PDFRedlines.Result.t()} | {:error, term()}
```

Extract redlines from PDF binary content.

---

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