convert_pdf_to_docx: Convert a pdf to docx

View source: R/convert_pdf_to_docx.r

convert_pdf_to_docxR Documentation

Convert a pdf to docx

Description

Use powershell to open a pdf in word, and save it as docx. It is saved in the same location with the same file name. Requires MS Word to be installed. Note that this will open a hidden dialogue box requiring you to confirm that you want to open Word (at least the first time you run it).

Usage

convert_pdf_to_docx(pdf, verbose = TRUE)

Arguments

pdf

(character) a pdf to convert

verbose

(logical; default = TRUE) print status messages?

Value

nothing, returned for side effects

Examples

## Not run: 
# Convert a single file
convert_pdf_to_docx("C:/files/pdfs/norm.pdf")

# Convert a folder of files
list.files("C:/files/pdfs", full.names = TRUE) |>
  purrr::walk(convert_pdf_to_docx)

## End(Not run)

baslat/sak documentation built on April 14, 2025, 4:14 p.m.