{"action":"opened","issue":{"url":"https://api.github.com/repos/pauldmps/Android-pdf.js/issues/6","labels_url":"https://api.github.com/repos/pauldmps/Android-pdf.js/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/pauldmps/Android-pdf.js/issues/6/comments","events_url":"https://api.github.com/repos/pauldmps/Android-pdf.js/issues/6/events","html_url":"https://github.com/pauldmps/Android-pdf.js/issues/6","id":69421476,"number":6,"title":"Always starts at first page of PDF","user":{"login":"alimalik91","id":6697604,"avatar_url":"https://avatars.githubusercontent.com/u/6697604?v=3","gravatar_id":"","url":"https://api.github.com/users/alimalik91","html_url":"https://github.com/alimalik91","followers_url":"https://api.github.com/users/alimalik91/followers","following_url":"https://api.github.com/users/alimalik91/following{/other_user}","gists_url":"https://api.github.com/users/alimalik91/gists{/gist_id}","starred_url":"https://api.github.com/users/alimalik91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimalik91/subscriptions","organizations_url":"https://api.github.com/users/alimalik91/orgs","repos_url":"https://api.github.com/users/alimalik91/repos","events_url":"https://api.github.com/users/alimalik91/events{/privacy}","received_events_url":"https://api.github.com/users/alimalik91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-19T12:46:06Z","updated_at":"2015-04-19T12:46:06Z","closed_at":null,"body":"Hi,\r\n\r\nI load the PDF like this: \r\npdfView.loadUrl(\"file://\" + getFilesDir() + \"/index.html?file=\" + path);\r\n\r\nThen I do this: \r\npdfView.loadUrl(\"javascript:onGotoPage(\" + currentPage + \")\");\r\n\r\nI have written my own function in customview.js:\r\n    function onGotoPage(pageNo) {\r\n      if (pageNo < 1 || pageNo > pdfDoc.numPages) {\r\n            return;\r\n      }\r\n      pageNum = pageNo;\r\n      queueRenderPage(pageNum);\r\n    }\r\n\r\nBut it always displays the first page.\r\nIf I call this function from an event, like a button press, it works fine. But when I call this function the first time just after the file has been loaded, it doesn't work and displays the first page.\r\n\r\nI think it has something to do in javascript? I have not much experience in java script!"}}