XML API - pdx:addExternalFile
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- docxSettings
- importHeadersAndFooters
- importListStyle
- importStyles
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- addBookmark
- addBreak
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addStructuredDocumentTag
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteBlock
- modifyInputFields
- processTemplate
- rawSearchAndReplace
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
pdx:addExternalFile
Inserts an external document (DOCX, HTML, RTF or MHT) into the current Word document.
Note
You are reading the XML API documentation. For the PHP API method please go to addExternalFile.
Description
Element definition
This element 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 phpdocx, if not you may expect certain formatting problems.
This element is not compatible with the conversion plugin: the inserted DOCX will not render at all in the resulting PDF, DOC, RTF, ODT or HTML document.
Attributes and sub-elements
options
key | Description |
---|---|
src | The path to the document (.docx) that you want to insert within our current Word document. |
matchSource | If true (default value) tries to preserve as much as possible the styles of the DOCX to be included. |
preprocess | If true does some preprocessing on the DOCX file to add. |
Beware that the DOCX to insert gets modified so please make a backup copy first.