将PowerPoint演示文稿另存为PDF,动画为不同页面 [英] Saving PowerPoint presentation as PDF with animations as different pages

查看:150
本文介绍了将PowerPoint演示文稿另存为PDF,动画为不同页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我目前正在开发一个插件,打算以更友好的方式向盲人展示幻灯片。


除了详细信息之外,我需要找到一种方法将演示文稿作为PDF上传到我的服务器,但理想情况下我会让每个动画在最终的PDF中创建一个新页面。


我搜索了一下,找到了一个工具(PPspliT)来做到这一点,但它有一个问题:它通过添加一个新的功能区和新按钮来实现这一点必须与我自己的加载项并排安装。这不会产生预期效果,现在将
太多的工作放在演示者身边,这也意味着如果没有第三方安装,我自己的插件就无法工作。


<那么我真正可以使用的是自己解决这个问题的一些迹象:我怎么能拆分我的powerpoint演示并将其保存为PDF?

解决方案

< blockquote>

您好
Tiago Grosso,


您曾问过,"我怎么能拆分我的powerpoint演示文稿并将其保存为PDF格式?"


我尝试检查
PowerPoint对象模型
 和没有任何方法可以拆分演示文稿。


所以你需要创建2个PowerPoint演示文稿对象。


一个用于当前的演示文稿和其他用于保存spli t幻灯片。


首先,您需要打开当前演示文稿,然后在需要创建新演示文稿的其他对象中打开。


然后您需要复制从当前演示文稿到新演示文稿。


然后您可以使用以下方法将新演示文稿另存为PDF。


创建新演示文稿的代码。

 private void demo()
{
//创建引用变量
PowerPoint.Application ppApplication = null;
PowerPoint.Presentations ppPresentations = null;
PowerPoint.Presentation ppPresentation = null;

//实例化PowerPoint应用程序
ppApplication = new PowerPoint.Application();

//创建演示文稿集合持有者
ppPresentations = ppApplication.Presentations;

//创建一个实际(空白)演示文稿
ppPresentation = ppPresentations.Add(Office.MsoTriState.msoTrue);

//激活PowerPoint应用程序
ppApplication.Activate();
}

将文件另存为PDF的代码:

 ppPresentation.SaveAs(myFileName,
PowerPoint.PpSaveAsFileType.ppSaveAsPDF,
Office.MsoTriState.msoTrue);

重复此过程以生成多个PDF文件。


问候


Deepak




Hi everybody,

I'm currently developing an add-in that intends to present slideshows to blind people in a more friendly way.

Details aside, I need to find a way to upload the presentation to my server as PDF but I ideally I'd have each animation create a new page in the final PDF.

I've searched a bit and found a tool (PPspliT) that does this but it has a problem: it does this by adding a new ribbon and new buttons and it would have to be installed side-to-side with my own add-in. This wouldn't have the desired effect of now putting too much work on the presenter's side and would also mean that my own add-in would not work without a third party installation.

So what I could really use are some indications on own to approach this problem: how could I split my powerpoint presentation and save it as PDF?

解决方案

Hi Tiago Grosso,

You had asked,"how could I split my powerpoint presentation and save it as PDF?"

I try to check the PowerPoint Object Model and there is no any method available to split the presentation.

So You need to create 2 objects of PowerPoint Presentation.

One for the current Presentation and other for to save split slides.

First you need to open the current presentation then in other object you need to create new presentation.

Then you need to copy the slides from current presentation to new presentation.

Then you can use method below to save new presentation as PDF.

Code to create new presentation.

  private void demo()
{
    // Create the reference variables
    PowerPoint.Application ppApplication = null;
    PowerPoint.Presentations ppPresentations = null;
    PowerPoint.Presentation ppPresentation = null;

    // Instantiate the PowerPoint application
    ppApplication = new PowerPoint.Application();

    // Create a presentation collection holder
    ppPresentations = ppApplication.Presentations;

    // Create an actual (blank) presentation
    ppPresentation = ppPresentations.Add(Office.MsoTriState.msoTrue);

    // Activate the PowerPoint application
    ppApplication.Activate();
}

Code to save file as PDF:

ppPresentation.SaveAs(myFileName,
                      PowerPoint.PpSaveAsFileType.ppSaveAsPDF, 
                      Office.MsoTriState.msoTrue);

Repeat the process to generate multiple PDF files.

Regards

Deepak


这篇关于将PowerPoint演示文稿另存为PDF,动画为不同页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆