Install ChromicPDF
mainChromicPDF is a supervision tree rather than a standalone application. To use it, you must add it to your runtime dependencies and include it in your application's supervision tree.
1. Add dependency
Add {:chromic_pdf, "~> 1.17"} to your mix.exs file.
2. Start in supervision tree
Add ChromicPDF to your list of children in your application's start/2 function.
# mix.exs
def deps do
[ {
:chromic_pdf,
"~> 1.17"
}
]
end
# lib/my_app/application.ex
def MyApp.Application do
def start(_type, _args) do
children = [
# other apps...
ChromicPDF
]
Supervisor.start_link(children, strategy: :one_for_one, name: MyApp.Supervisor)
end
end