GithubHelp home page GithubHelp logo

Comments (6)

pauldmps avatar pauldmps commented on August 16, 2024

Updated the sources. Please try again.

from android-pdf.js.

marchip avatar marchip commented on August 16, 2024

Update doesn't work.
I got same error:

08-20 10:57:47.665: I/Web Console(27493): Warning: Setting up fake worker.:201
08-20 10:57:48.286: I/Web Console(27493): Warning: Unhandled rejection: RangeError: ArrayBuffer length minus the byteOffset is not a multiple of the element size.
08-20 10:57:48.286: I/Web Console(27493): RangeError: ArrayBuffer length minus the byteOffset is not a multiple of the element size.
08-20 10:57:48.286: I/Web Console(27493): at Object.MurmurHash3_64_update as update
08-20 10:57:48.286: I/Web Console(27493): at Object.PartialEvaluator_preEvaluateFont as preEvaluateFont
08-20 10:57:48.286: I/Web Console(27493): at Object.PartialEvaluator_loadFont as loadFont
08-20 10:57:48.286: I/Web Console(27493): at Object.PartialEvaluator_handleSetFont as handleSetFont
08-20 10:57:48.286: I/Web Console(27493): at Object.next (file:///android_asset/pdfviewer/pdf.worker.js:16151:27)
08-20 10:57:48.286: I/Web Console(27493): at Object.Promise (file:///android_asset/pdfviewer/pdf.js:1195:16)
08-20 10:57:48.286: I/Web Console(27493): at Object.PartialEvaluator_getOperatorList as getOperatorList
08-20 10:57:48.286: I/Web Console(27493): at Object.onResolve (file:///android_asset/pdfviewer/pdf.worker.js:3443:33)
08-20 10:57:48.286: I/Web Console(27493): at Object.runHandlers (file:///android_asset/pdfviewer/pdf.js:1117:35):201

I'm using Samsung Galaxy S4 with Android 4.3
Could you resolve?
Thanks

from android-pdf.js.

pauldmps avatar pauldmps commented on August 16, 2024

Try setting
PDFJS.disableWorker = true;

instead of
PDFJS.disableWorker = false;

in customview,js

I'm not really a Javascript developer. So I cannot help you much. This project is based mostly on the work done by 'Butelo' https://bitbucket.org/butelo/pdfviewer
I just made some changes to make it open any files & page changing from actionbar buttons.

Also cross-domain requests are not supported. You cannot open a pdf from the internet by passing the url to the script. You must download it first to the device.

Unfortunately, I do not have any 4.3 device to test right now.

from android-pdf.js.

ericlentz avatar ericlentz commented on August 16, 2024

This issue is resolved by using the beta version of pdf.js and the pdf.worker.js. On one PDF I had another error, but it resolved the above error. This was tested on a 4.1.1 version. Of course, it seems to work fine on 4.4 with the stable version of pdf.js. The beta version I used was 1.0.473.

from android-pdf.js.

pauldmps avatar pauldmps commented on August 16, 2024

Thank you very much for providing this feedback.

Currently, I'm testing my app on 4.4. I'll update to latest beta when I test on 4.3 or lower.

Closing this issue as resolved!

from android-pdf.js.

lcopley avatar lcopley commented on August 16, 2024

I had a similar problem (with the same error message) and imported the latest version (1.1.something) of PDF.js and pdf.worker.js with good results...in Android 4.3 on my phone

from android-pdf.js.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.