Skip to content Skip to sidebar Skip to footer

Libreoffice Convert .docx To .pdf In Parallel Not Working Well

I have a lot of docx files to be converted to pdf. Converting them one by one takes long time. So I write a python scripts to convert them in parallel: from subprocess import Pope

Solution 1:

We were also stuck on the same issue for some time.

Multiple Instances of LibreOffice shares the same space using a UserInstallation directory and thus parallel conversion was creating a problem here (The intermittent processes seem to get mixed up).

Using a different directory for each instance of libre helped to solve this issue. You may achieve this via UserInstallation env variable which can be passed as: "-env:UserInstallation=file:///d:/tmp/p0/"

You may automate this by appending your loop variable or any unique identifier in the directory.

Reference: https://ask.libreoffice.org/en/question/42975/how-can-i-run-multiple-instances-of-sofficebin-at-a-time/

Post a Comment for "Libreoffice Convert .docx To .pdf In Parallel Not Working Well"