[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,maybe the first line in my zip task was misleading, I created temp.mimetype. If I adjust it to use the file name you suggest it does not make a difference.<zip destfile="${output.dir}/mimetype.zip" 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/**" /><!-- Missing option to add -X as parameter --><zip destfile="${output.dir}/book.epub" update="true" keepcompression="true" encoding="UTF-8" excludes="*.html"><zipfileset src="" /><zipfileset src="" /></zip>I read in Bobs description for epub3 (http://sourceforge.net/projects/docbook/files/epub3/) that I need to specify -X for the Ant task to avoid this error. Is this something I can do with the Apache Ant task?Best regards, Lars2014-02-17 17:50 GMT+01:00 Nils Cordes <info@nilscordes.de>:
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)."CiaoNilsNils CordesPlesser Str. 1112435 BerlinDeutschlandTelefon: +49 176 10091551E-Mail: info@nilscordes.deWeb: http://nilscordes.de2014-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 regardsNils2014-02-17 16:32 GMT+01:00 Lars Vogel <lars.vogel@gmail.com>:Hi,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" /></xslt><copy todir="${output.dir}/tmp/OEBPS"><fileset dir="OEBPS"></fileset></copy><copy todir="${output.dir}/tmp/META-INF"><fileset dir="META-INF"></fileset></copy><!-- 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="" /></zip><!-- 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" /></target>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]