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

png without V8? #1

Closed
vnijs opened this issue Mar 25, 2016 · 5 comments
Closed

png without V8? #1

vnijs opened this issue Mar 25, 2016 · 5 comments

Comments

@vnijs
Copy link

vnijs commented Mar 25, 2016

Just curious ... is a conversion from mermaid svg to png possible without V8 at this time?

@timelyportfolio
Copy link

Should be possible with the new webshot, which doesn't require V8 but does require phantom.js. Would this be an option?

@vnijs
Copy link
Author

vnijs commented Mar 26, 2016

I don't think so unfortunately. I posted wch/webshot#20: "Ideally, I'd like to press a button to take a screenshot of the current page in a shiny app, store the image, and then put a reference to the screenshot into an knitr document in the app or into Rstudio." but @wch suggested this won't work.

Also, I just noticed that you cannot get htmlwidgets into a PDF or Word document from Rstudio at all. Converting to PNG inside knitr / rmarkdown would be really nice. I was hoping that maybe something like https://github.com/jeroenooms/rsvg could be used somehow?

cc: @ramnathv

@ramnathv
Copy link

I think @yihui was working on something to this effect that will allow screenshots of htmlwidgets in rmd documents that are converted to pdf.

@yihui
Copy link

yihui commented Mar 26, 2016

It has been done. You just need the dev version of knitr. See https://bookdown.org/yihui/bookdown/html-widgets.html

BTW @vnijs your issue was different.

@vnijs
Copy link
Author

vnijs commented Mar 28, 2016

Thanks @yihui. Rendering of DiagrammeR plots in HTML, Word, and PDF from Rstudio works. Nice!

The issue I posted earlier on the webshot github repot was about taking a screen shot of the page I'm looking at in my browser. I guess for that you would need something like: https://github.com/niklasvh/html2canvas

@vnijs vnijs closed this as completed Jul 18, 2016
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

4 participants