77use Neos \Flow \Annotations as Flow ;
88
99
10- class MPdfRenderer extends AbstractRenderer {
10+ class MPdfRenderer extends AbstractRenderer
11+ {
1112
12- /**
13- * @Flow\Inject
14- * @var \Neos\Flow\Utility\Environment
15- */
16- protected $ environment ;
13+ /**
14+ * @Flow\Inject
15+ * @var \Neos\Flow\Utility\Environment
16+ */
17+ protected $ environment ;
1718
18- /**
19- * @var \Neos\Flow\Log\SystemLoggerInterface
20- * @Flow\Inject
21- */
22- protected $ systemLogger ;
19+ /**
20+ * @var \Neos\Flow\Log\SystemLoggerInterface
21+ * @Flow\Inject
22+ */
23+ protected $ systemLogger ;
2324
2425 /**
2526 * @Flow\InjectConfiguration
2627 * @var array
2728 */
28- protected $ settings ;
29-
30- /**
31- *
32- */
33- protected function initLibrary () {
34- $ this ->systemLogger ->log ('You are still using deprecated initLibrary call ' , LOG_DEBUG );
35- }
36-
37- /**
38- *
39- */
40- protected function convert ($ html = '' ) {
29+ protected $ settings ;
30+
31+ /**
32+ *
33+ */
34+ protected function initLibrary ()
35+ {
36+ $ this ->systemLogger ->log ('You are still using deprecated initLibrary call ' , LOG_DEBUG );
37+ }
38+
39+ /**
40+ *
41+ */
42+ protected function convert ($ html = '' )
43+ {
4144 $ orientation = '' ;
42- if ($ this ->getOption ('orientation ' ) === 'landscape ' ) {
43- $ orientation = '-L ' ;
44- }
45+ if ($ this ->getOption ('orientation ' ) === 'landscape ' ) {
46+ $ orientation = '-L ' ;
47+ }
4548
46- try {
47- $ tempDir = FLOW_PATH_TEMPORARY . '/KayStrobach.Pdf ' ;
49+ try {
50+ $ tempDir = FLOW_PATH_TEMPORARY . '/KayStrobach.Pdf ' ;
4851 if (!@mkdir ($ tempDir , 0777 , true ) && !is_dir ($ tempDir )) {
4952 throw new \InvalidArgumentException ('Could not create TempDir ' . $ tempDir );
5053 }
@@ -67,8 +70,8 @@ protected function convert($html = '') {
6770 $ mpdf ->debug = $ this ->getOption ('debug ' );
6871 $ mpdf ->showImageErrors = true ;
6972
70- $ mpdf ->setAutoTopMargin = TRUE ;
71- $ mpdf ->setAutoBottomMargin = TRUE ;
73+ $ mpdf ->setAutoTopMargin = true ;
74+ $ mpdf ->setAutoBottomMargin = true ;
7275
7376 $ this ->systemLogger ->log ('Paperorientation: ' . $ orientation );
7477
@@ -78,8 +81,8 @@ protected function convert($html = '') {
7881 Destination::STRING_RETURN
7982 );
8083 } catch (\Mpdf \MpdfException $ e ) {
81- $ this ->systemLogger ->log ($ e ->getMessage ());
84+ $ this ->systemLogger ->log ($ e ->getMessage ());
8285 }
8386 return null ;
84- }
87+ }
8588}
0 commit comments