{"action":"created","issue":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/499","repository_url":"https://api.github.com/repos/amir20/phantomjs-node","labels_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/499/comments","events_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/499/events","html_url":"https://github.com/amir20/phantomjs-node/issues/499","id":163798308,"number":499,"title":"how can i  use a spe variable  in  header or footer content callback ","user":{"login":"ibeeger","id":1124832,"avatar_url":"https://avatars.githubusercontent.com/u/1124832?v=3","gravatar_id":"","url":"https://api.github.com/users/ibeeger","html_url":"https://github.com/ibeeger","followers_url":"https://api.github.com/users/ibeeger/followers","following_url":"https://api.github.com/users/ibeeger/following{/other_user}","gists_url":"https://api.github.com/users/ibeeger/gists{/gist_id}","starred_url":"https://api.github.com/users/ibeeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibeeger/subscriptions","organizations_url":"https://api.github.com/users/ibeeger/orgs","repos_url":"https://api.github.com/users/ibeeger/repos","events_url":"https://api.github.com/users/ibeeger/events{/privacy}","received_events_url":"https://api.github.com/users/ibeeger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-05T08:36:05Z","updated_at":"2016-07-05T13:32:55Z","closed_at":null,"body":"<pre>\r\n            var title =\"标题\"\r\n            var config = {\r\n                width: \"1040px\",\r\n                height: \"1414px\",\r\n                borderLeft: \"5px solid #000\",\r\n                margin: {\r\n                    top: \"0px\",\r\n                    left: \"15px\",\r\n                    right: \"5px\",\r\n                    bottom: \"0px\"\r\n                },\r\n                orientation: \"portrait\",\r\n                header: {\r\n                    height: 315,\r\n                    contents: phInstance.callback(function(page, num) {\r\n                    //这里的 title 获取不到 \r\n                    return title;\r\n                })\r\n                },\r\n                footer: {\r\n                    height: 50,\r\n                    contents: phInstance.callback(function(pageNum, numPages) {\r\n                        return \"<div style='border-top:8px dashed #000'></div><p style='text-align:center;'>底部\" + pageNum + \"/\" + numPages + \"</p>\";\r\n                    })\r\n                }\r\n            }\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/comments/230479066","html_url":"https://github.com/amir20/phantomjs-node/issues/499#issuecomment-230479066","issue_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/499","id":230479066,"user":{"login":"amir20","id":260667,"avatar_url":"https://avatars.githubusercontent.com/u/260667?v=3","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":"2016-07-05T13:32:55Z","updated_at":"2016-07-05T13:32:55Z","body":"Sorry, I don't know what is spe variable?"}}
{"actor":{"display_login":"amir20"}}