Imports, composes, and inspects PDF documents without external executables.
Binary import supports unencrypted PDFs using direct objects and traditional page trees. Encrypted PDFs and compressed object streams are rejected with structured errors.
Summary
Functions
Composes several PDF binaries or documents in order.
Imports selected one-based pages from a PDF or PaperForge document.
Parses a PDF binary into a composable document object graph.
Returns reusable font, XObject, embedded-file, and appearance resources.
Types
@type source() :: PaperForge.Document.t() | binary()
Functions
@spec compose( [source()], keyword() ) :: {:ok, PaperForge.Document.t()} | {:error, term()}
Composes several PDF binaries or documents in order.
@spec import_pages(source(), Range.t() | [pos_integer()] | :all, keyword()) :: {:ok, PaperForge.Document.t()} | {:error, term()}
Imports selected one-based pages from a PDF or PaperForge document.
@spec parse_pdf( binary(), keyword() ) :: {:ok, PaperForge.Document.t()} | {:error, term()}
Parses a PDF binary into a composable document object graph.
@spec resources(PaperForge.Document.t()) :: map()
Returns reusable font, XObject, embedded-file, and appearance resources.