kartik-v / yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.
http://demos.krajee.com/mpdf
Other
163 stars 149 forks source link

Options array doesnt pass 'autoScriptToLang', 'autoLangToFont' and possibly 'useAdobeCJK' #48

Closed RGinguls closed 5 years ago

RGinguls commented 7 years ago

This in web.php config file under 'compenets'

   'pdf' => [
        'class' => Pdf::classname(),
        'mode' => Pdf::MODE_UTF8,
        'format' => Pdf::FORMAT_A4,
        'orientation' => Pdf::ORIENT_PORTRAIT,
        'destination' => Pdf::DEST_STRING,
        'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css',
        'options' =>[
            'autoScriptToLang' => true,
            'autoLangToFont' => true,
            'useAdobeCJK' => true,
        ]
  ]

didnt work, had to

    $pdf = Yii::$app->pdf;
    $mpdf = $pdf->api;
    $mpdf->autoScriptToLang = true;
    $mpdf->autoLangToFont = true;
    $mpdf->useAdobeCJK = true;
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.