PHPWord
PHPWord copied to clipboard
Docx read with images
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'));
I guess this is linked to #464. Recent Word documents store images as w:drawing instead of w:pict
Hello, I have used PHPWord for converting docx file to html and pdf, But when I convert docx file with images in it, images are getting removed after conversion. I took a reference of "Sample_11_ReadWord2007.php". Please help me on this, urgenlty.
I have attached my sample docx file demo.docx
Thanks in advance!
Me too!
This still hasn't been fixed in version 0.16
any updates on Images not getting displayed in .docx to .pdf conversion? I am still facing the issue with version 0.16
PHPWord can't read images from docx
i ran into the same issue. Is there any tool or package or library in Laravel that can read images from docs. I actually want to convert .docs file containing images and tables to PDF. Any help would be highly appreciated. Thanks.
i had the same problem does any one got any solution for this