OpenXmlSdkTs - v1.0.7
    Preparing search index...

    Class PmlPart

    PowerPoint-specific part with convenience methods for navigating presentation structure.

    Extends OpenXmlPart with typed accessors for slides, slide masters, notes, and other PowerPoint-specific parts.

    const presentation = await doc.presentationPart();
    const slides = await presentation!.slideParts();
    for (const slide of slides) {
    const xDoc = await slide.getXDocument();
    console.log(slide.getUri());
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Returns the MIME content type of this part (e.g., "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml").

      Returns string | null

    • Deletes a relationship from this part.

      Parameters

      • id: string

        The relationship ID to delete.

      Returns Promise<boolean>

      true if the relationship was deleted.

      Error if the relationship is not found.

    • Returns the XML content of this part as an XDocument.

      Returns Promise<XDocument>

      A promise resolving to the part's XDocument.

      The XDocument is parsed on first access and cached for subsequent calls. Modifications to the returned XDocument are reflected in the part. Call putXDocument to replace the XML content entirely.

      Error if the part is not an XML part.

      const xDoc = await mainPart.getXDocument();
      const body = xDoc.root!.element(W.body);
      const paragraphs = body!.elements(W.p);
    • Returns the comment authors part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the handout master part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the notes master part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the notes slide part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the presentation properties part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the table styles part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the user-defined tags part, or undefined if not present.

      Returns Promise<PmlPart | undefined>

    • Returns the view properties part, or undefined if not present.

      Returns Promise<PmlPart | undefined>