Given a docx template, the DocXFactory executable can be called without MS Office or LibreOffice to generate a docx.
Microsoft Office is recommended to render a PDF in the highest fidelity but alternatives on Linux are:
- using 3rd party APIs like https://www.aspose.com/ or https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/create-pdf/
- using libreoffice from cmd line with: libreoffice7.4 --headless --convert-to pdf for_pdf_test.doc