Convert-to not working on Debian 10, Libreoffice 6.1.5.2 installed

Hi,

I have saved a document (.docx) in tmp/backups. whenever I try to convert the document to pdf with the command Libreoffice --convert-to pdf name.docx (–outdir /tmp/backups/), nothing is happening.

With or without the --outdir command and even the --convert-to odt or txt, nothing is happening.

I even have tried to get it working by adding the env (-env:UserInstallation-file:///$HOME/.libreoffice-headless/) but not is happening then.

Can please someone help me out in this matter?

Best regards,

Jorn

Works perfectly fine here, using Debian 10’s LibreOffice 6.1.5.2.
Make sure the command is lowercase libreoffice not Libreoffice …

Hi erAck,

in my command line it is libreoffice, as lowercase.
On typing it in the message it is autocorrected.

Strange things is that on adding &&echo “exit status: $?” the result is returned as exit status: 0.
If I’m getting things right, that status indicates that everything is executed correctly. However, I’m unable to find my generated document. Any idea where it could have ended up?

If you execute that from command line in a terminal it tells you. If it doesn’t say anything then something’s odd.

Any idea on how it can be solved…
I already tried to uninstall Libreoffice and reinstall it, but it has the same problem.

I’m getting a bit desperate :worried:

I once again rebooted the machine and I have started the convert directly without giving the command libreoffice first and now it is giving me a clearer error message:
$ libreoffice --convert-to pdf out211004183719.docx

convert /tmp/backups/out211004183719.docx → /tmp/backups/out211004183719.pdf using filter : writer_pdf_Export

Error: Please verify input parameters… (SfxBaseModel::impl_store <file:///tmp/backups/out211004183719.pdf> failed: 0x507(Error Area:Io Class:Access Code:7)).
Any ideas?

Try exporting the docx from the GUI as PDF. Sometimes an already running soffice.bin prevents successful convert, so make sure LO is not running. Then your user profile settings might conflict somehow, so try with -env:UserInstallation=file:///tmp/profile. In the end you might have found a bug, so you can try if a newer version works https://wiki.documentfoundation.org/Installing_in_parallel/Linux.

There is no way to export via the GUI. GUI is not installed but LO is running fine.
I do think I’m on a good track and it has got something to do with userrights.

We are 1 step further in the process and might have found what causes the convert-to function not to work: a different user.

Apparently if I log on with my user, I have different rights than the one I need to execute the --convert function. (although it is the same user that has installed libreoffice)
Executing the --convert by using $ sudo libreoffice --convert is not helping and results in… nothing.

Is there a way that we can force the --convert function to be executed as a different user?

I have broken my head about this and have been searching, but can’t find it.
Is anyone here aware of such a parameter/variable?

I thought your installation is the one provided as package by Debian, then the user being logged in with doesn’t matter unless they can’t read the file to be converted, which may well happen if it is under the /tmp/ directory, by nature of how permissions are granted in /tmp.

Never run beasts as root, ever.