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

PDF Viewer not loading (MIME type was blocked) #3277

Open
jaredl2013 opened this issue Jan 5, 2025 · 3 comments
Open

PDF Viewer not loading (MIME type was blocked) #3277

jaredl2013 opened this issue Jan 5, 2025 · 3 comments

Comments

@jaredl2013
Copy link

Short Notice from the maintainer

Describe the bug/problem

The issue is when you select a book and click "read in browser" the page would be blank and not load the pdf.

To Reproduce

Steps to reproduce the behavior:

  1. Select a book from your library
  2. Select to view in browser

Expected behavior

When clicking to read in browser for the pdf to load.

I fixed my issue by editing the source page: "C:\Calibre-Web_internal\cps\templates\readpdf.html" and changing pdf.mjs, viewer.mjs and pdf.worker.mjs to pdf.js, viewer.js and pdf.worker.js. Also copying the mjs files and saving as js files.

Error in the inspect page of browser said it was the wrong mime type. It was text/plain.

image

@OzzieIsaacs
Copy link
Collaborator

Sounds like this one: #896 (comment)

I‘ll rename the files

@OzzieIsaacs
Copy link
Collaborator

It's merged, if you update to the newest nightly version, you will have the fix. It will be published in the next release

@jaredl2013
Copy link
Author

It's merged, if you update to the newest nightly version, you will have the fix. It will be published in the next release

Appreciate it! Thanks

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

2 participants