linkorb/birt-renderer
Composer 安装命令:
composer require linkorb/birt-renderer
包简介
Render BIRT reports from PHP
README 文档
README
Render BIRT .rptdesign files from your PHP application.
You can use the BIRT Designer to create reports, and save them as .rptdesign files.
Then you can generate the reports from your PHP application and present them to your end user.
The reports can be generated in HTML, PDF, DOC, XLS, PPT and Postscript.
How it works
This library is a clean wrapper around the genReport.sh shell-script which is part of the BIRT Runtime.
This means that you'll need to have the BIRT Runtime installed (see below).
Prerequisites: BIRT Runtime
You'll need to have a recent version of the BIRT Runtime extracted somewhere on your computer/server.
You can download it here: http://download.eclipse.org/birt/downloads/
Make sure you download the BIRT Runtime, and not the All-in-One or other options.
After downloading the file (birt-runtime-4_4_1-20140916.zip at the time of this writing), simply extract the zip file somewhere on your disk.
You'll need to remember the pathname, as you'll need to when instantiating a new Renderer in your code.
Example usage from PHP
use BirtRenderer\Renderer; use BirtRenderer\Report; use BirtRenderer\Parameter; // Instantiate a report, by filename $report = new Report(); $report->loadFilename('/home/yourname/example.rptdesign'); // Instantiate the Renderer $renderer = new Renderer(); // Set the BIRT_HOME environment variable (important) $renderer->setBirtHome('/home/yourname/birt-runtime-4_4_1'); // Create a list of report-parameters (key/value) $parameters = array(); $parameters[] = new Parameter('Color', 'Red'); $parameters[] = new Parameter('Size', 'XL'); // Render the report, with supplied parameters to $outputfilename $outputfilename = '/home/yourname/out.pdf'; $renderer->render($report, $parameters, $outputfilename);
Example usage from the console
This library includes an example console command to invoke the library. You can use it like this:
export BIRT_HOME=/home/yourname/birt-runtime-4_4_1
./bin/birt-renderer report:render --parameter Color=Red --parameter Size=XL myreport.rptdesign output.pdf
Based on the file-extension of the output file it will automatically detect the format.
License
MIT (see LICENSE.md)
Brought to you by the LinkORB Engineering team
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!
linkorb/birt-renderer 适用场景与选型建议
linkorb/birt-renderer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.48k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2014 年 12 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「reporting」 「birt」 「business intelligence」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 linkorb/birt-renderer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 linkorb/birt-renderer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 linkorb/birt-renderer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Reportico Open Source PHP Report Designer
Monolog JSON Formatter for Google StackDriver integration
Business rules engine tools.
Allow KoolReport to use twig template engine to render view
A basic wrapper for citco/carbon which returns business days between two given dates.
The Reportico Reporting Designer and Framework.
统计信息
- 总下载量: 1.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-19