basictomonokai

Google Apps Script-QRコード生成(BASE64)

Jul 26th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function generateQrCode() {
  2.   // QRコード生成
  3.   var text = 'こんにちは';
  4.   var response = UrlFetchApp.fetch("http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=" +text);
  5.   var image = response.getBlob();
  6.   var encoded = Utilities.base64Encode(image.getBytes());
  7.   Logger.log(encoded);
  8. }
Add Comment
Please, Sign In to add comment