{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/7587","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7587/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7587/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7587/events","html_url":"https://github.com/mozilla/pdf.js/issues/7587","id":174782504,"number":7587,"title":"Script5022 error when trying to view pdf with scanned image in ie11","user":{"login":"adam-knights","id":12710362,"avatar_url":"https://avatars.githubusercontent.com/u/12710362?v=3","gravatar_id":"","url":"https://api.github.com/users/adam-knights","html_url":"https://github.com/adam-knights","followers_url":"https://api.github.com/users/adam-knights/followers","following_url":"https://api.github.com/users/adam-knights/following{/other_user}","gists_url":"https://api.github.com/users/adam-knights/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-knights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-knights/subscriptions","organizations_url":"https://api.github.com/users/adam-knights/orgs","repos_url":"https://api.github.com/users/adam-knights/repos","events_url":"https://api.github.com/users/adam-knights/events{/privacy}","received_events_url":"https://api.github.com/users/adam-knights/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/1-other","name":"1-other","color":"DDDDDD"},{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-ie11-specific","name":"4-ie11-specific","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-02T15:10:43Z","updated_at":"2016-09-02T15:18:09Z","closed_at":"2016-09-02T15:18:09Z","body":"Pdf: \r\n[2_birds.pdf](https://github.com/mozilla/pdf.js/files/452246/2_birds.pdf)\r\n\r\n\r\nConfiguration:\r\n- Web browser and its version: ie11\r\n- Operating system and its version: window 7 64 bit\r\n- PDF.js version: pdfjs-dist v1.5.415\r\n- Is an extension:\r\n\r\nSteps to reproduce the problem:\r\n```\r\nlet pdfData = this.base64ToPdfData(encodedDoc);\r\n\r\n            window.document.write('<canvas id=\"af-canvas\"></canvas>');\r\n            PDFJS.workerSrc = '../assets/pdf.worker.js';\r\n            PDFJS.getDocument(pdfData).then(function(pdf) {\r\n              pdf.getPage(1).then(function(page) {\r\n                var scale = 1.5;\r\n                var viewport = page.getViewport(scale);\r\n\r\n                var canvas = window.document.getElementById('af-canvas');\r\n                var context = canvas.getContext('2d');\r\n                canvas.height = viewport.height;\r\n                canvas.width = viewport.width;\r\n\r\n                var renderContext = {\r\n                  canvasContext: context,\r\n                  viewport: viewport\r\n                };\r\n                page.render(renderContext);\r\n              });\r\n            });\r\n\r\n  base64ToPdfData(base64) {\r\n    var raw = atob(base64);\r\n    var uint8Array = new Uint8Array(raw.length);\r\n    for (var i = 0; i < raw.length; i++) {\r\n      uint8Array[i] = raw.charCodeAt(i);\r\n    }\r\n    return uint8Array;\r\n  },\r\n```\r\n\r\nThe pdf comes down in base64 encoded data, thus the above. I'm hoping this reproduces in a more basic sense for someone.\r\n\r\nWhat is the expected behavior? Display the pdf - see pdf in chrome for it working\r\n\r\nWhat went wrong? It doesnt render at all in ie11 and shows script5022 error in the debugger. It seems to fail at the line ``` this.ctx.drawImage(groupCtx.canvas, 0, 0);``` in the ```endGroup: function```.\r\n"}}
{"actor":{"display_login":"yurydelendik"}}