プレゼンテーション ノート
スライドノートの追加と削除
Aspose.Slides は、プレゼンテーションからノートスライドを削除する機能をサポートしています。このトピックでは、ノートを削除する新しい機能と、任意のプレゼンテーションからスタイル付きノートスライドを追加する機能を紹介します。Aspose.Slides for C++ は、任意のスライドのノートを削除する機能と、既存のノートにスタイルを追加する機能を提供します。開発者は、以下の方法でノートを削除できます。
- プレゼンテーションの特定のスライドのノートを削除する。
- プレゼンテーションのすべてのスライドのノートを削除する。
特定のスライドからノートを削除する
特定のスライドのノートは、以下の例のように削除することができます。
For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-C | |
// The path to the documents directory. | |
const String templatePath = u"../templates/AccessSlides.pptx"; | |
const String outPath = u"../out/RemoveNotesAtSpecificSlide.pptx"; | |
// Instantiate Presentation class | |
SharedPtr<Presentation>pres = MakeObject<Presentation>(templatePath); | |
// Removing notes of all slides | |
SharedPtr<INotesSlideManager> mgr; | |
//Removing notes from first slide | |
mgr = pres->get_Slides()->idx_get(0)->get_NotesSlideManager(); | |
mgr->RemoveNotesSlide(); | |
// Save presentation to disk | |
pres->Save(outPath, Aspose::Slides::Export::SaveFormat::Pptx); |
すべてのスライドからノートを削除する
プレゼンテーションのすべてのスライドのノートは、以下の例のように削除することができます。
For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-C | |
// The path to the documents directory. | |
const String templatePath = u"../templates/AccessSlides.pptx"; | |
const String outPath = u"../out/RemovedAllNotes.pptx"; | |
// Instantiate Presentation class | |
SharedPtr<Presentation>pres = MakeObject<Presentation>(templatePath); | |
// Removing notes of all slides | |
SharedPtr<INotesSlideManager> mgr ; | |
for (int i = 0; i < pres->get_Slides()->get_Count(); i++) | |
{ | |
mgr = pres->get_Slides()->idx_get(i)->get_NotesSlideManager(); | |
mgr->RemoveNotesSlide(); | |
} | |
// Save presentation to disk | |
pres->Save(outPath, Aspose::Slides::Export::SaveFormat::Pptx); |
NotesStyleの追加
NotesStyle プロパティが、IMasterNotesSlide インターフェースおよび MasterNotesSlide クラスに追加されました。このプロパティは、ノートテキストのスタイルを指定します。実装は以下の例で示されています。
For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-C | |
// The path to the documents directory. | |
const String outPath = u"../out/AddNotesSlideWithNotesStyle_out.pptx"; | |
const String templatePath = u"../templates/AccessSlides.pptx"; | |
SharedPtr<Presentation> pres = MakeObject<Presentation>(templatePath); | |
//Accessing Master note slide | |
SharedPtr<IMasterNotesSlide> notesMaster = pres->get_MasterNotesSlideManager()->get_MasterNotesSlide(); | |
if (notesMaster != NULL) | |
{ | |
// Get MasterNotesSlide text style | |
SharedPtr<ITextStyle> notesStyle = notesMaster->get_NotesStyle(); | |
//Set symbol bullet for the first level paragraphs | |
SharedPtr<IParagraphFormat> paragraphFormat = notesStyle->GetLevel(0); | |
paragraphFormat->get_Bullet()->set_Type(BulletType::Symbol); | |
} | |
pres->Save(outPath, Aspose::Slides::Export::SaveFormat::Pptx); |