Class DocxFormatter

java.lang.Object
io.jmix.reports.yarg.formatters.impl.AbstractFormatter
io.jmix.reports.yarg.formatters.impl.DocxFormatter
All Implemented Interfaces:
ReportFormatter
Direct Known Subclasses:
JmixDocxFormatter

public class DocxFormatter extends AbstractFormatter
* Document formatter for '.docx' file types
  • Field Details

    • log

      protected static final org.slf4j.Logger log
    • wordprocessingMLPackage

      protected org.docx4j.openpackaging.packages.WordprocessingMLPackage wordprocessingMLPackage
    • documentWrapper

      protected DocumentWrapper documentWrapper
    • documentConverter

      protected DocumentConverter documentConverter
    • htmlImportProcessor

      protected HtmlImportProcessor htmlImportProcessor
    • resolvedBandPaths

      protected final Map<String,AbstractFormatter.BandPathAndParameterName> resolvedBandPaths
      Band paths already resolved for the aliases of the template. An alias of a field of the band being printed matches no band name, so resolving it walks the whole band tree, and a tabulated region meets the same aliases once per row of the report. The band tree does not change while the document is being rendered, so an alias always resolves to the same band path.
  • Constructor Details

  • Method Details

    • separateBandNameAndParameterName

      protected AbstractFormatter.BandPathAndParameterName separateBandNameAndParameterName(String alias)
      Overrides:
      separateBandNameAndParameterName in class AbstractFormatter
    • setDocumentConverter

      public void setDocumentConverter(DocumentConverter documentConverter)
    • setHtmlImportProcessor

      public void setHtmlImportProcessor(HtmlImportProcessor htmlImportProcessor)
    • renderDocument

      public void renderDocument()
      Description copied from interface: ReportFormatter
      Creates document and serializes it to predefined stream (or something like this)
    • updateTableOfContents

      protected void updateTableOfContents()
    • handleUrls

      protected void handleUrls()
    • handleMultilineTexts

      protected void handleMultilineTexts()
    • loadDocument

      protected void loadDocument()
    • saveAndClose

      protected void saveAndClose()
    • replaceAllAliasesInDocument

      protected void replaceAllAliasesInDocument()
    • fillTables

      protected void fillTables()
    • tryToApplyInliners

      protected boolean tryToApplyInliners(String fullParameterName, Object paramValue, org.docx4j.wml.Text text)
    • writeToOutputStream

      protected void writeToOutputStream(org.docx4j.openpackaging.packages.WordprocessingMLPackage mlPackage, OutputStream outputStream) throws org.docx4j.openpackaging.exceptions.Docx4JException
      Throws:
      org.docx4j.openpackaging.exceptions.Docx4JException
    • convertAltChunks

      public void convertAltChunks() throws org.docx4j.openpackaging.exceptions.Docx4JException
      Throws:
      org.docx4j.openpackaging.exceptions.Docx4JException
    • isSupportedMultilineText

      protected boolean isSupportedMultilineText(org.docx4j.wml.Text text)