php – ubuntu cups print out pdf-ThrowExceptions

Exception or error:

I try to print via cups pdf files. But everything the printer is printing hyroglyphical things.
For example I create a PHP FPDF like that:

include (BASE_PATH . DIRECTORY_SEPARATOR . "api" . DIRECTORY_SEPARATOR . "admin" . DIRECTORY_SEPARATOR . "FPDF" . DIRECTORY_SEPARATOR . "i25.php" );
$pdfTo = BASE_PATH . DIRECTORY_SEPARATOR . "export" . DIRECTORY_SEPARATOR . "__hilfe_" . date('d.m.Y__H_i') . ".pdf";
    $pdf = new PDF_i25('P', 'mm', array(100, 150));
$pdf->SetAutoPageBreak(false, 10);
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 72);

        $pdf->SetY(20);
        $pdf->SetX(2);
        $pdf->MultiCell(95, 6, "HILFE", 0, 'C');

    $pdf->Output($pdfTo, 'F');

    $result = shell_exec("lpr -P OLP_7646 $pdfTo");

This created file is shown perfectly in foxitReader. But when I want to print it via shell_execthen I get bad printed document (like attached).
enter image description here
I installed the driver from kyocera directly and set it up in CUPS.
What is the problem of this setting? Has somebody an idea?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *