php-chrome-html2pdf
php-chrome-html2pdf copied to clipboard
Feature request: configurable executablePath for chromium
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.
What would be the idea l way to resolve this?
- An extra launchOptions variable i.e.
constructor(html, options, launchOptions)so many options can be passed topuppeteer.lauch, I'd need to merge with the defaults? - Similar to (1) but use
options.launchor something? - A
options.executablePathkey, eventually someone may want another launch option
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.