diff --git a/include/class.pdf.php b/include/class.pdf.php
index 8d80d4566082faa79c63894e0cde5b95be7e035f..bbb718f41d47775ce60e4062c93c1bff43fd15a5 100644
--- a/include/class.pdf.php
+++ b/include/class.pdf.php
@@ -108,7 +108,7 @@ class Task2PDF extends mPDFWithLocalImages {
         $this->task = $task;
         $this->options = $options;
 
-        parent::__construct(['mode' => 'utf-8', 'format' => $psize, 'tempDir'=>sys_get_temp_dir()]);
+        parent::__construct(['mode' => 'utf-8', 'format' => $this->options['psize'], 'tempDir'=>sys_get_temp_dir()]);
         $this->_print();
     }