Package org.docx4j.convert.in
Class FlatOpcXmlImporter
java.lang.Object
org.docx4j.convert.in.FlatOpcXmlImporter
Create a Package object from an
XmlPackage object.
Microsoft Word and Powerpoint both support
saving to this format. Excel doesn't, but you
can still have a spreadsheet in this format if you want to.
"<?xml version=""1.0"" standalone=""yes""?>
<?mso-application progid=""Word.Document""?>
<pkg:package xmlns:pkg=""http://schemas.microsoft.com/office/2006/xmlPackage"">
<pkg:part pkg:name=
pkg:contentType=
pkg:padding=""512""> (@padding is only on rels)
<pkg:xmlData>
<pkg:part pkg:name=""/word/media/image2.jpeg""
pkg:contentType=""image/jpeg""
pkg:compression=""store""> (@compression is only on binary parts)
<pkg:binaryData>
- Author:
- jharrop
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()getRawPart(ContentTypeManager ctm, String resolvedPartUri, Relationship rel) static PartgetRawPart(ContentTypeManager ctm, Part pkgPart, Relationship rel, OpcPackage targetPkg) getRelationshipsPart(Part part) Get the Relationships Part (if there is one) for a given Part.static RelationshipsPart
-
Field Details
-
handled
This HashMap is intended to prevent loops.
-
-
Constructor Details
-
FlatOpcXmlImporter
- Throws:
jakarta.xml.bind.JAXBException
-
FlatOpcXmlImporter
-
-
Method Details
-
get
- Throws:
Docx4JException
-
populateRelationshipsPart
public static RelationshipsPart populateRelationshipsPart(RelationshipsPart rp, Element el) throws InvalidFormatException, jakarta.xml.bind.JAXBException - Throws:
InvalidFormatExceptionjakarta.xml.bind.JAXBException
-
getRelationshipsPart
public RelationshipsPart getRelationshipsPart(Part part) throws Docx4JException, InvalidFormatException Get the Relationships Part (if there is one) for a given Part. Otherwise return null.- Parameters:
zf-part-- Returns:
- Throws:
InvalidFormatExceptionDocx4JException
-
getRawPart
public Part getRawPart(ContentTypeManager ctm, String resolvedPartUri, Relationship rel) throws Docx4JException - Throws:
Docx4JException
-
getRawPart
public static Part getRawPart(ContentTypeManager ctm, Part pkgPart, Relationship rel, OpcPackage targetPkg) throws Docx4JException - Throws:
Docx4JException
-