https://bugs.documentfoundation.org/show_bug.cgi?id=163863

            Bug ID: 163863
           Summary: Headless conversion silently stops after reaching a
                    certain number of files
           Product: LibreOffice
           Version: 24.2.6.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: framework
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I'm trying to convert a bunch of files from ODT to PDF using the headless mode,
e.g.:
lowriter --headless --convert-to pdf --outdir PDF *.odt

This works great as long as there are not too many files to convert. As soon as
the folder contains a few hundred files, the conversion stops after reaching a
certain number of files (247 in my case) and the libreoffice command returns no
error.

Steps to Reproduce:
1. Using command line, navigate to a folder containing several hundred ODT
files
$ ls -lc *.odt | wc -l
339

2. Convert the files to PDF
$ libreoffice --headless --convert-to pdf --outdir PDF *.odt

3. Confirm that no error was raised
$ echo $?
0

4. Fetch the number of generated PDF files
$ ls -lc PDF/*.pdf | wc -l
247

Actual Results:
247 PDF files have been generated out of the 339 ODT files

Expected Results:
339 PDF files should have been generated, one for each ODT file


Reproducible: Always


User Profile Reset: Yes

Additional Info:
There's nothing wrong with the ODT files, the 247 limit can be reached using
different sets of ODT files, each of which can successfully be converted to
PDF, as long as the number of files to convert remains below 247.

I found a few instances of people experiencing the same issue with roughly
similar limits:
https://ask.libreoffice.org/t/how-to-avoid-convert-to-to-stop-after-249-files/25960
https://ask.libreoffice.org/t/error-converting-thousands-of-documents-with-libreoffice/1341

Some answers suggested this might be a shell limitation (e.g. when translating
"*.odt" into the actual list of files), but I can successfully convert those
files using unoconv, e.g.:
$ unoconv -f pdf -o PDF *.odt
$ ls -lc PDF/*.pdf | wc -l
339

A workaround is to pass the list of ODT files using xarg, but this creates one
instance of libreoffice for each file, which defeats the purpose of using the
headless mode.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to