API Documentation

Download PHPDocX

download PhpDocX

Choose the version that better suits your needs

Click here

ON DEMAND

On demand

Do you have
special needs?

You may ask here for a quote

Support

Support

Do you need technical support?

We can help

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
  • Sets the line numbering configuration of the current Word document.
  • Imports a macro from an existing Word document into the current document
  • Add custom page borders to the Word 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
  • Creates a custom list style to use it in combination with the addList and embedHTML methods.
  • Creates a paragraph style to be used in combination with the addText method.
  • 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
  • Sets the global right to left language properties of the current Word document

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
  • Adds a Word comment to the current 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 a 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
  • Adds a merge field to the Word document
  • 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

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

CryptoPHPDOCX

Digital Signature package