Preview:
# install the library
sudo apt update && sudo apt install libreoffice

# convert file 
soffice --headless --invisible --norestore --convert-to pdf <source rtf file> --outdir <output directory>
  
# convert folder (cd to the folder)
lowriter --headless --invisible --norestore --convert-to pdf *.<the extension we want to convert>

# if the files are too much and it crashes half way
find . -name "*.<the extension we are going to convert>" -type f -print0 |xargs -0 -I {} libreoffice --headless --convert-to pdf --outdir <directory to save the pdfs> {}

# count the files
find <folder path> -mindepth 1 -type f -name "*.<extension>" -exec printf x \; | wc -c
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter