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

"Error: invalid page number: 2" #63

Closed
Jap2-0 opened this issue Apr 20, 2024 · 7 comments
Closed

"Error: invalid page number: 2" #63

Jap2-0 opened this issue Apr 20, 2024 · 7 comments

Comments

@Jap2-0
Copy link

Jap2-0 commented Apr 20, 2024

I was trying to open one of my go-to pdfs for stress testing, but this seems to occur when trying to open any pdf in Firefox (nightly).

Stack trace:

Error: invalid page number: 2                                                    viewer.js:750:11
    2114013 https://mupdf.com/wasm/demo/lib/mupdf-wasm.js:1142
    _emscripten_asm_const_int https://mupdf.com/wasm/demo/lib/mupdf-wasm.js:3820
    invoke_vi https://mupdf.com/wasm/demo/lib/mupdf-wasm.js:6179
    createExportWrapper https://mupdf.com/wasm/demo/lib/mupdf-wasm.js:994
    loadPage https://mupdf.com/wasm/demo/lib/mupdf.js:1392
    getPageSize https://mupdf.com/wasm/demo/worker.js:78
    onmessage https://mupdf.com/wasm/demo/worker.js:39
    open_document_from_file https://mupdf.com/wasm/demo/viewer.js:750
    onchange https://mupdf.com/wasm/demo/index.html:1
@Jap2-0
Copy link
Author

Jap2-0 commented Apr 20, 2024

Nevermind, I also see this in Edge at https://mupdf.com/wasm/demo/index.html.

@Jap2-0
Copy link
Author

Jap2-0 commented Apr 20, 2024

Actually, this is dependent on the pdf I'm testing with. (Examples coming shortly.)

@jamie-lemon
Copy link
Collaborator

I'm getting an error trying to download your PDF, can you attach the files another way?

@Jap2-0
Copy link
Author

Jap2-0 commented Apr 23, 2024

@jamie-lemon
Copy link
Collaborator

This should now be resolved for you - please recheck, we just had to align that live demo page with what we have on the repo in examples/simple-viewer.

Please confirm it works and we can close this issue - thanks!

@Jap2-0
Copy link
Author

Jap2-0 commented Apr 24, 2024

Yep, that fixes it.


(Just as a side note—feel free to ignore this—if you want an absolute torture test for PDF readers to play around with, check out https://drive.google.com/file/d/1GQTR_epMR0rdkkDiW-C_3HlAgao7sgb1/view. I won't blame you for not looking at it, both Acrobat and Firefox have difficulty rendering it.)

@Jap2-0 Jap2-0 closed this as completed Apr 24, 2024
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

No branches or pull requests

2 participants