OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Docbook to epub - Extra field length for first filename must be 0, but was ..

Hi Lars,

I had the same issue and fixed it that way.

See the comment of Matt Garrish at http://idpf.org/comment/370#comment-370
"When you zip your EPUB, the mimetype file must be the first one you add (mimetype == 8 characters)."



Nils Cordes
Plesser Str. 11
12435 Berlin
Telefon: +49 176 10091551
E-Mail: info@nilscordes.de
Web: http://nilscordes.de

2014-02-17 17:33 GMT+01:00 Lars Vogel <lars.vogel@gmail.com>:

Hi Nils,

This is IMHI correct, I create it in the first step. Also this seems to be unrelated to the error message.

Best regards, Lars

Am 17.02.2014 17:28 schrieb "Nils Cordes" <info@nilscordes.de>:
Hey Lars,

I think there is an error in the zip part of your Ant buildfile. Try to change "temp.mimetype" to "mimetype.zip".

<zip destfile="${output.dir}/mimetype.zip" ...
<zipfileset src="" ...

Best regards


2014-02-17 16:32 GMT+01:00 Lars Vogel <lars.vogel@gmail.com>:

I'm generating epub from Docbook via Apache Ant and I'm getting the following error during the validation with Epubcheck.

     [java] Epubcheck Version 3.0ERROR: /home/vogella/workspace/docu/de.vogella.publishing/../output/epub/book.epub: Extra field length for first filename must be 0, but was 20

Any suggestion what might be causing the error.

I generate the epub via the following snippet (see below).

Thanks for any help, Lars

<target name="build-epub_eclipsercp" description="Generates EPUB files from DocBook XML">
<xslt style="${epub.stylesheet}" extension=".html" basedir="${output.dir}/tmp2" destdir="${output.dir}/tmp">
<include name="*80_Book_Eclipse_RCP*/*book.xml" />
<param name="epub.stylesheet" _expression_="style.css" />
<param name="html.stylesheet" _expression_="${stylesheet}" />
<param name="section.autolabel" _expression_="1" />
<param name="chapter.autolabel" _expression_="1" />
<param name="show.comments" _expression_="0" />
<param name="section.autolabel.max.depth" _expression_="1" />
<param name="toc.section.depth" _expression_="1" />
<param name="section.label.includes.component.label" _expression_="1" />
<param name="make.valid.html" _expression_="1" />
<param name="html.cleanup" _expression_="1" />
<param name="chunker.output.encoding" _expression_="UTF-8" />
<param name="ignore.image.scaling" _expression_="1" />
<outputproperty name="indent" value="yes" />
<classpath refid="saxon.class.path" />

<copy todir="${output.dir}/tmp/OEBPS">
<fileset dir="OEBPS">

<copy todir="${output.dir}/tmp/META-INF">
<fileset dir="META-INF">

<!-- Don't know how to avoid genereation of "${destfilename}.html" by Saxon -->
<delete file="${output.dir}/tmp/book.html" />

<echo message="Generating book.epub" level="info" />

<!-- We create temporary zips so that minetype is the first one in the final zip  -->
<zip destfile="${output.dir}/temp.mimetype" basedir="${output.dir}/tmp" compress="false" includes="mimetype" />
<zip destfile="${output.dir}/temp.zip" basedir="${output.dir}/tmp/" level="9" compress="true" excludes="mimetype" includes="OEBPS/** META-INF/**" />
<zip destfile="${output.dir}/book.epub" update="true" keepcompression="true" encoding="UTF-8" excludes="*.html">
<zipfileset src="" />
<zipfileset src="" />

<!-- Have to delete these directories would be nicer to place then in tmp output dir 
<delete dir="./OEBPS" />
<delete dir="./META-INF" />

<!-- Make sure the epubcheck lib has a subfolder lib with saxon.jar and jing.jar in it
<epub.check epub="book" />


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]