API Documentation
Word content
Format conversion
CryptoPHPDOCX
Digital Signature package
Api Documentation
To generate a word document, you must activate the support for ZipArchive and XSLT in PHP 5
You will find in this section a complete list of the methods included in the latest version of the PHPDOCX library.
Here we include a brief description of each method for your convenience:
Layout and General
-
Inserts a background image into the Word document
-
Inserts footers into the Word document
-
Inserts headers into the Word document
-
Imports a macro from an existing Word document into the current document
-
Modifies the properties of the Word document
-
Adds a new section to the Word document
-
Creates the docx document
-
Creates and sends to the browser the docx document
-
Overwrites the general settings of the current Word document
-
Imports headers and footers from an external Word document
-
Imports Word styles from an external Word document
-
Modifies the layout properties of the Word document
-
Generates a Word document with all the available Word styles: samples and code
-
Sets background color of your Word document.
-
Sets the default font for the whole Word document
-
Enforces UTF-8 encoding of the Word document contents
-
Sets the default language of the Word document
-
Marks the resulting Word document as final
Word content
-
Transforms basic HTML and CSS to WordML and inserts it into your Word document
-
Inserts a bookmarks into the Word document
-
Inserts a line/column/page break into the Word document
-
Inserts a chart into the Word document
-
This method allows for the insertion of the current date and/or hour in different formats.
-
Adds an existing DOCX into your Word document
-
Inserts embedded elements into the Word document
-
Inserts an endnote into the Word document
-
Inserts an footnote into the Word document
-
Inserts form elements into the Word document
-
Inserts a heading into the Word document
-
Inserts HTML into the Word document
-
Inserts an image into the Word document
-
Inserts a link into the Word document
-
Inserts (nested) lists into the Word document
-
Imports a math equation from another Word document
-
Inserts a math equation in OMML format
-
Inserts a math equation in MathML format
-
Inserts a MHT (single file web page) into the Word document
-
Inserts the current page number into the Word document
-
Inserts a paragraph with complex formatting into the Word document
-
Inserts an external RTF file into the Word document
-
Inserts different types of shapes into a Word document
-
Adds a simple field to your Word document
-
Inserts different types of Structured Document Tags into the Word document
-
Inserts a table into a Word document
-
Inserts a Table of Contents (TOC) into the Word document
-
Inserts a paragraph into a Word document
-
Inserts a Text Box in the Word document
-
Inserts raw WordML code into the Word document
-
Creates a WordML fragment to be inserted into the Word document
-
Inserts HTML content into the Word document
Templates
-
Allows to use a predefined Word document template
-
Replaces a PHPDocX placeholder variable by a chart
-
Replaces a placeholder image in a Word template
-
Replaces a template variable by different types of content
-
Removes unused Word template variables
-
Removes remaining BLOCK type variables from the Word document
-
Deletes a block of content from the Word template
-
Returns the template placeholder variables as an array
-
Replaces a template variable by HTML content
-
Sets a custom symbol to wrap PHPDocX template variables
-
Ticks or unticks a Word template checkbox
Format conversion
-
Extracts the text contents from a Word document
-
Generates a PDF out of a simple Word document
-
Generates a XHTML string out of a Word document
-
Transforms .docx documents into another formats (.pdf, .doc, .rtf, .html)
-
Transforms docx to other formats with the help of Microsoft Office
-
Transforms plain text into WordML with custom styles
DocxUtilities
-
Merges two Word documents
-
Modifies the settings of an existing Word document
-
Parses and ticks or unticks the checboxes included in a Word document
-
Removes a whole chapter from a Word document
-
Replaces the data associated with a given chart
-
Searches for keywords within a Word document and highlights them
-
Removes the paragraphs containing a given string of text
-
Searches and replaces a given string of text in a Word document
-
Inserts a watermark into a Word document
-
Removes the watermarks from a Word documents
CryptoPHPDOCX
-
Encrypts (AES128) a Word document
-
Encrypts a PDF file
-
Password protects the contents of a Word document
-
Password protects the contents of a PDF document
-
Removes the password protection from a Word document
Digital Signature package
-
Selects the Word document that we want to digitally sign
-
Selects de PDF Document to be digitally signed
-
Selects the RSA key to be used for the digital dignature
-
Adds an explanatory comment to the Word digital signature
-
Selects the Digital Certificate to be used
-
Digitally signs a Word document
-
Digitally signs a PDF document
PHPDocx. Dinamic generation of reports in .docx format 

