Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
File_PDF: Automatic page break test
3
--FILE--
4
<?php
5
 
6
require_once dirname(__FILE__) . '/../PDF.php';
7
 
8
// Set up the pdf object.
9
$pdf = &File_PDF::factory(array('format' => array(50, 50), 'unit' => 'pt'));
10
// Deactivate compression.
11
$pdf->setCompression(false);
12
// Set margins.
13
$pdf->setMargins(0, 0);
14
// Enable automatic page breaks.
15
$pdf->setAutoPageBreak(true);
16
// Start the document.
17
$pdf->open();
18
// Start a page.
19
$pdf->addPage();
20
// Set font to Courier 8 pt.
21
$pdf->setFont('Courier', '', 10);
22
// Write 7 lines
23
$pdf->write(10, "Hello\nHello\nHello\nHello\nHello\nHello\nHello\n");
24
// Print the generated file.
25
echo $pdf->getOutput();
26
 
27
?>
28
--EXPECTF--
29
%PDF-1.3
30
3 0 obj
31
<</Type /Page
32
/Parent 1 0 R
33
/Resources 2 0 R
34
/Contents 4 0 R>>
35
endobj
36
4 0 obj
37
<</Length 184>>
38
stream
39
2 J
40
0.57 w
41
BT /F1 10.00 Tf ET
42
BT 2.83 42.00 Td (Hello) Tj ET
43
BT 2.83 32.00 Td (Hello) Tj ET
44
BT 2.83 22.00 Td (Hello) Tj ET
45
BT 2.83 12.00 Td (Hello) Tj ET
46
BT 2.83 2.00 Td (Hello) Tj ET
47
 
48
endstream
49
endobj
50
5 0 obj
51
<</Type /Page
52
/Parent 1 0 R
53
/Resources 2 0 R
54
/Contents 6 0 R>>
55
endobj
56
6 0 obj
57
<</Length 92>>
58
stream
59
2 J
60
0.57 w
61
BT /F1 10.00 Tf ET
62
BT 2.83 42.00 Td (Hello) Tj ET
63
BT 2.83 32.00 Td (Hello) Tj ET
64
 
65
endstream
66
endobj
67
1 0 obj
68
<</Type /Pages
69
/Kids [3 0 R 5 0 R ]
70
/Count 2
71
/MediaBox [0 0 50.00 50.00]
72
>>
73
endobj
74
7 0 obj
75
<</Type /Font
76
/BaseFont /Courier
77
/Subtype /Type1
78
/Encoding /WinAnsiEncoding
79
>>
80
endobj
81
2 0 obj
82
<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
83
/Font <<
84
/F1 7 0 R
85
>>
86
>>
87
endobj
88
8 0 obj
89
<<
90
/Producer (Horde PDF)
91
/CreationDate (D:%d)
92
>>
93
endobj
94
9 0 obj
95
<<
96
/Type /Catalog
97
/Pages 1 0 R
98
/OpenAction [3 0 R /FitH null]
99
/PageLayout /OneColumn
100
>>
101
endobj
102
xref
103
 
104
0000000000 65535 f
105
0000000538 00000 n
106
0000000723 00000 n
107
0000000009 00000 n
108
0000000087 00000 n
109
0000000320 00000 n
110
0000000398 00000 n
111
0000000629 00000 n
112
0000000811 00000 n
113
0000000887 00000 n
114
trailer
115
<<
116
/Size 10
117
/Root 9 0 R
118
/Info 8 0 R
119
>>
120
startxref
121
990
122
%%EOF