Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] File conversions using Firefox through WebDriver BiDi #565

Closed
yhatt opened this issue Dec 19, 2023 · 2 comments · Fixed by #603
Closed

[v4] File conversions using Firefox through WebDriver BiDi #565

yhatt opened this issue Dec 19, 2023 · 2 comments · Fixed by #603
Labels
enhancement New feature or request

Comments

@yhatt
Copy link
Member

yhatt commented Dec 19, 2023

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.
@ErnestoHoro
Copy link

Thank you for this one. I've tried marp for the first time and gave it a quick test, looks promising so far (on a machine with macOS 14.6.1 / Firefox 128.0).

Also have Vivaldi installed; I wonder if it complies to the requirements, as a Chromium derivative, and support would be of interest.

@yhatt yhatt changed the title Experiment: File conversions using Firefox through WebDriver BiDi [v4] File conversions using Firefox through WebDriver BiDi Sep 28, 2024
@yhatt
Copy link
Member Author

yhatt commented Sep 28, 2024

@ErnestoHoro Thank you for your early feedback too. The Chromium-flavored browsers such as Vivaldi should be compatible with Marp CLI, and you can test setting the path to Vivaldi as CHROME_PATH environment variable.

In v4, I'm going to implement a convenient option --browser-path.

@yhatt yhatt moved this to In Progress in Marp Roadmap Sep 28, 2024
@yhatt yhatt closed this as completed in #603 Oct 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done ✅ in Marp Roadmap Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants