Closed PJUllrich closed 5 years ago
Hi @PJUllrich - there's a configuration option for this. Unfortunately it's more or less undocumented:
config :pdf_generator,
raise_on_missing_wkhtmltopdf_binary: false
The dafault is true
, hence the error.
I will log this as bug, since it's only visible if you look at the module docs for PdfGenerator
. It should be in the README.
Oh and thanks a lot for reporting
Hey @gutschilla thank you for your answer! I managed to get it to work with your mentioned workaround, so thank you very much!
Sorry, this should probably be open until a fix is ready ;)
@PJUllrich - great to hear it's working.
The idea behind the error was to immediately crash on startup when the binary wasn't there (so no PDF could be generated anyways).
Then support for Chrome was added ... and the configuration option that never made a lot of sense using suddenly became viable to use ;-)
Fixed in https://github.com/gutschilla/elixir-pdf-generator/commit/1938bb09b4f5ffaf3b68c44dad9b13c097f11acb
Will be included in next release.
@PJUllrich please let me know if that would have gotten you to the missing option in the first place. Thanks for reporting, again!
Looks good to me! Thank you!
Hi, @gutschilla I am experiencing the same issue as @PJUllrich stated above and Currently I am using Ubuntu 20.04
, as per 1938bb0
it is fixed for Ubuntu 18
does this also apply for Ubuntu 20? For now I have fixed this issue with:
config :pdf_generator, raise_on_missing_wkhtmltopdf_binary: false
I'm having problems running this without installing
wkhtmltopdf
. The documentation says that one needs eitherwkhtmltopdf
orchromium
, so I installedchromium
.However, when I start the application with
mix phx.server
, the following error occurs:So, is
wkhtmltopdf
required when I only want to usechromium
as well?My Setup
I installed
chromium
locally with:I added this to
config/config.exs
:And added
:pdf_generator
toapplication
: