-
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
Supports loading of word files with images added on OneDrive #2245
Labels
Comments
3 tasks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
Add images by editing Word in OneDrive and download Word files locally
When loaded with
PhpOffice\PhpWord\IOFactory::load
Fixed a bug that caused
PhpOffice\PhpWord\Exception\InvalidImageException
.If you unzip a normal Word file with zip
/docProps
/word
/_rels
Image files are in the directory
It is saved as /word/media/xxx.png.
However, if it is a file with images added with OneDrive
/docProps
/media
/word
/_rels
It is stored in the media directory of the directory called
In
getRels
ofPhpOffice\PhpWord\Reader\Word2007 Since it is assumed that the image exists in the
/word/mediadirectory, The image in the
/media` directory could not be read and an error occurred.Steps to Reproduce
Expected Behavior
Being able to load word files
Current Behavior
PhpOffice\PhpWord\Exception\InvalidImageException
occursContext
If it is a word file with an image added on OneDrive
Reproduce any PHP version or PHP Word version.
The text was updated successfully, but these errors were encountered: