webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 421 forks source link

Automatic conversion of documents to open office or pdf #138

Closed nodera1 closed 9 years ago

nodera1 commented 9 years ago

Is there a way automatically do document conversion to the accepted file types?

kossebau commented 9 years ago

Nothing which is built into ViewerJS.

A solution can be to convert the documents on-the-fly on a server, using e.g. LibreOffice in headless-mode or the Calligra converter. So the url passed to ViewerJS would request the converted file from that server, which would then create it as needed.

See https://github.com/owncloud/format-filter-server for some sample implementation.