phpjasper icon indicating copy to clipboard operation
phpjasper copied to clipboard

Não é possível abrir este arquivo Algo deu errado.

Open thomasatxx opened this issue 3 years ago • 2 comments

Ao executar o .php ocorre o seguinte erro quando vai tentar gerar o PDF Screenshot_3

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();

?>`

thomasatxx avatar Aug 23 '21 17:08 thomasatxx

@jadsonbr

thomasatxx avatar Aug 26 '21 19:08 thomasatxx

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.

jadsonbr avatar Aug 26 '21 20:08 jadsonbr