1

I wanna edit epub file content in PHP to erase some text from begging of the ebook. I have tried some libraries with no success.

https://github.com/Grandt/PHPePub
https://github.com/Vaporbook/BookGluttonEpub
https://sourceforge.net/projects/oplsepublibrary

They can edit authors, isbn, description, creator, cover, etc., or create new epub file, or open epub file, but I haven't found some solution for editing content.

Do you know some easy way how to do it?

Anton Smatanik
  • 587
  • 1
  • 9
  • 25
  • You could read the content, put it in a variable, edit the text and place it in a new epub, delete the old epub and voila – Florian Humblot Jul 22 '16 at 09:01
  • Yes, this crossed my mind too, but it's not so simple. Load content with one library and create new epub from scratch with other one? Every library work in different style - with / without chapter, problem with css, move metadata, etc. it's heavy and bad solution. – Anton Smatanik Jul 22 '16 at 14:26
  • Fair enough, have you tried what is marked in this question: http://stackoverflow.com/q/6525775/4461980? – Florian Humblot Jul 22 '16 at 14:43

1 Answers1

1

Now I know, that you can just unzip epub as simple zip file and then edit all html and css files :)

After you have done changes, just zip the files back.

Anton Smatanik
  • 587
  • 1
  • 9
  • 25