mpdf / mpdf.github.io

mPDF documentation
https://mpdf.github.io
Other
508 stars 160 forks source link

adobe acrobat reader cannot open pdf document for printing #191

Closed kriit24 closed 1 year ago

kriit24 commented 1 year ago

If i generated pdf file with mpdf then acrobat reader cannot open the file. PDF file opens with chrome.

I also tried default options

Settings used:

$mpdfOptions = [
            'mode' => 'utf-8',
            'format' => 'A4',
            'orientation' => 'P',
            //'img_dpi' => 300,
            'printers_info' => true,
            'mirrorMargins' => true,
            //'bleedMargin' => 3,
            'tempDir' => _DIR . '/tmp/mpdf/temp',
            'PDFX' => false,
            'PDFXauto' => false
        ];

$html = '<h1>Hello World</h1>';

        $mpdf = new \Mpdf\Mpdf($mpdfOptions);
        $mpdf->WriteHTML($html,\Mpdf\HTMLParserMode::HTML_BODY);
        $mpdf->Output('qrcode_print_' . date('d.m.Y H.i') . '.pdf', 'D');