JSON API documentation
- Learn phpdocx in 5 minutes
- Practical guide
- 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
- JavaScript API
- JSON API
- Artificial Intelligence
- Compiled mode
- Blockchain for documents
JSON API documentation
Please refer to the JSON API introduction page to learn more about this functionality.
You will find in this section a complete list of the actions included in the JSON API feature of the latest version of the phpdocx library.
-
addBarcode
Inserts a barcode field into the Word document
-
addBookmark
Inserts a bookmarks into the Word document
-
addBreak
Inserts a line/column/page break into the Word document
-
addCaption
Inserts a caption into the Word document
-
addChart
Inserts a chart into the Word document
-
addComment
Inserts a comment to the current Word document
-
addCrossReference
Inserts a cross-reference into the Word document
-
addDateAndHour
Insert a date and/or hour in different formats
-
addDropCap
Inserts a drop cap into the Word document
-
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
Inserts a math equation in OMML or MathML format
-
addMergeField
Adds a merge field to the Word document
-
addPageNumber
Inserts the current page number into the Word document
-
addRuby
Adds a ruby (phonetic guide) content into the Word document
-
addSimpleField
Adds a simple field to the Word document
-
addStructuredDocumentTag
Inserts different types of Structured Document Tags into the Word document
-
addSVG
Inserts an SVG into the Word document
-
addTab
Inserts a tab into a 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 the Word document
-
addTextBox
Inserts a Text Box in the Word document
-
addWordFragment
Inserts a WordFragment into the Word document
-
addWordML
Inserts raw WordML code into the Word document
-
embedHTML
Inserts HTML content into the Word document
-
addBackgroundImage
Inserts a background image into the Word document
-
addFooter
Inserts footers into the Word document
-
addFooterSection
Inserts footers in a specific section into the Word document
-
addHeader
Inserts headers into the Word document
-
addHeaderSection
Inserts headers in a specific section into the Word document
-
addLineNumbering
Sets the line numbering configuration of the current Word 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
-
createListStyle
Creates a custom list style
-
createParagraphStyle
Creates a paragraph style
-
createTableStyle
Creates a table style to be used in combination with the addTable method
-
docxSettings
Overwrites the general settings of the current Word document
-
embedFont
Embeds a font in a Word document
-
modifyPageLayout
Modifies the layout properties of the Word document
-
removeFooters
Removes footers from the Word document
-
removeHeaders
Removes headers from the Word document
-
setBackgroundColor
Sets background color of the Word document
-
setCompatibilityMode
Sets the compatibility mode value for the Word document
-
setDefaultFont
Sets the default font for the whole Word document
-
setDocumentDefaultStyles
Sets the default styles for the whole Word document
-
setLanguage
Sets the default language of the Word document
-
setMarkAsFinal
Marks the resulting Word document as final
-
setRTL
Sets the global right to left language properties of the current Word document
-
clearBlocks
Removes remaining BLOCK type variables from the Word document
-
cloneBlock
Clones blocks in the document
-
deleteBlock
Deletes a block of content from the Word document
-
getTemplateVariables
Returns the template placeholder variables as an array
-
getTemplateVariablesType
Returns the template variables and their types
-
modifyInputFields
Modifies the values of the Word template input fields
-
modifyMergeFields
Modifies the values of the Word template merge fields
-
processTemplate
Processes the template to repair all listed variables
-
removeTemplateVariable
Removes a template variable with its container paragraph
-
removeTemplateVariableImage
Removes a template image variable with its container paragraph
-
replaceBlock
Replaces all content between two block variables
-
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
-
tickCheckboxes
Ticks or unticks a Word template checkbox
-
docx2txt
Extracts the text contents from a Word document
-
transformDocument
Transforms documents into other formats (DOCX, PDF, DOC, ODT, RTF, PNG, TXT)
-
transformDocAdvHTML
Transforms DOCX documents into HTML using native PHP classes
-
transformOMMLToMathML
Transforms OMML (Office MathML) equations to MathML
-
cloneWordContent
Clones existing elements in the document
-
getDocxPathQueryInfo
Gets information from a performed DOCXPath query
-
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
-
watermarkDocx
Inserts a watermark into a Word document
-
mergePdf
Merges two or more PDF documents
-
watermarkPdf
Inserts a watermark into a PDF document
-
customizeWordContent
Changes DOCX styles on the fly of new documents and templates
