A
A
Alexander Wolf2014-11-03 23:50:32
PHP
Alexander Wolf, 2014-11-03 23:50:32

How to convert doc, pdf, djvu, docx, fb2, epub to HTML in PHP?

Hello! The task was to write an online library. As a server, regular hosting (i.e. not VDS).
It is necessary to use PHP (or through the API of some services) to convert all these files into HTML.
Can you please tell me how this can be organized? Or are there ready-made frameworks / CMS for writing an online library?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-11-04
@mannaro

I think it makes sense to just display documents if possible. For example:
PDF - mozilla.github.io/pdf.js
DeJaVu - https://bitbucket.org/ololo/minidjvu.js/wiki/Home
docx, fb2 - habrahabr.ru/post/195342
epub - https://github .com/futurepress/epub.js/
as for doc - I think it will be easier to convert doc to docx.
From what I checked - pdf and epub will render well in the browser. The rest did not poke.

A
Alexander Aksentiev, 2014-11-04
@Sanasol

Everything together does not happen at once.
You will be chased off a regular hosting very soon if you do such things. These are very resource intensive processes.
There are definitely ready-made solutions for pdf, doc (x) did not work with the rest.
But the quality of processing very much depends on how you will process it. This is especially true for pdf.
And of course, pdf2html will not give text, most likely it will be html with image inserts (most of the pdf books are scans)
For docx, for example, there is PHPWord

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question