I am converting RTF file to PDF with Libreoffice in headless mode, via PHP code.
Here is my sample code:
shell_exec('libreoffice4.2 --headless --invisible --norestore --convert-to pdf --outdir /pdf /html/test.rtf');
I observed that Libreoffice is not able to convert the RTF to PDF file, if the RTF file contains any strange images, like this one|attachment
All the text is converted to PDF just fine, but don’t know what is preventing Libreoffice to skip the conversion in the case of existence of strange images in RTF file. The same RTF file containing strange images could be converted to PDF, using the COM extension of PHP under Windows.