indexer

indexer

ADVANCED / PREMIUM TRIAL

Parses Word documents and return their contents.

Description
Indexer (mixed $source)

This class parses the content of DOCX documents and returns an array with these contents:

  • body
    • charts
    • images
    • fields
    • links
    • text
  • comments
    • images
    • links
    • text
  • endnotes
    • images
    • links
    • text
  • fonts
  • footers
    • images
    • links
    • text
  • footnotes
    • images
    • links
    • text
  • headers
    • images
    • links
    • text
  • information
  • people
  • properties
    • core
    • custom
  • sections
  • signatures
  • sources
  • styles
    • docDefaults
    • heading
    • numbering
    • style

Parameters

source

The path to the Word document to be parsed (Advanced and Premium licenses) or a DOCXStructure object (Premium licenses).

Return values

array or json

Exceptions

Error while trying to open the (base) template as a zip file.

Code samples

Example #1: