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

feature request: pdf format support the output page size #50

Open
Liripo opened this issue Jun 1, 2023 · 1 comment
Open

feature request: pdf format support the output page size #50

Liripo opened this issue Jun 1, 2023 · 1 comment

Comments

@Liripo
Copy link

Liripo commented Jun 1, 2023

repex:

require(visNetwork, quietly = TRUE)
# minimal example
nodes <- data.frame(id = 1:3)
edges <- data.frame(from = c(1,2), to = c(1,3))
net <- visNetwork(nodes, edges, width = "100%")

library(htmlwidgets)

saveWidget(net,"net.html")

webshot2::webshot("net.html",file = "net.png",vwidth = 600,vheight = 400,cliprect = "viewport")

webshot2::webshot("net.html",file = "net.pdf",vwidth = 600,vheight = 400,cliprect = "viewport")

Now the fixed output format of pdf is A4format, if possible, hope to support custom page size.

@Liripo Liripo changed the title pdf format support the output page size feature request: pdf format support the output page size Jun 1, 2023
@Liripo
Copy link
Author

Liripo commented Jun 1, 2023

s$screenshot_pdf(filename = file, wait_ = FALSE)

It would be great if the parameters of screenshot_pdf could be exposed.

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

1 participant