How to change pdf export settings when doing 'libreoffice --headless --convert-to pdf file.docx'?

I am successfully using libreoffice to convert docx/doc/txt/rtf/html files to pdfs. Typically, this takes 1 second using:

  • libreoffice 7.0
  • Debian OS (on an AWS EC2 instance, no GUI)

I want to make this operation faster (e.g. 0.5 seconds) and also reduce the resulting pdf size. To this end, I want to try different pdf export settings (eg reduce image resolution) as found in PDF Export General

My understanding is, that I should be able to change those settings by using a different filter, but I don’t know how to edit existing filters or use new ones. Can anyone point me to relevant documentations or tutorials?

1000 thanks in advance.

PS.