Properties 接口描述

 

用于获取、设置及删除PowerPoint文档属性。

接口方法1: getPptDocumentProperties()获取PowerPoint文档属性

HTTP 请求方法:GET

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/documentproperties

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

import spire.cloud.powerpoint.sdk.*;
import spire.cloud.powerpoint.sdk.api.PropertiesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class getPptDocumentProperties {
    static String appId = "your id";
    static String appKey = "your key";
    static String baseUrl = "https://api.e-iceblue.cn";
    static Configuration configuration = new Configuration(appId, appKey,baseUrl);
    static PropertiesApi propertiesApi = new PropertiesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "getPptDocumentProperties.pptx";
        String password = null;
        String folder = "input";
        String storage = null;
        DocumentProperties response = propertiesApi.getPptDocumentProperties(name, password, folder, storage);
    }
}

接口方法2: setPptDocumentProperties()设置PowerPoint文档属性

HTTP 请求方法:POST

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/documentproperties

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
properties object { "SelfUri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" }, "AlternateLinks": [ { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } ], "List": [ { "SelfUri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" }, "AlternateLinks": [ { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } ], "Name": "string", "Value": "string", "BuiltIn": true } ] } 新的文档属性
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

import spire.cloud.powerpoint.sdk.*;
import spire.cloud.powerpoint.sdk.api.PropertiesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class setPptDocumentProperties {
    static String appId = "your id";
    static String appKey = "your key";
    static String baseUrl = "https://api.e-iceblue.cn";
    static Configuration configuration = new Configuration(appId, appKey,baseUrl);
    static PropertiesApi propertiesApi = new PropertiesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "setPptDocumentProperties.pptx";
        String password = null;
        String folder = "input";
        String storage = null;

        java.util.ArrayList propertyList = new java.util.ArrayList();
        DocumentProperty property1 = new DocumentProperty();
        property1.setName("Keywords");
        property1.setValue("Set document properties.");
        property1.setBuiltIn(false);
        propertyList.add(property1);
        DocumentProperty property2 = new DocumentProperty();
        property2.setName( "Author");
        property2.setValue("eiceblue");
        property2.setBuiltIn(false);
        propertyList.add(property2);
        DocumentProperty property3 = new DocumentProperty();
        property3.setName("Company");
        property3.setValue("iceblue");
        property3.setBuiltIn(false);
        propertyList.add(property3);
        DocumentProperty property4 = new DocumentProperty();
        property4.setName("LastSavedBy");
        property4.setValue("该 Email 地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。");
        property4.setBuiltIn(false);
        propertyList.add(property4);
        DocumentProperty property5 = new DocumentProperty();
        property5.setName("SharedDoc");
        property5.setValue("true");
        property5.setBuiltIn(false);
        propertyList.add(property5);
        DocumentProperties properties = new DocumentProperties();
        properties.list(propertyList);
        DocumentProperties response = propertiesApi.setPptDocumentProperties(name, properties, password, folder, storage);
    }
}

接口方法3: deletePptDocumentProperties()删除PowerPoint文档属性

HTTP 请求方法:DELETE

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/documentproperties

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

import spire.cloud.powerpoint.sdk.*;
import spire.cloud.powerpoint.sdk.api.PropertiesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class deletePptDocumentProperties {
    static String appId = "your id";
    static String appKey = "your key";
    static String baseUrl = "https://api.e-iceblue.cn";
    static Configuration configuration = new Configuration(appId, appKey,baseUrl);
    static PropertiesApi propertiesApi = new PropertiesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "deletePptDocumentProperties.pptx";
        String password = null;
        String folder = "input";
        String storage = null;
        DocumentProperties response = propertiesApi.deletePptDocumentProperties(name, password, folder, storage);
    }
}

接口方法4: getPptDocumentProperty()获取PowerPoint文档属性

HTTP 请求方法:GET

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/documentproperties/{propertyName}

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
propertyName string   文档属性名称
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

import spire.cloud.powerpoint.sdk.*;
import spire.cloud.powerpoint.sdk.api.PropertiesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class getPptDocumentProperty {
    static String appId = "your id";
    static String appKey = "your key";
    static String baseUrl = "https://api.e-iceblue.cn";
    static Configuration configuration = new Configuration(appId, appKey,baseUrl);
    static PropertiesApi propertiesApi = new PropertiesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "getPptDocumentProperty.pptx";
        String propertyName = "Author";//Available values : Company, Format, LastSavedTime, Title
        String password = null;
        String folder = "input";
        String storage = null;
        DocumentProperty response = propertiesApi.getPptDocumentProperty(name, propertyName, password, folder, storage);
    }
}

接口方法5: setPptDocumentProperty()设置PowerPoint文档属性

HTTP 请求方法:PUT

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/documentproperties/{propertyName}

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
propertyName string   文档属性名称
property object { "SelfUri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" }, "AlternateLinks": [ { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } ], "Name": "string", "Value": "string", "BuiltIn": true } 属性的值
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

import spire.cloud.powerpoint.sdk.*;
import spire.cloud.powerpoint.sdk.api.PropertiesApi;
import spire.cloud.powerpoint.sdk.model.*;
import spire.cloud.powerpoint.sdk.api.DocumentApi;
import spire.cloud.pdf.sdk.ApiException;

public class setPptDocumentProperty {
    static String appId = "your id";
    static String appKey = "your key";
    static String baseUrl = "https://api.e-iceblue.cn";
    static Configuration configuration = new Configuration(appId, appKey,baseUrl);
    static PropertiesApi propertiesApi = new PropertiesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "setPptDocumentProperty.pptx";
        String propertyName = "Keywords";
        DocumentProperty property = new DocumentProperty();
        property.setName("Keywords");
        property.setValue("SetPptDocumentProperty_pptx");
        property.setBuiltIn(false);
        String password = null;
        String folder = "input";
        String storage = null;
        DocumentProperty response = propertiesApi.setPptDocumentProperty(name, propertyName, property, password, folder, storage);
    }
}

接口方法6: deletePptDocumentProperty()删除PowerPoint文档属性

HTTP 请求方法:DELETE

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/documentproperties/{propertyName}

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
propertyName string   文档属性名称
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

import spire.cloud.powerpoint.sdk.*;
import spire.cloud.powerpoint.sdk.api.PropertiesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class deletePptDocumentProperty {
    static String appId = "your id";
    static String appKey = "your key";
    static String baseUrl = "https://api.e-iceblue.cn";
    static Configuration configuration = new Configuration(appId, appKey,baseUrl);
    static PropertiesApi propertiesApi = new PropertiesApi(configuration);

    public static void main(String[] args) throws spire.cloud.pdf.sdk.ApiException {
        String name = "deletePptDocumentProperty.pptx";
        String propertyName = "Author";
        String password = null;
        String folder = "input";
        String storage = null;
        DocumentProperties response = propertiesApi.deletePptDocumentProperty(name, propertyName, password, folder, storage);
    }
}