php-chrome-html2pdf icon indicating copy to clipboard operation
php-chrome-html2pdf copied to clipboard

Feature request: configurable executablePath for chromium

Open zerozh opened this issue 7 years ago • 2 comments

Since chromium was installed on node_modules folder by npm install, the problem occurred me is UnhandledPromiseRejectionWarning: Error: spawn EACCES.

After investigation, I found that the chromium binary owned by someone who run composer install/npm install, with default mode 700 in my Ubuntu. but php scripts owned and run by others, www usually. I must change the owner and mode of executable binary manually.

Maybe it is helpful to make executablePath configurable.

zerozh avatar Jun 15 '18 06:06 zerozh

What would be the idea l way to resolve this?

  1. An extra launchOptions variable i.e. constructor(html, options, launchOptions) so many options can be passed to puppeteer.lauch, I'd need to merge with the defaults?
  2. Similar to (1) but use options.launch or something?
  3. A options.executablePath key, eventually someone may want another launch option

mnightingale avatar Oct 14 '22 10:10 mnightingale

I think it would generally be a nice feature to have custom options that can be passed down to Puppeteer. This would solve multiple issues.

spiritix avatar Oct 25 '22 13:10 spiritix