Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Mpdf -> initContsructorParams margin parsing. #60

Merged
merged 1 commit into from Jul 19, 2017

Conversation

DaveFerger
Copy link
Contributor

Scope

This pull request includes a

  • Bug fix
  • New feature
  • Translation

Changes

The following changes were made (this change is also documented in the change log):

Correct Mpdf -> initContsructorParams margin parsing.

https://github.com/mpdf/mpdf/blob/development/src/Mpdf.php#L1543 :

private function initConstructorParams(array $config)
  {
    $constructor = [
      'mode' => '',
      'format' => 'A4',
      'default_font_size' => 0,
      'default_font' => '',
      'margin_left' => 15,
      'margin_right' => 15,
      'margin_top' => 16,
      'margin_bottom' => 16,
      'margin_header' => 9,
      'margin_footer' => 9,
      'orientation' => 'P',
    ];

    foreach ($constructor as $key => $val) {
      if (isset($config[$key])) {
        $constructor[$key] = $config[$key];
      }
    }

    return array_values($constructor);
  }

Versions

mpdf/mpdf
7.0.x-dev 4b5f88f

kartik-v/yii2-mpdf
dev-master 5f3cf0d

@DaveFerger DaveFerger changed the title Update Pdf.php Correct Mpdf -> initContsructorParams margin parsing. Jul 5, 2017
@kartik-v kartik-v merged commit 67980ab into kartik-v:master Jul 19, 2017
@kartik-v kartik-v mentioned this pull request Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants