Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I will attempt to address each of your questions in turn.

A1. The quote from the referenced help page is in a context relating to Draw / Impress rather than the conversion of graphics to PDF. While this may not matter at a low level it is also worth noting that the help pages are not always as accurate as they could be. To complicate your particular case, there are known differences (e.g., fdo#40186, fdo#42871, and fdo#46026 to indicate just a few) between the headless and UI forms of filters.

Example multi-page TIFFs can be found here (10 pages) and here (2 pages). LO Draw cannot open the former, but it will open the first page of the second graphic. This is probably indicative of limitations in the multi-page TIFF handling ability of Draw and the related graphics filters in LO. The first example file fails silently when attempting to convert to PDF in headless mode (refer A2 below). The second example file comes from bug fdo#63722 and I can confirm that using headless mode to try and convert this particular file to PDF results in only the first page being output.

I would look at alternative tools (e.g., ImageMagick, ghostscript, pdftk, etc.) to handle multi-page TIFFs. In a worst-case scenario (given TIFF variability in production) split them into single-page TIFFs:

$ convert multipage.tif single%d.tif  # this is using the ImageMagick tool "convert"

...then convert them to single-page PDFs, then combine them. Refer A4 below.

A2. The only related bug report I could find about this issue is fdo#59756 although it deals with a specific bind-to-port failure. The overall failure to respond with an error message is similar. I don't think you are doing anything wrong, but it would not hurt to raise a bug specific to this issue. Matters like the parameter checking example you provide (i.e., missing input file) I would think of as being an EasyHack.

A3. The only thing I can recommend here for Windows is file globbing e.g., soffice.bin -headless -convert-to pdf:writer_pdf_Export -outdir files/ *.odt. You could even use *.* but you run the risk of overwriting output where there are multiple identically named files of different types (extensions). You could work through directories in this manner or script a solution. The exact approach will depend upon the nature of your files, their arrangement / storage, and your conversion requirements.

A4. This really is best handled by separate dedicated tools IMO e.g., pdftk. It is a lot easier than using LO. These types of tools are also smaller and markedly more efficient. Use LO in headless mode when you are dealing with complex documents.

Please report any bugs you raise back here using the format "fdo#123456". Thanks.