{capure} allow to take screenshots in R Markdown documents in HTML format.
All page
Capture a screenshot of the entire page with:
capture(
selector = "body",
filename = "my-document",
"Take screenshot",
button_class = "btn btn-primary btn-block"
)
If you want a PDF as output, you can use
capture_pdf()
.