{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/5601","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5601/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5601/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5601/events","html_url":"https://github.com/mozilla/pdf.js/issues/5601","id":53120531,"node_id":"MDU6SXNzdWU1MzEyMDUzMQ==","number":5601,"title":"Callback for when PDF is finished rendering?","user":{"login":"evisiion","id":8092414,"node_id":"MDQ6VXNlcjgwOTI0MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8092414?v=4","gravatar_id":"","url":"https://api.github.com/users/evisiion","html_url":"https://github.com/evisiion","followers_url":"https://api.github.com/users/evisiion/followers","following_url":"https://api.github.com/users/evisiion/following{/other_user}","gists_url":"https://api.github.com/users/evisiion/gists{/gist_id}","starred_url":"https://api.github.com/users/evisiion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evisiion/subscriptions","organizations_url":"https://api.github.com/users/evisiion/orgs","repos_url":"https://api.github.com/users/evisiion/repos","events_url":"https://api.github.com/users/evisiion/events{/privacy}","received_events_url":"https://api.github.com/users/evisiion/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2014-12-30T14:55:46Z","updated_at":"2018-07-18T03:42:08Z","closed_at":"2014-12-30T21:30:45Z","author_association":"NONE","body":"I need to render a gradient to cover the bottom half of the rendered PDF. I'm working for a newspaper and we're doing an app that shows the paper with a teaser before subscribing. \n\nThe problem is, the gradient needs to be painted on top of the PDF, so it has to wait until the PDF is finished rendering. In fact, on mobile browsers attempting the gradient rendering before the PDF is finished results in extremely wild behavior (the canvas re-renders and blinks every time the page scrolls even a bit) resulting in constant re-paints and the content will render upside down sometimes.\n\nSo quite simply, I need to run a callback when the PDF has finished rendering.\n\nCan you guys support callbacks? Or send out an event when the rendering is done?\n"},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/405799320","html_url":"https://github.com/mozilla/pdf.js/issues/5601#issuecomment-405799320","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5601","id":405799320,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTc5OTMyMA==","user":{"login":"turquoise-turtle","id":16552560,"node_id":"MDQ6VXNlcjE2NTUyNTYw","avatar_url":"https://avatars0.githubusercontent.com/u/16552560?v=4","gravatar_id":"","url":"https://api.github.com/users/turquoise-turtle","html_url":"https://github.com/turquoise-turtle","followers_url":"https://api.github.com/users/turquoise-turtle/followers","following_url":"https://api.github.com/users/turquoise-turtle/following{/other_user}","gists_url":"https://api.github.com/users/turquoise-turtle/gists{/gist_id}","starred_url":"https://api.github.com/users/turquoise-turtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turquoise-turtle/subscriptions","organizations_url":"https://api.github.com/users/turquoise-turtle/orgs","repos_url":"https://api.github.com/users/turquoise-turtle/repos","events_url":"https://api.github.com/users/turquoise-turtle/events{/privacy}","received_events_url":"https://api.github.com/users/turquoise-turtle/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T03:42:08Z","updated_at":"2018-07-18T03:42:08Z","author_association":"NONE","body":"Using the viewer provided with pdf.js, `pagesloaded` event worked for me (I open the print dialog as soon as it is finished loading):\r\n\r\n```\r\ndocument.addEventListener('pagesloaded', function (e) {\r\n\twindow.print();\r\n}, true);\r\n```"}}
{"actor":{"display_login":"turquoise-turtle"}}