This is an online document viewer. Which makes use of pdfjs by mozilla for displaying pdf in browser. On the server end it uses libreoffice to convert all office documents to pdf format.
This is just a demo. So you may modify the index.php file as per the need of your application.
To begin clone the repository and upload the contents of Web folder into the root directory of your web server.
Install libreoffice-office and libreoffice writer.
Change the paths as required in getFile.php
Make an entry in crontab to run the cron.php every 5mins(or as per your need)