Elixir bindings for pdf_oxide, a high-performance PDF library written in Rust.
Summary
Functions
Extracts the text content of the page at the given zero-based index.
Extracts the text content of the page at the given zero-based index, raising an error if it fails.
Opens a PDF document from the given binary data.
Opens a PDF document from the given binary data, raising an error if it fails.
Opens a PDF document from the specified file path.
Opens a PDF document from the specified file path, raising an error if it fails.
Returns the number of pages in the given PDF document.
Returns the number of pages in the given PDF document, raising an error if it fails.
Returns the PDF specification version of the given document as a {major, minor} tuple.
Returns the PDF specification version of the given document, raising an error if it fails.
Types
Functions
@spec extract_text(t(), non_neg_integer()) :: {:ok, binary()} | {:error, term()}
Extracts the text content of the page at the given zero-based index.
@spec extract_text!(t(), non_neg_integer()) :: binary()
Extracts the text content of the page at the given zero-based index, raising an error if it fails.
Opens a PDF document from the given binary data.
Opens a PDF document from the given binary data, raising an error if it fails.
Opens a PDF document from the specified file path.
Opens a PDF document from the specified file path, raising an error if it fails.
@spec page_count(t()) :: {:ok, non_neg_integer()} | {:error, term()}
Returns the number of pages in the given PDF document.
@spec page_count!(t()) :: non_neg_integer()
Returns the number of pages in the given PDF document, raising an error if it fails.
@spec version(t()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | {:error, term()}
Returns the PDF specification version of the given document as a {major, minor} tuple.
@spec version!(t()) :: {non_neg_integer(), non_neg_integer()}
Returns the PDF specification version of the given document, raising an error if it fails.