什么是gembox.presentation?
Gembox.Presentation是一个.NET组件,使您能够从.NET应用程序读取,编写,转换和打印演示文件(PPTX,PPT和PPSX)。
使用Gembox.presentation,您可以获得一个易于使用的快速可靠组件,并且不依赖Microsoft PowerPoint。它仅需要.NET,并且比Microsoft Office Automation快得多!
Gembox.presentation功能
- 阅读PPT和PPTX演示文稿。
- 创建或写入并转换为PPT,PPTX,PDF,XPS和图像格式(SVG,PNG,JPEG,GIF,GIF,BMP,TIFF,WMP)。
- 查看Azure功能中的演示文稿,julazor,ASP.NET Core,ASP.NET,MAUI和WPF应用程序。
- Windows,Linux,MacOS,Android和iOS操作系统上的处理演示文稿。
- 打印演示。
- 保护,加密和数字签名演示文稿。
- 获取,创建或编辑主幻灯片,布局幻灯片,幻灯片,主笔记幻灯片和音符幻灯片。
- 获取,创建或编辑图纸,例如文本框,连接器,图片,表格,图表和媒体(音频和视频)。
- 通过段落,运行,字段和线路断裂,以形状和表单元格中获取,创建或编辑文本。
- 获取,创建或编辑超链接,评论,占位符,标题和页脚。
- 获取,创建或编辑形状,表,文本框,段落和字符格式。
- 获取,创建或编辑表样式。
- 获取并设置内置和自定义演示属性。
- 将HTML内容加载到演示文稿中。
- 访问或修改幻灯片大小,幻灯片过渡,幻灯片显示,宏等。
- 导出到PDF,XPS或图像格式时指定字体位置。
- 阅读演示文稿时,保留不支持的演示内容元素和属性。
开始
您不确定如何使用Gembox.presentation开始使用.NET中的PowerPoint演示文稿?检查下面的代码,其中显示了如何从头开始创建PPTX文件并写“ Hello World!”在上面。
// If using Professional version, put your serial key below. ComponentInfo . SetLicense ( \"FREE-LIMITED-KEY\" ) ; // Create new empty presentation. var presentation = new PresentationDocument ( ) ; // Add a new custom slide. var slide = presentation . Slides . AddNew ( SlideLayoutType . Custom ) ; // Add a rectangle and fill it with dark blue color. var shape = slide . Content . AddShape ( ShapeGeometryType . RoundedRectangle , 2 , 2 , 8 , 4 , LengthUnit . Centimeter ) ; shape . Format . Fill . SetSolid ( Color . FromName ( ColorName . DarkBlue ) ) ; // Add a paragraph and some text, and set text color to white. var run = shape . Text . AddParagraph ( ) . AddRun ( \"Hello World!\" ) ; run . Format . Fill . SetSolid ( Color . FromName ( ColorName . White ) ) ; // Save the presentation as PowerPoint\'s PPTX file. presentation . Save ( \"Writing.pptx\" ) ;
有关更多Gembox.presentation代码示例和演示,请访问我们的示例页面。
安装
您可以从Nuget?下载Gembox.presentation或从下载下载。
资源
- 产品页面
- 例子
- 文档
- API参考
- 论坛
- 博客
