lundi 23 août 2021

Fillable PDFs created with mpdf are not showing the check boxes

I'm creating fillable PDFs with mPDF but the check boxes, including the box and tick, are not showing in the Chrome print preview and the printed document. In addition, the checkbox in Adobe Acrobat on iOS is not showing the tick. The check boxes work fine on evince and all other widgets work fine.

My setup is as follows: Linux 18.04, Php 7.4, mPDF 8.0.12

Here is the code. It should be noted that I am using the kartik Yii2 extension.

$pdf = new Pdf([
            'mode' => Pdf::MODE_CORE, 
            'format' => Pdf::FORMAT_LETTER, 
            'orientation' => Pdf::ORIENT_PORTRAIT, 
            'destination' => Pdf::DEST_BROWSER, 
            'content' => $html, 
            'cssFile' => '@backend/web/css/fillablepdfs.css',
            // set mPDF properties
            'options' => ['title' => $title, 'useActiveForms' => true, 'CSSselectMedia' => 'print'],
            // call mPDF methods
            'methods' => [
            ]
        ]);

I have seen similar issues on Slackoverflow but none seem to have helped me. Any help would be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire