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

Update knit_print.webshot so that images are included at normal size #41

Open
wch opened this issue May 30, 2017 · 2 comments
Open

Update knit_print.webshot so that images are included at normal size #41

wch opened this issue May 30, 2017 · 2 comments

Comments

@wch
Copy link
Owner

wch commented May 30, 2017

The intro vignette has some code that sizes the screenshots for inclusion in an Rmd document, but it would be nice if that were not necessary.

This will require some changes to knit_print.webshot as well as in the knitr package.

cc @yihui

@vnijs
Copy link

vnijs commented Jul 13, 2017

Not sure if this is related but ... automatic sizing seems to work fine on mac but not so much on Windows. Using webshot 0.4.1 and the Rmd below the DT table covers the full width of the page on Mac but is very small on Windows (see screenshot of the windows pdf below). Same effect occurs with other htmlwidgets (e.g., DiagrammeR and plotly)

cc @yihui

---
title: "Widget Size"
output:
  pdf_document: default
---

```{r}
DT::datatable(iris)
```

image

@vnijs
Copy link

vnijs commented Aug 20, 2017

@wch Can you suggest a workaround for widget screenshot sizing for Rmd-to-Word and/or Rmd-to-PDF on Windows? Although this works fine on Mac, the default size on Windows is so small that it isn't really usable.

cc @yihui

FYI Screenshot on Mac shown below for reference

image

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