epub

Python - ZipFile' object has no attribute 'seek'

僤鯓⒐⒋嵵緔 提交于 2019-12-13 02:51:48
问题 got a problem with my code here. I am trying to get a script working that can make an ePub file. They are compressed zip files that are deflated (i.e. without compression) and have to be done in order. This current script will create a .zip but it is unusable a creates errors both in Python Shell and on the Terminal app when running the zip -t command. The error in question is as follows on the Python shell: Traceback (most recent call last): File "/Users/Hal/Documents/GitHub/Damore-essay

The mimetype file has an extra field of length n. The use of the extra field feature of the ZIP format is not permitted for the mimetype file

随声附和 提交于 2019-12-12 18:33:03
问题 I am using the C# library DotNetZip (Ionic.Zip and Ionic.Zlib) to generate an ebook from a directory. Directory looks like this: BookName | |___content/ | images/ | css/ | (html pages, .ops, .ncx) | |___META-INF/ | container.xml | |___mimetype The code to generate the archive looks like this: using (ZipFile zip = new ZipFile(pathTemp + ".epub")) { zip.RemoveSelectedEntries("*.*"); zip.AddFile(mimetype, "").CompressionLevel = CompressionLevel.None; zip.AddDirectory(pathTemp + "\\content",

How do you use PowerShell to extract Epub meta data (XML)?

我们两清 提交于 2019-12-12 17:16:43
问题 I'm not new to PowerShell, but I am to XML parsing. Basically I want to extract the title, creator, and publisher information from the OPF file, which is just an xml file. The book below is Moby Dick from Google's epub v3 sample collection. <?xml version="1.0" encoding="UTF-8"?> <package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="pub- id" prefix="cc: http://creativecommons.org/ns#"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title id=

epub 3, how to prevent pages from running in background ? (iBooks / Readium)

痞子三分冷 提交于 2019-12-12 10:09:44
问题 I have created and validated an ePub 3 which I am currently testing. I am using a fixed layout.. <meta property="rendition:layout">pre-paginated</meta> <meta property="rendition:orientation">portrait</meta> <meta property="rendition:spread">none< /meta> It works nicely, however multiple pages seems to load and run at once when testing in different readers. I'm using jQuery's document ready to kick things off and play audio, run animations, etc. When testing in iBooks I open the book to page 1

Creating epub with a2x versus ZIP

a 夏天 提交于 2019-12-12 04:40:00
问题 Using this a2x command creates a valid .epub file (book.epub): $ a2x -v -k -f epub -d book book.asc a2x: archiving: mimetype a2x: archiving: META-INF/container.xml a2x: archiving: OEBPS/ch01.html a2x: archiving: OEBPS/ch02.html a2x: archiving: OEBPS/content.opf a2x: archiving: OEBPS/docbook-xsl.css a2x: archiving: OEBPS/index.html a2x: archiving: OEBPS/pr01.html a2x: archiving: OEBPS/toc.ncx However, if I try to manually create an .epub archive using the artifacts (contained in book.epub.d )

Count total number of pages in epub

时光怂恿深爱的人放手 提交于 2019-12-12 03:05:32
问题 I am new with epub. I have many different epub format files and i am going this file readable online. I don't have much idea about what is in epub file ? There is any way so i can know how many pages in my epub file ? I can do it using xml , javascript , PHP or any other way if you have. 回答1: Epub files are responsive ebooks which changes number of pages according to screen size. Also the page numbers depends on the viewer application & device. 回答2: An EPUB file is basically a ZIP file which

Load .epub content to UIWebview with only Horizontal scrolling

故事扮演 提交于 2019-12-12 02:33:37
问题 Currently I'm working on to display Epub content in UIWebview . From this link I have downloaded one sample app for Epub which fulfills all my needs except one thing that is, need to scroll the webview horizontally instead of vertical scroll. Anyone please help me out to do this. 回答1: that mean you need to make a pagination for the html content .. this done by some java script functions .. there is already uploaded open source files to do this .. just google it :). 来源: https://stackoverflow

Is it possible to DRM EPub files without using any 3rd party software / services?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 18:37:29
问题 I am looking for a way to add DRM protection to EPub files without buying Adobe software for $6500 or using any 3rd party service. We would like to set up our own DRM server. Scenario: I upload a hello world EPub file, and the system adds DRM to it. Is it possible? I hear many times that this is impossible, but could someone clarify why? How exactly does Adobe DRM work and why could not I build my own DRM server? Thanks 回答1: The problem is not building a DRM server. You can do that. The

landscape fixed layout epub 3 viewing only 1 page at a time starting from indesign file

自作多情 提交于 2019-12-11 10:42:58
问题 I am creating an indesign cs6 epub3 fixed layout with landscape only mode, viewing only one page at a time. I added the meta <meta property="rendition:layout">pre-paginated</meta> <meta property="rendition:orientation">landscape</meta> <meta property="rendition:spread">none</meta> and I also specified the width and height in css and each xhtml file with <meta name="viewport" content="width=1024, height=768" /> I want the document to appear as one landscape page only, not as a two sides book.

How to create ePub with System.IO.Compression.ZipArchive?

南笙酒味 提交于 2019-12-11 10:26:02
问题 I've written some code generating ePub archive using .NET 4.5 System.IO.Compression.ZipArchive. I need this to be part of a Portable Class Library (PCL), hence using a subset of .NET fx. I have issue with the mimetype file containing the magic 'application/epub+zip'. Having read the specs, I add that file first with no compression. Despite this care, the produced ePub archive isn't conforming to specs. Specs demand the content of the mimetype file should start at position 38. Mine starts at