Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to 'break open' epub and then rezip without errors

Engaged ,
Dec 30, 2017 Dec 30, 2017

I've managed to break open an .epub file by renaming it .zip and unzipping. I've done some edits in the HTML (simply deleted a div) and then rezipped it. However upon rezipping I get an error and whichever device I use can no longer read the .epub file. Something has happened to the structure when zipping back to an .epub file.

Any tips on avoiding this?

TOPICS
EPUB
5.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 30, 2017 Dec 30, 2017

Much easier on Windows. Open the file in Windows Explorer but don’t extract it.

MOVE (don’t copy) the HTML/CSS folder to the desktop and do whatever it is you need to do. Then move it back and rename the zip file with the EPUB extension.

Translate
Community Expert ,
Dec 30, 2017 Dec 30, 2017

Mac or Windows?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 30, 2017 Dec 30, 2017

Sorry, Windows.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 30, 2017 Dec 30, 2017

Much easier on Windows. Open the file in Windows Explorer but don’t extract it.

MOVE (don’t copy) the HTML/CSS folder to the desktop and do whatever it is you need to do. Then move it back and rename the zip file with the EPUB extension.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 30, 2017 Dec 30, 2017

Hey, Bob. I've just done a quick test using your methodology and it works great. This opens up a lot more styling options for me now, so thanks for that!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 30, 2017 Dec 30, 2017

Great. Please note this will NOT work on a Mac.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 31, 2017 Dec 31, 2017

To any Mac users following this thread, I'd recommend BBEdit Bare Bones Software | BBEdit 12

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 05, 2018 Jan 05, 2018

Hi,

When I start to work with ePUB, early 2009, I had the same problem unknownsailor​

Now I only use - http://www.docdataflow.com/ecancrusher/ for MAC and Windows. It´s is very friendly user, just darg and drop the ePUB file over the app to unzip. After move the folder over the app again, to zip it.

Regards

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 20, 2023 Sep 20, 2023

Hey, 

I literally created an account so that I could reply to this comment.

I have been struggling to open ePUB files on my reader and after I tried Docdataflow, it worked and I was about to cry because of how happy it made me.

Thank you so very much for this tip.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 20, 2023 Sep 20, 2023
LATEST

There seems to be a specific glitch in the way MacOS handles ZIP archiving. The MIMETYPE file must be in plain, uncompressed format to be read correctly, and (to the best of my knowledge) all Windows-based tools and processes are sensible and don't attempt to encode or compress this 21-byte file. Macs insist, against all efforts, on encoding it. The only workaround I know of is to re-ZIP the file, then use a specific "store uncompressed" command to write the MIMETYPE file into the archive without compression. (Uunfortuinately, I've never been given a clear set of directions on how to do that under MacOS.)

 

But that's the core of the problem, and it can be overcome with a bit of savvy, not requiring any specific archiving tool or utility.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines