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

Pagemode bookmarks won't work with embed pdfjs in Firefox #9180

Closed
brouillon opened this issue Nov 22, 2017 · 3 comments
Closed

Pagemode bookmarks won't work with embed pdfjs in Firefox #9180

brouillon opened this issue Nov 22, 2017 · 3 comments

Comments

@brouillon
Copy link

Configuration:

  • Firefox 57 64bits
  • Linux Mint 18.2
  • PDF.js v 2.0.144
  • Not in browser extension

Steps to reproduce the problem:

  1. embed pdf.js, and open a pdf with viewer and use of option #pagemode=bookmarks

What is the expected behavior?
The pdf will be rendered with bookmarks panel open

What went wrong?
The bookmarks pane wasn't open
Also note the rendering of the pdf is blank until an external event came as scroll pdf or resize browser window

Everything is fine in same site with chromium panel and rendering
I noticed in js console :
Error: Unknown action from worker: GetPageMode
pdf.worker.js:1298:5
messageHandlerComObjOnMessage@http://localhost/OpenTPE/OpenTPE/views/js/pdfjs/build/pdf.worker.js:2651:7
pdf.worker.js:1299:5
Error: Unknown action from worker: GetPageMode

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Nov 22, 2017

embed pdf.js, and open a pdf with viewer and use of option #pagemode=bookmarks

Please provide access to the complete example online, as requested in both https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md and https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md.

Also note the rendering of the pdf is blank until an external event came as scroll pdf or resize browser window

This sounds like an issue with your custom implementation of PDF.js, but from a distance it's impossible to tell what might be wrong.

Edit:

PDF.js v 2.0.144

I noticed in js console :
Error: Unknown action from worker: GetPageMode
pdf.worker.js:1298:5
messageHandlerComObjOnMessage@http://localhost/OpenTPE/OpenTPE/views/js/pdfjs/build/pdf.worker.js:2651:7
pdf.worker.js:1299:5
Error: Unknown action from worker: GetPageMode

The only way that could potentially happen is if you use different versions of the pdf.js and pdf.worker.js files, which is not supported.
However, after PR #8959 (which is present in the PDF.js version mentioned above) that will now throw an Error immediately on the getDocument call.

@brouillon
Copy link
Author

I can't provide access to an online example, so i extracted the pdfviewer part of this project and put it online and with the inverse of murphy's law everything goes right :(

It's the same pdfjs files, same pdf, just some part differs like include of css or js script

Don't understand what's going on.

In my project pdf is loaded at page 0 and i need to scroll to force refresh of the view, the bookmarks pane can be opened manually but won't open automatically as #pagemode will.

I found a way to fix it in my project, use of 127.0.01 instead of localhost for accessing it o_O
Don't know if it's in link with pdf.js, firefox or apache so let's close it

Thanks a lot

@pzanwar03
Copy link

Is there added Bookmark?

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

4 participants