Create, Edit, and Convert PowerPoint Presentations with Aspose.Slides for C++
Create, edit, convert, render, and manage PowerPoint presentations in C++ without Microsoft PowerPoint.
Download Free TrialWhy Choose Aspose.Slides for C++?
Aspose.Slides for C++ offers many advantages over other solutions for PowerPoint automation, such as:
- Cross-platform compatibility: Aspose.Slides for C++ supports multiple platforms. You can use Aspose.Slides for C++ on Windows, Linux, macOS, and other operating systems.
- Easy integration and deployment: Aspose.Slides for C++ is a standalone library that does not require Microsoft Office or any other software to be installed on your system. You can integrate Aspose.Slides for C++ with existing applications and deploy it on servers or cloud environments.
- Powerful features and functionality: Aspose.Slides for C++ provides a rich set of features for working with PowerPoint presentations, such as creating and modifying slides, adding and editing shapes, text, images, animations, transitions, charts, tables, and other elements, applying themes and layouts, inserting audio and video, exporting and printing presentations, generating frames for video export, and more.
- AI: Includes AI-powered translation support through integration with external language models for automatic multilingual presentation workflows.
- High performance and quality: Aspose.Slides for C++ delivers fast, high-quality processing for PowerPoint presentations. You can process thousands of presentations in minutes without compromising the fidelity and accuracy of the output.
- Free trial and licensing options: Download a free trial for evaluation, request a temporary license to remove evaluation limitations, or choose a commercial license that fits your deployment.
Advanced C++ PowerPoint Processing Library Features
Save presentations to files or streams
Convert presentations to standard formats
Manage built-in and custom document properties
Password-protect presentations
Add, format, and manipulate charts
Add, format, and manipulate shapes
Add, format, and manipulate slides
Add, format, and manipulate text
Add, format, and manipulate tables
Export presentations to PDF and XPS
Export slides in SVG format
Add images to presentations
Generate frames for video export
Add infographics to presentations
Generate presentations from database content
Support MSO 2016 charts
Export presentations as HTML
Import and export HTML text in slides
Add layout slides to presentations
Load protected presentations
Set the font size of individual legends
Create stock charts and get chart images
Change series colors
Set rounded borders for chart areas
Change category colors in series
Set font properties for chart data tables
Supported File Formats
Aspose.Slides for C++ supports a wide range of PowerPoint presentation file formats, including:
- Input formats: PPT, PPTX, PDF, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPTM, FODP, and more.
- Output formats: PPTX, PPT, PDF, HTML, PNG, BMP, JPG, FODP, GIF, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPTM, SVG, TIFF, and more.
You can also convert presentations to and from streams and byte arrays.
Export PowerPoint Files to PDF
Aspose.Slides for C++ can convert presentation files to PDF by loading a presentation and saving it with the PDF output format.
C++ code for converting a presentation to PDF
auto presentation = MakeObject<Presentation>(u"presentation.ppt");
presentation->Save(u"document.pdf", SaveFormat::Pdf);
presentation->Dispose();
Add Animation to Presentations
Adding animations to presentation elements can make slides more interactive and engaging.
C++ code for adding animation to a text box
auto presentation = MakeObject<Presentation>();
auto slide = presentation->get_Slides()->idx_get(0);
auto autoShape = slide->get_Shapes()->AddAutoShape(ShapeType::Rectangle, 20, 20, 150, 100);
auto textFrame = autoShape->get_TextFrame();
textFrame->set_Text(u"First paragraph \nSecond paragraph \n Third paragraph");
// Get the main animation sequence of the slide.
auto mainSequence = slide->get_Timeline()->get_MainSequence();
// Add the Fade animation effect to the shape.
auto effect = mainSequence->AddEffect(autoShape, EffectType::Fade, EffectSubtype::None, EffectTriggerType::OnClick);
// Animate the shape text by first-level paragraphs.
effect->get_TextAnimation()->set_BuildType(BuildType::ByLevelParagraphs1);
presentation->Save(u"animated_text.pptx", SaveFormat::Pptx);
presentation->Dispose();
Save PowerPoint Slides to Images
Aspose.Slides for C++ can render presentation slides as images. This is useful for previews, web pages, documents, and video workflows.
The C++ code demonstrates how to convert a presentation to JPG images.
C++ code for converting a presentation to JPG with custom scale
auto presentation = MakeObject<Presentation>(u"presentation.pptx");
auto desiredSize = Size(1200, 800);
for (auto&& slide : presentation->get_Slides())
{
// Generate an image of the slide with the specified dimensions.
auto image = slide->GetImage(desiredSize);
// Save the image to disk in JPEG format.
auto fileName = String::Format(u"slide_{0}.jpg", slide->get_SlideNumber());
image->Save(fileName, ImageFormat::Jpeg);
image->Dispose();
}
presentation->Dispose();
Convert Presentations to Video
Aspose.Slides for C++ can generate presentation frames that can be assembled into video files with tools such as FFmpeg.
C++ code for converting a presentation to video
void OnFrameTick(SharedPtr<PresentationPlayer> sender, SharedPtr<FrameTickEventArgs> args)
{
auto fileName = String::Format(u"frame_{0}.png", sender->get_FrameIndex());
args->GetFrame()->Save(fileName);
}
void Run()
{
auto presentation = MakeObject<Presentation>(u"Presentation.pptx");
const int fps = 33;
auto animationsGenerator = MakeObject<PresentationAnimationsGenerator>(presentation);
auto player = MakeObject<PresentationPlayer>(animationsGenerator, fps);
player->FrameTick += OnFrameTick;
animationsGenerator->Run(presentation->get_Slides());
const String ffmpegParameters = String::Format(
u"-loglevel {0} -framerate {1} -i {2} -y -c:v {3} -pix_fmt {4} {5}",
u"warning", fps, "frame_%d.png", u"libx264", u"yuv420p", "video.mp4");
auto ffmpegProcess = Process::Start(u"ffmpeg", ffmpegParameters);
ffmpegProcess->WaitForExit();
presentation->Dispose();
}
Learn More about Aspose.Slides for C++
To learn more about Aspose.Slides and how to use it, you can visit the following pages:
- Aspose.Slides Product Family : Overview of Aspose.Slides products, features, benefits, and use cases.
- Aspose.Slides Documentation : Tutorials, guides, and documentation for Aspose.Slides for C++.
- Aspose.Slides Pricing : Pricing, licensing options, FAQs, and support information.
- Aspose.Slides Blog : News, updates, and articles about Aspose.Slides.
- Aspose.Slides Forum : Community support for questions, feedback, and troubleshooting.
Support and Learning Resources
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Release Notes
- Why Aspose.Slides for C++?
- Customers List
- Success Stories