Convert a Document (usually PowerPoint) to a PDF
convert_to_pdf(path, pdf_file = sub("[.]pptx", ".pdf", path))path to the document, can be PowerPoint or DOCX
output PDF file name. By default, creates a PDF in the
same directory as the path file.
This functionality requires the use of
LibreOffice and the soffice binary it contains. See
set_libreoffice_path for more information. Note,
if (FALSE) { # \dontrun{
path = system.file("examples/ex.pptx", package="docxtractr")
pdf <- convert_to_pdf(path, pdf_file = tempfile(fileext = ".pdf"))
path = system.file("examples/data.docx", package="docxtractr")
pdf_doc <- convert_to_pdf(path, pdf_file = tempfile(fileext = ".pdf"))
} # }