Skip to content

Commit

Permalink
Merge pull request #4827 from aydreeihn/issue/mpdf
Browse files Browse the repository at this point in the history
MPDF Issues
  • Loading branch information
protich committed Apr 3, 2019
2 parents ea77250 + 064e002 commit 6e7e9b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/class.faq.php
Expand Up @@ -155,7 +155,8 @@ function printPdf() {
include STAFFINC_DIR . 'templates/faq-print.tmpl.php';
$html = ob_get_clean();

$pdf = new mPDFWithLocalImages('', $paper);
$pdf = new mPDFWithLocalImages(['mode' => 'utf-8', 'format' =>
$paper, 'tempDir'=>sys_get_temp_dir()]);
// Setup HTML writing and load default thread stylesheet
$pdf->WriteHtml(
'<style>
Expand Down
2 changes: 1 addition & 1 deletion include/class.pdf.php
Expand Up @@ -108,7 +108,7 @@ function __construct($task, $options=array()) {
$this->task = $task;
$this->options = $options;

parent::__construct(['format' => $this->options['psize']]);
parent::__construct(['mode' => 'utf-8', 'format' => $psize, 'tempDir'=>sys_get_temp_dir()]);
$this->_print();
}

Expand Down
Expand Up @@ -262,7 +262,7 @@ public function __construct()
// Reduce memory usage processing tables (but with increased processing time)
'packTableData' => false,

'ignore_table_percents' => true,
'ignore_table_percents' => false,
'ignore_table_widths' => true,
// If table width set > page width, force resizing but keep relative sizes
// Also forces respect of cell widths set by %
Expand Down

0 comments on commit 6e7e9b4

Please sign in to comment.