File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require __DIR__ . '/../src/JasperPHP/JasperPHP.php ' ;
4+
5+ $ outputPdfRtf = __DIR__ ;
6+ $ jasperFile = __DIR__ . '/hello_world.jasper ' ;
7+ $ jrxmlFile = __DIR__ . '/hello_world.jrxml ' ;
8+ $ jrxmlParamsFile = __DIR__ . '/hello_world_params.jrxml ' ;
9+
10+ $ jasper = new JasperPHP \JasperPHP ;
11+
12+ // compiling jrxml file into jasper file
13+ $ jasper ->compile ($ jrxmlFile )->execute ();
14+
15+ // processing jasper file into pdf and rtf
16+ $ jasper ->process (
17+ $ jasperFile ,
18+ $ outputPdfRtf ,
19+ array ("pdf " , "rtf " )
20+ )->execute ();
21+
22+ // Listing Parameters of jasper file
23+ $ jasperParameters = $ jasper ->list_parameters ($ jrxmlParamsFile )->execute ();
24+ print "<h2>Listing Parameters of jasper file</h2> \n" ;
25+ foreach ($ jasperParameters as $ parameter_description ) {
26+ print "<pre> " . $ parameter_description . "</pre> \n" ;
27+ }
You can’t perform that action at this time.
0 commit comments