{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/5125","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/5125/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/5125/comments","events_url":"https://api.github.com/repos/electron/electron/issues/5125/events","html_url":"https://github.com/electron/electron/issues/5125","id":147810313,"number":5125,"title":"webContents.print Default Margins","user":{"login":"fxckdead","id":116668,"avatar_url":"https://avatars.githubusercontent.com/u/116668?v=3","gravatar_id":"","url":"https://api.github.com/users/fxckdead","html_url":"https://github.com/fxckdead","followers_url":"https://api.github.com/users/fxckdead/followers","following_url":"https://api.github.com/users/fxckdead/following{/other_user}","gists_url":"https://api.github.com/users/fxckdead/gists{/gist_id}","starred_url":"https://api.github.com/users/fxckdead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxckdead/subscriptions","organizations_url":"https://api.github.com/users/fxckdead/orgs","repos_url":"https://api.github.com/users/fxckdead/repos","events_url":"https://api.github.com/users/fxckdead/events{/privacy}","received_events_url":"https://api.github.com/users/fxckdead/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-12T16:45:47Z","updated_at":"2016-04-12T23:52:58Z","closed_at":null,"body":"* Electron version: 0.37.2\r\n* Operating system: Windows 7 x64 / OSX / Linux\r\n\r\nI want to know if there's some way to set page margins, coz `webContents.print` only accept 2 options (`printBackground` and `silent`) so i can't set margins, but in `webContents.printToPDF` you can define the option `marginsType` and i think it's same as the chrome option:\r\n\r\n![margins-chrome](https://cloud.githubusercontent.com/assets/116668/14468043/708bff26-00b4-11e6-83b7-d51a61908a79.png)\r\n\r\nIf i print in my Electron application it always set margins (bottom line in the image) and if i set \"no margins\" in chrome (i think its same as `marginsType: 1`) it prints like the bottom line:\r\n\r\n**(The blue line is where margin is)**\r\n![fullsizerender](https://cloud.githubusercontent.com/assets/116668/14467806/56c3e474-00b3-11e6-9d04-f6f61db91ff8.jpg)\r\n\r\n\r\nIs there some way to configure \"Global Margins\" for printer? or it must be in the API Framework of Electron? "},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/209154944","html_url":"https://github.com/electron/electron/issues/5125#issuecomment-209154944","issue_url":"https://api.github.com/repos/electron/electron/issues/5125","id":209154944,"user":{"login":"baconface","id":4763342,"avatar_url":"https://avatars.githubusercontent.com/u/4763342?v=3","gravatar_id":"","url":"https://api.github.com/users/baconface","html_url":"https://github.com/baconface","followers_url":"https://api.github.com/users/baconface/followers","following_url":"https://api.github.com/users/baconface/following{/other_user}","gists_url":"https://api.github.com/users/baconface/gists{/gist_id}","starred_url":"https://api.github.com/users/baconface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baconface/subscriptions","organizations_url":"https://api.github.com/users/baconface/orgs","repos_url":"https://api.github.com/users/baconface/repos","events_url":"https://api.github.com/users/baconface/events{/privacy}","received_events_url":"https://api.github.com/users/baconface/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T23:52:58Z","updated_at":"2016-04-12T23:52:58Z","body":"You should be able to do this through CSS by setting margins for the ```@page``` selector."}}