I finally managed to get good performance on my docx creation (7-10 pages).
It all generates within 2 seconds now.
Then I create a PDF out of it using LibreOffice.
This process takes 8-10 seconds and maxes out the server's CPU during the process.
Are there any command-line settings I can do like tweaking compression etc to speed things up?
Thanks