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.JS not working on safari #3797

Closed
syifan opened this issue Oct 10, 2013 · 9 comments
Closed

PDF.JS not working on safari #3797

syifan opened this issue Oct 10, 2013 · 9 comments

Comments

@syifan
Copy link

syifan commented Oct 10, 2013

PDF.js is not working on my safari 5.1.0. Even the demo does not work. Error in the console is as follows.

thumbs is undefined.

l10n.js:877#thumbs is undefined.
l10n.js:794#thumbs_label is undefined.
l10n.js:877#thumbs_label is undefined.
l10n.js:794#outline is undefined.
l10n.js:877#outline is undefined.
l10n.js:794#outline_label is undefined.
l10n.js:877#outline_label is undefined.
l10n.js:794#find_label is undefined.
l10n.js:877#find_label is undefined.
l10n.js:794#find_previous is undefined.
l10n.js:877#find_previous is undefined.
l10n.js:794#find_previous_label is undefined.
l10n.js:877#find_previous_label is undefined.
l10n.js:794#find_next is undefined.
l10n.js:877#find_next is undefined.
l10n.js:794#find_next_label is undefined.
l10n.js:877#find_next_label is undefined.
l10n.js:794#find_highlight is undefined.
l10n.js:877#find_highlight is undefined.
l10n.js:794#find_match_case_label is undefined.
l10n.js:877#find_match_case_label is undefined.
l10n.js:794#presentation_mode is undefined.
l10n.js:877#presentation_mode is undefined.
l10n.js:794#presentation_mode_label is undefined.
l10n.js:877#presentation_mode_label is undefined.
l10n.js:794#open_file is undefined.
l10n.js:877#open_file is undefined.
l10n.js:794#open_file_label is undefined.
l10n.js:877#open_file_label is undefined.
l10n.js:794#print is undefined.
l10n.js:877#print is undefined.
l10n.js:794#print_label is undefined.
l10n.js:877#print_label is undefined.
l10n.js:794#download is undefined.
l10n.js:877#download is undefined.
l10n.js:794#download_label is undefined.
l10n.js:877#download_label is undefined.
l10n.js:794#bookmark is undefined.
l10n.js:877#bookmark is undefined.
l10n.js:794#bookmark_label is undefined.
l10n.js:877#bookmark_label is undefined.
l10n.js:794#first_page is undefined.
l10n.js:877#first_page is undefined.
l10n.js:794#first_page_label is undefined.
l10n.js:877#first_page_label is undefined.
l10n.js:794#last_page is undefined.
l10n.js:877#last_page is undefined.
l10n.js:794#last_page_label is undefined.
l10n.js:877#last_page_label is undefined.
l10n.js:794#page_rotate_cw is undefined.
l10n.js:877#page_rotate_cw is undefined.
l10n.js:794#page_rotate_cw_label is undefined.
l10n.js:877#page_rotate_cw_label is undefined.
l10n.js:794#page_rotate_ccw is undefined.
l10n.js:877#page_rotate_ccw is undefined.
l10n.js:794#page_rotate_ccw_label is undefined.
l10n.js:877#page_rotate_ccw_label is undefined.
l10n.js:794#toggle_sidebar is undefined.
l10n.js:877#toggle_sidebar is undefined.
l10n.js:794#toggle_sidebar_label is undefined.
l10n.js:877#toggle_sidebar_label is undefined.
l10n.js:794#findbar is undefined.
l10n.js:877#findbar is undefined.
l10n.js:794#findbar_label is undefined.
l10n.js:877#findbar_label is undefined.
l10n.js:794#previous is undefined.
l10n.js:877#previous is undefined.
l10n.js:794#previous_label is undefined.
l10n.js:877#previous_label is undefined.
l10n.js:794#next is undefined.
l10n.js:877#next is undefined.
l10n.js:794#next_label is undefined.
l10n.js:877#next_label is undefined.
l10n.js:794#page_label is undefined.
l10n.js:877#page_label is undefined.
l10n.js:794#presentation_mode is undefined.
l10n.js:877#presentation_mode is undefined.
l10n.js:794#presentation_mode_label is undefined.
l10n.js:877#presentation_mode_label is undefined.
l10n.js:794#open_file is undefined.
l10n.js:877#open_file is undefined.
l10n.js:794#open_file_label is undefined.
l10n.js:877#open_file_label is undefined.
l10n.js:794#print is undefined.
l10n.js:877#print is undefined.
l10n.js:794#print_label is undefined.
l10n.js:877#print_label is undefined.
l10n.js:794#download is undefined.
l10n.js:877#download is undefined.
l10n.js:794#download_label is undefined.
l10n.js:877#download_label is undefined.
l10n.js:794#bookmark is undefined.
l10n.js:877#bookmark is undefined.
l10n.js:794#bookmark_label is undefined.
l10n.js:877#bookmark_label is undefined.
l10n.js:794#tools is undefined.
l10n.js:877#tools is undefined.
l10n.js:794#tools_label is undefined.
l10n.js:877#tools_label is undefined.
l10n.js:794#zoom_out is undefined.
l10n.js:877#zoom_out is undefined.
l10n.js:794#zoom_out_label is undefined.
l10n.js:877#zoom_out_label is undefined.
l10n.js:794#zoom_in is undefined.
l10n.js:877#zoom_in is undefined.
l10n.js:794#zoom_in_label is undefined.
l10n.js:877#zoom_in_label is undefined.
l10n.js:794#zoom is undefined.
l10n.js:877#zoom is undefined.
l10n.js:794#page_scale_auto is undefined.
l10n.js:877#page_scale_auto is undefined.
l10n.js:794#page_scale_actual is undefined.
l10n.js:877#page_scale_actual is undefined.
l10n.js:794#page_scale_fit is undefined.
l10n.js:877#page_scale_fit is undefined.
l10n.js:794#page_scale_width is undefined.
l10n.js:877#page_scale_width is undefined.
l10n.js:794#first_page is undefined.
l10n.js:877#first_page is undefined.
l10n.js:794#last_page is undefined.
l10n.js:877#last_page is undefined.
l10n.js:794#page_rotate_cw is undefined.
l10n.js:877#page_rotate_cw is undefined.
l10n.js:794#page_rotate_ccw is undefined.
l10n.js:877#page_rotate_ccw is undefined.
l10n.js:794#error_more_info is undefined.
l10n.js:877#error_more_info is undefined.
l10n.js:794#error_less_info is undefined.
l10n.js:877#error_less_info is undefined.
l10n.js:794#error_close is undefined.
l10n.js:877#error_close is undefined.
l10n.js:794#password_label is undefined.
l10n.js:877#password_label is undefined.
l10n.js:794#password_cancel is undefined.
l10n.js:877#password_cancel is undefined.
l10n.js:794#password_ok is undefined.
l10n.js:877#password_ok is undefined.
Warning: Setting up fake worker.
pdf.js:4356TypeError: 'undefined' is not an object (evaluating 'PDFJS.WorkerMessageHandler.setup')

@timvandermeij
Copy link
Contributor

Please provide more information on which operating system you're using and if these errors occur locally or also with the viewer on http://mozilla.github.io/pdf.js/web/viewer.html.

It might also be related to #3760 if you're using Windows.

@syifan
Copy link
Author

syifan commented Oct 10, 2013

Thanks, I was using safari on Mac osx 10.6.8. The errors occur on the viewer. It also have some other problems locally and on safari of ios7.

@o0x2a
Copy link

o0x2a commented Oct 22, 2013

I tried out the current code on master branch and I'm getting following error from viewer when load the page in qt Webkit (AppleWebkit/534.34)

TypeError: 'undefined' is not an object (evaluating 'PDFJS.WorkerMessageHandler.setup')

  http://localhost:8888/src/display/api.js:611 in WorkerTransport_setupFakeWorker
  http://localhost:8888/src/display/api.js:545 in transportTest
  http://localhost:8888/web/compatibility.js:310 in functionPrototypeBindBound
  http://localhost:8888/src/shared/util.js:1047 in messageHandlerComObjOnMessage

@rodoabad
Copy link

rodoabad commented Nov 4, 2013

Is this the same thing as this error.

Warning: Setting up fake worker. pdf.js
Warning: Unhandled rejection: TypeError: Cannot call method 'setup' of undefined
TypeError: Cannot call method 'setup' of undefined
at Object.WorkerTransport_setupFakeWorker [as setupFakeWorker]

This happens even though I have

PDFJS.disableWorker = false;

Using Chrome and FF (latest).

Why does it still try to setup fake workers even though I have it set to false?

@albertmatyi
Copy link

Same issue here. Tested on:

  • Ubuntu 12.04
    • Chromium 30
    • UX 28.0a1
  • OSX
    • Chrome 31.0

With PDFJS.disableWorker = true

line 4697: PDFJS.WorkerMessageHandler is undefined therefore setup fails

With PDFJS.disableWorker = false the document is not loaded and none of the callbacks in PDFJS.getDocument(url).then(success, fail) are called.

@timvandermeij
Copy link
Contributor

Is this still an issue?

@trevorturk
Copy link

I think this issue has been resolved. I ran into the error but fixed it by
updating the library.

On Tuesday, March 18, 2014, Tim van der Meij notifications@github.com
wrote:

Is this still an issue?

Reply to this email directly or view it on GitHubhttps://github.com//issues/3797#issuecomment-37999776
.

@thangamani2015
Copy link

I am using IOS7.1.1 pdf.js is opening very slow . Even i tried the sample too. Its getting loaded finally but it take time. Can you let me know why it is happening. This is happening the especially in IOS7. But its works well in IOS8 and Ipads.

Eventhough i have minified the pdf.js and pdf.worker.js, but is its same issue.

Please suggest how to fix this?

@Jeevanandanj
Copy link

This issue is occurring because pdf worker js is not loaded before pdf.js.

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

9 participants