8000 GitHub - zasource-dev/elixir-pdf: An attempt to get a nice API for PDF generation in Elixir
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

An attempt to get a nice API for PDF generation in Elixir

License

Notifications You must be signed in to change notification settings

zasource-dev/elixir-pdf

 
 

Repository files navigation

Pdf

Build Status Module Version Hex Docs Total Download License Last Updated

The missing PDF library for Elixir.

Usage

Pdf.build([size: :a4, compress: true], fn pdf ->
  pdf
  |> Pdf.set_info(title: "Demo PDF")
  |> Pdf.set_font("Helvetica", 10)
  |> Pdf.text_at({200,200}, "Welcome to Pdf")
  |> Pdf.write_to("test.pdf")
end)

Installation

Add :pdf to your list of dependencies in mix.exs:

def deps do
  [
    {:pdf, "~> 0.6"},
  ]
end

PDF Version

By default, the PDF version is set to 1.7.

If needed, the PDF version can be set by using the :version compile-time option.

NOTE: All functionality in this library is developed against the 1.7 specification, it is up to you to ensure that you use only the functionality that is available in the version you choose.

config :pdf, :version, "1.7"

Copyright and License

Copyright (c) 2016 Andrew Timberlake

This work is free. You can redistribute it and/or modify it under the terms of the MIT License. See the LICENSE.md file for more details.

About

An attempt to get a nice API for PDF generation in Elixir

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 99.5%
  • HTML 0.5%
0