Skip to content

Commit

Permalink
Document prefer_system_executable for chrome-headless
Browse files Browse the repository at this point in the history
The recommended setup instructions for chrome-headless, which tell the user to install the dependencies globally using `npm -g install`, only work if we set `prefer_system_executable: true` in the generator options. This should definitely be mentioned in the docs, as it currently requires digging through the code to find this line: https://github.com/gutschilla/elixir-pdf-generator/blob/master/lib/pdf_generator.ex#L181
  • Loading branch information
richeterre authored Jun 16, 2019
1 parent 1938bb0 commit 863cf36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ config :pdf_generator,
pdftk_path: "/usr/bin/pdftk" # <-- only needed for PDF encryption
```

or, if you prefer shrome-headless
or, if you prefer chrome-headless

```
config :pdf_generator,
use_chrome: true, # <-- make sure you installed node/puppetteer
raise_on_missing_wkhtmltopdf_binary: false # <-- so the app won't complain about a missing wkhtmltopdf
use_chrome: true, # <-- make sure you installed node/puppeteer
prefer_system_executable: true # <-- set this if you installed the NPM dependencies globally
raise_on_missing_wkhtmltopdf_binary: false, # <-- so the app won't complain about a missing wkhtmltopdf
```

## More options
Expand Down

0 comments on commit 863cf36

Please sign in to comment.