mrstacy / html2mht
Convert Html into MHT archive
Installs: 173
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mrstacy/html2mht
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ~7.1
This package is not auto-updated.
Last update: 2026-01-10 02:43:04 UTC
README
This is a library to convert an html page into an MHT archive.
Dependencies
PHP >=7.1
Install library via composer:
composer require mrstacy/html2mht
Usage:
$html2mht = new Html2Mht(<FULL PATH TO INPUT HTML FILE>);
$html2mht->generateMhtFile(<FULL PATH TO OUTPUT MHT FILE>);
Running Tests locally:
In project root run the following to run tests
php vendor/phpunit/phpunit/phpunit
Known Issues:
- This only runs against local html files (not a URL)
- This does not include files that aren't linked directly from the main html file (IE: If an image is linked in the css file, it won't be included)