Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kobo Touch DRM-related error when trying to open ePub documented exported from Wallabag 1.8.1 (Framabag) #992

Closed
pieqq opened this issue Jan 7, 2015 · 9 comments

Comments

@pieqq
Copy link

pieqq commented Jan 7, 2015

I saw a similar issue (#748) but it has been closed, so I open a new one with more information.

I imported the following links in Wallabag, then exported them in ePub format and put them on my Kobo Touch eReader:

When trying to open them on the eReader, I see the following error message:

Oops! This document couldn't be opened
This document is protected by Adobe Digital Rights Management (DRM) and is not currently authorized for use with your Adobe ID. Please sign-in with the authorized Adobe ID and try again.
www.kobo.com/help

Obviously this error message is wrong, since these ePub files are not encrypted using any DRM. But anyway, the result is I cannot open these files on my eReader.

As suggested in #748, I tried to validate the ePub files using the idpf ePub validator form. All of them failed with the same error:

I/O error: error in opening zip file

However, I can successfully open these ePub files with my archive manager on Ubuntu 14.10...

Some more info:

  • Wallabag version: 1.8.1 (I'm using Framabag service)
  • Kobo software version: 3.11.0 (4d8eac1207, 10/16/14)
@tcitworld
Copy link
Member

This is definitely an error with the file, nothing to do with DRM indeed.
I suggest, in order of importance :

  • Installing Calibre and try to view ePub generated files with the ebook viewer. An error should display and give you the moment where it fails.
  • Exporting the files one by one and see which one(s) fail.
  • Opening the zip file with an archive manager, like you did, and validate the html files in the OEBPS folder with the W3C HTML validator. Three of your articles had errors by passing directly to the validator, but I didn't look carefully if there was errors which could create problems.

@tcitworld tcitworld added the Bug label Jan 10, 2015
@tcitworld tcitworld self-assigned this Jan 10, 2015
@pieqq
Copy link
Author

pieqq commented Jan 13, 2015

When I import the ePub in Calibre and try to visualize it, it works fine.
When I export them from Calibre to the Kobo device, it works fine.
However, if I try to copy directly the ePub generated by Wallabag into my Kobo device, I cannot read it (see description in my previous post).

Interestingly, Calibre does something to the ePub file. For instance, the original file as exported by Wallabag is 73.8 kb, but when exported by Calibre to my Kobo, it becomes only 51.1 kb.

I compared the content of both files, and it looks like the only modification is in book.opf (the difference in size is probably only due to Calibre using a heavier compression level):

--- /home/pierre/Downloads/C64/OEBPS/book.opf
+++ /home/pierre/Downloads/C64-calibre/OEBPS/book.opf
@@ -1,50 +1,52 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0"  encoding="UTF-8"?>
 <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="3.0">
-   <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-       <meta property="dcterms:modified">2015-01-13T05:50:19Z</meta>
+   <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+       <dc:creator xmlns:ns0="http://www.idpf.org/2007/opf" ns0:role="aut" ns0:file-as="wallabag">wallabag</dc:creator>
+<meta property="dcterms:modified">2015-01-13T05:50:19Z</meta>
        <dc:contributor>PHP</dc:contributor>
        <dc:contributor>wallabag</dc:contributor>
        <dc:title>An Introduction to Programming C-64 Demos</dc:title>
-       <dc:language>en</dc:language>
        <dc:identifier id="BookId">http://www.framabag.org</dc:identifier>
-       <dc:date>2015-01-13T05:50:19.000000+00:00</dc:date>
+       <dc:date>2015-01-13T05:50:19+00:00</dc:date>
        <dc:description>Some articles saved on my wallabag</dc:description>
        <dc:publisher>wallabag</dc:publisher>
        <dc:relation>wallabag</dc:relation>
-       <dc:creator>wallabag</dc:creator>
        <dc:source>http://www.framabag.org</dc:source>
-       <meta name="cover" content="coverImage" />
-       <meta name="generator" content="EPub (Version 3.2) by A. Grandt, http://www.phpclasses.org/package/6115" />
-   </metadata>
+       <meta name="cover" content="coverImage"/>
+       <meta name="generator" content="EPub (Version 3.2) by A. Grandt, http://www.phpclasses.org/package/6115"/>
+   <meta name="calibre:title_sort" content="Introduction to Programming C-64 Demos, An"/>
+<meta name="calibre:author_link_map" content="{&quot;wallabag&quot;: &quot;&quot;}"/>
+<dc:language>en</dc:language>
+<dc:identifier xmlns:ns1="http://www.idpf.org/2007/opf" ns1:scheme="calibre">7194cf17-cad5-40cd-9033-94330b960928</dc:identifier>
+</metadata>

    <manifest>
-       <item id="ncx" href="book.ncx" media-type="application/x-dtbncx+xml" />
-       <item id="css_CoverPageCss" href="Styles/CoverPage.css" media-type="text/css" />
-       <item id="CoverImage" href="images/Cover.png" media-type="image/png" />
-       <item id="ref_cover" href="CoverPage.xhtml" media-type="application/xhtml+xml" />
-       <item id="chapter1" href="Cover2.html" media-type="application/xhtml+xml" />
-       <item id="i_codeLinusimg1.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg1.png" media-type="image/png" />
-       <item id="i_codeLinusimg2.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg2.png" media-type="image/png" />
-       <item id="i_codeLinusimg3.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg3.png" media-type="image/png" />
-       <item id="i_codeLinusimg4.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg4.png" media-type="image/png" />
-       <item id="i_codeLinusimg5.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg5.png" media-type="image/png" />
-       <item id="i_codeLinusimg6.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg6.png" media-type="image/png" />
-       <item id="chapter2" href="An-Introduction-to-Programming-C-64-Demos.html" media-type="application/xhtml+xml" />
-       <item id="ref_toc" href="TOC.xhtml" media-type="application/xhtml+xml" />
-       <item id="toc" href="epub3toc.xhtml" media-type="application/xhtml+xml" properties="nav" />
+       <item id="ncx" href="book.ncx" media-type="application/x-dtbncx+xml"/>
+       <item id="css_CoverPageCss" href="Styles/CoverPage.css" media-type="text/css"/>
+       <item id="CoverImage" href="images/Cover.png" media-type="image/png"/>
+       <item id="ref_cover" href="CoverPage.xhtml" media-type="application/xhtml+xml"/>
+       <item id="chapter1" href="Cover2.html" media-type="application/xhtml+xml"/>
+       <item id="i_codeLinusimg1.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg1.png" media-type="image/png"/>
+       <item id="i_codeLinusimg2.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg2.png" media-type="image/png"/>
+       <item id="i_codeLinusimg3.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg3.png" media-type="image/png"/>
+       <item id="i_codeLinusimg4.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg4.png" media-type="image/png"/>
+       <item id="i_codeLinusimg5.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg5.png" media-type="image/png"/>
+       <item id="i_codeLinusimg6.png" href="images/http/www.antimon.org/code/Linus/codeLinusimg6.png" media-type="image/png"/>
+       <item id="chapter2" href="An-Introduction-to-Programming-C-64-Demos.html" media-type="application/xhtml+xml"/>
+       <item id="ref_toc" href="TOC.xhtml" media-type="application/xhtml+xml"/>
+       <item id="toc" href="epub3toc.xhtml" media-type="application/xhtml+xml" properties="nav"/>
    </manifest>

    <spine toc="ncx">
-       <itemref idref="ref_cover" linear="no" />
-       <itemref idref="chapter1" />
-       <itemref idref="ref_toc" linear="no" />
-       <itemref idref="chapter2" />
+       <itemref idref="ref_cover" linear="no"/>
+       <itemref idref="chapter1"/>
+       <itemref idref="ref_toc" linear="no"/>
+       <itemref idref="chapter2"/>
    </spine>

    <guide>
-       <reference type="cover" title="CoverPage" href="CoverPage.xhtml" />
-       <reference type="toc" title="Table of Contents" href="TOC.xhtml" />
-       <reference type="text" title="Notices" href="Cover2.html" />
+       <reference type="cover" title="CoverPage" href="CoverPage.xhtml"/>
+       <reference type="toc" title="Table of Contents" href="TOC.xhtml"/>
+       <reference type="text" title="Notices" href="Cover2.html"/>
    </guide>
 </package>

So I'm not sure what to do to generate Kobo-compatible ePub files from Wallabag directly... I guess it's not your fault guys! Should I report a bug to Kobo? Should you/me file a bug in the PHP ePub export lib you're using for Wallabag? (what lib is it?)

P.S.: I can provide both ePub files but I don't know how to attach a document to a GitHub issue...

@tcitworld
Copy link
Member

I don't think it's Kobo related if it can't be opened by the Epub Validator. I will look why I can change in the book.opf file in order to pass the test.
We use the PHPePub Class to generate ePubs : https://github.com/Grandt/PHPePub

@nicosomb
Copy link
Member

@tcitworld as the wallabag export expert, can you try this issue with wallabag v2 please?

@tcitworld
Copy link
Member

Oops. Will have a look.

@tcitworld
Copy link
Member

Well, as I don't have any Kobo device, I can't test it directly. I didn't remark any differences on first sight with the file you got, but since PHPePub got updated, you may have a chance it now works.

Here is a zipped file of your articles exported on v2 : Unread articles.epub.zip

I'll ask @Grandt for more help if it still occurs.

@nicosomb
Copy link
Member

@Pierrrrrrre Can you tell us if exported files given by @tcitworld work on your device?

@pieqq
Copy link
Author

pieqq commented Feb 29, 2016

Hey,

last year I lost my Kobo Touch reader, but since then I got another one, the Kobo Glo HD.

I just tried the provided file on it and it seems to work just fine. I can open it and navigate through it.

@nicosomb
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants