Class PresentationMLPackage
java.lang.Object
org.docx4j.openpackaging.Base
org.docx4j.openpackaging.packages.OpcPackage
org.docx4j.openpackaging.packages.PresentationMLPackage
- All Implemented Interfaces:
PackageIdentifier
- Author:
- jharrop
-
Field Summary
FieldsFields inherited from class org.docx4j.openpackaging.packages.OpcPackage
contentTypeManager, customXmlDataStorageParts, docPropsCorePart, docPropsCustomPart, docPropsExtendedPart, externalResources, handled, partsFields inherited from class org.docx4j.openpackaging.Base
contentType, partName, relationships -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.PresentationMLPackage(ContentTypeManager contentTypeManager) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic NotesSlidePartcreateNotesSlidePart(Part sourcePart, PartName partName) Deprecated.static PresentationMLPackageCreate an empty presentation.static PresentationMLPackagecreatePackage(SlideSizesWellKnown sz, boolean landscape) Create an empty presentation.static SlidePartcreateSlidePart(MainPresentationPart pp, SlideLayoutPart layoutPart, PartName partName) Deprecated.static PresentationMLPackageConvenience method to create a PresentationMLPackage from an existing File (.pptx or .xml Flat OPC).static PresentationMLPackageload(InputStream pptxInputStream) Creates aPresentationMLPackagefrom anInputStream.partialClone(int[] slideNumbers) Create a PresentationMLPackage containing the specified slides only.voidreset()Reinit fields so this pkg object can be re-used.booleansetPartShortcut(Part part, String relationshipType) Tell the source Part about this target Part, so the source can use this part via a convenience method.Methods inherited from class org.docx4j.openpackaging.packages.OpcPackage
addDocPropsCorePart, addDocPropsCustomPart, addDocPropsExtendedPart, clone, cloneAs, getContentTypeManager, getCustomXmlDataStorageParts, getDocPropsCorePart, getDocPropsCustomPart, getDocPropsExtendedPart, getDrawingPropsIdTracker, getExternalResources, getPackage, getParts, getSourcePartStore, getTargetPartStore, getTitle, isNew, load, load, load, load, load, load, load, load, load, load, name, save, save, save, save, save, save, setContentTypeManager, setName, setNew, setSourcePartStore, setTargetPartStore, setTitleMethods inherited from class org.docx4j.openpackaging.Base
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, setContentType, setPartName, setRelationships, setUserData
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
PresentationMLPackage
public PresentationMLPackage()Constructor. Also creates a new content type manager -
PresentationMLPackage
Constructor.- Parameters:
contentTypeManager- The content type manager to use
-
-
Method Details
-
getProtectionSettings
-
load
Convenience method to create a PresentationMLPackage from an existing File (.pptx or .xml Flat OPC).- Parameters:
pptxFile- The pptx file- Throws:
Docx4JException
-
load
Creates aPresentationMLPackagefrom anInputStream.- Parameters:
pptxInputStream- anInputStreamof a .pptx file- Returns:
- a
PresentationMLPackagerepresenting the .pptx file - Throws:
Docx4JException- if an exception is encountered in processing
-
setPartShortcut
Description copied from class:BaseTell the source Part about this target Part, so the source can use this part via a convenience method.- Overrides:
setPartShortcutin classOpcPackage- Returns:
- true if the source Part does use the target Part in a convenience method.
-
getMainPresentationPart
-
createPackage
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:
InvalidFormatExceptionjakarta.xml.bind.JAXBException
-
createNotesSlidePart
@Deprecated public static NotesSlidePart createNotesSlidePart(Part sourcePart, PartName partName) throws Exception Deprecated.Create a notes slide and add it to slide relationships- Parameters:
sourcePart-partName-- Returns:
- the notes slide
- Throws:
InvalidFormatExceptionjakarta.xml.bind.JAXBExceptionException
-
getPlaceHoldersFromAcrossLayouts
-
getStyleTree
- Throws:
InvalidFormatException
-
reset
public void reset()Reinit fields so this pkg object can be re-used.- Overrides:
resetin classOpcPackage- Since:
- 3.3.7
-
partialClone
Create a PresentationMLPackage containing the specified slides only.- Returns:
- Since:
- 8.1.6
-