{"action":"created","issue":{"url":"https://api.github.com/repos/yihui/knitr/issues/1294","repository_url":"https://api.github.com/repos/yihui/knitr","labels_url":"https://api.github.com/repos/yihui/knitr/issues/1294/labels{/name}","comments_url":"https://api.github.com/repos/yihui/knitr/issues/1294/comments","events_url":"https://api.github.com/repos/yihui/knitr/issues/1294/events","html_url":"https://github.com/yihui/knitr/issues/1294","id":180476741,"number":1294,"title":"control svg size in pdf","user":{"login":"vnijs","id":2998956,"avatar_url":"https://avatars.githubusercontent.com/u/2998956?v=3","gravatar_id":"","url":"https://api.github.com/users/vnijs","html_url":"https://github.com/vnijs","followers_url":"https://api.github.com/users/vnijs/followers","following_url":"https://api.github.com/users/vnijs/following{/other_user}","gists_url":"https://api.github.com/users/vnijs/gists{/gist_id}","starred_url":"https://api.github.com/users/vnijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vnijs/subscriptions","organizations_url":"https://api.github.com/users/vnijs/orgs","repos_url":"https://api.github.com/users/vnijs/repos","events_url":"https://api.github.com/users/vnijs/events{/privacy}","received_events_url":"https://api.github.com/users/vnijs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/yihui/knitr/milestones/29","html_url":"https://github.com/yihui/knitr/milestones/v1.15","labels_url":"https://api.github.com/repos/yihui/knitr/milestones/29/labels","id":1940031,"number":29,"title":"v1.15","description":"","creator":{"login":"yihui","id":163582,"avatar_url":"https://avatars.githubusercontent.com/u/163582?v=3","gravatar_id":"","url":"https://api.github.com/users/yihui","html_url":"https://github.com/yihui","followers_url":"https://api.github.com/users/yihui/followers","following_url":"https://api.github.com/users/yihui/following{/other_user}","gists_url":"https://api.github.com/users/yihui/gists{/gist_id}","starred_url":"https://api.github.com/users/yihui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihui/subscriptions","organizations_url":"https://api.github.com/users/yihui/orgs","repos_url":"https://api.github.com/users/yihui/repos","events_url":"https://api.github.com/users/yihui/events{/privacy}","received_events_url":"https://api.github.com/users/yihui/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":20,"state":"open","created_at":"2016-08-13T03:32:43Z","updated_at":"2016-10-02T01:23:10Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-10-01T19:59:41Z","updated_at":"2016-10-02T01:23:10Z","closed_at":"2016-10-02T01:23:10Z","body":"When creating an svg image, e.g., using DiagrammeR, the size of the image is fine on mac but can be extremely small on windows. An example Rmd file is shown below as is output from Rstudio's `Knit to pdf` on mac and windows.\r\n\r\nknitr use `webshot` to generate the image for the pdf and it would be great if something like `fig.width` could be used to set the size of the image. Perhaps related to https://github.com/wch/webshot/issues/26\r\n\r\ncc: @rich-iannone, @wch, @timelyportfolio\r\n\r\n\t\t---\r\n\t\ttitle: \"svg\"\r\n\t\toutput: pdf_document\r\n\t\t---\r\n\r\n\t\t```{r cars}\r\n\t\tDiagrammeR::mermaid(\"\r\n\t\tgraph LR\r\n\t\t  A-->B\r\n\t\t  A-->C\r\n\t\t  C-->E\r\n\t\t  B-->D\r\n\t\t  C-->D\r\n\t\t  D-->F\r\n\t\t  E-->F\r\n\t\t\")\r\n\t\t```\r\n\r\nSVG on Mac:\r\n[svg.pdf](https://github.com/yihui/knitr/files/504628/svg.pdf)\r\n\r\nSVG on Windows:\r\n[svg_win.pdf](https://github.com/yihui/knitr/files/504632/svg_win.pdf)\r\n"},"comment":{"url":"https://api.github.com/repos/yihui/knitr/issues/comments/250947855","html_url":"https://github.com/yihui/knitr/issues/1294#issuecomment-250947855","issue_url":"https://api.github.com/repos/yihui/knitr/issues/1294","id":250947855,"user":{"login":"yihui","id":163582,"avatar_url":"https://avatars.githubusercontent.com/u/163582?v=3","gravatar_id":"","url":"https://api.github.com/users/yihui","html_url":"https://github.com/yihui","followers_url":"https://api.github.com/users/yihui/followers","following_url":"https://api.github.com/users/yihui/following{/other_user}","gists_url":"https://api.github.com/users/yihui/gists{/gist_id}","starred_url":"https://api.github.com/users/yihui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yihui/subscriptions","organizations_url":"https://api.github.com/users/yihui/orgs","repos_url":"https://api.github.com/users/yihui/repos","events_url":"https://api.github.com/users/yihui/events{/privacy}","received_events_url":"https://api.github.com/users/yihui/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T01:23:10Z","updated_at":"2016-10-02T01:23:10Z","body":"You can try PNG screenshots instead. PDF screenshots do not always work as you'd expect. See the last paragraph: https://bookdown.org/yihui/bookdown/html-widgets.html\r\n\r\nBTW, `fig.width`/`fig.height` do set the image size."}}
{"actor":{"display_login":"yihui"}}