News

phpdocx v15 release notes

  • May 21, 2024

We are excited to announce a major update of our library. phpdocx 15 is now available for our users to download. It incorporates essential new methods and features, designed to allow you generate fully customized documents and thus boost your workflow while you save development time and efforts.

In order to get phpdocx 15, just go to Pricing and select the license(s) that best suit your needs. Users interested in generate XLSX and PPTX as well as DOCX can get the Bureau version, which offers three Premium libraries (phpdocx, phpxlsx, phppptx) in one suite for a very competitive price.

Users with a valid License Update Service (LUS) can get this version at no cost by going to MY PHPDOCX and choosing the license to update. If you have a previous phpdocx version, you can also upgrade by following the same procedure.

This is the complete list of phpdocx 15 features:

  • JavaScript API (Premium licenses):
    • Work with DOCX documents using nodejs and web browsers.
    • Included bundles: CommonJS (cjs), ESM (mjs) and IIFE (iife.js).
    • TypeScript type information.
    • Available features:
      • Contents: bookmarks, breaks, dates and times, external files, footers, headers, images, links, lists, page number, paragraphs, table of contents, tables, texts, WordFragments, WordML.
      • Styles: characters, lists, paragraphs.
      • Layouts: modify section layout, RTL, sections.
      • Settings: document properties, document settings.
      • Templates: get template symbols, get template variables, process template, remove variable image, remove variable text, replace variable external file, replace variable image, replace variable list, replace variable table, replace variable text, replace variable WordFragment, replace variable WordML, set template symbols.
      • Handle transitional and strict DOCX variants.
      • Extra utilities: convert units (emu, half-point, pt, px, twip).
      • MS Word default styles.
  • Extended charts: box & whisker, funnel, waterfall, histogram, sunburst, treemap.
  • WebP image format supported (addImage, replacePlaceholderImage, embedHTML, replaceVariableByHTML, BulkProcessing).
  • New removeTemplateVariableImage method to remove image placeholders.
  • HTML to DOCX:
    • CSS variables.
    • WebP.
    • CSS Extended: set max-width and max-height styles to images (Premium licenses).
    • Add alt attribute as descr value in image tags.
    • New streamContext option to set a stream context to download images.
    • Supported root and only-child selectors.
    • Improved CSS media query handling.
    • CSS 8-digit HEX colors are added as 6-digit HEX colors.
    • Removed a PHP Warning when adding an invalid border color.
  • New importStylesWordDefault method to import MS Word default styles.
  • Encrypt DOCX, XLSX and PPTX methods support files bigger than 6.5MB (Premium licenses).
  • The conversion plugin based on LibreOffice supports transforming PDF to DOCX, DOC, ODT, PNG, RTF and TXT (Advanced and Premium licenses).
  • DOCXPath (Advanced and Premium licenses):
    • New types: table-row, table-cell and table-cell-paragraph.
    • Added "m" namespace for XPath queries.
  • watermarkPdf allows setting specific pages to add watermarks (Advanced and Premium licenses).
  • New options in addChart: deleteAxisValues and excludeExternalData.
  • New streamContext option in embedHTML and replaceVariableByHTML to set a stream context to download images.
  • The font option in addText allows using an array to set all font types (ascii, hAnsi, eastAsia, cs).
  • MultiMerge: supported extended chart elements, increased list numbering style IDs (Advanced and Premium licenses).
  • addStructuredDocumentTag allows setting a custom font family and char value when adding checkboxes.
  • Added new methods and options to phpdocx CLI command (Premium licenses).
  • Improved modifyMergeFields to handle not default merge field contents (Advanced and Premium licenses).
  • Add title and description values in addTable.
  • New excludeHeadersAndFooters option in addSection to exclude cloning headers and footers references.
  • DOCXCustomizer (Premium licenses):
    • table-cell-paragraph new type.
    • widowControl option.
    • Added "m" namespace for XPath queries.
  • Text contents support applying disabled styles (using false as value): bold, italic, bidi, caps, smallCaps, widowControl and wordWrap.
  • Theme charts supports applying custom colors to lines (Premium licenses).
  • DOCXStructure and in-memory DOCX documents supported in docx2txt, mergeDocxAt and rawSearchAndReplace methods (Premium licenses).
  • Added a default HTML content when adding an empty content with embedHTML and replaceVariableByHTML to avoid throwing a PHP error.
  • Improved parseMode when a paragraph contains other internal paragraphs.
  • Improved the inline-block replacement type to work with complex contents multiple times (Premium licenses).
  • Included a sample_composer.json file in the plugins folder of the namespaces package (Advanced and Premium licenses).
  • addProperties can be called multiple times for the same document object. The static variables have been changed to class attributes.
  • modifyMergeFields is not case sensitive when doing replacements.
  • PHP GD Extension is checked in phpdocx-cli and check scripts.
  • Remove invalid UTF-8 XML characters automatically.
  • The htmlspecialchars PHP function to convert protected XML characters has been added to be applied automatically in the search terms of the following DocxUtilities methods: rawSearchAndReplace, searchAndColor, searchAndHighlight and searchAndRemove.
  • Reordered extended tags when transforming HTML with the parseFloats option enabled to avoid an error message using an outdated version of MS Word 2007.
  • Corrections in the internal phpdoc documentation.