Not
Contents
[
Hide
]
Aspose.Slides for PHP via Java kullanarak not slaytlarını ekleme, okuma, kaldırma ve güncelleme işlemlerinin nasıl yapılacağını gösterir.
Not Slaytı Ekle
Bir not slaytı oluşturun ve ona metin atayın.
function addNote() {
$presentation = new Presentation();
try {
$slide = $presentation->getSlides()->get_Item(0);
$notesSlide = $slide->getNotesSlideManager()->addNotesSlide();
$notesSlide->getNotesTextFrame()->setText("My note");
$presentation->save("note.pptx", SaveFormat::Pptx);
} finally {
$presentation->dispose();
}
}
Not Slaytına Erişim
Mevcut bir not slaytından metni okuyun.
function accessNote() {
$presentation = new Presentation("note.pptx");
try {
$slide = $presentation->getSlides()->get_Item(0);
$notesSlide = $slide->getNotesSlideManager()->getNotesSlide();
$notes = $notesSlide->getNotesTextFrame()->getText();
} finally {
$presentation->dispose();
}
}
Not Slaytını Kaldır
Bir slayt ile ilişkili not slaytını kaldırın.
function removeNote() {
$presentation = new Presentation("note.pptx");
try {
$slide = $presentation->getSlides()->get_Item(0);
$slide->getNotesSlideManager()->removeNotesSlide();
$presentation->save("note_removed.pptx", SaveFormat::Pptx);
} finally {
$presentation->dispose();
}
}
Not Metnini Güncelle
Bir not slaytının metnini değiştirin.
function updateNoteText() {
$presentation = new Presentation("note.pptx");
try {
$slide = $presentation->getSlides()->get_Item(0);
$notesSlide = $slide->getNotesSlideManager()->getNotesSlide();
$notesSlide->getNotesTextFrame()->setText("Updated");
$presentation->save("note_updated.pptx", SaveFormat::Pptx);
} finally {
$presentation->dispose();
}
}