Pagedown: Add support for Edge with Chromium in find_chrome

Created on 18 Jan 2020  路  6Comments  路  Source: rstudio/pagedown

As discussed with @RLesur, New Edge browser is [officially out and it is based on Chromium now, offering the Chrome Devtools Protocol - same one as in Chrome or Chromium headless.

Here are some ressources on this new version:

I tested that it works with crrri, our R 馃摝 for interfacing with chrome devtools protocol in browser.

Then I tested with pagedown::chrome_print and it works perfectly find just by changing the binary

Sys.setenv(PAGEDOWN_CHROME = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe")
pagedown::chrome_print("https://pagedown.rbind.io/", output = "pagedown.pdf")

First good news: pagedown::chrome_print works find with new Edge ! 馃帀

For all those who can't have access to chrome or chromium on their computer, but have Edge in the newer version, it could be nice to support Edge browser in find_chrome or at least mention in the doc it works with Edge Chromium.

The logic could be:

  • Find chrome on windows
  • If not found find Edge and check the version to see if it supports chromium

馃し鈥嶁檪 Or there could be a pagedown::edge_print with a find_edge ? 馃槈 馃槃

help wanted

Most helpful comment

I tried this command on Linux and it worked perfectly

Sys.setenv(PAGEDOWN_CHROME = "/usr/bin/brave")
pagedown::chrome_print("https://pagedown.rbind.io/", output = "pagedown.pdf")

I just hope that it didn't use my Chromium install I also have on my machine.

All 6 comments

Hi @cderv,

We can also add the Brave browser to the list of browser we can support, it's also based on Chromium.
Thanks

Thanks @dickoa .
Did you try to print a pdf using chrome_print with this browser ? Does it work out of the box ?

I tried this command on Linux and it worked perfectly

Sys.setenv(PAGEDOWN_CHROME = "/usr/bin/brave")
pagedown::chrome_print("https://pagedown.rbind.io/", output = "pagedown.pdf")

I just hope that it didn't use my Chromium install I also have on my machine.

Cool ! Great News ! 馃憤
Thank you !

I don't have access to a Windows computer with the new Edge.
Is someone interested in sending a PR?

I have one but I did not found time yet. If anyone would do it in the meantime, that is great !

Was this page helpful?
0 / 5 - 0 ratings