none
Saving PowerPoint presentation as PDF with animations as different pages RRS feed

  • Question

  • 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?

    Thursday, April 19, 2018 10:44 AM

All replies

  • 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


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 20, 2018 6:56 AM
    Moderator
  • Hi Tiago Grosso,

    Is your issue is solved now?

    I find that you did not done any follow up after creating this thread.

    If your issue is fixed by you then I suggest you to post your solution and mark it as an answer.

    If your issue is still exist then try to refer the suggestions given by the community members.

    If you think that the suggestions given by the community member can solve your issue then mark the helpful suggestion as an answer.

    It will help us to close this thread and it also can be helpful to other community members who will meet with same kind of issues in future.

    If you have any further questions then you can let us know about it, We will try to provide you further suggestions to solve it.

    I suggest you to update the status of this thread and take appropriate actions to close it.

    Thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 2, 2018 9:54 AM
    Moderator