Author: Timothy Edwards
Updated on: 2021-10-28
Posted on: 2021-10-28
Package: PHP DOCX to Image
Sometimes we need to retrieve images that are inside a Microsoft Word document in DOCX file.
Read this article to get a brief introduction to a PHP solution to get images from DOCX files.
Read this article to get a brief introduction to a PHP solution to get images from DOCX files.
In this article you will learn:
What You Can Do with the PHP DOCX to Image Class
How to Extract Images From DOCX Files
Download and Install the PHP DOCX to Image Package Using PHP Composer
What You Can Do with the PHP DOCX to Image Class
Recently I developed and published a XXXPHP class to parse DOCX to HTML with imagesXXX. Then I thought that some sections of the code would be useful as standalone classes.
Therefore I created the XXXPHP DOCX to Image classXXX which will extract images from a Microsoft Word DOCX file and then save them as individual image files in a directory with the same name as the original Word file.
How to Extract Images From DOCX Files
The normal usage of this class is very simple as can be seen from the Readme file and the provided example script imgtest.php.
require_once('wordimg.php'); $rt = new WordPHP(true); $rt->readDocument('sample.docx');
In normal mode this class produces no output to the screen.
Download and Install the PHP DOCX to Image Package Using PHP Composer
You can download or install the PHP DOCX to Image package using PHP Composer tool by going to this download page to get the package code. That page also contains instructions on how to install package using PHP Composer from the PHP Classes site.
You need to be a registered user or login to post a comment
1,586,779 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
Comments:
No comments were submitted yet.