PPT slides to images

后端 未结 2 532
予麋鹿
予麋鹿 2020-12-05 08:38

I am using Office 07 PIA to convert the ppt into images in C#.

The slides are properly converted into images.

Now, while individual slides are converted into

相关标签:
2条回答
  • 2020-12-05 09:26

    The question is difficult to understand.

    However from what I gather you are trying to display PowerPoint Slides in your custom C# Application?

    Solution 1:

    Convert each PPT slide into HTML format (this should be possible from PowerPoint e.g. save as).

    Drop a web-Browser component onto your application, and then simply point to the HTML file(s). You could even get the 'next' abd 'prev' buttons to go to the next 'slide' or bind it to mouse click.

    As for videos, I'm not sure how exporting HTML from PowerPoint would handle this, you may be able to convert the Video to FLV, and imbed a basic FLV flash player into the HTML 'slide' file(s)

    Extended Solution 1:

    To deal with the animations (PowerPoint Fades etc) you could use this free product iSpring. This converts PPT to Flash (including animations and videos I believe). Which can then be embedded into a HTML file and played back on a web browser Component.

    Edit 2: iSpring is no longer free

    0 讨论(0)
  • 2020-12-05 09:42

    It's pretty simple:

    Office 2002

    using Microsoft.Office.Core;
    using PowerPoint;
    
    ApplicationClass pptApplication = new ApplicationClass();
    
    Presentation pptPresentation = pptApplication.Presentations.Open("myfile.ppt", MsoTriState.msoFalse,
    MsoTriState.msoFalse, MsoTriState.msoFalse);
    
    pptPresentation.Slides.Item(1).Export("slide.jpg", "jpg", 320, 240);
    

    Office 2003

    using Microsoft.Office.Core;
    using Microsoft.Office.Interop.PowerPoint;
    
    ApplicationClass pptApplication = new ApplicationClass();
    Presentation pptPresentation = pptApplication.Presentations.Open("myfile.ppt", MsoTriState.msoFalse,
    MsoTriState.msoFalse, MsoTriState.msoFalse);
    
    pptPresentation.Slides.Item[1].Export("slide.jpg", "jpg", 320, 240);
    

    Image Output Quality

    pptPresentation.Slides.Item[1].Export("slide.png", "PNG", 1024, 768);
    
    0 讨论(0)
提交回复
热议问题