-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathindex.php
More file actions
39 lines (32 loc) · 781 Bytes
/
index.php
File metadata and controls
39 lines (32 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?PHP
require __DIR__ . '/vendor/autoload.php';
use JasperPHP\JasperPHP;
/*
$input = __DIR__ . '/examples/hello_world_xml.jrxml';
$output = __DIR__ . '/';
$jasper = new JasperPHP;
$jasper->process(
$input,
$output,
array('pdf'),
array(),
array(
'data_file' => __DIR__ . '/examples/xmlExample.xml',
'driver' => 'xml',
'xml_xpath' => '/CancelResponse/CancelResult/ID'
)
)->execute();*/
$input = __DIR__ . '/examples/hello_world_json.jrxml';
$output = __DIR__ . '/';
$jasper = new JasperPHP;
$jasper->process(
$input,
$output,
array('pdf'),
array(),
array(
'driver' => 'json',
'json_query' => 'contacts.person',
'data_file' => __DIR__ . '/examples/jsonExample.json'
)
)->execute();