Forum


Replies: 8   Views: 2093
Transform documents to text
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by kobbe  · 12-02-2020 - 13:44

So instead new follow up question.

From looking at the style, how can I see that it is a headline and what depth it has? :o

array(2) {
   ["pStyle"]=>
  array(3) {
      ["type"]=>
    string(8) "w:pStyle"
      ["val"]=>
    string(32) "FormatmallRubrik1MnsterInget15gr"
      ["styles"]=>
    array(13) {
         [0]=>
      array(4) {
            ["tag"]=>
        string(7) "w:style"
            ["type"]=>
        string(4) "open"
            ["level"]=>
        int(1)
        ["attributes"]=>
        array(3) {
               ["w:type"]=>
          string(9) "paragraph"
               ["w:customStyle"]=>
          string(1) "1"
               ["w:styleId"]=>
          string(32) "FormatmallRubrik1MnsterInget15gr"
        }
      }
      [1]=>
      array(4) {
            ["tag"]=>
        string(6) "w:name"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(2)
        ["attributes"]=>
        array(1) {
               ["w:val"]=>
          string(49) "Formatmall Rubrik 1 + Mönster: Inget (15 % grå)"
        }
      }
      [2]=>
      array(4) {
            ["tag"]=>
        string(9) "w:basedOn"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(2)
        ["attributes"]=>
        array(1) {
               ["w:val"]=>
          string(7) "Rubrik1"
        }
      }
      [3]=>
      array(3) {
            ["tag"]=>
        string(14) "w:autoRedefine"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(2)
      }
      [4]=>
      array(4) {
            ["tag"]=>
        string(6) "w:rsid"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(2)
        ["attributes"]=>
        array(1) {
               ["w:val"]=>
          string(8) "00F90FB4"
        }
      }
      [5]=>
      array(3) {
            ["tag"]=>
        string(5) "w:pPr"
            ["type"]=>
        string(4) "open"
            ["level"]=>
        int(2)
      }
      [6]=>
      array(4) {
            ["tag"]=>
        string(5) "w:shd"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(3)
        ["attributes"]=>
        array(3) {
               ["w:val"]=>
          string(5) "clear"
               ["w:color"]=>
          string(4) "auto"
               ["w:fill"]=>
          string(6) "D9D9D9"
        }
      }
      [7]=>
      array(3) {
            ["tag"]=>
        string(5) "w:pPr"
            ["type"]=>
        string(5) "close"
            ["level"]=>
        int(2)
      }
      [8]=>
      array(3) {
            ["tag"]=>
        string(5) "w:rPr"
            ["type"]=>
        string(4) "open"
            ["level"]=>
        int(2)
      }
      [9]=>
      array(4) {
            ["tag"]=>
        string(8) "w:rFonts"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(3)
        ["attributes"]=>
        array(1) {
               ["w:cs"]=>
          string(15) "Times New Roman"
        }
      }
      [10]=>
      array(4) {
            ["tag"]=>
        string(6) "w:szCs"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(3)
        ["attributes"]=>
        array(1) {
               ["w:val"]=>
          string(2) "20"
        }
      }
      [11]=>
      array(3) {
            ["tag"]=>
        string(5) "w:rPr"
            ["type"]=>
        string(5) "close"
            ["level"]=>
        int(2)
      }
      [12]=>
      array(3) {
            ["tag"]=>
        string(7) "w:style"
            ["type"]=>
        string(5) "close"
            ["level"]=>
        int(1)
      }
    }
  }
  ["pPr"]=>
  array(3) {
      ["type"]=>
    string(5) "w:pPr"
      ["val"]=>
    string(5) "w:pPr"
      ["styles"]=>
    array(3) {
         [0]=>
      array(3) {
            ["tag"]=>
        string(5) "w:pPr"
            ["type"]=>
        string(4) "open"
            ["level"]=>
        int(1)
      }
      [1]=>
      array(4) {
            ["tag"]=>
        string(8) "w:pStyle"
            ["type"]=>
        string(8) "complete"
            ["level"]=>
        int(2)
        ["attributes"]=>
        array(1) {
               ["w:val"]=>
          string(32) "FormatmallRubrik1MnsterInget15gr"
        }
      }
      [2]=>
      array(3) {
            ["tag"]=>
        string(5) "w:pPr"
            ["type"]=>
        string(5) "close"
            ["level"]=>
        int(1)
      }
    }
  }
}