* @author Christoph Wurst * @author Lukas Reschke * @author Robin Appelman * @author Roeland Jago Douma * @author Stefan Weil * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ namespace OC\AppFramework\Http; use OCP\AppFramework\Http\IOutput; /** * Very thin wrapper class to make output testable */ class Output implements IOutput { /** @var string */ private $webRoot; /** * @param $webRoot */ public function __construct($webRoot) { $this->webRoot = $webRoot; } /** * @param string $out */ public function setOutput($out) { print($out); } /** * @param string|resource $path or file handle * * @return bool false if an error occurred */ public function setReadfile($path) { if (is_resource($path)) { $output = fopen('php://output', 'w'); return stream_copy_to_stream($path, $output) > 0; } else { return @readfile($path); } } /** * @param string $header */ public function setHeader($header) { header($header); } /** * @param int $code sets the http status code */ public function setHttpResponseCode($code) { http_response_code($code); } /** * @return int returns the current http response code */ public function getHttpResponseCode() { return http_response_code(); } /** * @param string $name * @param string $value * @param int $expire * @param string $path * @param string $domain * @param bool $secure * @param bool $httpOnly */ public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') { $path = $this->webRoot ? : '/'; setcookie($name, $value, [ 'expires' => $expire, 'path' => $path, 'domain' => $domain, 'secure' => $secure, 'httponly' => $httpOnly, 'samesite' => $sameSite ]); } } ObjectStreams'>Temp_PDF_ObjectStreams Apache XML Graphics FOP: https://github.com/apache/xmlgraphics-fopwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: 805a53f507cf86897ab6ab74e5cbdc727dbd1e5f (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<?xml version="1.0" standalone="no"?>


<!-- What's Implemented? -->

<s1 title="Features">
  <s2 title="What's Implemented?">
      <p>The following formatting objects and properties of the XSL-FO 1.0
         W3C Recommandation are implemented. Please have also a look at the 
         section on <jump href="limitations.html">limitations</jump>.
      </p>
  </s2>
  <s2 title="1) Formatting Objects">
    <p>This section follows the table "B Formatting Object Summary" in the xsl:fo specification. At the 
       end of each sub-section you find listed what is not implemented.</p>

    <s3 title="B.1 Declaration and Pagination and Layout Formatting Objects">
      <ul>
        <li>root</li>
        <li>page-sequence</li>
        <li>page-sequence-master</li>
        <li>single-page-master-reference</li>
        <li>repeatable-page-master-reference</li>
        <li>repeatable-page-master-alternatives</li>
        <li>conditional-page-master-reference</li>
        <li>layout-master-set</li>
        <li>simple-page-master</li>
        <li>region-body</li>
        <li>region-before</li>
        <li>region-after</li>
        <li>region-start</li>
        <li>region-end</li>
        <li>flow</li>
        <li>static-content</li>
      </ul>
      <p>Not implemented: declarations, color-profile, title</p>
    </s3>

    <s3 title="B.2 Block Formatting Objects">
      <ul>
        <li>block</li>
        <li>block-container (limited)</li>
      </ul>
    </s3>

    <s3 title="B.3 Inline Formatting Objects">
      <ul>
        <li>character</li>
        <li>external-graphic</li>
        <li>inline</li>
        <li>instream-foreign-object</li>
        <li>leader</li>
        <li>page-number </li>
        <li>page-number-citation, see <jump href="limitations.html">limitations</jump></li>
      </ul>
      <p>Not implemented: bidi-override, initial-property-set, inline-container</p>
    </s3>

    <s3 title="B.4 Table Formatting Objects">
      <ul>
        <li>table</li>
        <li>table-body</li>
        <li>table-cell</li>
        <li>table-column</li>
        <li>table-footer</li>
        <li>table-header</li>
        <li>table-row</li>
      </ul>
      <p>Not implemented: table-and-caption, table-caption </p> 
    </s3>

    <s3 title="B.5 List Formatting Objects">
      <ul>
        <li>list-block </li>
        <li>list-item </li>
        <li>list-item-body </li>
        <li>list-item-label </li>
      </ul>
    </s3>

    <s3 title="B.6 Link and Multi Formatting Objects">
      <ul>
        <li>basic-link (internal and external)</li>
      </ul>
      <p>Not implemented: multi-switch, multi-case, multi-toggle,
         multi-properties, multi-property-set</p>
    </s3>

    <s3 title="B.7 Out-of-line Formatting Objects">
      <ul>
        <li>footnote</li>
        <li>footnote-body</li>
      </ul>
      <p>Not implemented: float</p>
    </s3>

    <s3 title="B.8 Other Formatting Objects">
      <ul>
        <li>wrapper</li>
        <li>marker, retrieve marker</li>
      </ul>
    </s3>
  </s2>

  <s2 title="2) Properties">
  <p>Property values can be computed. Compound properties are also understood by Fop.</p>
    <ul>
      <li>background-color </li>
      <li>background-image </li>
      <li>blank-or-not-blank</li>
      <li>border-after-color</li>
      <li>border-after-style</li>
      <li>border-after-width</li>
      <li>border-before-color</li>
      <li>border-before-style</li>
      <li>border-before-width</li>
      <li>border-bottom</li>
      <li>border-bottom-color</li>
      <li>border-bottom-style</li>
      <li>border-bottom-width</li>
      <li>border-color (only one value allowed) </li>
      <li>border-end-color</li>
      <li>border-end-style</li>
      <li>border-end-width</li>
      <li>border-left</li>
      <li>border-left-color</li>
      <li>border-left-style</li>
      <li>border-left-width</li>
      <li>border-right</li>
      <li>border-right-color</li>
      <li>border-right-style</li>
      <li>border-right-width</li>
      <li>border-start-color</li>
      <li>border-start-style</li>
      <li>border-start-width</li>
      <li>border-style</li>
      <li>border-top</li>
      <li>border-top-color</li>
      <li>border-top-style</li>
      <li>border-top-width</li>
      <li>border-width</li>
      <li>bottom</li>
      <li>break-after </li>
      <li>break-before </li>
      <li>character</li>
      <li>color </li>
      <li>column-count</li>
      <li>column-gap</li>
      <li>column-width </li>
      <li>country</li>
      <li>end-indent </li>
      <li>extent </li>
      <li>external-destination</li>
      <li>flow-name </li>
      <li>font-family </li>
      <li>font-size </li>
      <li>font-style </li>
      <li>font-weight </li>
      <li>height</li>
      <li>hyphenate</li>
      <li>hyphenation-character</li>
      <li>hyphenation-push-character-count</li>
      <li>hyphenation-remain-character-count</li>
      <li>id</li>
      <li>initial-page-number</li>
      <li>internal-destination</li>
      <li>keep-with-next (broken)</li>
      <li>language</li>
      <li>leader-alignment (not value "page")</li>
      <li>leader-length (see limitations)</li>
      <li>leader-pattern (not value "use-content")</li>
      <li>leader-pattern-width</li>
      <li>left</li>
      <li>letter-spacing</li>
      <li>line-height </li>
      <li>margin (only on pages and regions) </li>
      <li>margin-bottom (only on pages and regions) </li>
      <li>margin-left (only on pages and regions) </li>
      <li>margin-right (only on pages and regions) </li>
      <li>margin-top (only on pages and regions) </li>
      <li>master-name </li>
      <li>master-reference </li>
      <li>maximum-repeats</li>
      <li>number-columns-spanned</li>
      <li>odd-or-even</li>
      <li>padding (only one value allowed) </li>
      <li>padding-after</li>
      <li>padding-before</li>
      <li>padding-bottom </li>
      <li>padding-end</li>
      <li>padding-left  </li>
      <li>padding-right  </li>
      <li>padding-start</li>
      <li>padding-top  </li>
      <li>page-height </li>
      <li>page-position</li>
      <li>page-width </li>
      <li>position (allowed values: "static" (default),"relative", "absolute", fixed ) </li>
      <li>provisional-distance-between-starts </li>
      <li>provisional-label-separation </li>
      <li>ref-id </li>
      <li>region-name</li>
      <li>right</li>
      <li>rule-style</li>
      <li>rule-thickness </li>
      <li>space-after.optimum </li>
      <li>space-before.optimum </li>
      <li>span</li>
      <li>src </li>
      <li>start-indent </li>
      <li>table-omit-footer-at-break</li>
      <li>table-omit-header-at-break</li> 
      <li>text-align </li>
      <li>text-align-last </li>
      <li>text-decoration</li>
      <li>text-indent </li>
      <li>top</li>
      <li>white-space-collapse</li>
      <li>width</li>
      <li>wrap-option</li>
    </ul>
    <p>All other properties are not implemented.</p>
  </s2>

  <s2 title="3)SVG Support">
<p>
FOP uses <jump href="http://xml.apache.org/batik/">Batik</jump> directly for its SVG support. Therefore FOP supports the same
elements and properties as are supported by Batik. As FOP is designed for
rendering to a static medium then only static SVG is rendered.
</p>
<p>
Due to some limitations in PDF some SVG images, particularly ones with effects
or transparency, may not come out correctly. The images should still be rendered
correctly for the AWT and Print renderers.
</p>
  </s2>
</s1>