SetAuthor(strip_tags($meta['name'])); $mpdf->SetCreator(variable_get('site_name', 'Drupal')); // Pulled from the HTML meta data // $mpdf->SetTitle(html_entity_decode($meta['title'], ENT_QUOTES, 'UTF-8')); // $keys = implode(' ', explode("\n", trim(strip_tags($print['taxonomy'])))); // $mpdf->SetKeywords($keys); // Encrypt the file and grant permissions to the user to copy and print // No password is required to open the document // Owner has full rights using the password "MyPassword" // $mpdf->SetProtection(array('copy', 'print'), '', 'MyPassword'); // $mpdf->SetProtection(array('copy', 'print', 'print-highres'), '', ''); drupal_alter('print_pdf_mpdf', $mpdf, $html, $meta); $mpdf->WriteHTML($html); // try to recover from any warning/error ob_clean(); return $mpdf->Output('', 'S'); }