1. Các sản phẩm
  2.   Bài thuyết trình
  3.   C++
  4.   Aspose.Slides for C++

Aspose.Slides for C++


C++ .NET API to Generate & Manipulate PowerPoint Presentations

A Powerful C++ Presentation Library to create, edit, merge, clone, protect, convert and manipulate PowerPoint PPT, PPTX presentations.

Aspose.Slides for C++ is a robust API that helps software developers to create powerful applications for working with Microsoft PowerPoint and OpenDocument presentations without using any external dependencies. This library offers a wide range of features for handling presentations, including support for reading and writing presentations, manipulating the layout and content of slides, and converting presentations to other file formats. The library supports both older versions of PowerPoint, such as PowerPoint 97-2003, and the latest version of PowerPoint, allowing you to work with presentations in a variety of formats.

Aspose.Slides for C++ is the first and only component that provides the functionality of PowerPoint document creation and management. The library enables software developers to create presentations from scratch and save them in different Microsoft PowerPoint & other file formats such as PPT, POT, PPS, PPTX, POTX, PPSX, PPTM, PPSM, POTM, ODP, OTP, TIFF, EMF, XML and so on. The library also allows presentation conversion to PDF, XPS, SWF, HTML, JPEG, PNG, GIF, BMP, SVG, and so on.

Aspose.Slides for C++ is very flexible as well as highly customizable. The library offers a variety of alternatives for formatting slides and customizing their appearance, including support for adding images, text, shapes, Morph Transitions, styles, and other elements. The library also provides several tools for manipulating the layout and content of slides, including options for resizing, repositioning, and rearranging elements. Overall, Aspose.Slides for C++ is an excellent choice for anyone looking for a powerful and flexible library for working with presentations without using Microsoft PowerPoint format.

Previous Next

Getting Started with Aspose.Slides for C++

The recommend way to install Aspose.Slides for C++ is using NuGet. Please use the following command for a smooth installation.

Install Aspose.Slides for C++ via NuGet

NuGet\Install-Package Aspose.Slides.Cpp -Version 23.1.0 
You can also download it directly from Aspose product release page.

Create & Edit Presentations via C++ API

Aspose.Slides for C++ is a comprehensive library for managing presentations in the Microsoft PowerPoint format. With its powerful features and intuitive API, this library makes it easy to create and manipulate presentations in a variety of ways. The library supports several important feature for presentation management, such as examine existing presentations, import and open presentations, add new slides to presentation, insert images and content to presentations, combine multiple presentation, Split large presentations to smaller one and many more.

Creating Presentations via .NET API

Presentation presentation = new Presentation();

presentation.Save("OutputPresenation.pptx", SaveFormat.Pptx);

Presentations Conversion to Other Formats via C++

Aspose.Slides for C++ is an excellent choice for anyone looking for a powerful and flexible library for converting presentations in the Microsoft PowerPoint format to other file formats. It provides a range of tools and features for converting presentations, making it easy to share presentations with others, even if they do not have access to Microsoft PowerPoint. The library provides support for conversion to some popular file formats such as PDF, XPS, HTML, image file formats (JPEG, PNG, GIF, BMP, SVG) and many more. It Is also possible to customize the appearance of converted presentations, such as setting the output resolution, specifying page margins, and choosing between different page layouts.

Convert PowerPoint to PDF with Hidden Slides via .NET API

// Instantiates a Presentation class that represents a PowerPoint file
Presentation presentation = new Presentation("PowerPoint.pptx");

// Instantiates the PdfOptions class
PdfOptions pdfOptions = new PdfOptions();

// Adds hidden slides
pdfOptions.ShowHiddenSlides = true;

// Saves the presentation as a PDF
presentation.Save("PowerPoint-to-PDF.pdf", SaveFormat.Pdf, pdfOptions);

Compare, Clone & Export Slides via C++ API

Aspose.Slides for C++ is has included numerous useful features for handling presentation slides inside C++ applications. Software developers can easily add new slides to their existing presentation, specify custom slide sizes, changing the slide size, access slides inside presentations, remove the unwanted slides and clone slides with just a couple of lines of C++ code. It is also very easy to compare two slides and export presentation slides to images with custom sizes, slides conversion to PNG, converting slides with notes and comments to images and so on.

Clone a Slide via C# API

// Instantiate Presentation class that represents a presentation file
using (Presentation pres = new Presentation("CloneWithinSamePresentationToEnd.pptx"))

    // Clone the desired slide to the end of the collection of slides in the same presentation
    ISlideCollection slds = pres.Slides;


    // Write the modified presentation to disk
    pres.Save("Aspose_CloneWithinSamePresentationToEnd_out.pptx", SaveFormat.Pptx);


Add Animation Effect to Presentations via C++ API

Aspose.Slides for C++ library gives software developers the power for the addition of animation effects to slides inside their own C applications. You can add various animation effects such as entrance, emphasis, exit, and motion path to shapes and text boxes. Additionally, you can customize the animation effect using properties such as duration, trigger, and direction. It is also possible to create custom animation and use multiple PowerPoint animation effects on a shape.  

Add Animation Effect to a Single Paragraph via .NET API

using (Presentation presentation = new Presentation(dataDir + "Presentation1.pptx"))
    // select paragraph to add effect
    IAutoShape autoShape = (IAutoShape)presentation.Slides[0].Shapes[0];
    IParagraph paragraph = autoShape.TextFrame.Paragraphs[0];

    // add Fly animation effect to selected paragraph
    IEffect effect = presentation.Slides[0].Timeline.MainSequence.AddEffect(paragraph, EffectType.Fly, EffectSubtype.Left, EffectTriggerType.OnClick);

    presentation.Save(dataDir + "AnimationEffectinParagraph.pptx", SaveFormat.Pptx);
 Tiếng Việt