zoukankan      html  css  js  c++  java
  • 利用Aspose转PDF

    添加引用:

    using Aspose.Cells;
    using Aspose.Slides;
    using Aspose.Words;

    /// <summary>
            /// PPT转PDF
            /// </summary>
            /// <param name="InPath">输入路径</param>
            /// <param name="OutPath">输出路径</param>
            public void PPT_PDF(string InPath, string OutPath)
            {
                Presentation ppt = new Presentation(InPath);
                ppt.Save(OutPath, Aspose.Slides.Export.SaveFormat.Pdf);
            }
            /// <summary>
            /// Word转PDF
            /// </summary>
            /// <param name="InPath"></param>
            /// <param name="OutPath"></param>
            public void Word_PDF(string InPath, string OutPath)
            {
                Document doc = new Document(InPath);
                doc.Save(OutPath, Aspose.Words.SaveFormat.Pdf);
            }
            /// <summary>
            /// Excel转PDF
            /// </summary>
            /// <param name="InPath"></param>
            /// <param name="OutPath"></param>
            public void Excel_PDF(string InPath, string OutPath)
            {
                Workbook excel = new Workbook(InPath);
                excel.Save(OutPath, Aspose.Cells.SaveFormat.Pdf);
            }
  • 相关阅读:
    用before 和after 清除浮动
    清除浮动最优
    pc端布局03
    PC端布局02
    >PC端常用布局01
    浮动
    盒模型-
    盒模型-外边距合并
    spring中的AOP
    AOP的概念
  • 原文地址:https://www.cnblogs.com/lyhsblog/p/6781722.html
Copyright © 2011-2022 走看看