Getting Started

This section covers everything you need to set up Aspose.Slides FOSS for C++ and write your first presentation.

In This Section

PageDescription
InstallationBuild from source with CMake FetchContent or git submodule, verify the build, and run a quick start program.
LicenseMIT License details: free for any use, no API key, no registration required.

Quick Build

include(FetchContent)
FetchContent_Declare(
    aspose_slides_foss
    GIT_REPOSITORY https://github.com/aspose-slides-foss/Aspose.Slides-FOSS-for-Cpp.git
    GIT_TAG        main
)
FetchContent_MakeAvailable(aspose_slides_foss)

Requires a C++20 compiler and CMake 3.20 or later.

Minimal Working Example

#include <Aspose/Slides/Foss/presentation.h>
#include <Aspose/Slides/Foss/export/save_format.h>
#include <Aspose/Slides/Foss/shape_type.h>
#include <Aspose/Slides/Foss/slide.h>
#include <Aspose/Slides/Foss/slide_collection.h>
#include <Aspose/Slides/Foss/shape_collection.h>
#include <Aspose/Slides/Foss/auto_shape.h>

using namespace Aspose::Slides::Foss;

int main() {
    Presentation pres;
    auto& slide = pres.slides()[0];
    auto& shape = slide.shapes().add_auto_shape(ShapeType::RECTANGLE, 50, 50, 400, 120);
    shape.text_frame()->set_text("Hello, Aspose.Slides FOSS!");
    pres.save("output.pptx", SaveFormat::PPTX);
    return 0;
}

Presentation uses RAII. When the object goes out of scope, internal resources are released automatically.

Next Steps

After building, see the Developer Guide for feature guides covering shapes, text formatting, tables, fill, effects, speaker notes, comments, and document properties.

 English