dongpin1059 2019-06-26 10:29
浏览 138

如何阅读上传到Google云端硬盘的PDF文件的内容?

I want to read the content of the PDF file which is uploaded into google drive. The content should be in a human readable format, not in binary format. Right now I'm using google drive API to read the content but unable to do that.

 $fileId = $request['thesis_google_id'];
    $response = $service->files->get($fileId,   array(
    'alt' => 'media'));
    $content = $response->getBody()->read(2024);
  • 写回答

2条回答 默认 最新

  • drug95107 2019-06-26 11:08
    关注

    The core functionality of the Google Drive API is to download and upload files in Google Drive. This API does not give you the ability to read anything it just stores the files for you and allows you to download them.

    The Google Docs api does give you access to read and write files but i suspect it only supports google docs format files not PDF.

    You will need to download the file locally then use some form of PDF reader for PHP to read it.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度