Hey r-stats people
Anyone have ideas on writing code that takes a word doc, renames it in a certain format, and save it as a PDF?
Signed,
A desperate and tired PhD candidate who need an efficient method for doing this
Anyone have ideas on writing code that takes a word doc, renames it in a certain format, and save it as a PDF?
Signed,
A desperate and tired PhD candidate who need an efficient method for doing this
Comments
files <- list.files(folder, pattern = ".docx")
for (file in files) {
rmarkdown::pandoc_convert(file.path(folder,file), to = "pdf")
}
Some_file.docx
Result_file_20250402.pdf
Have you done anything to the file other than effectively done a File Save As?
What operating system?
Does it have word on it?
Why R?
What is the input file name - is it constant or might there be multiple files etc.
e.g. "I have 1000 docx files, I need 1000 pdf files. It can take 3 hours but I don't want to be stood over it"
or "I need to convert 1 docx file in less the 2 seconds"