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 Type Method Description AlternativeFormatInputPartaddAltChunk(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.AlternativeFormatInputPartaddAltChunk(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.AlternativeFormatInputPartaddAltChunk(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.AlternativeFormatInputPartaddAltChunk(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.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.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.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.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.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.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.AlternativeFormatInputPartaddAltChunk(AltChunkType type, java.io.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.WordprocessingMLPackageconvertAltChunks()Convert the AltChunks to ordinary docx WordML content, returning result as a new WordprocessingMLPackage.
-
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 Docx4JExceptionAdd 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
AlternativeFormatInputPart addAltChunk(AltChunkType type, java.io.InputStream is) throws Docx4JExceptionAdd 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, java.io.InputStream is, int index) throws Docx4JExceptionAdd 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 Docx4JExceptionAdd 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 Docx4JExceptionAdd 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, java.io.InputStream is, ContentAccessor attachmentPoint) throws Docx4JExceptionAdd 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, java.io.InputStream is, ContentAccessor attachmentPoint, int index) throws Docx4JExceptionAdd 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 the AltChunks to ordinary docx WordML content, returning result as a new WordprocessingMLPackage.- Throws:
Docx4JException
-