Forum


Replies: 1   Views: 1349
Broken shape->imagefill in multimerge
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by greatjakes  · 22-02-2021 - 23:03

Version/License: 10.0 Premium

For the purpose of troubleshooting, I've reproduced the issue using the simplest possible code and documents and confirmed this issue appears to be a bug in phpdocx.

Problem:

I'm trying to use MultiMerge to merge two fairly complex documents. When $docs (2nd document) contains Shape-formatted images where the image reference doesn't also exist in the $first document, the images in $docs are broken.

Here's what I mean by "Shape-formatted images":

  • Insert > Shape > Oval > [Draw the shape into the 2nd document]
  • Oval > Format Shape > Fill > Picture fill > [Insert a picture into the shape]

What happens is the final/merged document contains the elements, but the images are broken. The images show the "X" icon and error "The picture can't be displayed."

Workaround:

If I also place those images in the $first document, the images display as expected in the second document/page. However this isn't a viable solution for my use-case.

Sidenote:

This problem doesn't occur if I use normal picture elements. It only becomes a problem if I have a Shape filled with a picture. It's also a problem when using SVG images.