1 <?php
2 require_once ('../code/cssj_driver.php');
3 header("Content-Type: application/pdf");
4
5 //ドライバの作成
6 $driver = cssj_create_driver_for('localhost', 8099);
7
8 //セッションの開始
9 $session = cssj_create_session($driver, 'user', 'secret') or die('サーバーに接続できません');
10
11 //リソースの送信
12 cssj_ob_start_resource($session, 'file:test.css');
13 readfile('test.css');
14 cssj_ob_end_flush_resource();
15
16 //本体の変換
17 $in = fopen('test.html', 'r');
18 cssj_ob_start_main($session, 'file:test.html');
19 for (;;) {
20 $data = fread($in, 8192);
21 if (strlen($data) <= 0) {
22 break;
23 }
24 echo $data;
25 }
26 cssj_ob_end_flush_main();
27 fclose($in);
28
29 //セッションの終了
30 cssj_close($session);
31 ?>
Documentation generated on Mon, 7 Nov 2005 19:21:26 +0900 by phpDocumentor 1.2.3