How to convert .docx file into .doc file with PHP? -
i want read text .docx file line line , keep each line data in array, since .docx zipped file want convert .doc file can read file using @fopen($filename, 'r');.
below code tried using phpword conver .docx .doc ,
<?php require_once 'phpword/phpword.php'; $phpword = new phpword(); $document = $phpword->loadtemplate('basictable.docx'); // save file $objwriter = phpword_iofactory::createwriter($phpword, 'word2007'); $objwriter->save('basictable4.doc'); ?> and creates erroneous .doc file.
if want text out of .docx file , save text file can use library docx2text
after converting text file can read text file line line , keep each line data in array.
Comments
Post a Comment