JSON API - mergeDocx
- addBarcode
- addBookmark
- addBreak
- addCaption
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addDropCap
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addPageNumber
- addRuby
- addSimpleField
- addStructuredDocumentTag
- addSVG
- addTab
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- addWordFragment
- embedHTML
- addBackgroundImage
- addFooter
- addFooterSection
- addHeader
- addHeaderSection
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setCompatibilityMode
- setDefaultFont
- setDocumentDefaultStyles
- setLanguage
- setMarkAsFinal
- setRTL
- clearBlocks
- cloneBlock
- deleteBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- removeTemplateVariableImage
- replaceBlock
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHTML
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
- tickCheckboxes
mergeDocx
PREMIUM
TRIAL / ADVANCED
Merges Word documents.
Note
You are reading the JSON API documentation. For the PHP API method please go to mergeDocx.
JSON data
| Key | Description |
|---|---|
| document | First Word document to merge. Path to the local document, Base64 string, or URL. |
| documents | Array of Word documents to merge with the first document. Each item can be a path to a local document, a Base64 string, or a URL. |
| mergeType | The possible values are:
If the mergeType equals 1 or the last section of the first document is of the "continuous" type, there may be some missalignment of absolutely positioned content in the merged document. This is due to the fact that the absolute positioned content of the second document was layed out with respect the second document page distribution that may change after the merging. |
| enforceSectionPageBreak | Enforces a page section break between documents even if the first section type of the merged document is of the continuous type. |
| numbering | The possible values are:
|
| lineBreaks | Inserts the indicated number of line breaks between the contents of the merging files. |
| forceLatestStyles | Keeps the last merged document styles, overwriting the previous styles. |
| importEmbeddedFonts | If true, imports embedded fonts. Default as false. |
| renameStyles | If true, rename styles of the DOCX to be merged with unique names to keep them. Default as false. |
Code samples
Example #1
A document can be a local file, a Base64 string, or a remote file.
Release notes
- phpdocx 18.0:
- new action.
