Convert PDF to Doc with Google Script Editor

依然范特西╮ 提交于 2019-12-05 13:45:16
function pdfToDoc() {  
  var fileBlob = DriveApp.getFileById('0B3m2D6239t6aWHo5TVpyYzhxV1U').getBlob();  
  var resource = {
    title: fileBlob.getName(),
    mimeType: fileBlob.getContentType()
  };
  var options = {
    ocr: true
  };
  var docFile = Drive.Files.insert(resource, fileBlob, options);  
  Logger.log(docFile.alternateLink);  
}

Add Drive API to google apps script project https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services

You can see you pdf file id on google drive when you download it http://i.imgur.com/3pYvwjx.png

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!