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

Epub fails to render, no errors are logged #1248

Closed
SirFitz opened this issue Feb 3, 2022 · 1 comment · Fixed by #1309
Closed

Epub fails to render, no errors are logged #1248

SirFitz opened this issue Feb 3, 2022 · 1 comment · Fixed by #1309

Comments

@SirFitz
Copy link

SirFitz commented Feb 3, 2022

I tried the basic setup below, but no success, could I have some guidance here?
Thanks in advance!

   <div id="area"></div>

    <script type="text/javascript">

        let book;
        document.addEventListener('DOMContentLoaded', () => {
              var book = ePub("https://s3.amazonaws.com/moby-dick/moby-dick.epub");
              var rendition = book.renderTo("area");
              rendition.display();
        });
    </script>
    <script src="https://cdn.jsdelivr.net/npm/epubjs/dist/epub.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.6.1/jszip.min.js" integrity="sha512-qDzk+Wqv8uAmrIr0t9Hjo4qM3DjvwTWuuuG3w9H8JBKd1EMpMaUEKoHKYbX6yP+ilTloEADFKFwKMzOZLlgTEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    
@martinfday
Copy link

martinfday commented Feb 24, 2022

I experience the same issue...

Found the problem, load the jszip lib before the epub.min.js

`

<script type="text/javascript">

    let book;
    document.addEventListener('DOMContentLoaded', () => {
          var book = ePub("https://s3.amazonaws.com/moby-dick/moby-dick.epub");
          var rendition = book.renderTo("area");
          rendition.display();
    });
</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.6.1/jszip.min.js" integrity="sha512-qDzk+Wqv8uAmrIr0t9Hjo4qM3DjvwTWuuuG3w9H8JBKd1EMpMaUEKoHKYbX6yP+ilTloEADFKFwKMzOZLlgTEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="https://cdn.jsdelivr.net/npm/epubjs/dist/epub.min.js"></script>


`

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

Successfully merging a pull request may close this issue.

2 participants