Download the PHP package soluble/jasper without Composer

On this page you can find all versions of the php package soluble/jasper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jasper

soluble-jasper

PHP Version Build Status codecov Scrutinizer Code Quality PHPStan Latest Stable Version Total Downloads License

PDF report generation with jasper reports for PHP.

Docs: https://belgattitude.github.io/soluble-jasper

Features

Requirements

Dependencies

Examples

Creating a new report

Datasources

Jasper reports supports multiple datasources for filling the report (see JRApi)

JavaSqlConnection

Example using JavaSqlConnection:

!!! tip For convenience you can also use the JdbcDsnFactory to convert database params.

JsonDataSource

Example using JsonDataSource:

XmlDataSource

Example using XmlDataSource:

Logging

You can enable any psr/log compatible logger. Here's a basic example with monolog:

Exceptions

When running or exporting a report, the following exception can be thrown:

Generally at compile time:

Exception Description
ReportFileNotFoundException When the report file cannot be opened (PHP or Java side, check perms)
BrokenXMLReportFileException When the report JRXML file cannot be parsed (xml error)
ReportCompileException Compilation error, generally an invalid expression or missing resource
JavaProxiedException Exception on the Java side, and call $e->getJvmStackTrace() for debug
RuntimeException Normally never thrown, see exception message

At filling time:

Exception Description
BrokenJsonDataSourceException When the json datasource cannot be parsed
JavaProxiedException Exception on the Java side, and call $e->getJvmStackTrace() for debug

Installation

This project requires a java server (or service) running on the same machine that will expose the jasper API to the php side (network bridge).

Check the installation example below or a more complex doc here.

JasperBridge

Build a war file

Deploy on Tomcat (example on ubuntu sudo apt install tomcat8)

Wait few seconds and point your browser to http://localhost:8080/JasperReports, you should see the php-java-bridge dashboard page.

The bridge address can be used in the japha bridge adapter:

If you encounter permissions problems (i.e. the pdf are created under tomcat8 user), just add your user to the tomcat group:

Benchmarks

Early benchmarks for common operation (run on a laptop for now, will do soon on digitalocean). See tests/bench/simple_benchmarks.php.

Jasper compile time and filling (internal)

Benchmark name x1 x5 x10 Average Memory
00_report_mini.jrxml (compile) 43.03ms 179.05ms 347.55ms 35.60ms 18.97Kb
00_report_mini.jrxml (fill) 3.19ms 9.15ms 18.58ms 1.93ms 14.27Kb
01_report_default.jrxml (compile) 39.24ms 192.41ms 338.65ms 35.64ms 0.31Kb
01_report_default.jrxml (fill) 3.70ms 11.22ms 22.75ms 2.35ms 0.44Kb

PDF exports

Benchmark name x1 x5 x10 Average Memory
00_report_mini.jrxml (text-only) 38.74ms 3.76ms 8.58ms 3.19ms 0.79Kb
01_report_default.jrxml (text+png) 318.68ms 1,365.02ms 2,709.56ms 274.58ms 0.75Kb
06_report_barcodes.jrxml (barcodes) 123.81ms 323.71ms 630.51ms 67.38ms 0.75Kb

Coding standards and interop


All versions of jasper with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
psr/log Version ^1.0
psr/http-message Version ^1.0.1
soluble/japha Version ^2.5.1
zendframework/zend-diactoros Version ^1.6 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package soluble/jasper contains the following files

Loading the files please wait ....