Instructions

In order to convert rtf to html, send the rtf file .

CURL Example

curl -F "rtf=@sample.rtf" http://localhost:9022/convert > sample.html

PHP Example

<php
  $ch = curl_init("http://localhost:9022/convert");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, [
      'rtf' =>  new \CurlFile(__DIR__.'/sample.rtf','text/rtf','sample.rtf')
  ]);
  $result = curl_exec($ch);
  file_put_contents("output.html", $result);

Background Info

This system is using libreoffice as the engine to support this function.