示例#1
0
<?php

error_reporting(E_ALL | E_STRICT);
defined('BASE_DIR') || define('BASE_DIR', dirname(__FILE__) . '/../../');
require BASE_DIR . 'vendor/autoload.php';
$lib = new RevPDFLib\Application();
$data = simplexml_load_file('helloworld.xml');
$lib->export($data);
示例#2
0
<?php

error_reporting(E_ALL | E_STRICT);
defined('BASE_DIR') || define('BASE_DIR', dirname(__FILE__) . '/../../');
require BASE_DIR . 'vendor/autoload.php';
$conn = new PDO('mysql:dbname=revpdf;host=localhost', 'revpdf', 'password');
$conn->exec("SET CHARACTER SET utf8");
$lib = new RevPDFLib\Application();
$data = simplexml_load_file('label.xml');
$lib->setDatasource($conn);
$lib->export($data);