{"action":"created","issue":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/729","repository_url":"https://api.github.com/repos/amir20/phantomjs-node","labels_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/729/comments","events_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/729/events","html_url":"https://github.com/amir20/phantomjs-node/issues/729","id":296015140,"number":729,"title":"Render pdf as blank page without error","user":{"login":"mickeyjohn","id":14140486,"avatar_url":"https://avatars1.githubusercontent.com/u/14140486?v=4","gravatar_id":"","url":"https://api.github.com/users/mickeyjohn","html_url":"https://github.com/mickeyjohn","followers_url":"https://api.github.com/users/mickeyjohn/followers","following_url":"https://api.github.com/users/mickeyjohn/following{/other_user}","gists_url":"https://api.github.com/users/mickeyjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/mickeyjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickeyjohn/subscriptions","organizations_url":"https://api.github.com/users/mickeyjohn/orgs","repos_url":"https://api.github.com/users/mickeyjohn/repos","events_url":"https://api.github.com/users/mickeyjohn/events{/privacy}","received_events_url":"https://api.github.com/users/mickeyjohn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-02-09T21:18:38Z","updated_at":"2018-02-10T01:18:11Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\npage.render would create a capture of the page and save as an pdf file.\r\n\r\n### Actual behavior\r\nIt can only render successfully once. Subsequent renders end up with blank pdf file without any error.\r\n\r\n### Steps to reproduce the behavior\r\nMy codes:\r\n\r\n```\r\nvar log = console.log;\r\nvar nolog = function () { };\r\n\r\nvar sitepage = null;\r\nvar phInstance = null;\r\n\r\nphantom.create(['--ssl-protocol=any'], {\r\n    phantomPath: '/home/user/.npm-global/bin/phantomjs',\r\n    logger: { warn: log, debug: log, error: log }\r\n})\r\n    .then(instance => {\r\n        phInstance = instance;\r\n        return instance.createPage();\r\n    })\r\n    .then(page => {\r\n        sitepage = page;\r\n        return sitepage.on('viewportSize', { width: 800, height: 600 });\r\n    })\r\n    .then(() => {\r\n        return sitepage.open('https://www.google.ca');\r\n    })\r\n    .then(() => {\r\n        return sitepage.render(__dirname + '/test.pdf', { format: 'pdf' })\r\n            .then(() => {\r\n                console.log('DONE');                \r\n            });\r\n    })\r\n    .catch(error => {\r\n        console.timeEnd('test');\r\n        console.log('Center Error: ', error);\r\n    })\r\n    .then(() => {\r\n        phInstance.exit();\r\n        // process.exit();\r\n    });;\r\n\r\n```\r\nIt is driving me crazy now. Could anyone please help showing me why or the best way to troubleshot the issue? I have another testing site still running well using phantomjs and phantom-node the same way to render.\r\n\r\n### Environment\r\n\r\n- OS: Ubuntu destop 14.04\r\n- Node version (`node -v`): v8.9.4\r\n- package version: 4.0.12\r\n"},"comment":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/comments/364613357","html_url":"https://github.com/amir20/phantomjs-node/issues/729#issuecomment-364613357","issue_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/729","id":364613357,"user":{"login":"amir20","id":260667,"avatar_url":"https://avatars3.githubusercontent.com/u/260667?v=4","gravatar_id":"","url":"https://api.github.com/users/amir20","html_url":"https://github.com/amir20","followers_url":"https://api.github.com/users/amir20/followers","following_url":"https://api.github.com/users/amir20/following{/other_user}","gists_url":"https://api.github.com/users/amir20/gists{/gist_id}","starred_url":"https://api.github.com/users/amir20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir20/subscriptions","organizations_url":"https://api.github.com/users/amir20/orgs","repos_url":"https://api.github.com/users/amir20/repos","events_url":"https://api.github.com/users/amir20/events{/privacy}","received_events_url":"https://api.github.com/users/amir20/received_events","type":"User","site_admin":false},"created_at":"2018-02-10T01:18:11Z","updated_at":"2018-02-10T01:18:11Z","author_association":"OWNER","body":"I didn't setup phantomjs. It's already included as a dependency. See https://github.com/amir20/phantomjs-node/blob/master/package.json#L28. "}}
{"actor":{"display_login":"amir20"}}