Is there a way to generate an officer docx as a pdf without the use of libreoffice?

84 Views Asked by At

Due to the data security rules at my job, I can't install certain applications. I was wondering if there was a simpler way to generate word docs (via officer package) as a pdf before R outputs the document.

1

There are 1 best solutions below

0
On

You can use package doconv, see https://github.com/ardata-fr/doconv#convert-a-word-file-to-pdf

library(doconv)
to_pdf(docx_file, output = "docx_example.pdf")

Note it requires MS Office on the machine!