Ask Your Question

RTF to PDF conversion fails for strange images [closed]

asked 2014-04-11 14:29:27 +0100

shasi gravatar image

updated 2015-09-08 21:00:50 +0100

Alex Kemp gravatar image

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

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 20:22:41.249972


Could you attach an example file which does not work?

mahfiaz gravatar imagemahfiaz ( 2014-04-11 15:06:55 +0100 )edit

Well, i noticed that the problem is not with the size of the RTF file, but due to a strange image inside it.

shasi gravatar imageshasi ( 2014-04-14 10:56:12 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-04-14 11:33:38 +0100

vmiklos gravatar image

Sounds like a bug -- please report it at

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-04-11 14:29:27 +0100

Seen: 464 times

Last updated: Apr 14 '14