mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-29 17:18:39 +00:00
17 lines
424 B
PHP
Executable File
17 lines
424 B
PHP
Executable File
<?php declare(strict_types=1);
|
|
|
|
use PhpOffice\PhpWord\IOFactory;
|
|
use PhpOffice\PhpWord\Writer\HTML;
|
|
use phpOMS\Autoloader;
|
|
|
|
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
|
|
|
$media = $this->getData('media');
|
|
|
|
$reader = IOFactory::createReader('Word2007');
|
|
$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
|
|
|
$writer = new HTML($doc);
|
|
|
|
$writer->save('php://output');
|