我想从第一页删除页眉,并且我将页眉定义为:
header = {
height: header_height,
contents: phantom.callback(function(pageNum, numPages) {
if(pageNum == 1) {
return "";
}
return header_contents;
})
};
但它用header_height
留下了空白空白。有没有办法为第一页设置header.height=0
?
您不能专门为第一页设置边距。但是您可以在第一页包含css样式,因为phantomjs尊重css margin