News

phpdocx v16 release notes

  • Mar 18, 2025

We have the pleasure to announce that phpdocx has reached its version 16. This new major version includes a huge set of free DOCX code templates for your convenience, new methods and many other useful features, up to a hundred.

Just go to Pricing to get the license that best suits your project requirements.

Users with a valid License Update Service (LUS) may get this new version at no cost, by going to MY PHPDOCX and selecting the licence(s) they want to update.

Users with previous versions can also upgrade to the new one in the same place.

Also, we encourage you to get LUS, if you don't already have it, in order to get the next releases for free, plus other benefits, for a whole year.

The complete list features of phpdocx 16 is the following:

  • 25 DOCX code templates ready to use (Advanced and Premium licenses).
  • New method to insert table of authorities: addTableAuthorities (Advanced and Premium licenses).
  • Captions:
    • New addCaption method.
    • align and wrapTextInBookmarks options in addImage and addTable captions.
  • HTML Extended (Premium licenses):
    • New HTML Extended tags: phpdocx_caption, phpdocx_tableauthorities.
    • parentId attribute in phpdocx_comment to reply comments.
    • Apply custom base URLs.
    • addTableFigures supports setting a custom style.
    • Extra check when using mixPlaceholderStyles not to read DOMText elements.
  • CSS Extended (Premium licenses):
    • New "data-custom" style to add custom styles in texts, paragraphs, tables and lists.
    • Added 'data-font-family: initial' as new style in text contents.
    • Added 'data-color: initial' as new style in text contents.
  • Native DOCX to HTML (Advanced and Premium licenses):
    • EMF images support.
    • Merge fields.
    • Maximum value of 6 for headings.
    • Handle baseline vertAlign value.
    • Text input structured document tags.
    • Checkboxes added as block contents without a paragraph element.
    • Extra check not to apply a default cell margin if only table cell margin styles are applied.
    • Cast to float px values transformed to pt.
    • Apply an absolute position to images set as back position only if behindDoc is active.
    • Removed a deprecated message when a rowspan is not set in a table.
  • Native DOCX to PDF (Advanced and Premium licenses):
    • EMF images support.
    • Merge fields.
    • Maximum value of 6 for headings.
    • Handle baseline vertAlign value.
    • Structured document tags.
    • Extra check not to apply a default cell margin if only table cell margin styles are applied.
    • Target value used in Content-Disposition when the stream mode is enabled.
    • Apply an absolute position to images set as back position only if behindDoc is active.
    • Removed a deprecated message when a rowspan is not set in a table.
  • JavaScript API (Premium licenses):
    • Contents: captions (images and tables), math equations, text boxes.
    • Styles: default paragraph styles in tables, paragraph borders, tables.
    • Renamed BorderCell to Border.
  • PDFUtilities (Advanced and Premium licenses):
    • New attachFile method: attach one or more files in a PDF, set XMP RDF contents.
    • New addPageNumber method.
    • New addPageNumbers and pageNumbersOptions in mergePdf to add page numbers.
    • Exceptions display the PDF file name if it doesn't exist.
    • Supported versions of PDF/A model.
  • Theme charts:
    • Set custom title layout.
    • Apply font styles to series and values labels (Premium licenses).
  • BulkProcessing (Premium licenses):
    • Supported fit value in replaceImage.
    • Handle 0 dpi values in images.
  • Comments:
    • Allow adding comments to multiple paragraphs.
    • New parentId option to reply comments.
  • Indexer (Advanced and Premium licenses):
    • Linked image contents are only returned if the external linked resource is http or https.
    • New getExternalResources option to disable the download of external resource contents such as linked images.
  • Conversion plugin based on LibreOffice (Advanced and Premium licenses):
    • Added "--norestore" to all conversions.
    • New documentation in the macros-libreoffice folder to enable and use lossless compression without adding a macro.
    • New path option in transformDocument to set the path to libreoffice.
    • The escapeshellarg option applies to the LibreOffice path option.
  • New fit value to set width and height sizes with replacePlaceholderImage.
  • Mark citations to be inserted in table of authorities (Advanced and Premium licenses).
  • New suppressAutoHyphens option in paragraph styles.
  • addStructuredDocumentTag and addCitation methods support new rPr styles: characterBorder and rStyle.
  • Improved inserting math equations as WordFragment.
  • addMathEquation allows disabling the default italic style.
  • Add line signatures (Premium licenses):
    • Use EMF as default image.
    • Generate and add a GUID as id.
  • New distance option in addImage and addSVG methods to set the distance from text.
  • split methods allow setting a custom path for the target documents distinct than the script folder (Advanced and Premium licenses).
  • Added mb_ functions in DOCXUtilites and AI methods to parse strings (Advanced and Premium licenses).
  • PDF to PNG transformation allows setting a custom path for the target files distinct than the source folder (Advanced and Premium licenses).
  • Merge DOCX documents (Advanced and Premium licenses):
    • Remote images.
  • Encrypt and protect PDF (Premium licenses):
    • Exceptions display the PDF file name if the file doesn't exist.
    • Removed a depecrated message implicit float message.
  • SignPDF (Premium licenses):
    • Exceptions display the PDF file name if the file doesn't exist.
  • Extra check to avoid duplicated relationships when using replacePlaceholderImage with headers and footers that include images embedded in shapes.
  • Structured document tags support text as type.
  • Improved adding multiple section types.
  • Text contents support applying disabled styles (using false as value): keepLines, keepNext and pageBreakBefore.
  • The font option in createParagraphStyle, createCharacterStyle, setDocumentDefaultStyles and paragraph styles allows using an array to set all font types (ascii, hAnsi, eastAsia, cs).
  • HTML to DOCX:
    • Silent the PHP Exception when adding a not valid SVG.
    • Silent a PHP Warning from exif_imagetype when adding a not valid remote image.
  • Added new methods and options to phpdocx CLI command (Premium licenses).
  • Replaced rand with mt_rand in replacePlaceholderImage and addPageNumber methods to generate internal random IDs.
  • Extra check to set the scope option in watermarkDocx.
  • Updated the default regular expression used by the parseMode option in templates not to get placeholders without contents.
  • Removed ~E_STRICT from the default logger error levels when using PHP 8.0 or newer.
  • Corrections in the internal phpdoc documentation.