Forum


Replies: 2   Views: 779
How to retrieve oleobjects
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 Brightalley  · 12-11-2021 - 15:02

We're using small mp4 video clips in our docx documents which we like to import and convert to the actual files.

While pasting these clips in the document they are saved as oleObject files under word/embeddings 

We can retrieve the oleObject file using an xPath query to retrieve the r:id of the oleObject from word/document.xml which refers to the Id in word/_rels/document.xml.rels but it is not yet the mp4 file we want to process.

Is there a way to retrieve and convert oleObjects to the actual files as specified in the header of the oleObject?

 

Posted by admin  · 12-11-2021 - 16:06

Hello,

Using phpdocx you can retrieve existing oleObjects in a DOCX, but it doesn't allow extracting their contents to get the original files. It's a work in progress that will be included in the Indexer class in a future release, but there's no release date yet for this feature.

Regards.

Posted by Brightalley  · 12-11-2021 - 16:49

Thanks for the quick response. 

We will use a custom extractor for the time being.