{"action":"created","issue":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2801","repository_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf","labels_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2801/labels{/name}","comments_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2801/comments","events_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2801/events","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2801","id":134196005,"number":2801,"title":"wkhtmltopdf doesn't include esri map to pdf file in Windows (in Linux works)","user":{"login":"gf59ru","id":9844145,"avatar_url":"https://avatars.githubusercontent.com/u/9844145?v=3","gravatar_id":"","url":"https://api.github.com/users/gf59ru","html_url":"https://github.com/gf59ru","followers_url":"https://api.github.com/users/gf59ru/followers","following_url":"https://api.github.com/users/gf59ru/following{/other_user}","gists_url":"https://api.github.com/users/gf59ru/gists{/gist_id}","starred_url":"https://api.github.com/users/gf59ru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gf59ru/subscriptions","organizations_url":"https://api.github.com/users/gf59ru/orgs","repos_url":"https://api.github.com/users/gf59ru/repos","events_url":"https://api.github.com/users/gf59ru/events{/privacy}","received_events_url":"https://api.github.com/users/gf59ru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-17T06:50:00Z","updated_at":"2016-02-19T04:58:39Z","closed_at":null,"body":"Hello!\r\n\r\nI have task to generate pdf with map in my web application.\r\nMap shows using [ArcGIS Javascript library](https://developers.arcgis.com/javascript/)\r\n\r\nWhen I run `wkhtmltopdf.exe map.html map.pdf` with any parameters (as `--javascript-delay`), result pdf file doesn't contain map while `map.html` shows it. Pdf file has 1.3 KB size only.\r\n\r\nI tried same action at Linux OS (CentOS 6) and pdf generated with map (command was `wkhtmltopdf --javascript-delay 3000 map.html map.pdf`), and pdf file has 215 KB size.\r\n\r\nMay be reason is in some security settings (eg deny javascript from local files), but `map.html` file is local and works correctly both at Windows and Linux.\r\n\r\nMy `map.html` content (from [Esri javascript samples](https://developers.arcgis.com/javascript/jssamples/map_simple.html)):\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n  <head>\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n    <meta name=\"viewport\" content=\"initial-scale=1, maximum-scale=1,user-scalable=no\"/>\r\n    <title>Simple Map</title>\r\n    <link rel=\"stylesheet\" href=\"https://js.arcgis.com/3.15/esri/css/esri.css\">\r\n    <style>\r\n      html, body, #map {\r\n        height: 100%;\r\n        margin: 0;\r\n        padding: 0;\r\n      }\r\n    </style>\r\n    <script src=\"https://js.arcgis.com/3.15/\"></script>\r\n    <script>\r\n      var map;\r\n\r\n      require([\"esri/map\", \"dojo/domReady!\"], function(Map) {\r\n        map = new Map(\"map\", {\r\n          basemap: \"topo\",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd\r\n          center: [-122.45, 37.75], // longitude, latitude\r\n          zoom: 13\r\n        });\r\n      });\r\n    </script>\r\n  </head>\r\n\r\n  <body>\r\n    <div id=\"map\"></div>\r\n  </body>\r\n</html>\r\n```"},"comment":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/comments/186051970","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2801#issuecomment-186051970","issue_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2801","id":186051970,"user":{"login":"gf59ru","id":9844145,"avatar_url":"https://avatars.githubusercontent.com/u/9844145?v=3","gravatar_id":"","url":"https://api.github.com/users/gf59ru","html_url":"https://github.com/gf59ru","followers_url":"https://api.github.com/users/gf59ru/followers","following_url":"https://api.github.com/users/gf59ru/following{/other_user}","gists_url":"https://api.github.com/users/gf59ru/gists{/gist_id}","starred_url":"https://api.github.com/users/gf59ru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gf59ru/subscriptions","organizations_url":"https://api.github.com/users/gf59ru/orgs","repos_url":"https://api.github.com/users/gf59ru/repos","events_url":"https://api.github.com/users/gf59ru/events{/privacy}","received_events_url":"https://api.github.com/users/gf59ru/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T04:58:38Z","updated_at":"2016-02-19T04:58:38Z","body":"Yes, I tried - map didn't be shown\r\nWhen I launched wkhtmltopdf in Linux without javascript delay (`wkhtmltopdf map.html map.pdf` command), esri logo was drawed and rest of map wasn't, you can look [here](http://1drv.ms/1ovWChb), normal map (with js delay) [here](http://1drv.ms/1ovWI8D)\r\nBut in Windows even esri logo not shows, look [here](http://1drv.ms/1ovWNcg).\r\n\r\nAlso I add debug messages in map javascript, `map.html` becomes so:\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n  <head>\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n    <meta name=\"viewport\" content=\"initial-scale=1, maximum-scale=1,user-scalable=no\"/>\r\n    <title>Simple Map</title>\r\n    <link rel=\"stylesheet\" href=\"https://js.arcgis.com/3.15/esri/css/esri.css\">\r\n    <style>\r\n      html, body, #map {\r\n        height: 100%;\r\n        margin: 0;\r\n        padding: 0;\r\n      }\r\n    </style>\r\n    <script src=\"https://js.arcgis.com/3.15/\"></script>\r\n    <script>\r\n      /********** console.log start message ********/\r\n      console.log('start map script');\r\n      var map;\r\n      /********** console.log require message ********/\r\n      console.log('require');\r\n      require([\"esri/map\", \"dojo/domReady!\"], function(Map) {\r\n        /********** console.log map creation message ********/\r\n        console.log('map create');\r\n        map = new Map(\"map\", {\r\n          basemap: \"topo\",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd\r\n          center: [-122.45, 37.75], // longitude, latitude\r\n          zoom: 13\r\n        });\r\n        /********** console.log map successfully created message ********/\r\n        console.log('map was created');\r\n      });\r\n    </script>\r\n  </head>\r\n\r\n  <body>\r\n    <div id=\"map\"></div>\r\n  </body>\r\n</html>\r\n```\r\nThen enabled js debugging (`wkhtmltopdf.exe --debug-javascript --javascript-delay 10000 map.html map.pdf` command) and saw such output:\r\n```\r\nLoading pages (1/6)\r\nWarning: file:///C:/Path/To/map.html:16 start map script\r\nWarning: file:///C:/Path/To/map.html:16 require\r\nWarning: file:///C:/Path/To/map.html:20 map create\r\nWarning: file:///C:/Path/To/map.html:20 map was created\r\nCounting pages (2/6)\r\nResolving links (4/6)\r\nLoading headers and footers (5/6)\r\nPrinting pages (6/6)\r\nDone\r\n```\r\nSo, javascript works perfectly but somehow its results doesn't includes in result pdf file."}}