PHP DOCX to Image: Extract images from Microsoft Word DOCX files

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (2)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-10-24 (6 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 64 This week: 61All time: 9,974 This week: 1Up
Version License PHP version Categories
docxtoimg 1.0.0GNU General Publi...5PHP 5, Graphics, Files and Folders
Description Author

This class can extract image files from Microsoft Word DOCX files.

It can take the path of a Microsoft Word file in DOCX format and extract its contents to save the image files that it contains.

The extracted images files are saved to a given directory.

Picture of Timothy Edwards
  Performance   Level  
Name: Timothy Edwards <contact>
Classes: 3 packages by
Country: United Kingdom
Innovation award
Innovation award
Nominee: 2x

Details

A php class to extract all the images from a Word DOCX document and save them as separate image files

Description

This php class will take a DOCX type Word document and extract all the images that are contined in it. They will be then all be saved in a directory with the same name as the original DOCX file. This directory will be automatically created if it does not exist. In the normal mode this class will not provide any output to screen. A php demonstration file (imgtest.php) is included. This demonstration file expects the DOCX file to be named 'sample.docx'.

USAGE

Normal mode to save all the images (no output to screen)

$rt = new WordPHP(false); or $rt = new WordPHP();

Display on screen the names of the images found and saved

$rt = new WordPHP(true);

Read docx file and save all the images found

$rt->readDocument('FILENAME');
  Files folder image Files  
File Role Description
Accessible without login Plain text file imgtest.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Plain text file wordimg.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:64
This week:61
All time:9,974
This week:1Up
For more information send a message to info at phpclasses dot org.