File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,20 @@ class TCPDF extends AbstractRenderer implements WriterInterface
36
36
*/
37
37
protected $ includeFile = 'tcpdf.php ' ;
38
38
39
+ /**
40
+ * Gets the implementation of external PDF library that should be used.
41
+ *
42
+ * @param string $orientation Page orientation
43
+ * @param string $unit Unit measure
44
+ * @param string $paperSize Paper size
45
+ *
46
+ * @return \TCPDF implementation
47
+ */
48
+ protected function createExternalWriterInstance ($ orientation , $ unit , $ paperSize )
49
+ {
50
+ return new \TCPDF ($ orientation , $ unit , $ paperSize );
51
+ }
52
+
39
53
/**
40
54
* Save PhpWord to file.
41
55
*
@@ -50,7 +64,7 @@ public function save($filename = null)
50
64
$ orientation = 'P ' ;
51
65
52
66
// Create PDF
53
- $ pdf = new \ TCPDF ($ orientation , 'pt ' , $ paperSize );
67
+ $ pdf = $ this -> createExternalWriterInstance ($ orientation , 'pt ' , $ paperSize );
54
68
$ pdf ->setFontSubsetting (false );
55
69
$ pdf ->setPrintHeader (false );
56
70
$ pdf ->setPrintFooter (false );
You can’t perform that action at this time.
0 commit comments