removePage

Versionshinweise

22.1, 21.2.06, 21.1.11

Code

Groovy
boolean removePage(PresentationDocument document, int pageIndex)

Beschreibung

Entfernen einer Seite aus der übergebenen Präsentationsdatei.

Parameter

  • document

    Repräsentiert die Präsentationsdatei

  • pageIndex
    Index der Seite, die entfernt werden soll (erste Seite startet mit 1)

Rückgabe

Liefert true, wenn das Entfernen der Seite erfolgreich war, ansonsten false.

Beispiele

Groovy
IPresentationResult openResult = PresentationUtils.openFile("C:\\Work\\myFirstPresentation.ppsx");

if (!PresentationUtils.isSuccessful(openResult))
{
	/** handle error code */
    return;
}

PresentationDocument presentation = null;
try
{
  presentation = PresentationUtils.getPresentationDocument(openResult);

  boolean success = PresentationUtils.removePage(presentation, 7);
  ...
}
finally
{
  PresentationUtils.close(presentation);
}