I have done this previously with PDF generator to build printable receipt, with background image… but it was in Ruby, with prawn.
I guess I would use pdf_generator w/ Elixir, but I have not done this yet.
For simple card printing, You could use a special stylesheet for printing purpose and include it like this.
<link rel="stylesheet" type="text/css" href="print.css" media="print">
This allows to define what, and what not to print.






















