Learn R Programming

docxtractr (version 0.6.5)

convert_to_pdf: Convert a Document (usually PowerPoint) to a PDF

Description

Convert a Document (usually PowerPoint) to a PDF

Usage

convert_to_pdf(path, pdf_file = sub("[.]pptx", ".pdf", path))

Arguments

path

path to the document, can be PowerPoint or DOCX

pdf_file

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,

Examples

Run this code
# NOT RUN {
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"))
# }

Run the code above in your browser using DataLab