elixir-pdf-generator icon indicating copy to clipboard operation
elixir-pdf-generator copied to clipboard

docs seem wrong for using chrome

Open jdewar opened this issue 4 years ago • 0 comments

rather than deal with wkhtmltopdf and flexbox, i've moved to chrome. the docs suggest this for using chrome-headless

config :pdf_generator,
    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

as best as i can tell, use_chrome: true doesn't work, and prefer_system_executable: true doesn't work in config.exs

i believe that config only works here, and like this:

|> PdfGenerator.generate_binary(
  generator: :chrome,
  prefer_system_executable: true
)

jdewar avatar Jun 16 '20 15:06 jdewar