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

remove dependency to phantomJS? #392

Closed
randomgambit opened this issue Jun 6, 2019 · 11 comments
Closed

remove dependency to phantomJS? #392

randomgambit opened this issue Jun 6, 2019 · 11 comments

Comments

@randomgambit
Copy link

Hello @haozhu233 !

I was wondering if there is a way to use save_as_image() without using the phantomJS dependency. Indeed, the project is dead ariya/phantomjs#15344

Saving as images is very important (say to share via email for instance) but I feel the package requirements are too complex here. What do you think?

@randomgambit
Copy link
Author

Hi @haozhu233 ! did you get a chance to look at that? Thanks!

@haozhu233
Copy link
Owner

@randomgambit I did look at that project after you mention it the other day but didn't really think about this. Basically all I did here is use webshot, which uses phantomjs on the backend. Do you have any thoughts on what we can use to take a picture from HTML? Since HTML pages need to be loaded for the css to take effect, I think some level of js is necessary.

@randomgambit
Copy link
Author

@haozhu233 thanks for the reply. I have seen a couple of headless javascript capable browsers. What about https://github.com/hrbrmstr/htmlunit ? That looks promising. The big issue with the current approach is that it requires to install an external component (phnsomJS) which I cant do at work AND that component is not maintained anymore (stuff will break in the future).

What do you think?
Thanks!

@randomgambit
Copy link
Author

according to the author this one is an alternative to phantomJS. could be a good idea too!
hrbrmstr/splashr#18

@haozhu233
Copy link
Owner

We will switch to this one in the future.

https://github.com/rstudio/webshot2

@randomgambit
Copy link
Author

why not now? :D

@randomgambit
Copy link
Author

@haozhu233 what I mean is can we try a beta version of kableExtra with webshot2? Happy to report any bugs or errors!

@randomgambit
Copy link
Author

Hi @haozhu233 how are you? Any plans on using webshot2 soon?
Thanks!

@haozhu233
Copy link
Owner

haozhu233 commented Aug 19, 2020

@randomgambit After so many months, I just reviewed webshot2 again and I realized it also requires users to install Chrome... Although I think many people do have chrome installed, it does add a non-trivial dependency requirement. Say if the US government prohibited google's business activities in China or any other countries in the future, it will become an issue. (just saying).

I mean stopping maintaining isn't too terrible as long as it's still usable and there isn't a terrible security bug... Bootstrap 3 is also dead but we are still using it. :P So I guess I tend to keep using webshot. What do you think?

@randomgambit
Copy link
Author

@haozhu233 well at the same time using a deprecated soft can be source of unfixable bugs, malwares and other technical issues. Even if chrome is blocked at work (which is not), one could at least use his personal computer at home to use webshot2 dont you think?

@haozhu233
Copy link
Owner

@randomgambit well, the bottomline is that webshot2 is not on CRAN so that's basically a no for this option. At the same time, installing chrome on HPC or a linux server with strict access control can be another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants