Reputation: 1778
Hello fellow R enthusiasts,
I am wondering whether we can create a pdf version from docx within R (not using other conversion tools). I create a docx report using ReporteRs
package. I would like to make a copy of that in pdf copy. Is it possible within R, without using any external softwares? Thank you in advance.
Upvotes: 0
Views: 2536
Reputation: 1778
Here is one way to do it. Disclaimer: This answer came up in google group of ReporteRs
.
writeDoc( doc, file = docfile)
system(paste("libreoffice --headless --convert-to pdf ", docfile), intern = TRUE)
It needs libreoffice application to be installed in your system.
Upvotes: 2