Closed jirutka closed 10 years ago
From the code you have pasted it looks like the error is in pdf.js code. This is a library we use as is. However, we are not always on the latest version. Can you please try your pdf here http://mozilla.github.io/pdf.js/web/viewer.html If you still see the same error, report it to https://github.com/mozilla/pdf.js project. If not, we may need to update to a later version of the external pdf.js lib.
Since no further feedback has been received, this issue will be closed shortly. Please reply in this thread if this is still an issue and you are able to provide the information requested or a copy of the problem file.
@jirutka in pdf.js try to find...
var loadTestFontId = 'lt' + Date.now() + this.loadTestFontId++;
And replace it with...
var loadTestFontId = 'lt' + (+Date.now()) + this.loadTestFontId++;
It can happen when the Date.now method is overloaded to return a Date instance instead of UNIX-milliseconds.
@charnog Since this seems to be a bug in the external library pdf.js, can you please report this to the pdf.js (https://github.com/mozilla/pdf.js) project? We try to avoid using custom versions of their library. Once fixed by the pdf.js project I will update the included library.
@loftux it's not a pdf.js or a media-viewers bug. According to 15.9.4.4 "The now function return a Number value...". So the polyfill MUST return a Number value too.
if (!Date.now) {
Date.now = function now() {
return new Date().getTime();
};
}
Not a bug with the media-viewers project
When I open a document page, MediaViewer loads (navigation bar, white “paper”, …), but the actual document doesn’t load (progress wheel is spinning). JavaScript console shows:
And there’s some context:
The weird thing is that it’s failing only somewhere. It seems that there’s no problem in Firefox (regardless of the platform), but some people with Chrome has problem.