XML API documentation
- Learn phpdocx in 5 minutes
- Tutorial
- API quick guide
- HTML to Word
- HTML Extended
- Conversion plugin
- Word to HTML
- DOCXPath
- Bulk processing
- DOCXCustomizer
- Digital signature
- Cryptophpdocx
- Right to left languages
- phpdocx CLI command
- Tracking
- Artificial Intelligence
- Blockchain for documents
- JavaScript API
- Compiled mode
XML API documentation
You will find in this section a complete list of the tags included in the XML API feature of the latest version of the phpdocx library.
Here we include a brief description of each method for your convenience:
-
addBackgroundImage
Inserts a background image into the Word document
-
addFooter
Inserts footers into the Word document
-
addHeader
Inserts headers into the Word document
-
addLineNumbering
Sets the line numbering configuration of the current Word document
-
addMacroFromDoc
Imports a macro from an existing Word document into the current document
-
addPageBorders
Inserts page borders into the Word document
-
addProperties
Modifies the properties of the Word document
-
addSection
Adds a new section to the Word document
-
createCharacterStyle
Creates a character style to be used in combination with the addText method
-
createListStyle
Creates a custom list style to use it in combination with the addList and embedHTML methods
-
createParagraphStyle
Creates a paragraph style to be used in combination with the addText method
-
docxSettings
Overwrites the general settings of the current Word document
-
importHeadersAndFooters
Imports headers and footers from an external Word document
-
importListStyle
Imports a list style from an external Word document
-
importStyles
Imports Word styles from an external Word document
-
modifyPageLayout
Modifies the layout properties of the Word document
-
parseStyles
Generates a Word document with all the available Word styles
-
removeFooters
Removes footers into the Word document
-
removeHeaders
Removes headers into the Word document
-
setBackgroundColor
Sets background color of the Word document
-
setDefaultFont
Sets the default font for the whole Word document
-
setDocumentDefaultStyles
Sets the default styles for the whole Word document
-
setEncodeUTF8
Enforces UTF-8 encoding of the Word document contents
-
setLanguage
Sets the default language of the Word document
-
setMarkAsFinal
Marks the resulting Word document as final
-
addBookmark
Inserts a bookmarks into the Word document
-
addBreak
Inserts a line/column/page break into the Word document
-
addChart
Inserts a chart into the Word document
-
addComment
Adds a Word comment to the current Word document
-
addCrossReference
Inserts a cross-reference into the Word document
-
addDateAndHour
Allows to insert the current date and/or hour in different formats
-
addEndnote
Inserts an endnote into the Word document
-
addExternalFile
Adds an external DOCX, HTML, MHT, RTF or TXT file
-
addFootnote
Inserts a footnote into the Word document
-
addFormElement
Inserts form elements into the Word document
-
addHeading
Inserts a heading into the Word document
-
addImage
Inserts an image into the Word document
-
addLink
Inserts a link into the Word document
-
addList
Inserts (nested) lists into the Word document
-
addMathEquation
Imports a math equation from another Word document or inserrts a math equation in OMML or MathML format
-
addMergeField
Adds a merge field to the Word document
-
addOnlineVideo
Adds an online video to the Word document
-
addPageNumber
Inserts the current page number into the Word document
-
addShape
Inserts different types of shapes into a Word document
-
addSimpleField
Adds a simple field to your Word document
-
addStructuredDocumentTag
Inserts different types of Structured Document Tags into the Word document
-
addTable
Inserts a table into a Word document
-
addTableContents
Inserts a Table of Contents (TOC) into the Word document
-
addTableFigures
Inserts a Table of Figures into the Word document
-
addText
Inserts a paragraph into a Word document
-
addTextBox
Inserts a Text Box in the Word document
-
addWordML
Inserts raw WordML code into the Word document
-
embedHTML
Inserts HTML content into the Word document
-
clearBlocks
Removes remaining BLOCK type variables from the Word document
-
deleteBlock
Deletes a block of content from the Word document
-
modifyInputFields
Modifies the values of the Word template input fields
-
processTemplate
Processes the template to repair all listed variables
-
removeTemplateVariable
Removes a template variable with its container paragraph
-
replaceListVariable
Replaces a single variable within a list by a list of items
-
replacePlaceholderImage
Replaces a placeholder image by an external image
-
replaceTableVariable
Replaces a single variable by a 'table set of rows'
-
replaceVariableByExternalFile
Replaces an array of variables by external files
-
replaceVariableByHtml
Replaces a template variable with WordML obtained from HTML via the embed method
-
replaceVariableByText
Replaces an array of variables by their values
-
replaceVariableByWordFragment
Replaces an array of variables by Word Fragments
-
replaceVariableByWordML
Replaces an array of variables by plain WordML
-
setTemplateSymbol
Sets a custom symbol to wrap phpdocx template variables
-
setTemplateBlockSymbol
Sets a custom string to set phpdocx block variables
-
enableRepairMode
Enables repair features to fix common issues when working with LibreOffice
-
transformDocument
Transforms DOCX documents into another formats (PDF, HTML, XHTML, DOC, RTF, PNG, TXT)
-
cloneBlock
Clones blocks in the document
-
cloneWordContent
Clones existing elements in the document
-
insertWordFragment
Inserts existing elements in the document
-
moveWordContent
Moves existing elements in the document
-
removeWordContent
Removes existing elements in the document
-
replaceWordContent
Replaces existing elements by a WordFragment
-
mergeDocx
Merges two or more Word documents
-
parseCheckboxes
Parses and ticks or unticks the checboxes included in a Word document
-
rawSearchAndReplace
Searches and replaces texts in any XML file of the document
-
removeChapter
Removes a whole chapter from a Word document
-
replaceChartData
Replaces the data associated with a given chart
-
searchAndHighlight
Searches for keywords within a Word document and highlights them
-
searchAndRemove
Removes the paragraphs containing a given string of text
-
searchAndReplace
Searches and replaces a given string of text in a Word document
-
setLineNumbering
Modifies the line numbering properties of an existing Word document
-
watermarkDocx
Inserts a watermark into a Word document
-
watermarkRemove
Removes watermarks from a Word document
-
removeSection
Removes a section and its contents
-
splitDocx
Splits DOCX documents per section
-
mergePdf
Merges two or more PDF documents
-
splitPdf
Splits PDF documents
-
watermarkPdf
Inserts a watermark into a PDF document
-
customizeWordContent
Changes DOCX styles on the fly of new documents and templates
-
addPermProtection
Adds editable regions of contents into the Word document
-
encryptDocx
Encrypts (AES128) a Word document
-
encryptPDF
Encrypts a PDF file
-
protectDocx
Password protects the contents of a Word document
-
protectPDF
Password protects the contents of a PDF document
-
removeProtection
Removes the password protection from a Word document
-
sign (DOCX)
Digitally signs a Word document
-
sign (PDF)
Digitally signs a PDF document