gutschilla / elixir-pdf-generator

Create PDFs with wkhtmltopdf or puppeteer/chromium from Elixir.
MIT License
330 stars 71 forks source link

Please don't remove xvfb-run option #64

Closed kiere closed 4 years ago

kiere commented 4 years ago

https://github.com/gutschilla/elixir-pdf-generator/blob/master/README.md#optional-dependencies

In order for us to use pdf_generator with wkhtmltopdf on Gigalixir using Releases, I have to use the following configuration in order for my app to be able to take advantage of wkhtmltopdf.

config :pdf_generator,
  command_prefix: ["xvfb-run", "-a"],
  delete_temporary: true

Gigalixir runs with the Heroku Cedar-14 stack. This stack includes wkhtmltopdf, but I'm having a challenging time getting pdf_generator installed in "headless chrome" mode since I can't globally install npm modules. I took a break from exploring options with custom buildpacks and will hopefully discover a way to get pdf_generator to work with headless Chrome eventually since this would provide several advantages to our users.

gutschilla commented 4 years ago

Hi @kiere , Thanks for the feedback! Since nobody told me about it I just assumed that this feature wasn't in use. So as it's being used, I'll keep it. Again, thanks for the feedback - it's very valuable for me. Best regards, Martin

gutschilla commented 4 years ago

removed feature deprecation from README

paulstatezny commented 4 years ago

@kiere I'm sorry this is slightly off topic, but now that Gigalixir uses heroku-18, are you still able to use wkhtmltopdf?

I couldn't find a way (via buildpack, etc) to get xvfb on the machine, and I too am unable to get the Chrome solution working on Gigalixir.