Skip to content

Commit 413f5e8

Browse files
committed
Change PDF Core to AbstractRenderer
1 parent 580a61a commit 413f5e8

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

samples/Sample_Header.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
// Set PDF renderer
1818
$rendererName = \PhpOffice\PhpWord\Settings::PDF_RENDERER_DOMPDF;
19-
$rendererLibraryPath = ""; // Put dompdf library path
19+
$rendererLibraryPath = ''; // DomPDF library path
20+
2021
if (!\PhpOffice\PhpWord\Settings::setPdfRenderer($rendererName, $rendererLibraryPath)) {
2122
$writers['PDF'] = null;
2223
}

src/PhpWord/Writer/PDF.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PDF
2121
/**
2222
* The wrapper for the requested PDF rendering engine
2323
*
24-
* @var \PhpOffice\PhpWord\Writer\PDF\Core
24+
* @var \PhpOffice\PhpWord\Writer\PDF\AbstractRenderer
2525
*/
2626
private $renderer = null;
2727

src/PhpWord/Writer/PDF/Core.php renamed to src/PhpWord/Writer/PDF/AbstractRenderer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
namespace PhpOffice\PhpWord\Writer\PDF;
1111

12+
use PhpOffice\PhpWord\Exception\Exception;
1213
use PhpOffice\PhpWord\PhpWord;
13-
use PhpOffice\PhpWord\PhpWord\Exception\Exception;
1414

1515
/**
16-
* Core PDF Writer
16+
* Abstract PDF renderer
1717
*/
18-
abstract class Core extends \PhpOffice\PhpWord\Writer\HTML
18+
abstract class AbstractRenderer extends \PhpOffice\PhpWord\Writer\HTML
1919
{
2020
/**
2121
* Temporary storage directory

src/PhpWord/Writer/PDF/DomPDF.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
use PhpOffice\PhpWord\PhpWord;
1313
use PhpOffice\PhpWord\Settings;
14-
use PhpOffice\PhpWord\PhpWord\Exception\Exception;
14+
use PhpOffice\PhpWord\Exception\Exception;
1515

1616
/** Require DomPDF library */
1717
$pdfRendererClassFile = Settings::getPdfRendererPath() . '/dompdf_config.inc.php';
@@ -24,7 +24,7 @@
2424
/**
2525
* DomPDF writer
2626
*/
27-
class DomPDF extends Core implements \PhpOffice\PhpWord\Writer\WriterInterface
27+
class DomPDF extends AbstractRenderer implements \PhpOffice\PhpWord\Writer\WriterInterface
2828
{
2929
/**
3030
* Create new instance

0 commit comments

Comments
 (0)