PHPackages                             quilhasoft/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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. quilhasoft/jasperphp

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

quilhasoft/jasperphp
====================

Pure PHP library to read JRXML files made with 'JasperSoft Studio' and generate reports in PDF

v1.0(8mo ago)7542.4k↓14%32[18 issues](https://github.com/QuilhaSoft/JasperPHP/issues)1MITPHPPHP &gt;=5.3.0

Since Sep 18Pushed 2mo ago16 watchersCompare

[ Source](https://github.com/QuilhaSoft/JasperPHP)[ Packagist](https://packagist.org/packages/quilhasoft/jasperphp)[ GitHub Sponsors](https://github.com/Rctnet)[ RSS](/packages/quilhasoft-jasperphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (1)

[![alt text](https://camo.githubusercontent.com/e29133a6a1a86df5bd0e49af00997bd0b03730144e985547412a35363972be74/68747470733a2f2f636c6f75642d3164653132642e626563646e2e6e65742f6d656469612f6f726967696e616c2f61313063306436323833333239336331373933653939353034613234393636352f6a61737065724c6f676f2e706e67)](https://camo.githubusercontent.com/e29133a6a1a86df5bd0e49af00997bd0b03730144e985547412a35363972be74/68747470733a2f2f636c6f75642d3164653132642e626563646e2e6e65742f6d656469612f6f726967696e616c2f61313063306436323833333239336331373933653939353034613234393636352f6a61737065724c6f676f2e706e67)

JasperPHP
=========

[](#jasperphp)

A pure PHP library to generate reports from JasperSoft Studio (.jrxml files), without the need for a Java bridge or a Jasper Server.

[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EE7CD4UZEL3A4&source=url)

For more details, documentation, and blog posts, visit [jasperphp.com](https://jasperphp.com).

Recent Changes &amp; Modernization
----------------------------------

[](#recent-changes--modernization)

This project has undergone a significant modernization effort to align with current PHP best practices. Key changes include:

- **Laravel\\Octane integration:** Added methods to reset static classes and values to each request (tested OK)
- **Composer Integration:** The project now uses Composer for dependency management.
- **PSR-4 Autoloading:** Switched to PSR-4 for class autoloading, with a reorganized and namespaced directory structure (`src/`).
- **Static Analysis:** `phpstan` has been integrated to improve code quality and catch errors.
- **Flexible Data Sources:** Added support for multiple data sources, including Arrays, JSON/CSV files, and direct database queries.
- **Versatile Output Methods:** Introduced new methods to stream reports to the browser, force downloads, save to a file, or get the content as a base64 string.

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

[](#requirements)

- PHP 7.4 or higher
- Composer for dependency management.

The following PHP extensions are also required:

- `gd`
- `mbstring`
- `xml`

Installation
------------

[](#installation)

Install the library using Composer:

```
composer require quilhasoft/jasperphp:dev-master
```

Quick Start
-----------

[](#quick-start)

Here is a basic example of how to generate a report. For a more detailed and runnable example, see `public/index.php`.

```
