В прошлом году я использовал этот код в скрипте Google Apps без ошибок. Сегодня он больше не работает. Ошибка показывает: «Не удалось преобразовать текст/html в приложение/pdf». Спасибо за помощь.
function testToPDF() {
const pdfFolder = DriveApp.getFolderById("1QHlMXx_IFWe90u4fLcprRWp");
var html = "Hello world"
+ "The quick brown fox jumped over the lazy dog";
var blob = Utilities.newBlob(html, "text/html", "text");
var pdf = blob.getAs("application/pdf");
const pdfFile = pdfFolder.createFile(pdf).setName("text.pdf");
return pdfFile.getUrl();
}
Подробнее здесь: https://stackoverflow.com/questions/687 ... ng-anymore