print_pptx_pdf: Export a .pptx file created using 'officer' package as a .pdf

View source: R/functions.R

print_pptx_pdfR Documentation

Export a .pptx file created using 'officer' package as a .pdf

Description

This function exports the document as a temporary .pptx file, creates a temporary .vbs file with the intended .pdf file name, runs the .vbs file in command prompt, and then deletes the temporary files.

Usage

print_pptx_pdf(x, target = NULL, ...)

Arguments

x

document created using 'read_pptx()' function from 'officer' package

target

path to the .pdf to be exported, default is a .pdf with the exported object's name in the current working directory

Examples

ppt1 <- read_pptx()
ppt1 <- add_sheet(ppt1)
print_pptx_pdf(ppt1)
ppt2 <- read_pptx()
ppt2 <- add_sheet(ppt2)
print_pptx_pdf(ppt2, target = file.path(paste(getwd(),"/test.pdf",sep="")))

joshmire/officerWinTools documentation built on July 5, 2023, 4:27 a.m.