Forum


Replies: 6   Views: 314
Indexer: check or exclude externals resources
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 Bouillou  · 28-11-2024 - 12:33

Using your code, I can see that external link is removed :

Before removeWordContent

array:3 [â–¼
  "elements" => DOMNodeList {#2377 â–¶}
  "length" => 1
  "query" => "//w:drawing[.//@r:link]"
]

After removeWordContent

array:3 [â–¼
  "elements" => DOMNodeList {#2535 â–¶}
  "length" => 0
  "query" => "//w:drawing[.//@r:link]"
]

but after saving, the final document has no longer the image as expected, but it still containing the external link in "word\_rels\document.xml.rels" and the Indexer is throwing a warning.

<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId8" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="file:///\\SVFHVA\Commun\.......