我正在构建HTML格式的PDF列表.在列表中,我想要包含下载链接和打印按钮/链接.有没有办法在没有用户看到PDF或打开PDF查看器的情况下直接打开PDF的"打印"对话框?
将PDF下载到隐藏的iframe并触发使用JavaScript打印的一些变体?
我正在从谷歌电子表格中的脚本编辑器发送 http 请求,但我不断收到以下错误消息:
`Google Apps Script: You do not have permission to call UrlFetchApp.fetch. Required permissions: https://www.googleapis.com/auth/script.external_request`
Run Code Online (Sandbox Code Playgroud)
我正在使用 onEdit 功能:
function onEdit(e){
var ui = SpreadsheetApp.getUi();
var response = UrlFetchApp.fetch('http://www.eur-api.idomoo.com/');
Logger.log(response.getContentText());
}
Run Code Online (Sandbox Code Playgroud)
我不知道为什么我会收到这个错误?我还授予了 script.external_request 范围的权限,任何帮助将不胜感激。
一段时间以来,我无法从我的 Google 帐户在 Google Apps 脚本中为我正在使用的文件之外的范围提供任何新的 OAuth 授权(.currentonly有效,其他一切都无效)。
它要求提供我想要使用的 Google 帐户,并在选择它显示的帐户后:
此应用已被阻止
此应用试图访问您 Google 帐户中的敏感信息。为确保您的帐户安全,Google 阻止了此访问。
看截图:

甚至没有显示具有请求权限概述的屏幕。对于我尝试添加权限的每个新的或旧的电子表格文件,都会发生这种情况。但是在停止工作之前已经获得 OA 的电子表格会定期更新项目触发器。
这是我的清单文件:
{
"timeZone": "Europe/Paris",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets.currentonly", // this works
"https://www.googleapis.com/auth/drive", // this doesn't work
"https://www.googleapis.com/auth/spreadsheets" // this also doesn't work
],
"runtimeVersion": "V8"
}
Run Code Online (Sandbox Code Playgroud)
当我尝试从不同的 Google 帐户执行相同操作时,一切正常。因此,我认为这与整个 Google 帐户设置有关。
我尝试启用,Less secure app access但没有帮助。
是否有可能在该帐户中禁用了来自未经验证的 3rd 方应用程序的访问?我怎样才能再次启用它?