-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Milestone
Description
When using phpword to read a word file without images, i dont run into any problems.
As soon as it contains an image i get the error:
DOMXPath::query(): Undefined namespace prefix (View: C:\xampp\htdocs\App\resources\views\pages\wordconvert.blade.php)
My code for running PhpWord:
<?php
require_once base_path('vendor/autoload.php');
/* Filename */
$fileheader = 'test';
$phpWord = \PhpOffice\PhpWord\IOFactory::load(storage_path('app/uploaded/files/'. $fileheader .'.docx'));
$htmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$htmlWriter->save(storage_path('app/uploaded/convert/'. $fileheader .'.html'));