decktape | R Documentation |
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
)
file |
The path to the HTML presentation file. When |
output |
The desired output path of the PDF file. |
args |
Command-line arguments to be passed to |
docker |
Whether to use Docker ( |
version |
The decktape version when you use Docker. |
open |
Whether to open the resulting PDF with your system PDF viewer. |
The output file path (invisibly).
For some operating systems you may need to
add yourself to the
docker
group and restart your machine if you use DeckTape via
Docker. By default, the latest version of the decktape Docker image
is used. In case of errors, you may want to try older versions (e.g.,
version = '2.8.0'
).
DeckTape: https://github.com/astefanutti/decktape. Docker: https://www.docker.com.
xaringan::decktape("https://slides.yihui.org/xaringan", "xaringan.pdf", docker = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.