ExPdfCore

Hex.pmDocsLicense

Core PDF writer engine for Elixir — document, page, export, fonts, images, graphics state, and layout primitives. Uses only the Erlang/OTP standard library. No Hex runtime dependencies, no system tools.

Part of the ExPDF umbrella.

Installation

def deps do
  [
    {:ex_pdf_core, "~> 1.0"}
  ]
end

Most users should depend on ex_pdf instead, which bundles core, components, and the reader.

What's included

Usage

Pdf.build([size: :a4, compress: true], fn pdf ->
  pdf
  |> Pdf.set_font("Helvetica", 12)
  |> Pdf.text_at({200, 200}, "Hello, world!")
  |> Pdf.add_image({100, 100}, "logo.png")
end)
|> Pdf.export()

License

MIT. See LICENSE.md.