marp-team/marp-cli

Experiment: File conversions using Firefox through WebDriver BiDi

yhatt opened this issue · 0 comments

Background

Mozilla and Google have announced that Puppeteer now supports WebDriver BiDi protocol. The headless Firefox could not generate PDF for a long time. But now, Firefox becomes able to generate PDF through WebDriver BiDi (Since Firefox 112: https://bugzil.la/1806810)

The support for other functions Marp CLI is depending is still in progress, but that is well worth to try to support PDF/PPTX/image conversion using Firefox.

Most Linux distributions have installed Firefox as a default browser. If implemented the auto-detection of Firefox binary path, Linux users may no longer have to worry about installed browsers. It's important because Marp ecosystem should be easy to touch for everyone.

Related pages

Related issues

Concerns

  • Currently Firefox does not support Page.pdf({ preferCSSPageSize: true }). Marp CLI conversion logic has to set the proper width and height instead of relying on Marpit's printable option.
  • Firefox emits only PNG file even if used page.screenshot with type option as another file type.