Open nujiakk opened 9 months ago
You can use the PHP word library to retreive the commented information in the DOCX or else you can also use DOM document to access the commented information
Try this DOM Document method Load the DOCX file as the xml $xml = file_get_contents("path to your docx"); $dom = new DOMDocument(); $dom->loadXML($xml, LIBXML_PARSEHUGE);
$xpath = new DOMXPath($dom); $comments = $xpath->query("//w:comment");
foreach ($comments as $comment) { $author = $comment->getElementsByTagName("w:author")->item(0)->nodeValue; $date = $comment->getElementsByTagName("w:date")->item(0)->nodeValue; $text = $comment->getElementsByTagName("w:t")->item(0)->nodeValue; }
How do I directly retrieve comments information from a DOCX document?