Class PresentationMLPackage

java.lang.Object
org.docx4j.openpackaging.Base
org.docx4j.openpackaging.packages.OpcPackage
org.docx4j.openpackaging.packages.PresentationMLPackage
All Implemented Interfaces:
PackageIdentifier

public class PresentationMLPackage
extends OpcPackage
Author:
jharrop
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

    • PresentationMLPackage

      public PresentationMLPackage()
      Constructor. Also creates a new content type manager
    • PresentationMLPackage

      public PresentationMLPackage​(ContentTypeManager contentTypeManager)
      Constructor.
      Parameters:
      contentTypeManager - The content type manager to use
  • Method Details

    • getProtectionSettings

      public ProtectPresentation getProtectionSettings()
    • load

      public static PresentationMLPackage load​(java.io.File pptxFile) throws Docx4JException
      Convenience method to create a PresentationMLPackage from an existing File (.pptx or .xml Flat OPC).
      Parameters:
      pptxFile - The pptx file
      Throws:
      Docx4JException
    • load

      public static PresentationMLPackage load​(java.io.InputStream pptxInputStream) throws Docx4JException
      Creates a PresentationMLPackage from an InputStream.
      Parameters:
      pptxInputStream - an InputStream of a .pptx file
      Returns:
      a PresentationMLPackage representing the .pptx file
      Throws:
      Docx4JException - if an exception is encountered in processing
    • setPartShortcut

      public boolean setPartShortcut​(Part part, java.lang.String relationshipType)
      Description copied from class: Base
      Tell the source Part about this target Part, so the source can use this part via a convenience method.
      Overrides:
      setPartShortcut in class OpcPackage
      Returns:
      true if the source Part does use the target Part in a convenience method.
    • getMainPresentationPart

      public MainPresentationPart getMainPresentationPart()
    • createPackage

      public static PresentationMLPackage createPackage() throws InvalidFormatException
      Create an empty presentation.
      Returns:
      Throws:
      InvalidFormatException
    • createPackage

      public static PresentationMLPackage createPackage​(SlideSizesWellKnown sz, boolean landscape) throws InvalidFormatException
      Create an empty presentation.
      Returns:
      Throws:
      InvalidFormatException
      Since:
      2.7
    • createSlidePart

      @Deprecated public static SlidePart createSlidePart​(MainPresentationPart pp, SlideLayoutPart layoutPart, PartName partName) throws InvalidFormatException, jakarta.xml.bind.JAXBException
      Deprecated.
      Create a slide and add it to the package. Deprecated, so use MainPresentationPart's addSlide method instead.
      Parameters:
      pp -
      layoutPart -
      partName -
      Returns:
      the slide
      Throws:
      InvalidFormatException
      jakarta.xml.bind.JAXBException
    • createNotesSlidePart

      @Deprecated public static NotesSlidePart createNotesSlidePart​(Part sourcePart, PartName partName) throws java.lang.Exception
      Deprecated.
      Create a notes slide and add it to slide relationships
      Parameters:
      sourcePart -
      partName -
      Returns:
      the notes slide
      Throws:
      InvalidFormatException
      jakarta.xml.bind.JAXBException
      java.lang.Exception
    • getPlaceHoldersFromAcrossLayouts

      public java.util.Map<java.lang.String,​ShapeWrapper> getPlaceHoldersFromAcrossLayouts()
    • getStyleTree

      public StyleTree getStyleTree() throws InvalidFormatException
      Throws:
      InvalidFormatException
    • reset

      public void reset()
      Reinit fields so this pkg object can be re-used.
      Overrides:
      reset in class OpcPackage
      Since:
      3.3.7
    • partialClone

      public PresentationMLPackage partialClone​(int[] slideNumbers)
      Create a PresentationMLPackage containing the specified slides only.
      Returns:
      Since:
      8.1.6