You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for your work on PHPOffice, it's a great library that has allowed us to easily implement a Word export in our application.
In our export we add some images to the exported document.
It worked great on multiple word processors but not on Open Office : the images were not displayed.
Here is an .docx example generated by this gist : test.docx.zip (zipped, because github didn't allowed to upload this docx).
Some examples
Not working
The image is not displayed on Open Office 4.1.3, rev 1761381 (on Windows 10) :
Working
The image is displayed on Libre Office 4.2.8.2, Build ID: 420m0 (on Ubuntu 14.4) :
The image is displayed on WPS Writer 10.1.0.5672 (on Ubuntu 14.4) :
The image is displayed on Libre Office 5.1.6.2 (on ubuntu 16.1) :
The image is displayed on Word 2016, version 1706, build 8229.2073 (on Windows 10) :
Our fix
Some of our users may open our documents with Open Office. So we had to make it work.
After creating a document with an image on WPS Writer and comparing this document.xml from a document generated by PHPOffice, we have changed the image class.
The issue
First, thank you for your work on PHPOffice, it's a great library that has allowed us to easily implement a Word export in our application.
In our export we add some images to the exported document.
It worked great on multiple word processors but not on Open Office : the images were not displayed.
Here is a gist of a minimalist way to reproduce the problem : https://gist.github.com/agallou/7bb2373491f713bfc94fd622a02b9754
On this example we just add a section and an image in it.
Here is an .docx example generated by this gist :
test.docx.zip (zipped, because github didn't allowed to upload this docx).
Some examples
Not working
The image is not displayed on Open Office 4.1.3, rev 1761381 (on Windows 10) :
Working
The image is displayed on Libre Office 4.2.8.2, Build ID: 420m0 (on Ubuntu 14.4) :
The image is displayed on WPS Writer 10.1.0.5672 (on Ubuntu 14.4) :
The image is displayed on Libre Office 5.1.6.2 (on ubuntu 16.1) :
The image is displayed on Word 2016, version 1706, build 8229.2073 (on Windows 10) :
Our fix
Some of our users may open our documents with Open Office. So we had to make it work.
After creating a document with an image on WPS Writer and comparing this document.xml from a document generated by PHPOffice, we have changed the image class.
Those changes can be displayed here agallou@0a8f3ac
Besides the alignement, the styles does'nt work, and the image is still not displayed when it's included on the footer.
So it's not an ideal solution and could not be merged as-it but it allowed us to have something usable for our users.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: