Skip to content

Conversation

tcorral
Copy link

@tcorral tcorral commented Apr 10, 2017

  • When the minified version is used the resolver of the worker can not find it properly and throws 404 error.
  • The problem was that:
    • It was getting the current name of the file.
    • It was replacing .js by .worker.js
  • When it was loading the unminified version it was working fine because:
    • pdf.js - .js + .worker.js = pdf.worker.js
  • When it was loading the minified version it didtn't work because:
    • pdf.min.js - .js + .worker.js = pdf.min.worker.js
    • pdf.min.worker.js doesn't exist the real file name is pdf.worker.min.js

- When the minified version is used the resolver of the worker can not find it properly and throws 404 error.
- The problem was that:
  - It was getting the current name of the file.
  - It was replacing **.js** by **.worker.js**
- When it was loading the unminified version it was working fine because:
  - *pdf.js - .js + .worker.js*  = **pdf.worker.js**
- When it was loading the minified version it didtn't work because:
  - *pdf.min.js - .js + .worker.js* = **pdf.min.worker.js**
  - **pdf.min.worker.js** doesn't exist the real file name is **pdf.worker.min.js**
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/34e8aefb10ac767/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/34e8aefb10ac767/output.txt

Total script time: 2.75 mins

Published

@yurydelendik yurydelendik merged commit ad1023f into mozilla:master Apr 13, 2017
@yurydelendik
Copy link
Contributor

Thank you.

@timvandermeij timvandermeij removed the request for review from yurydelendik April 13, 2017 20:16
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Fix worker resolution on using minified version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants