Error: Please verify input parameters... (SfxBaseModel::impl_store failed: 0x11b(Error Area:Io Class:Abort Code:27))

Libreoffice 7.6.2. I am getting this error while converting to pdf from docx in Windows. See below.

soffice --headless --convert-to pdf:writer_pdf_Export --outdir /c/Users/Desktop/ /c/Users/Desktop/test.docx

Error: Please verify input parameters… (SfxBaseModel::impl_store <file:///C:/Users/Desktop/test.pdf> failed: 0x11b(Error Area:Io Class:Abort Code:27))

Are you sure that C:\Users\Desktop\ exists and if so, do you have full access to it?

Yes I have full read and write access. Noticed this happens when docx size is over 20 MB. The one Iam trying to convert is 29 MB

I also wonder how C:\Users\Desktop have appeared; but nothing impossible manually, of course.

ERRCODE_IO_ABORT likely indicates that LibreOffice tries to show some dialog; in headless mode, that results in an abort.

But you of course have already tried the same conversion in GUI mode, haven’t you?

conversion from GUI mode works. Export as PDF. But we need this to work headless.

Then it’s impossible to tell something without a sample problematic file, which fails for you.

Looks like anything over 45 MB of docx file gets locked when converting via command line. This is our use case as our client uploads large docx files.
Any flag from command line to disable from file being locked?

In Other Note:
I think we should have an option to upload file with larger sizes here on this support portal.
I get this when trying to upload file here
“Sorry, that file is too big (maximum size is 4 MB). Why not upload your large file to a cloud sharing service, then paste the link?”

Not everyone will have cloud sharing service