Skip to content

Latest commit

 

History

History
77 lines (74 loc) · 2.35 KB

readme.md

File metadata and controls

77 lines (74 loc) · 2.35 KB

Docx4jUtil - Utility class create MS office word document based on DOCX4J Library

Here you can find Class Diagram

This Lib (classes) helps you to create docx document. The factory classes contained on util package are the core of lib. This classes have most methods to compose docx. The classes are:

  • StyleFactory this class allows to create "word" object to insert into document
    • extFormatting
    • textFormatting
    • overrideDefaultStyle
    • setCellBorders
    • setCellWidth
    • setCellNoWrap
    • setCellVMerge
    • setCellHMerge
    • setCellColor
    • setCellMargins
    • setVerticalAlignment
    • setFontSize
    • setFontFamily
    • setFontColor
    • setHorizontalAlignment
    • addBoldStyle
    • addItalicStyle
    • addUnderlineStyle
    • addStyle
    • addTableCell
    • addTableCell
    • addCellStyle
    • addImageCellStyle
    • newImage
    • getImageBytes
    • createTableWithContent
    • createHyperlink
    • customizeLayoutSection
    • createSectionBreak
  • SectionFactory this class compose several object to create document:
    • fromDocTableToTable
    • fromFieldListToParagraphList
    • fromDocTextToParagraph
    • fromDocFieldToParagrah
    • fromDocTextToParagraph
    • fromDocLinkToParagraph
    • fromDocImgToParagraph
    • fromDocImgToParagraph
    • populateP
  • Docx4JXmlWrapper this class is mainly used to manage revision / bookmark and retrive text form document
    • getBookmark
    • getRevisionIns
    • getRevisionDel
    • getRevision
    • createSimpleField
    • bookmarkRun
    • createRevision
    • handleRels
    • readRevision
    • acceptRevision
    • getText
    • setText
    • internalGetText
    • internalSetText
    • insertAnchorRevision
    • createAnchor
    • createAnchorNoParagraph
    • createTextFormatting

Code Example

On test directory you can find some Junit Test that create some word document. The test classes are:

  • CreateReport
    • createReportTextFormat - create document with many text formatting
    • createReportStyle - create document that use / overwrite default style of word document
    • createTable - create document with table
    • createReportDoubleColumn - create document with several break page to create double column template document
    • completeReport - create complete word document with several object
  • CreateSectionReport
    • createDefaultReport