Batch convert OnlyOffice files to pdf

Hello,

As the title says, I would like to convert several text files created with OnlyOffice into pdf files without opening each one individually.

The whole thing should be done locally on a MacBook. I use the desktop version.

Is there any possibility to do this?