Converting pdf to docx through command line

I’m trying to convert pdf or odt to docx by this command, or to doc it still wouldn’t work

libreoffice7.6 --headless --convert-to docx:“Office Open XML Text” --outdir ./ file.pdf

and got this error

Error: Please verify input parameters… (SfxBaseModel::impl_store <file:///home/file.docx> failed: 0xc10(Error Area:Io Class:Write Code:16) at /home/buildslave/source/libo-core/sfx2/source/doc/sfxbasemodel.cxx:3221 at /home/buildslave/source/libo-core/sfx2/source/doc/sfxbasemodel.cxx:1792)

PDF Converter - quick, online, free - PDF24 Tools

Of course; do you succeed when opening a PDF in LibreOffice interactively? But the error would be different.

Hmm, the error you posted is for this case, isn’t it? Likely two different issues…
https://opengrok.libreoffice.org/search?&full=ERRCODE_IO_CANTWRITE&project=core&sort=fullpath