NativeElixirPdfUtilities.Merge (native_elixir_pdf_utilities v0.15.0)

View Source

PDF utilities for merging documents through the shared native reader.

The merger rebuilds its output with a new PDF 1.7 catalog, flat page tree, cross-reference table, and trailer. It resolves modern input structures, rewrites active indirect references, materializes inherited page values, and preserves stream bytes.

Summary

Functions

Merges a non-empty list of PDF binaries into one rebuilt PDF.

Types

error_reason()

@type error_reason() ::
  :empty_pdf_list | NativeElixirPdfUtilities.Pdf.Reader.error_reason()

pdf_bin()

@type pdf_bin() :: binary()

Functions

merge(inputs)

@spec merge([pdf_bin()]) ::
  {:ok, pdf_bin()}
  | {:error,
     {error_reason(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}

Merges a non-empty list of PDF binaries into one rebuilt PDF.

Input page order determines output page order. Catalog-level structures such as outlines, named destinations, and forms are not preserved.