Theme 接口描述

 

获取PowerPoint幻灯片主题的字体、配色方案、格式等信息。

接口方法1:getSlidesTheme()获取幻灯片主题信息

HTTP 请求方法:GET

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

请求参数:

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

Java代码示例:

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

public class getSlidesTheme {
    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 ThemeApi themeApi = new ThemeApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 0;
        String password = null;
        String folder = "input";
        String storage = null;
        Theme response = themeApi.getSlidesTheme(name, slideIndex, password, folder, storage);
    }
}

接口方法2:getSlidesThemeColorScheme()获取幻灯片主题配色方案信息

HTTP 请求方法:GET

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/slides/{slideIndex}/theme/colorScheme

请求参数:

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

Java代码示例:

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

public class getSlidesThemeColorScheme {
    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 ThemeApi themeApi = new ThemeApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 0;
        String password = null;
        String folder = "input";
        String storage = null;
        ColorScheme response = themeApi.getSlidesThemeColorScheme(name, slideIndex, password, folder, storage);
    }
}

接口方法3:getSlidesThemeFontScheme()获取幻灯片主题字体方案信息

HTTP 请求方法:GET

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/slides/{slideIndex}/theme/fontScheme

请求参数:

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

Java代码示例:

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

public class getSlidesThemeFontScheme {
    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 ThemeApi themeApi = new ThemeApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 0;
        String password = null;
        String folder = "input";
        String storage = null;
        FontScheme response = themeApi.getSlidesThemeFontScheme(name, slideIndex, password, folder, storage);
    }
}

接口方法4:getSlidesThemeFormatScheme()获取幻灯片主题格式方案信息

HTTP 请求方法:GET

请求URL:https://api.e-iceblue.cn/v1/powerpoint/{name}/slides/{slideIndex}/theme/formatScheme

请求参数:

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

Java代码示例:

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

public class getSlidesThemeFormatScheme {
    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 ThemeApi themeApi = new ThemeApi(configuration);

    public static void main(String[] args) throws ApiException {
    String name = "template.pptx";
    Integer  slideIndex = 0;
    String password = null;
    String folder = "input";
    String storage = null;
    FormatScheme response = themeApi.getSlidesThemeFormatScheme(name, slideIndex, password, folder, storage); 
    }
}