Interface AltChunkInterface
- All Known Implementing Classes:
DocumentPart,FooterPart,GlossaryDocumentPart,HeaderPart,JaxbXmlPartAltChunkHost,MainDocumentPart
public interface AltChunkInterface
An altChunk can appear wherever EG_BlockLevelElts is allowed
ie in tc, footnotes/endnotes, txbxContent, body, comment,
hdr/ftr. Also a content control???
- Since:
- 2.8
- Author:
- jharrop
-
Method Summary
Modifier and TypeMethodDescriptionaddAltChunk(AltChunkType type, byte[] bytes) Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, byte[] bytes, int index) Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint) Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint, int index) Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is) Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is, int index) Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint) Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint, int index) Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.voidConvert altChunks in this part to ordinary docx WordML content.
-
Method Details
-
addAltChunk
Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
bytes-- Returns:
- Throws:
Docx4JException
-
addAltChunk
AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, int index) throws Docx4JException Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
bytes-index-- Returns:
- Throws:
Docx4JException- Since:
- 8.1.0
-
addAltChunk
Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
is-- Returns:
- Throws:
Docx4JException
-
addAltChunk
AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, int index) throws Docx4JException Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
is-index-- Returns:
- Throws:
Docx4JException- Since:
- 8.1.0
-
addAltChunk
AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint) throws Docx4JException Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
bytes-attachmentPoint-- Returns:
- Throws:
Docx4JException
-
addAltChunk
AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint, int index) throws Docx4JException Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
bytes-attachmentPoint-index-- Returns:
- Throws:
Docx4JException- Since:
- 8.1.0
-
addAltChunk
AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint) throws Docx4JException Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
is-attachmentPoint-- Returns:
- Throws:
Docx4JException
-
addAltChunk
AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint, int index) throws Docx4JException Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Parameters:
is-attachmentPoint-index-- Returns:
- Throws:
Docx4JException- Since:
- 8.1.0
-
convertAltChunks
Convert altChunks in this part to ordinary docx WordML content. To convert an altChunk of type XHTML, this method requires docx4j-XHTMLImport.jar (LGPL) and its dependencies. Since 11.4.8, this method does the conversion in situ (ie rather than cloning the pkg), and does not convert docx altChunks. To handle those, use the MergeDocx component of Docx4j Enterprise.- Throws:
Docx4JException
-