I'm setting up a spreadsheet which creates a pdf file and share it with someone to print it and sign it.
var content = getMessage(X,Y,Z, etc);
var FolderFile = DriveApp.getFoldersByName('CreatingFolderTest').next();
var FileCreation = FolderFile.createFile(EmployeeID, content, MimeType.PDF).addViewer(Email);
the issue is that when I'm trying to download the file it gives me an error that pdf file is not properly decoded.
Tried to search for solutions and found that it might the metadata tags I'm using
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width"/>
I expect that I can create a file in PDF format from the HTML file already in the code and send it to the employee to print it out! will be extra if I can add a password to the pdf file, but that's a kind of extra mile