Giter Site home page Giter Site logo

Comments (8)

paperdigits avatar paperdigits commented on July 20, 2024

Could this be an OS related issue? I have found the windows native zip function to be hit and miss, but this is only anecdotal, I can't provide any hard evidence.

I can try and give this a go on Debian this weekend, if I have time.

On October 31, 2014 11:11:01 AM PDT, Eliot Kimber [email protected] wrote:

Getting this failure:

The mimetype file has an extension of length 20. No filename extensions
are permitted for the mimetype file.

From epubcheck for the EPUB Zip file generated by the Ant task. Have
asked Radu and Jean Kaplansky for guidance. Using Oxygen's archive
browser to open and save the EPUB file resolves the issue, so it must
be something with how Ant's Zip implementation works.

Would like to avoid having custom Java code just to make the Zip file.


Reply to this email directly or view it on GitHub:
#21

from org.dita4publishers.epub.

scalderwood avatar scalderwood commented on July 20, 2024

I was getting a different error message: Mimetype entry must not have an extra field in its ZIP header

And I fixed that by adding this to the zip task for the mimetype:
zip64Mode="never"

Not sure if that will solve your problem or not, Eliot; I don't run into your problem when executing the ant code against my ePub source files (whether 2 or 3). The above error happens with Ant 1.9.3 on OS X and epubcheck 3.0.1.

from org.dita4publishers.epub.

raducoravu avatar raducoravu commented on July 20, 2024

Some time ago one of my coleagues added an issue which explains why zip64Mode should be added to the ANT task on the old SourceForge DITA For Publishers List:

https://sourceforge.net/p/dita4publishers/bugs/106/

So you must add this flag if you are using ANT 1.9 or newer to publish.

from org.dita4publishers.epub.

drmacro avatar drmacro commented on July 20, 2024

I'm using Ant 1.8.5, so zip64Mode="never" isn't supported.

Comparing the Zip produced by Ant and by Oxygen at the byte level, the difference is an extended field in the local file header for the mimetype file, consisting of 20 null bytes. So Ant is adding that extended field. Without having researched it, I'm assuming that Ant 1.9 fixes this issue with the zip64Mode option.

from org.dita4publishers.epub.

drmacro avatar drmacro commented on July 20, 2024

I upgraded to Ant 1.9.4 and confirmed that with @zip64Mode="never" specified that the EPUB file passes epubcheck.

from org.dita4publishers.epub.

raducoravu avatar raducoravu commented on July 20, 2024

ANT 1.9.0 was released in March 7, 2013, so probably it's safe to assume most users use ANT 1.9.0 or newer, so setting @zip64Mode="never" should work for most users.

from org.dita4publishers.epub.

drmacro avatar drmacro commented on July 20, 2024

Unfortunately, it appears that the OT 1.8.5 comes with Ant 1.8.4 out of the box, so I can't assume it's installed.

I can make a check in the Ant script for the Ant version and issue a message when the version is not 1.9.1 or greater.

from org.dita4publishers.epub.

drmacro avatar drmacro commented on July 20, 2024

Fixed by #26

from org.dita4publishers.epub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.