Phantom.js resize screen

Set view Port Size does not work for me in headless mode, therefore I tried to use javascriptExcutor to resize the screen with javascript (does not really work):

((JavascriptExecutor) webDriver).executeScript(“window.setsize(arguments[0] , (1920, 1024)”);