I used to use this code to convert HTML code into PDF files, but since yesterday is not working anymore !
function htmlToPDF() {
var html = "<h1>Hello world</h1>"
var blob = Utilities.newBlob(html, "text/html", "text.html");
var pdf = blob.getAs(MimeType.PDF)
DriveApp.createFile(pdf).setName("text.pdf");
}
The error I got: "Exception: Conversion from text/html to application/pdf failed. "
Can you help me please?