Google文档Api Drive没有方法导出

时间:2021-10-08 15:27:04

I need to get my doc file in pdf format. I read this article https://developers.google.com/drive/v3/web/manage-downloads & try to use it, but i don't have method export in my drive object. Can you help me?

我需要以pdf格式获取我的doc文件。我阅读了这篇文章https://developers.google.com/drive/v3/web/manage-downloads并尝试使用它,但我的驱动对象中没有方法导出。你能帮助我吗?

Google文档Api Drive没有方法导出

This is my Pom-file:

这是我的Pom文件:

<google-api-version>1.20.0</google-api-version>
<dependency>
            <groupId>com.google.api-client</groupId>
            <artifactId>google-api-client</artifactId>
            <version>${google-api-version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client</artifactId>
            <version>${google-api-version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-drive</artifactId>
            <version>v2-rev170-${google-api-version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client-jetty</artifactId>
            <version>1.21.0</version>
        </dependency>

1 个解决方案

#1


0  

change your version in POM to this

将您在POM中的版本更改为此

<dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v3-rev6-1.20.0</version>
</dependency>

#1


0  

change your version in POM to this

将您在POM中的版本更改为此

<dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v3-rev6-1.20.0</version>
</dependency>