Linux: Command Line Utility Convert RTF to PDF?

Any recommendations for converting RTF to PDF? I need to do this from my LAMP application, so a command line utility like GhostScript would be ideal.

+8
source share
5 answers
sudo apt-get install ted /usr/share/ted/Ted/rtf2pdf.sh source-file dest-file 

or visit the link

+3
source

Alternatively, you can use libreoffice for this task:

 libreoffice --headless --invisible --norestore --convert-to pdf source-file.rtf 
+10
source

In my Ubuntu 10.4, I have unrtf that "converts RTF to HTML, LaTeX, Postscript." From Postscript, it should be a trivial ps2pdf application for receiving PDF files.

+2
source

On Cent OS 6, these steps worked for me to convert RTF to PDF from a php file:

  • yum install Ted
  • yum install ghostscript
  • Download rtf2pdf.sh to some path, for example: / var / www / html / lib, where Apache has sufficient permissions
  • shell_exec ('sh / lib / rtf2pdf.sh / files / test.rtf / files / test.pdf');
0
source

unoconv makes this very convenient. (For your information, I am currently using the same version 0.5-1). First I have to run the unoconv --listener & , and then the unoconv *.rtf command, for example ...

0
source

Source: https://habr.com/ru/post/893827/


All Articles