Slides 接口描述

 

操作PowerPoint幻灯片,包括获取、创建、删除、设置和复制幻灯片,设置和删除幻灯片背景,将幻灯片另存为其他文档格式等。

接口方法1:getSlidesList()获取幻灯片信息

HTTP 请求方法:GET

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

请求参数:

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

Java代码示例:

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

public class getSlidesList {
    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 SlidesApi slidesApi = new SlidesApi(configuration);
    
    public static void main(String[] args) throws ApiException {
    String name = "template.pptx";
    String password = null;
    String folder = "input";
    String storage = null;
    Slides slidesList = slidesApi.getSlidesList(name, password, folder, storage); 
    }
}

接口方法2:addSlide()创建幻灯片

HTTP 请求方法:POST

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
position integer   需要创建幻灯片的目标位置,默认添加到末尾
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null
layoutAlias string   新创建的幻灯片的版式别名。别名可以是幻灯片版式的类型、名字或索引

Java代码示例:

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

public class addSlide {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  position = 2;
        String password = null;
        String folder = "input";
        String storage = null;
        String layoutAlias = "TwoTextAndTwoObjects";//TitleOnly TwoTextAndTwoObjects Title TextAndObject Blank
        Slides response = slidesApi.addSlide(name, position, password, folder, storage, layoutAlias);
    }
}

接口方法3:deleteSlidesList()删除幻灯片

HTTP 请求方法:DELETE

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

请求参数:

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

Java代码示例:

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

public class deleteSlidesList {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        String slides = "0,2,4";
        String password = null;
        String folder = "input";
        String storage = null;
        Slides response = slidesApi.deleteSlidesList(name, slides, password, folder, storage);
    }
}

接口方法4:getSlide()获取幻灯片信息

HTTP 请求方法:GET

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

请求参数:

参数 是否必选 类型 可选值范围 说明
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.SlidesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class getSlide {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 2;
        String password = "test";
        String folder = "input";
        String storage = null;
        Slide response = slidesApi.getSlide(name, slideIndex, password, folder, storage);
    }
}

接口方法5:setSlide()设置幻灯片

HTTP 请求方法:PUT

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
slideIndex integer   幻灯片索引
slideDto object { "SelfUri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" }, "AlternateLinks": [ { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } ], "Width": 0, "Height": 0, "ShowMasterShapes": true, "LayoutSlide": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "Shapes": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "Theme": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "Placeholders": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "Images": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "Comments": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "Background": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } }, "NotesSlide": { "Uri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } } } 设置幻灯片的数据
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

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

public class setSlide {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 2;
        String password = null;
        String folder = "input";
        String storage = null;
        Slide slideDto = slidesApi.getSlide(name, slideIndex, password, folder, storage);
        ResourceUriElement uriElement = new ResourceUriElement();
        ResourceUri rUri = new ResourceUri();
        rUri.setHref("TitleOnly");
        uriElement.setUri(rUri);
        slideDto.setAlternateLinks(null);
        slideDto.setLayoutSlide(uriElement);
        slideDto.setShowMasterShapes(!slideDto.isShowMasterShapes());
        Slide response = slidesApi.setSlide(name, slideIndex, slideDto, password, folder, storage);
    }
}

接口方法6:deleteSlideByIndex()删除指定索引处的幻灯片

HTTP 请求方法:DELETE

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

请求参数:

参数 是否必选 类型 可选值范围 说明
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.SlidesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class deleteSlideByIndex {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 3;
        String password = null;
        String folder = "input";
        String storage = null;
        Slides response = slidesApi.deleteSlideByIndex(name, slideIndex, password, folder, storage);
    }
}

接口方法7:copySlide()复制幻灯片

HTTP 请求方法:POST

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
slideToCopy integer   在源PowerPoint文档中被复制的幻灯片索引
position integer   幻灯片复制到PowerPoint文档的位置,默认复制到末尾
source string   被复制幻灯片的源PowerPoint文档名称
sourcePassword string   被复制幻灯片的源PowerPoint文档密码,没有则为null
sourceStorage string   被复制幻灯片的源PowerPoint文档的储存空间,没有则为null
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

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

public class copySlide {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideToCopy = 2;
        Integer  position = 3;
        String source = "input/test_shapes.pptx";
        String sourcePassword = null;
        String sourceStorage = null;
        String password = null;
        String folder = "input";
        String storage = null;
        Slides response = slidesApi.copySlide(name, slideToCopy, position, source, sourcePassword, sourceStorage, password, folder, storage);
    }
}

接口方法8:moveSlide()调整幻灯片顺序

HTTP 请求方法:POST

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

请求参数:

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

Java代码示例:

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

public class moveSlide {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;//the first value is 0
        Integer  newPosition = 3;//the first value is 0
        String password = null;
        String folder = "input";
        String storage = null;
        Slides response = slidesApi.moveSlide(name, slideIndex, newPosition, password, folder, storage);
    }
}

接口方法9:reorderManySlide()调整幻灯片顺序

HTTP 请求方法:POST

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
oldPositions string   需调整顺序的幻灯片原位置的逗号分隔数组
newPositions string   需调整顺序的幻灯片新位置的逗号分隔数组
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

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

public class reorderManySlide {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        String oldPositions = "5,1,0";
        String newPositions = "0,2,3";
        String password = null;
        String folder = "input";
        String storage = null;
        Slides response = slidesApi.reorderManySlide(name, oldPositions, newPositions, password, folder, storage);
    }
}

接口方法10:saveSlideAs()将幻灯片另存为其他文档格式

HTTP 请求方法:POST

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
slideIndex integer   幻灯片索引
format string Jpeg, Png, Gif, Bmp, Pptx, Ppsx, Ppt, Pps, Odp, Pdf, Xps, Ps, Pcl, Svg 输出文档的文档格式
options object { "Format": "string" } 输出文档选项
width integer   输出文档的宽度,默认值为0,即不调整文档尺寸
height integer   输出文档的高度,默认值为0,即不调整文档尺寸
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

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

import java.io.File;

public class saveSlideAs {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;
        String format = SlideExportFormat.PDF.toString(); //Jpeg, Png, Gif, Bmp, Pptx, Ppsx, Ppt, Pps, Odp, Xps, Ps, Pcl, Svg
        ExportOptions options = null;
        Integer  width = 400;
        Integer  height = 300;
        String password = null;
        String folder = "input";
        String storage = null;
        File response = slidesApi.saveSlideAs(name, slideIndex, format, options, width, height, password, folder, storage);
    }
}

接口方法11:saveSlideToPath()将幻灯片另存为其他文档格式

HTTP 请求方法:PUT

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
slideIndex integer   幻灯片索引
format string Jpeg, Png, Gif, Bmp, Pptx, Ppsx, Ppt, Pps, Odp, Pdf, Xps, Ps, Pcl, Svg 输出文档的文档格式
options object { "Format": "string" } 输出文档选项
destFilePath string   输出文档的存贮路径,如果省略该参数,则默认存到根目录
width integer   输出文档的宽度,默认值为0,即不调整文档尺寸
height integer   输出文档的高度,默认值为0,即不调整文档尺寸
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

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

public class saveSlideToPath {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;
        String format = SlideExportFormat.PDF.toString();
        ExportOptions options = null;
        Integer  width = 400;
        Integer  height = 300;
        String password = null;
        String folder = "input";
        String storage = null;
        String destFilePath = "output/output.pdf";////Jpeg, Png, Gif, Bmp, Pptx, Ppsx, Ppt, Pps, Odp, Xps, Ps, Pcl, Svg
        slidesApi.saveSlideAsToPath(name, slideIndex, format, destFilePath, options, width, height, password, folder, storage);
    }
}

接口方法12:getSlideBackground()获取幻灯片背景信息

HTTP 请求方法:GET

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

请求参数:

参数 是否必选 类型 可选值范围 说明
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.SlidesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class getSlideBackground {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 4;
        String password = null;
        String folder = "input";
        String storage = null;
        SlideBackground response = slidesApi.getSlideBackground(name, slideIndex, password, folder, storage);
    }
}

接口方法13:setSlideBackground()设置幻灯片背景

HTTP 请求方法:PUT

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

请求参数:

参数 是否必选 类型 可选值范围 说明
name string   原文档名称
slideIndex integer   幻灯片索引
source object { "SelfUri": { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" }, "AlternateLinks": [ { "Href": "string", "Relation": "string", "LinkType": "string", "Title": "string" } ], "Type": "string", "FillFormat": {} } 设置幻灯片背景的数据
folder string   存放原文档的文件夹,没有则为null
storage string   文档存储空间,使用冰蓝云配置的2G空间存贮文档,可设置为null
password string   原文档密码,没有则为null

Java代码示例:

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

public class setSlideBackground {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        String password = null;
        String folder = "input";
        String storage = null;
        Integer slideIndex = 0;
        //solidFill
        SlideBackground source = new SlideBackground();
        FillFormat fillFormat = new FillFormat();
        fillFormat.setType("SolidFill");
        source.setFillFormat(fillFormat);
        source.setType("SolidFill");
        SolidFill fill = new SolidFill("lightpink");
        source.fillFormat(fill);

//        //gradientFill
//        SlideBackground source = new SlideBackground();
//        FillFormat fillFormat = new FillFormat();
//        fillFormat.setType("GradientFill");
//        source.setFillFormat(fillFormat);
//        source.setType("GradientFill");
//        ArrayList<GradientFillStop> stops = new ArrayList<GradientFillStop>();
//        GradientFillStop stop1 = new GradientFillStop();
//        stop1.setColor("green");
//        stop1.setPosition(0d);
//        GradientFillStop stop2 = new GradientFillStop();
//        stop2.setColor("yellow");
//        stop2.setPosition(1d);
//        stops.add(stop1);
//        stops.add(stop2);
//        GradientFill fileformat = new GradientFill();
//        fileformat.setDirection("FromCorner1");
//        fileformat.setShape("Linear");
//        fileformat.setStops(stops);
//        fileformat.setLinearAngle(30d);
//        fileformat.setIsScaled(false);
//        fileformat.setTileFlip("Horizontal");
//        source.setFillFormat(fileformat);

//        //pictureFill
//        SlideBackground source = new SlideBackground();
//        source.setType("PictureFill");
//        FillFormat fillFormat = new FillFormat();
//        fillFormat.setType("PictureFill");
//        source.setFillFormat(fillFormat);
//        String imgPath = "input/Image.jpg";
//        ResourceUriElement image = new ResourceUriElement();
//        ResourceUri url = new ResourceUri();
//        url.setHref(imgPath);
//        url.setRelation(null);
//        url.setLinkType(null);
//        url.setTitle(null);
//        image.setUri(url);
//        PictureFill pictureFill = new PictureFill();
//        pictureFill.setCropBottom(2d);
//        pictureFill.setCropLeft(5d);
//        pictureFill.setCropRight(2d);
//        pictureFill.setCropTop(5d);
//        pictureFill.setDpi(96);
//        pictureFill.setImage(image);
//        pictureFill.setBase64Data(null);
//        pictureFill.setSvgData(null);
//        pictureFill.setPictureFillMode("Tile");
//        source.setFillFormat(pictureFill);
        SlideBackground response = slidesApi.setSlideBackground(name, slideIndex, source, folder, password, storage);
    }
}

接口方法14:deleteSlideBackground()删除幻灯片背景

HTTP 请求方法:DELETE

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

请求参数:

参数 是否必选 类型 可选值范围 说明
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.SlidesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class deleteSlideBackground {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;
        String password = null;
        String folder = "input";
        String storage = null;
        SlideBackground response = slidesApi.deleteSlideBackground(name, slideIndex, password, folder, storage);
    }
}

接口方法15:setSlideBackgroundColor()设置幻灯片背景颜色

HTTP 请求方法:PUT

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

请求参数:

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

Java代码示例:

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

public class setSlideBackgroundColor {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 4;
        String color = "#FFB6C1";
        String password = null;
        String folder = "input";
        String storage = null;
        SlideBackground response = slidesApi.setSlideBackgroundColor(name, slideIndex, color, folder, password, storage);
    }
}

接口方法16:getSlideComments()获取幻灯片批注

HTTP 请求方法:GET

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

请求参数:

参数 是否必选 类型 可选值范围 说明
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.SlidesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class getSlideComments {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;
        String password = null;
        String folder = "input";
        String storage = null;
        SlideComments response = slidesApi.getSlideComments(name, slideIndex, password, folder, storage);
    }
}

接口方法17:deleteSlideComments()删除幻灯片批注

HTTP 请求方法:DELETE

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

请求参数:

参数 是否必选 类型 可选值范围 说明
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.SlidesApi;
import spire.cloud.powerpoint.sdk.model.*;

public class deleteSlideComments {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;
        String password = null;
        String folder = "input";
        String storage = null;
        SlideComments response = slidesApi.deleteSlideComments(name, slideIndex, password, folder, storage);
    }
}

接口方法18:deleteSlideComment()删除幻灯片批注

HTTP 请求方法:DELETE

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

请求参数:

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

Java代码示例:

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

public class deleteSlideComment {
    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 SlidesApi slidesApi = new SlidesApi(configuration);

    public static void main(String[] args) throws ApiException {
        String name = "template.pptx";
        Integer  slideIndex = 1;
        Integer  commentIndex = 0;
        String password = null;
        String folder = "input";
        String storage = null;
        SlideComments response = slidesApi.deleteSlideComment(name, slideIndex, commentIndex, password, folder, storage);
    }
}