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

Unexpected token 'P', "PK #897

Open
marco-silvestri opened this issue Aug 6, 2024 · 2 comments
Open

Unexpected token 'P', "PK #897

marco-silvestri opened this issue Aug 6, 2024 · 2 comments

Comments

@marco-silvestri
Copy link

Hi,
when trying to implement the basic example:
<script> D2Reader.load({ url: new URL('http://localhost/mary-parker-follett_the-new-state.epub'), }).then(instance => { console.log("D2Reader loaded ", instance); }).catch(error => { console.error("error.message ", error.message); }); </script>

I get
(index):38 error.message Unexpected token 'P', "PK���

I've tried with different books but nothing has changed. in my package json I have _"@d-i-t-a/reader": "^2.4.10",
what could cause the issue?

@aferditamuriqi
Copy link
Member

@marco-silvestri you can't load an epub directly, it needs to be an exploded epub, and load via manifest (readium manifest)please take a look at the sample implementations in the viewer and if there are still questions, let me know.

@marco-silvestri
Copy link
Author

Ok, thanks! I will test it asap and let you know

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

No branches or pull requests

2 participants