This function can use either the decktape
command or the hosted
docker image of the decktape library to convert HTML slides to PDF
(including slides produced by xaringan).
decktape(
file,
output,
args = "--chrome-arg=--allow-file-access-from-files",
docker = Sys.which("decktape") == "",
version = "",
open = FALSE
)
The output file path (invisibly).
The path to the HTML presentation file. When docker =
FALSE
, this path could be a URL to online slides.
The desired output path of the PDF file.
Command-line arguments to be passed to decktape
.
Whether to use Docker (TRUE
) or use the
decktape
command directly (FALSE
). By default, if
decktape has been installed in your system and can be found via
Sys.which('decktape')
, it will be uesd directly.
The decktape version when you use Docker.
Whether to open the resulting PDF with your system PDF viewer.
DeckTape: https://github.com/astefanutti/decktape. Docker: https://www.docker.com.
if (FALSE) { # interactive()
xaringan::decktape("https://slides.yihui.org/xaringan", "xaringan.pdf", docker = FALSE)
}
Run the code above in your browser using DataLab