PHPackages                             penblu/jasperphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. penblu/jasperphp

ActiveYii2-extension

penblu/jasperphp
================

Extension creada por PenBlu para el uso de la libreria JasperPHP creada por Hélder Duarte (https://github.com/cossou/JasperPHP).

1.0.1(5y ago)05GPL-2.0HTML

Since Feb 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/PenBlu/yii-jasperphp)[ Packagist](https://packagist.org/packages/penblu/jasperphp)[ RSS](/packages/penblu-jasperphp/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

JasperReports for PHP
=====================

[](#jasperreports-for-php)

Package to generate reports with [JasperReports 6](http://community.jaspersoft.com/project/jasperreports-library) library through [JasperStarter v3](http://jasperstarter.sourceforge.net/) command-line tool. More information in

Install
-------

[](#install)

```
composer require penblu/jasperphp

```

Introduction
------------

[](#introduction)

This package aims to be a solution to compile and process JasperReports (.jrxml &amp; .jasper files).

#### Compiling

[](#compiling)

First we need to compile our `JRXML` file into a `JASPER` binary file. We just have to do this one time.

**Note:** You don't need to do this step if you are using *Jaspersoft Studio*. You can compile directly within the program.

```
$jasper = new JasperPHP();
JasperPHP->compile(__DIR__ . '/vendor/penblu/jasperphp/examples/Blank_A4_1.jrxml')->execute();
```

This command will compile the `hello_world.jrxml` source file to a `hello_world.jasper` file.

**Note:** If you are using Laravel 4 run `php artisan tinker` and copy &amp; paste the command above.

#### Processing

[](#processing)

Now lets process the report that we compile before:

```
$jasper = new JasperPHP();
$jasper->process(
	base_path(__DIR__ . '/vendor/penblu/jasperphp/examples/Blank_A4_1.jasper'),
	false,
	array('pdf', 'xlsx'),
	array('php_version' => phpversion())
)->execute();
```

Now check the examples folder! :) Great right? You now have 2 files, `Blank_A4_1.pdf` and `Blank_A4_1.xlsx`.

Check the *API* of the `compile` and `process` functions in the file `vendor/penblu/jasperphp/JasperPHP.php` file.

#### Listing Parameters

[](#listing-parameters)

Querying the jasper file to examine parameters available in the given jasper report file:

```
$jasper = new JasperPHP();
$output = $jasper->list_parameters(
		base_path(__DIR__ . '/vendor/penblu/jasperphp/examples/Blank_A4_1.jasper')
	)->execute();

foreach($output as $parameter_description)
	echo $parameter_description;
```

### Advanced example

[](#advanced-example)

We can also specify parameters for connecting to database:

```
$jasper = new JasperPHP();
$jasper->process(
    base_path(__DIR__ . '/vendor/penblu/jasperphp/examples/Blank_A4_1.jasper'),
    false,
    array('pdf', 'xlsx'),
    array('php_version' => phpversion()),
    array(
      'driver' => 'postgres',
      'username' => 'vagrant',
      'host' => 'localhost',
      'database' => 'samples',
      'port' => '5433',
    )
  )->execute();
```

Requirements
------------

[](#requirements)

- Java JDK 1.6 or above
- PHP [exec()](http://php.net/manual/function.exec.php) function
- \[optional\] [Mysql Connector](http://dev.mysql.com/downloads/connector/j/) (if you want to use database)
- \[optional\] [Jaspersoft Studio](http://community.jaspersoft.com/project/jaspersoft-studio) (to draw and compile your reports)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

1928d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db7ca0eed3cee80ef673bc796ee063c0484261313f071ad59dc7baf21e526d3c?d=identicon)[edu19432](/maintainers/edu19432)

---

Top Contributors

[![edu19432](https://avatars.githubusercontent.com/u/1338659?v=4)](https://github.com/edu19432 "edu19432 (10 commits)")

---

Tags

yii2extensionjasperphp

### Embed Badge

![Health badge](/badges/penblu-jasperphp/health.svg)

```
[![Health](https://phpackages.com/badges/penblu-jasperphp/health.svg)](https://phpackages.com/packages/penblu-jasperphp)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
