CDRFontSearcher is a PHP class designed to search for a specific font inside CorelDRAW (.cdr) files. It extracts and scans pageX.dat files within CDR archives (which are ZIP-compressed) to locate the specified font.
- Scans all
.cdrfiles in a given directory. - Searches for font names inside
pageX.datfiles. - Extracts unique fonts found in each file.
- Works without requiring CorelDRAW to be installed.
- PHP 7.4 or later
ZipArchiveextension enabled in PHP
- Clone or download the script into your project directory.
- Ensure PHP is installed and configured properly.
- Verify that the
ZipArchiveextension is enabled inphp.ini.
require 'CDRFontSearcher.php';
$directory = '/path/to/cdr/files';
$searchFont = 'LetterOMatic!'; // Change to the font you want to search for
$fontSearcher = new CDRFontSearcher($directory, $searchFont);
$fontSearcher->search();$directory: Path to the directory containing CDR files.$searchFont: The font name to search for.
Scans the directory and processes all .cdr files to find the specified font.
Handles the extraction and scanning of an individual CDR file.
Checks if the extracted file content contains the specified font.
Searching for files with font 'LetterOMatic!' in CDR files...
Font 'LetterOMatic!' found in: example1.cdr
Font 'LetterOMatic!' found in: example2.cdr
This project is open-source and available under the MIT License.