knitr::opts_chunk$set(echo = TRUE, collapse = TRUE) library(r2rtf)
r2rtf:::rtf_convert_format( input = list.files("vignettes/rtf/", pattern = "*.rtf", full.names = TRUE), output_dir = "vignettes/html", format = "html" )
r2rtf
had an experimental internal function r2rtf:::rtf_convert_format
to
convert RTF format to PDF, DOCX, or HTML.
This feature requires LibreOffice >= 7.1 and was only
tested in a Linux environment.
By default, r2rtf:::rtf_convert_format
convert RTF file to PDF format.
The PDF file will be saved in the same folder with same file name by default.
In example below, ae_example.pdf
will be created in the same folder.
r2rtf:::rtf_convert_format(input = "rtf/ae_example.rtf")
r2rtf:::rtf_convert_format(input = list.files("rtf", pattern = "*.rtf"))
format
argument allow use to specify output format as pdf
, docx
, or html
. r2rtf:::rtf_convert_format(input = "rtf/ae_example.rtf", format = "html")
There is one known limitation after RTF file convert to HTML files:
knitr::include_graphics("pdf/border-type.pdf")
````{=html}
xfun::file_string("html/border-type.html")
````
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.