addExternalFile
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createDocx
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importHeadersAndFooters
- importStyles
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addTable
- addTableContents
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteTemplateBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- tickCheckbox
addExternalFile
BASIC / ADVANCED / PREMIUM
Inserts an external document (DOCX, HTML, RTF or MHT) into the current Word document.
Description
public void addExternalFile(OptionsExternalFile options) throws Exception
This method allows the insertion of an external DOCX, HTML, RTF or MHT document within the current Word document.
When inserting a DOCX document, it is recommended that the page layout of the inserted DOCX coincides with the one of the Word document you are generating with Javadocx, if not you may expect certain formatting problems.
This method is only compatible with MS Word.
Parameters
options
An array with the available options.
The possible keys and values are (required options are shown with red background):
Option | Type | Description |
---|---|---|
src | String | The path to the document that you want to insert within our current Word document. |
matchSource | Boolean | If true (default value), it tries to preserve as much as possible the styles of the DOCX to be included. |