-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not read images on Word file #1159
Comments
IIRC the PDF exporter uses the HTML methods to generate the document, and the quality is not yet Production-ready. I saw a few patches, but they are not yet merged into the product. If you have time to donate, maybe you can help out adding this functionality, or if you need it working fast, then save to docx and use another product: UNO/oowriter to do the conversion. |
I dont think this issue is unique for exporting to PDF. I am encountering this issue when I open an exisiting docx file containing images with IOFactory::load(). When I save as a docx again all the images and most of the formatting is missing. Also from #882 it looks like a IOFactory parsing issue. |
@cubicleWar the template processor is not using the IOFactory, just doing seach & replace in the xml document, so images should not be lost. The issue must be something else |
@troosan sorry, you are right I meant I encounter the issue loading an exisiting document with IOFactory. The template Processor maintains all images and formatting correctly. |
Dose IOFactory lost images issue solved now? I have tried the lastest developer version but it didn't work. |
PHPWord currently does not parse images from documents created with Word 2011+ |
Hii, What code should I use to read an Image I have in the Word file. can someone provide me the exact command for reading an image? |
Which PR is that? |
I have updated to version 0.16 but when I try saving the file, no images are displayed |
Not able to read images of any types. |
Hey there. I'm currently looking at PHPWord as a solution for a client so he can do some replacements through 200+ documents. He has images and diagrams in these documents that seem to be getting stripped by the library, is there any current information on what the state of image reading is - or is it the case that i might be "doing it wrong". Thanks. |
The problem that image are missing after a docx file was loaded and saved as docx file again is still present in 0.16.0 Are there any near time plans to fix this? How much time would it take? And would the possibility to get an invoice speed up the process? |
To spice the hole topic a bit. Non of the files /word/media/* are considered to be read while loading a docx file with \PhpOffice\PhpWord\Reader\Word2007 While \PhpOffice\PhpWord\TemplateProcessor::zip() mentions the replacement or reading of images in the comment, \PhpOffice\PhpWord\TemplateProcessor::addImageToRelations() uses the path in $typeTpl and \PhpOffice\PhpWord\Writer\Word2007::__construct() adds them to the $this->mediaPaths, the reader skips the media handling completely. |
Hi Thank |
Hi @ErnestStaug Thank for your reply. I need to try this PR :) |
@navotera did you solve your problem? |
@irisda I am sorry, we are using the Libre native package for processing the word file. |
I'm trying to open a Word document already with previously added images, when showing or saving again using PHPWord the image does not appear.
I'm trying to read the Word file and save it to PDF with the same content and formatting, but the images disappear when saving or even trying to view the HTML.
How to proceed? Is there a way to read the saved Word file's images?
The text was updated successfully, but these errors were encountered: