Popplex.NIF (Popplex v0.2.0)
View SourceLow-level NIF interface to Poppler C++ library.
This module provides direct access to the NIF functions.
Most users should use the Popplex module instead.
Summary
Functions
Combines multiple PDF files into one.
Gets the page count of a PDF file.
Gets text content from a PDF file.
Renders PDF page(s) to image(s).
Functions
Combines multiple PDF files into one.
Parameters:
input_files: List of PDF file paths to combineoutput_file: Path for the output PDF file
Returns {:ok, output_path} or {:error, reason}.
Note: This function is currently not implemented in the C++ layer.
Gets the page count of a PDF file.
Returns {:ok, count} or {:error, reason}.
Gets text content from a PDF file.
Parameters:
path: Path to the PDF filepage: Page number (0-indexed) or -1 for all pages
Returns {:ok, text} or {:error, reason}.
Renders PDF page(s) to image(s).
Parameters:
path: Path to the PDF filepage: Page number (0-indexed) or -1 for all pagesformat: 0 for PNG, 1 for JPEGdpi: Resolution in dots per inchquality: JPEG quality (1-100), ignored for PNG
Returns:
{:ok, binary}for single page{:ok, [binary]}for all pages{:error, reason}on failure