Open thomasatxx opened 3 years ago
@jadsonbr
Please do not make repeated comments or otherwise spam us with notifications on these issues. It does not help in any way whatsoever. If it continues in the future, we will not allow you to comment in this repository, please consider this a warning.
Ao executar o .php ocorre o seguinte erro quando vai tentar gerar o PDF
Segue o meu código a baixo: `<?php
require DIR . '/vendor/autoload.php';
use PHPJasper\PHPJasper;
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
$input = DIR . '/vendor/geekcom/phpjasper/examples/modelOficio.jasper';
$output = DIR . '/vendor/geekcom/phpjasper/examples';
$options = [ 'format' => ['pdf'], 'locale' => 'en', 'params' => [], 'db_connection' => [ 'driver' => 'mysql', //mysql, .... 'username' => 'root', 'password' => '', 'host' => 'localhost', 'database' => 'sca3.0' ] ];
$jasper = new PHPJasper;
$jasper->process( $input, $output, $options )->output();
$filename = 'modelOficio.pdf'; header('Content-Description: application/pdf'); header('Content-Type: application/pdf'); header('Content-Disposition:; filename=' . $filename); readfile($output . '/' . $filename); unlink($output . '/' . $filename); flush();
?>`