2
Contributors
1
Reply
13
Views
2 Years
Discussion Span
Last Post by cereal
0

I don't know if there is a ready PHP solution for this, but if you can install software in your hosting, then use LibreOffice in command line mode:

<?php

    $file = 'something.doc';
    $str  = sprintf("libreoffice --headless --invisible --convert-to pdf %s", $file);
    $cmd  = escapeshellcmd($str);

    exec($cmd);

There are other solutions as unoconv, based on LibreOffice and JodConverter which seems to not be anymore maintained.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.