在C++中將PPT轉換為Word
強大的跨平台 C++ API,無需 Microsoft PowerPoint 或 Office 即可使用 C++ 代碼將 PowerPoint 轉換為 Word
使用 Aspose.Slides 和 Aspose.Words 將 PowerPoint 轉換為 Word
Aspose.Slides for C++ 和 [Aspose.Words for C++]( https://products.aspose.com/ words/cpp/) 是功能強大的 C++ 庫,用於操作和轉換 PowerPoint 演示文稿、Word 文檔和其他文件。將 PowerPoint 轉換為 Word 時,實際上是將演示文稿幻燈片的內容移動到 Word 文檔中的頁面。
在 C++ 中將 PowerPoint 轉換為 Word
幾行代碼即可快速將PPT轉Word
將 PowerPoint 轉換為 Word 的 C++ 代碼
auto presentation = MakeObject<Presentation>();
auto doc = MakeObject<Aspose::Words::Document>();
auto builder = MakeObject<Aspose::Words::DocumentBuilder>(doc);
for (const auto& slide : presentation->get_Slides())
{
// generates and inserts slide image
auto bitmap = slide->GetThumbnail(1.0f, 1.0f);
builder->InsertImage(bitmap);
// inserts slide's texts
for (const auto& shape : slide->get_Shapes())
{
if (ObjectExt::Is<AutoShape>(shape))
{
auto autoShape = System::AsCast<AutoShape>(shape);
builder->Writeln(autoShape->get_TextFrame()->get_Text());
}
}
builder->InsertBreak(Aspose::Words::BreakType::PageBreak);
}
如何將 PPT 轉換為 Word
安裝 Aspose.Slides for C++ 和 Aspose.Words for C++
創建 Presentation 類和 Doc 類的實例。
加載要轉換為 Word 的 PPT 演示文稿。
根據幻燈片的內容生成圖像和文本。
保存生成的 Word 文檔。
免費在線轉換器
其他支持的轉換
您還可以將 PowerPoint 轉換為其他格式的文件