command line convert docx to pdf loses if statements

I have a mailmerge and wherever my if statements are they don’t print out once converted to pdf using the libre office command line tool.

Maybe you can explain in detail what you are doing (command line) and what you want. Does it work opening the program?

In my word document I have something like this:

{ IF { item } = “true” “Show text” “Show alternative text” }

Then I convert to pdf using the following command line options
inputFile -norestore --writer --headless --outdir outputLocation

Once completed nothing is printed, my other merge fields work, but where the IF statement is it just appears blank.

Anybody got any further ideas on this? I am a total impasse with it.