Last active
November 5, 2019 20:48
-
-
Save trevorfoskett/360c0ec9504e1813e648a75da70bdde8 to your computer and use it in GitHub Desktop.
Runs server-side function to return the contents of the document in base64 format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Runs server-side function to return the contents | |
* of the document in base64 format. | |
* | |
* @return {string} Base 64'd document content. | |
*/ | |
function genPDF() { | |
return new Promise(function(resolve, reject) { | |
google.script.run | |
.withSuccessHandler(function(blobB64) { | |
resolve(blobB64); | |
}) | |
.createPDF(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment