Command line convert to png issue

Hello,
I am having an issue with converting a text file from the command line. I am using the following command:

soffice --headless --convert-to png --outdir "xxx" "test.txt"

but this generates only an empty png file. I have tried specifying the writer_png_Export filter and supplying odt document instead of txt but the result remains the same.

Is this an issue with LibreOffice or I am doing something wrong?

What exactly are you trying to do? It is not clear to me what you are expecting by way of output.

EDIT: For some reason the ability to export via the GUI (File > Export…) a page of text to a PNG (resulting in a graphic of the entire page container) does not appear to available via the CLI. This thread would appear related, as is bug fdo#67005.

Well, I am trying to convert a text file to image using the command line. Since the filters have names containing the word export in them I thought they were supposed to be a command line encapsulation of the export functions in the File menu. There is an option to export a text file to image there, why is that not possible from the command line and why is there a writer_png_Export filter if it is not doing anything?

Thanks for clarifying. I will update my answer, which was clearly wrong. I am no longer certain why it does not work, other than the fact that there are known differences between the GUI and CLI filters.