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 Details

    • addAltChunk

      AlternativeFormatInputPart addAltChunk​(AltChunkType type, byte[] bytes) 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 -
      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

      AlternativeFormatInputPart addAltChunk​(AltChunkType type, java.io.InputStream is) 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 -
      Returns:
      Throws:
      Docx4JException
    • addAltChunk

      AlternativeFormatInputPart addAltChunk​(AltChunkType type, java.io.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, java.io.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, java.io.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

      WordprocessingMLPackage convertAltChunks() throws Docx4JException
      Convert the AltChunks to ordinary docx WordML content, returning result as a new WordprocessingMLPackage.
      Throws:
      Docx4JException