public class WordprocessingMLPackage extends OpcPackage
Modifier and Type | Class and Description |
---|---|
static class |
WordprocessingMLPackage.FilterSettings |
Modifier and Type | Field and Description |
---|---|
protected GlossaryDocumentPart |
glossaryDoc |
protected static org.slf4j.Logger |
log |
protected MainDocumentPart |
mainDoc |
contentTypeManager, customXmlDataStorageParts, docPropsCorePart, docPropsCustomPart, docPropsExtendedPart, externalResources, handled, parts
contentType, partName, relationships
Constructor and Description |
---|
WordprocessingMLPackage()
Constructor.
|
WordprocessingMLPackage(ContentTypeManager contentTypeManager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static WordprocessingMLPackage |
createPackage()
Creates a WordprocessingMLPackage, using default page size and orientation.
|
static WordprocessingMLPackage |
createPackage(PageSizePaper sz,
boolean landscape)
Creates a WordprocessingMLPackage, containing a MainDocumentPart (with content),
Styles part, DocPropsCorePart part, and DocPropsExtendedPart.
|
void |
filter(WordprocessingMLPackage.FilterSettings filterSettings)
Deprecated.
|
protected void |
finalize() |
DocumentModel |
getDocumentModel() |
Mapper |
getFontMapper() |
HeaderFooterPolicy |
getHeaderFooterPolicy()
Deprecated.
|
MainDocumentPart |
getMainDocumentPart() |
ProtectDocument |
getProtectionSettings() |
static WordprocessingMLPackage |
load(File docxFile)
Convenience method to create a WordprocessingMLPackage
from an existing File (.docx zip or .xml Flat OPC).
|
static WordprocessingMLPackage |
load(InputStream is)
Convenience method to create a WordprocessingMLPackage
from an existing stream(.docx zip or .xml Flat OPC).
|
void |
reset()
Reinit fields so this pkg object can be re-used.
|
void |
setFontMapper(Mapper fm) |
void |
setFontMapper(Mapper fm,
boolean populate) |
boolean |
setPartShortcut(Part part,
String relationshipType)
Tell the source Part about this target Part, so the
source can use this part via a convenience method.
|
void |
transform(Templates xslt,
Map<String,Object> transformParameters)
Use an XSLT to alter the contents of this package.
|
addDocPropsCorePart, addDocPropsCustomPart, addDocPropsExtendedPart, clone, getContentTypeManager, getCustomXmlDataStorageParts, getDocPropsCorePart, getDocPropsCustomPart, getDocPropsExtendedPart, getExternalResources, getPackage, getParts, getSourcePartStore, getTargetPartStore, getTitle, load, load, load, load, load, load, load, load, name, save, save, save, save, save, save, setContentTypeManager, setName, setSourcePartStore, setTargetPartStore, setTitle
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, setContentType, setPartName, setRelationships, setUserData
protected static org.slf4j.Logger log
protected MainDocumentPart mainDoc
protected GlossaryDocumentPart glossaryDoc
public WordprocessingMLPackage()
public WordprocessingMLPackage(ContentTypeManager contentTypeManager)
contentTypeManager
- The content type manager to usepublic ProtectDocument getProtectionSettings()
public DocumentModel getDocumentModel()
@Deprecated public HeaderFooterPolicy getHeaderFooterPolicy()
public static WordprocessingMLPackage load(File docxFile) throws Docx4JException
docxFile
- The docx fileDocx4JException
public static WordprocessingMLPackage load(InputStream is) throws Docx4JException
docxFile
- The docx fileDocx4JException
public boolean setPartShortcut(Part part, String relationshipType)
Base
setPartShortcut
in class OpcPackage
public MainDocumentPart getMainDocumentPart()
public void transform(Templates xslt, Map<String,Object> transformParameters) throws Exception
is
- transformParameters
- Exception
@Deprecated public void filter(WordprocessingMLPackage.FilterSettings filterSettings) throws Exception
Exception
public void setFontMapper(Mapper fm, boolean populate) throws Exception
fm
- populate
- Exception
public Mapper getFontMapper()
public static WordprocessingMLPackage createPackage() throws InvalidFormatException
InvalidFormatException
public static WordprocessingMLPackage createPackage(PageSizePaper sz, boolean landscape) throws InvalidFormatException
sz
- landscape
- InvalidFormatException
protected void finalize() throws Throwable
public void reset()
reset
in class OpcPackage
Copyright © 2007-2018. All Rights Reserved.