0

I want to extract text from an msword file (eg: .docx) to use the content of msword file in my PHP script.

Is it possible to get all pages in an array of php? Like

$array = [
   [0] => 'content here......',
   [1] => 'content here......',
   [2] => 'content here......',
];

where index 0 is page one, index 1 is page two and so on.

M.suleman Khan
  • 540
  • 5
  • 17

1 Answers1

0

I have done it Myself i used a class

https://github.com/abhihub/EDUSITE/blob/master/DocxConversion.php

$docObj = new DocxConversion("example.docx");
$docText= $docObj->convertToText(1);

and i got my desired result

Posting this answer because maybe someone needs it in Future

M.suleman Khan
  • 540
  • 5
  • 17