Change PDF Core to AbstractRenderer

This commit is contained in:
Ivan Lanin 2014-04-14 10:07:35 +07:00
parent 580a61a832
commit 413f5e88d8
4 changed files with 8 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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

View File

@ -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