Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Parameters #26

Open
ahmedhakem opened this issue Dec 24, 2019 · 2 comments
Open

Export Parameters #26

ahmedhakem opened this issue Dec 24, 2019 · 2 comments

Comments

@ahmedhakem
Copy link

ahmedhakem commented Dec 24, 2019

I'm trying to compile jasper report from my php code to (PDF, HTMl) format,

*in pdf format the arabic font i just installed in jasper studio working fine in jasper studio but in php the font not showing i think it required some export parameters.

*in HTML format i embed the image in the exported html and showing like base64 image in the exported HTML file it works fine when i export from jasper studio but in php code the image generated in a separated folder i think it expected some export parameters.
And here is my code. How can i pass export parameters with php code.

      $input =base_path().'/vendor/geekcom/phpjasper-laravel/examples/kemo/assign.jasper';
      $output =base_path().'/vendor/geekcom/phpjasper-laravel/examples';

      $options = [
        'format' => ['html', 'pdf'],
        'params' => [
            'requestID'  => 25
          ],
        'db_connection' => [
              'driver' => 'mysql',
              'username' => env('DB_USERNAME'),
              'password' => env('DB_PASSWORD'),
              'host' => env('DB_HOST'),
              'database' => env('DB_DATABASE'),
              'port' => '3306'
          ]
      ];

      $jasper = new PHPJasper();

        $jasper->process(
            $input,
            $output,
            $options
        )->execute();

        return response()->file($output.'/assign.html');

Please help me on this issue. Thanks is advance

@ahmedhakem
Copy link
Author

Any help on this issue please?

@ahmedhakem
Copy link
Author

Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant