专业网站建设品牌,十四年专业建站经验,服务6000+客户--广州京杭网络
免费热线:400-683-0016      微信咨询  |  联系我们

Aspose.slides记录

当前位置:网站建设 > 技术支持
资料来源:网络整理       时间:2023/2/14 0:36:33       共计:3649 浏览
前言

Aspose.slides是一款处理pptx的商业软件,由于业务需要对pptx中文本框/形状/备注/图表等各个模块中的文本及格式进行编辑,在尝试POI/DOM4J之后使用Aspose进行业务处理,并将问题及使用情况进行记录.
获取liscense

    static{
        InputStream is = null;
        try {
            ClassLoader loader = Thread.currentThread().getContextClassLoader();
            is = loader.getResourceAsStream("licenseOfSlides.xml");
            License aposeLic = new License();
            aposeLic.setLicense(is);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            IOUtils.closeQuietly(is);
        }
    }

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13

创建对象及保存

    public void readAndSave(File inFile,File outFile) throws FileNotFoundException{
        InputStream in = null;
        OutputStream out = null;
        if (inFile != null) {
            in = new FileInputStream(inFile);
        }
        if (outFile != null) {
            out = new FileOutputStream(outFile);
        }
        // 生成presentation对象
        Presentation pres = new Presentation(in);
        // 保存为pptx
        pres.save(out, SaveFormat.Pptx);
        // 保存为ppt
        pres.save(out, SaveFormat.Ppt);
        // 保存为pdf
        pres.save(out, SaveFormat.Pdf);
    }
————————————————
版权说明:
本网站凡注明“广州京杭 原创”的皆为本站原创文章,如需转载请注明出处!
本网转载皆注明出处,遵循行业规范,如发现作品内容版权或其它问题的,请与我们联系处理!
欢迎扫描右侧微信二维码与我们联系。
·上一条:c# 将PPT转换成HTML | ·下一条:C# 利用Aspose.Slides.dll将本地ppt文档转化成pdf(完美破解版 无水印 无中文乱码)

Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有    粤ICP备16019765号 

广州京杭网络科技有限公司 版权所有