Download the PHP package paulofilipem/phpjasperxml without Composer
On this page you can find all versions of the php package paulofilipem/phpjasperxml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paulofilipem/phpjasperxml
More information about paulofilipem/phpjasperxml
Files in paulofilipem/phpjasperxml
Package phpjasperxml
Short Description PHP WYSIWYG Web/PDF Report Library
License MIT
Homepage https://github.com/SIMITGROUP/phpjasperxml
Informations about the package phpjasperxml
PHPJasperXML
PHP WYSIWYG Web/PDF Report Library
This project to ease the develop web/printer friendly report in php. After many year development this project is stable and created a lot of web report. You can design your report via jasper report studio (http://community.jaspersoft.com/project/jaspersoft-studio) and then use phpjasperxml to render it in php. No javabridge is required at server side. We borrow tcpdf and phpexcel to export our report in pdf/excel. So far it support up to php7.2 (only tested in 7.0, and 7.2)
If export excel is crucial and you required fast export excel engine (phpexcel is painfully slow), you can get commercial driver from:
- Cross platform Excel Library (written in c/c++) http://www.libxl.com/
- PHP extension to for libxl https://github.com/iliaal/php_excel
Once excel library loaded phpjasperxml should detect it and use that to export excel, the performance will be 6-7x faster!
PHPJasperXML is not complete replacement of jaspersoft, it have some limitation. We'd use it many years and it is proven stable but it is not 100% features ready. There is known issue which is:
- Subreport not render perfectly in detail band (Header and Footer I think should be ok), technically it seems very hard to calculate the height of subreport at the same time balance with all others element in same detail band
- Some barcode is not supported yet (QR code is supported)
- Some situation text might not ablet to vertical align properly due to limitation of tcpdf
- There is some others limitation, so far we change our way to accomodate the limitation
- PHPJasperXML allow you do once and generate pdf/excel, however it is not suitable to run report with 100 pages long cause the limitation of algorithm.
- Best use case of PHPJasperXML is use for design / print document, example Invoice, Purchase Order, Service Order, and etc printable document. Short report run well and allow export excel nicely. Long report you shall use alternative report tool
Installation
- Download and extract this project into you website root directory (I assume /var/www)
- Import sampledb.sql into mysql database, in this project we assume your username=root, password=mysql, database = phpjasperxml. If you use difference user/password/database, you shall change setting in sample1.php and sample2.php.
- With your favorite web browser, browse into http://localhost/PHPJasperXML/index.php, test report you like.
- Finish.
How to Use This Class
- You can use iReport to edit the sample1.jrxml, sample2.jrxml and see the effect from web browser.
- You can use any text editor to edit sample1.php and sample2.php, you will found that integrate the report into your project is like peanut.
- Due to this project still at initial stage, to documentation is ready yet. However for those familiar with PHP and iReport should have no problem for using this class.
PHP Code
License
- PHPJasperXML is using MIT license, mean you can do whatever you want. However it use few library from different license.
- TCPDF (use to draw pdf): GPL V3 https://github.com/tecnickcom/TCPDF
- PHPEXCEL (when you need to export data into excel without libxl): LGPL https://github.com/PHPOffice/PHPExcel
- Lib_Excel (when you wish to use commercial libxl library, performance 6x): https://github.com/iliaal/php_excel
- PChart2 (when you wish to draw chart): GPL V3 http://www.pchart.net/license
- Fonts (There is lot of fonts in tcpdf/fonts): We have no ideal what is license of each fonts, you take your own risk when you use the fonts.
Supported Database
at the moment PHPJasperXML support:
- mysql (with mysqli)
- postgres
- sql server
- PDO (for others)
Obvious Limitation
- It is php library, it not not support java syntax or groovy code in when you define value or print when expression.
- Sub report is not support well in detail band, however it work reasonable at page header and footer.
- Chart support is bad, we need people to help that cause we not use chart in pdf.
How to debug?
A lot of time we want to debug and what wrong in our report, easiest way is append at report url with string debugsql=1&showhtmldata=1
as below:
http://www.mydomain.com/myreport.php?para1=1&debugsql=1&showhtmldata=1