Comments (6)
Updated the sources. Please try again.
from android-pdf.js.
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.
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.
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.
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.
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)
- Problems passing parameters into WebView on older versions of Android HOT 18
- blurry HOT 9
- Not Working HOT 7
- Select text not working HOT 1
- Always starts at first page of PDF HOT 1
- Android - pdf. js works on local pdf file HOT 1
- Showing "Page: /" on white page HOT 2
- PDFJS.getDocument Uncaught TypeError: undefined is not a function
- Only first page is getting displayed
- Quality of pdf is very low
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-pdf.js.