ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - tyre/gutenex: Native PDF generation for Elixir
Native PDF generation for Elixir. Contribute to tyre/gutenex development by creating an account on GitHub.
Visit Site

GitHub - tyre/gutenex: Native PDF generation for Elixir

GitHub - tyre/gutenex: Native PDF generation for Elixir

Gutenex

Build Status

PDF generation!

So weird that it's still a thing for murderers in horror movies to keep clippings of their crimes. PDF that shit! — Julieanne Smolinkski

What started out as a wrapper for the Erlang erlguten library has turned into a full rewrite in Elixir.

Plan

Rewriting the basic PDF functionality means:

  • text
  • fonts
  • images
  • rendering/exporting
  • parsing existing PDFs
  • templating
  • documentation

Usage

  # Load image, get alias
  {alpaca_alias, alpaca_rendition} = Gutenex.PDF.Images.load("./test/support/images/alpaca.png")

  {:ok, pid} = Gutenex.start_link
  Gutenex.add_image(pid, alpaca_alias, alpaca_rendition) |>
  Gutenex.begin_text |>
  Gutenex.set_font("Helvetica", 48) |>
  Gutenex.text_position(40, 180) |>
  Gutenex.text_render_mode(:fill) |>
  Gutenex.write_text("ABC") |>
  Gutenex.set_font("Courier", 32) |>
  Gutenex.text_render_mode(:stroke) |>
  Gutenex.write_text("xyz") |>
  Gutenex.end_text |>
  Gutenex.move_to(400, 20) |>
  Gutenex.draw_image(alpaca_alias, %{
      translate_x: 300,
      translate_y: 500,
    }) |>
  Gutenex.export("./tmp/alpaca.pdf") |>
  Gutenex.stop

Now open up that file and you should see some text near the bottom and a picture of what I believe to be an alpaca. Could also be a llama.

By default, coordinates are in units of 1/72 inch as per the PDF spec. Origin is in lower left corner of the page. This is roughly 1 point in printing terms.

  Gutenex.line_width(pid, 0.01)          # very fine line
  |> Gutenex.line({{0, 0}, {500, 500}})  # up and to the right

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory