Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I directly convert docx to ePub in PHP? [closed]

Tags:

php

epub

Trying to find a PHP library that will enable me to convert docx to ePub.

I'm aware of Java solutions (e.g. http://code.google.com/p/epub-tools/), and PHP classes used to create ePub files (e.g. http://sourceforge.net/projects/oplsepublibrary/).

But what I'm looking for is a direct conversion from docx (or PDF at a push) to ePub using PHP.

Is anyone aware of solution that can achieve this?

EDIT

I have added a link in my answer below to a solution that I have developed to achieve this. The solution is available on Github at: https://github.com/benskay/PHP-Digital-Format-Convert-Epub-Mobi-PDF

like image 919
kaese Avatar asked Feb 23 '23 08:02

kaese


1 Answers

I'm afraid that the only direct solution to convert from DOCX to EPUB is the .NET component made by Aspose.

One possible indirect way (I've not tested this):

  • Convert DOCX to DocBook XML (See this SO thread - I think that you can control OpenOffice server with PHP).
  • Use the DocBook XSLT to convert DocBook XML to EPUB (can be made with PHP, see libxslt).
like image 173
fbdcw Avatar answered Mar 06 '23 18:03

fbdcw