Skip to content

Cannot parse the generated epub #130

Description

@zjamshidi

I'm trying to generate an epub in my Android app and then show it using the FolioReader. Today I succeed to integrate the epublib library and generate my first epub. However, it could not be parsed by the reader!

FolioReader utilizes r2-streamer-kotlin to parse the epub file and it expects the opf file to have a package tag but in the genearted epub the contenet.opf tags has opf prefix. How can I remove the prefix?

Activity

  1. zjamshidi commented on Mar 11, 2020

    @zjamshidi
    Author

    Here is my code

                Book book = new Book();
                Metadata metadata = book.getMetadata();
    
                // Set the title
                metadata.addTitle("Epublib test book 1");
    
                // Add an Author
                metadata.addAuthor(new Author("Joe", "Tester"));
    
                // Set cover image
                book.setCoverImage(new Resource(context.getAssets().open("book1/cover.jpg"), "cover.jpg" ));
    
                // Add Chapter 1
                book.addSection("Introduction",
                        new Resource( context.getAssets().open("book1/chapter1.html"), "chapter1.html" ));
    
                // Add css file
                book.getResources().add(
                        new Resource( context.getAssets().open("book1/styles.css"), "styles.css" ));
    
    // Create EpubWriter
                EpubWriter epubWriter = new EpubWriter();
    
  2. westernbuptboy commented on Nov 23, 2022

    @westernbuptboy

    Hi. I encountered the same issue, did you solve it?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions