Change PDF Core to AbstractRenderer
This commit is contained in:
parent
580a61a832
commit
413f5e88d8
|
|
@ -16,7 +16,8 @@ $writers = array('Word2007' => 'docx', 'ODText' => 'odt', 'RTF' => 'rtf', 'HTML'
|
|||
|
||||
// Set PDF renderer
|
||||
$rendererName = \PhpOffice\PhpWord\Settings::PDF_RENDERER_DOMPDF;
|
||||
$rendererLibraryPath = ""; // Put dompdf library path
|
||||
$rendererLibraryPath = ''; // DomPDF library path
|
||||
|
||||
if (!\PhpOffice\PhpWord\Settings::setPdfRenderer($rendererName, $rendererLibraryPath)) {
|
||||
$writers['PDF'] = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class PDF
|
|||
/**
|
||||
* The wrapper for the requested PDF rendering engine
|
||||
*
|
||||
* @var \PhpOffice\PhpWord\Writer\PDF\Core
|
||||
* @var \PhpOffice\PhpWord\Writer\PDF\AbstractRenderer
|
||||
*/
|
||||
private $renderer = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\PDF;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* Core PDF Writer
|
||||
* Abstract PDF renderer
|
||||
*/
|
||||
abstract class Core extends \PhpOffice\PhpWord\Writer\HTML
|
||||
abstract class AbstractRenderer extends \PhpOffice\PhpWord\Writer\HTML
|
||||
{
|
||||
/**
|
||||
* Temporary storage directory
|
||||
|
|
@ -11,7 +11,7 @@ namespace PhpOffice\PhpWord\Writer\PDF;
|
|||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/** Require DomPDF library */
|
||||
$pdfRendererClassFile = Settings::getPdfRendererPath() . '/dompdf_config.inc.php';
|
||||
|
|
@ -24,7 +24,7 @@ if (file_exists($pdfRendererClassFile)) {
|
|||
/**
|
||||
* DomPDF writer
|
||||
*/
|
||||
class DomPDF extends Core implements \PhpOffice\PhpWord\Writer\WriterInterface
|
||||
class DomPDF extends AbstractRenderer implements \PhpOffice\PhpWord\Writer\WriterInterface
|
||||
{
|
||||
/**
|
||||
* Create new instance
|
||||
|
|
|
|||
Loading…
Reference in New Issue