尝试使用此选项将工作表导出为PDF。一切正常,但页码不会出现。谁能让我知道为什么?感谢
var url = ss.getUrl(); //gets url
url = url.replace(/edit/,'');
var url_ext = 'export?exportFormat=pdf&format=pdf' +
'&size=letter' +
'&portrait=false' +
'&fitw=true' +
'&sheetnames=false&printtitle=false' +
'&pagenumbers=true&gridlines=false' +
'&fzr=true' +
'&gid=GID'
var token = ScriptApp.getOAuthToken();
var response = UrlFetchApp.fetch(url + url_ext, {
headers: {
'Authorization': 'Bearer ' + token
}
});
var blob = response.getBlob().setName(sheet.getName() + '.pdf');