Skip to content

Instantly share code, notes, and snippets.

@tagplus5
tagplus5 / imageToText.gs
Created Dec 18, 2015
google apps script image to text ocr
View imageToText.gs
function doGet(request) {
if (request.parameters.url != undefined && request.parameters.url != "") {
var imageBlob = UrlFetchApp.fetch(request.parameters.url).getBlob();
var resource = {
title: imageBlob.getName(),
mimeType: imageBlob.getContentType()
};
var options = {
ocr: true
};