Commit 84e8385bbadbacb6f03937111bcec2d2dbcea2bf
Merge branch 'master' of http://service.routetopa.eu:7480/isislab/DEEP
Showing
192 changed files
with
21985 additions
and
3 deletions
Too many changes.
To preserve performance only 100 of 192 files are displayed.
.gitignore
0 โ 100644
configuration.xml
1 | 1 | <configuration> |
2 | 2 | |
3 | 3 | <deep_datalet_configuration> |
4 | - <components_repository_url_reference>http://192.168.164.128/DatalEts-Ecosystem-Provider/COMPONENTS/datalets/</components_repository_url_reference> | |
4 | + <components_repository_url_reference>http://172.16.15.77/DEEalerProvider/COMPONENTS/datalets/</components_repository_url_reference> | |
5 | 5 | </deep_datalet_configuration> |
6 | 6 | |
7 | 7 | <deep_controllets_configuration> |
8 | - <components_repository_url_reference>http://192.168.164.128/DatalEts-Ecosystem-Provider/COMPONENTS/controllets/</components_repository_url_reference> | |
8 | + <components_repository_url_reference>http://172.16.15.77/DEEalerProvider/COMPONENTS/controllets/</components_repository_url_reference> | |
9 | 9 | </deep_controllets_configuration> |
10 | 10 | |
11 | 11 | </configuration> | ... | ... |
export/.htaccess
0 โ 100644
export/PHPRtfLite-1.3.1/COPYING
0 โ 100644
1 | + GNU GENERAL PUBLIC LICENSE | |
2 | + Version 3, 29 June 2007 | |
3 | + | |
4 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
5 | + Everyone is permitted to copy and distribute verbatim copies | |
6 | + of this license document, but changing it is not allowed. | |
7 | + | |
8 | + Preamble | |
9 | + | |
10 | + The GNU General Public License is a free, copyleft license for | |
11 | +software and other kinds of works. | |
12 | + | |
13 | + The licenses for most software and other practical works are designed | |
14 | +to take away your freedom to share and change the works. By contrast, | |
15 | +the GNU General Public License is intended to guarantee your freedom to | |
16 | +share and change all versions of a program--to make sure it remains free | |
17 | +software for all its users. We, the Free Software Foundation, use the | |
18 | +GNU General Public License for most of our software; it applies also to | |
19 | +any other work released this way by its authors. You can apply it to | |
20 | +your programs, too. | |
21 | + | |
22 | + When we speak of free software, we are referring to freedom, not | |
23 | +price. Our General Public Licenses are designed to make sure that you | |
24 | +have the freedom to distribute copies of free software (and charge for | |
25 | +them if you wish), that you receive source code or can get it if you | |
26 | +want it, that you can change the software or use pieces of it in new | |
27 | +free programs, and that you know you can do these things. | |
28 | + | |
29 | + To protect your rights, we need to prevent others from denying you | |
30 | +these rights or asking you to surrender the rights. Therefore, you have | |
31 | +certain responsibilities if you distribute copies of the software, or if | |
32 | +you modify it: responsibilities to respect the freedom of others. | |
33 | + | |
34 | + For example, if you distribute copies of such a program, whether | |
35 | +gratis or for a fee, you must pass on to the recipients the same | |
36 | +freedoms that you received. You must make sure that they, too, receive | |
37 | +or can get the source code. And you must show them these terms so they | |
38 | +know their rights. | |
39 | + | |
40 | + Developers that use the GNU GPL protect your rights with two steps: | |
41 | +(1) assert copyright on the software, and (2) offer you this License | |
42 | +giving you legal permission to copy, distribute and/or modify it. | |
43 | + | |
44 | + For the developers' and authors' protection, the GPL clearly explains | |
45 | +that there is no warranty for this free software. For both users' and | |
46 | +authors' sake, the GPL requires that modified versions be marked as | |
47 | +changed, so that their problems will not be attributed erroneously to | |
48 | +authors of previous versions. | |
49 | + | |
50 | + Some devices are designed to deny users access to install or run | |
51 | +modified versions of the software inside them, although the manufacturer | |
52 | +can do so. This is fundamentally incompatible with the aim of | |
53 | +protecting users' freedom to change the software. The systematic | |
54 | +pattern of such abuse occurs in the area of products for individuals to | |
55 | +use, which is precisely where it is most unacceptable. Therefore, we | |
56 | +have designed this version of the GPL to prohibit the practice for those | |
57 | +products. If such problems arise substantially in other domains, we | |
58 | +stand ready to extend this provision to those domains in future versions | |
59 | +of the GPL, as needed to protect the freedom of users. | |
60 | + | |
61 | + Finally, every program is threatened constantly by software patents. | |
62 | +States should not allow patents to restrict development and use of | |
63 | +software on general-purpose computers, but in those that do, we wish to | |
64 | +avoid the special danger that patents applied to a free program could | |
65 | +make it effectively proprietary. To prevent this, the GPL assures that | |
66 | +patents cannot be used to render the program non-free. | |
67 | + | |
68 | + The precise terms and conditions for copying, distribution and | |
69 | +modification follow. | |
70 | + | |
71 | + TERMS AND CONDITIONS | |
72 | + | |
73 | + 0. Definitions. | |
74 | + | |
75 | + "This License" refers to version 3 of the GNU General Public License. | |
76 | + | |
77 | + "Copyright" also means copyright-like laws that apply to other kinds of | |
78 | +works, such as semiconductor masks. | |
79 | + | |
80 | + "The Program" refers to any copyrightable work licensed under this | |
81 | +License. Each licensee is addressed as "you". "Licensees" and | |
82 | +"recipients" may be individuals or organizations. | |
83 | + | |
84 | + To "modify" a work means to copy from or adapt all or part of the work | |
85 | +in a fashion requiring copyright permission, other than the making of an | |
86 | +exact copy. The resulting work is called a "modified version" of the | |
87 | +earlier work or a work "based on" the earlier work. | |
88 | + | |
89 | + A "covered work" means either the unmodified Program or a work based | |
90 | +on the Program. | |
91 | + | |
92 | + To "propagate" a work means to do anything with it that, without | |
93 | +permission, would make you directly or secondarily liable for | |
94 | +infringement under applicable copyright law, except executing it on a | |
95 | +computer or modifying a private copy. Propagation includes copying, | |
96 | +distribution (with or without modification), making available to the | |
97 | +public, and in some countries other activities as well. | |
98 | + | |
99 | + To "convey" a work means any kind of propagation that enables other | |
100 | +parties to make or receive copies. Mere interaction with a user through | |
101 | +a computer network, with no transfer of a copy, is not conveying. | |
102 | + | |
103 | + An interactive user interface displays "Appropriate Legal Notices" | |
104 | +to the extent that it includes a convenient and prominently visible | |
105 | +feature that (1) displays an appropriate copyright notice, and (2) | |
106 | +tells the user that there is no warranty for the work (except to the | |
107 | +extent that warranties are provided), that licensees may convey the | |
108 | +work under this License, and how to view a copy of this License. If | |
109 | +the interface presents a list of user commands or options, such as a | |
110 | +menu, a prominent item in the list meets this criterion. | |
111 | + | |
112 | + 1. Source Code. | |
113 | + | |
114 | + The "source code" for a work means the preferred form of the work | |
115 | +for making modifications to it. "Object code" means any non-source | |
116 | +form of a work. | |
117 | + | |
118 | + A "Standard Interface" means an interface that either is an official | |
119 | +standard defined by a recognized standards body, or, in the case of | |
120 | +interfaces specified for a particular programming language, one that | |
121 | +is widely used among developers working in that language. | |
122 | + | |
123 | + The "System Libraries" of an executable work include anything, other | |
124 | +than the work as a whole, that (a) is included in the normal form of | |
125 | +packaging a Major Component, but which is not part of that Major | |
126 | +Component, and (b) serves only to enable use of the work with that | |
127 | +Major Component, or to implement a Standard Interface for which an | |
128 | +implementation is available to the public in source code form. A | |
129 | +"Major Component", in this context, means a major essential component | |
130 | +(kernel, window system, and so on) of the specific operating system | |
131 | +(if any) on which the executable work runs, or a compiler used to | |
132 | +produce the work, or an object code interpreter used to run it. | |
133 | + | |
134 | + The "Corresponding Source" for a work in object code form means all | |
135 | +the source code needed to generate, install, and (for an executable | |
136 | +work) run the object code and to modify the work, including scripts to | |
137 | +control those activities. However, it does not include the work's | |
138 | +System Libraries, or general-purpose tools or generally available free | |
139 | +programs which are used unmodified in performing those activities but | |
140 | +which are not part of the work. For example, Corresponding Source | |
141 | +includes interface definition files associated with source files for | |
142 | +the work, and the source code for shared libraries and dynamically | |
143 | +linked subprograms that the work is specifically designed to require, | |
144 | +such as by intimate data communication or control flow between those | |
145 | +subprograms and other parts of the work. | |
146 | + | |
147 | + The Corresponding Source need not include anything that users | |
148 | +can regenerate automatically from other parts of the Corresponding | |
149 | +Source. | |
150 | + | |
151 | + The Corresponding Source for a work in source code form is that | |
152 | +same work. | |
153 | + | |
154 | + 2. Basic Permissions. | |
155 | + | |
156 | + All rights granted under this License are granted for the term of | |
157 | +copyright on the Program, and are irrevocable provided the stated | |
158 | +conditions are met. This License explicitly affirms your unlimited | |
159 | +permission to run the unmodified Program. The output from running a | |
160 | +covered work is covered by this License only if the output, given its | |
161 | +content, constitutes a covered work. This License acknowledges your | |
162 | +rights of fair use or other equivalent, as provided by copyright law. | |
163 | + | |
164 | + You may make, run and propagate covered works that you do not | |
165 | +convey, without conditions so long as your license otherwise remains | |
166 | +in force. You may convey covered works to others for the sole purpose | |
167 | +of having them make modifications exclusively for you, or provide you | |
168 | +with facilities for running those works, provided that you comply with | |
169 | +the terms of this License in conveying all material for which you do | |
170 | +not control copyright. Those thus making or running the covered works | |
171 | +for you must do so exclusively on your behalf, under your direction | |
172 | +and control, on terms that prohibit them from making any copies of | |
173 | +your copyrighted material outside their relationship with you. | |
174 | + | |
175 | + Conveying under any other circumstances is permitted solely under | |
176 | +the conditions stated below. Sublicensing is not allowed; section 10 | |
177 | +makes it unnecessary. | |
178 | + | |
179 | + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. | |
180 | + | |
181 | + No covered work shall be deemed part of an effective technological | |
182 | +measure under any applicable law fulfilling obligations under article | |
183 | +11 of the WIPO copyright treaty adopted on 20 December 1996, or | |
184 | +similar laws prohibiting or restricting circumvention of such | |
185 | +measures. | |
186 | + | |
187 | + When you convey a covered work, you waive any legal power to forbid | |
188 | +circumvention of technological measures to the extent such circumvention | |
189 | +is effected by exercising rights under this License with respect to | |
190 | +the covered work, and you disclaim any intention to limit operation or | |
191 | +modification of the work as a means of enforcing, against the work's | |
192 | +users, your or third parties' legal rights to forbid circumvention of | |
193 | +technological measures. | |
194 | + | |
195 | + 4. Conveying Verbatim Copies. | |
196 | + | |
197 | + You may convey verbatim copies of the Program's source code as you | |
198 | +receive it, in any medium, provided that you conspicuously and | |
199 | +appropriately publish on each copy an appropriate copyright notice; | |
200 | +keep intact all notices stating that this License and any | |
201 | +non-permissive terms added in accord with section 7 apply to the code; | |
202 | +keep intact all notices of the absence of any warranty; and give all | |
203 | +recipients a copy of this License along with the Program. | |
204 | + | |
205 | + You may charge any price or no price for each copy that you convey, | |
206 | +and you may offer support or warranty protection for a fee. | |
207 | + | |
208 | + 5. Conveying Modified Source Versions. | |
209 | + | |
210 | + You may convey a work based on the Program, or the modifications to | |
211 | +produce it from the Program, in the form of source code under the | |
212 | +terms of section 4, provided that you also meet all of these conditions: | |
213 | + | |
214 | + a) The work must carry prominent notices stating that you modified | |
215 | + it, and giving a relevant date. | |
216 | + | |
217 | + b) The work must carry prominent notices stating that it is | |
218 | + released under this License and any conditions added under section | |
219 | + 7. This requirement modifies the requirement in section 4 to | |
220 | + "keep intact all notices". | |
221 | + | |
222 | + c) You must license the entire work, as a whole, under this | |
223 | + License to anyone who comes into possession of a copy. This | |
224 | + License will therefore apply, along with any applicable section 7 | |
225 | + additional terms, to the whole of the work, and all its parts, | |
226 | + regardless of how they are packaged. This License gives no | |
227 | + permission to license the work in any other way, but it does not | |
228 | + invalidate such permission if you have separately received it. | |
229 | + | |
230 | + d) If the work has interactive user interfaces, each must display | |
231 | + Appropriate Legal Notices; however, if the Program has interactive | |
232 | + interfaces that do not display Appropriate Legal Notices, your | |
233 | + work need not make them do so. | |
234 | + | |
235 | + A compilation of a covered work with other separate and independent | |
236 | +works, which are not by their nature extensions of the covered work, | |
237 | +and which are not combined with it such as to form a larger program, | |
238 | +in or on a volume of a storage or distribution medium, is called an | |
239 | +"aggregate" if the compilation and its resulting copyright are not | |
240 | +used to limit the access or legal rights of the compilation's users | |
241 | +beyond what the individual works permit. Inclusion of a covered work | |
242 | +in an aggregate does not cause this License to apply to the other | |
243 | +parts of the aggregate. | |
244 | + | |
245 | + 6. Conveying Non-Source Forms. | |
246 | + | |
247 | + You may convey a covered work in object code form under the terms | |
248 | +of sections 4 and 5, provided that you also convey the | |
249 | +machine-readable Corresponding Source under the terms of this License, | |
250 | +in one of these ways: | |
251 | + | |
252 | + a) Convey the object code in, or embodied in, a physical product | |
253 | + (including a physical distribution medium), accompanied by the | |
254 | + Corresponding Source fixed on a durable physical medium | |
255 | + customarily used for software interchange. | |
256 | + | |
257 | + b) Convey the object code in, or embodied in, a physical product | |
258 | + (including a physical distribution medium), accompanied by a | |
259 | + written offer, valid for at least three years and valid for as | |
260 | + long as you offer spare parts or customer support for that product | |
261 | + model, to give anyone who possesses the object code either (1) a | |
262 | + copy of the Corresponding Source for all the software in the | |
263 | + product that is covered by this License, on a durable physical | |
264 | + medium customarily used for software interchange, for a price no | |
265 | + more than your reasonable cost of physically performing this | |
266 | + conveying of source, or (2) access to copy the | |
267 | + Corresponding Source from a network server at no charge. | |
268 | + | |
269 | + c) Convey individual copies of the object code with a copy of the | |
270 | + written offer to provide the Corresponding Source. This | |
271 | + alternative is allowed only occasionally and noncommercially, and | |
272 | + only if you received the object code with such an offer, in accord | |
273 | + with subsection 6b. | |
274 | + | |
275 | + d) Convey the object code by offering access from a designated | |
276 | + place (gratis or for a charge), and offer equivalent access to the | |
277 | + Corresponding Source in the same way through the same place at no | |
278 | + further charge. You need not require recipients to copy the | |
279 | + Corresponding Source along with the object code. If the place to | |
280 | + copy the object code is a network server, the Corresponding Source | |
281 | + may be on a different server (operated by you or a third party) | |
282 | + that supports equivalent copying facilities, provided you maintain | |
283 | + clear directions next to the object code saying where to find the | |
284 | + Corresponding Source. Regardless of what server hosts the | |
285 | + Corresponding Source, you remain obligated to ensure that it is | |
286 | + available for as long as needed to satisfy these requirements. | |
287 | + | |
288 | + e) Convey the object code using peer-to-peer transmission, provided | |
289 | + you inform other peers where the object code and Corresponding | |
290 | + Source of the work are being offered to the general public at no | |
291 | + charge under subsection 6d. | |
292 | + | |
293 | + A separable portion of the object code, whose source code is excluded | |
294 | +from the Corresponding Source as a System Library, need not be | |
295 | +included in conveying the object code work. | |
296 | + | |
297 | + A "User Product" is either (1) a "consumer product", which means any | |
298 | +tangible personal property which is normally used for personal, family, | |
299 | +or household purposes, or (2) anything designed or sold for incorporation | |
300 | +into a dwelling. In determining whether a product is a consumer product, | |
301 | +doubtful cases shall be resolved in favor of coverage. For a particular | |
302 | +product received by a particular user, "normally used" refers to a | |
303 | +typical or common use of that class of product, regardless of the status | |
304 | +of the particular user or of the way in which the particular user | |
305 | +actually uses, or expects or is expected to use, the product. A product | |
306 | +is a consumer product regardless of whether the product has substantial | |
307 | +commercial, industrial or non-consumer uses, unless such uses represent | |
308 | +the only significant mode of use of the product. | |
309 | + | |
310 | + "Installation Information" for a User Product means any methods, | |
311 | +procedures, authorization keys, or other information required to install | |
312 | +and execute modified versions of a covered work in that User Product from | |
313 | +a modified version of its Corresponding Source. The information must | |
314 | +suffice to ensure that the continued functioning of the modified object | |
315 | +code is in no case prevented or interfered with solely because | |
316 | +modification has been made. | |
317 | + | |
318 | + If you convey an object code work under this section in, or with, or | |
319 | +specifically for use in, a User Product, and the conveying occurs as | |
320 | +part of a transaction in which the right of possession and use of the | |
321 | +User Product is transferred to the recipient in perpetuity or for a | |
322 | +fixed term (regardless of how the transaction is characterized), the | |
323 | +Corresponding Source conveyed under this section must be accompanied | |
324 | +by the Installation Information. But this requirement does not apply | |
325 | +if neither you nor any third party retains the ability to install | |
326 | +modified object code on the User Product (for example, the work has | |
327 | +been installed in ROM). | |
328 | + | |
329 | + The requirement to provide Installation Information does not include a | |
330 | +requirement to continue to provide support service, warranty, or updates | |
331 | +for a work that has been modified or installed by the recipient, or for | |
332 | +the User Product in which it has been modified or installed. Access to a | |
333 | +network may be denied when the modification itself materially and | |
334 | +adversely affects the operation of the network or violates the rules and | |
335 | +protocols for communication across the network. | |
336 | + | |
337 | + Corresponding Source conveyed, and Installation Information provided, | |
338 | +in accord with this section must be in a format that is publicly | |
339 | +documented (and with an implementation available to the public in | |
340 | +source code form), and must require no special password or key for | |
341 | +unpacking, reading or copying. | |
342 | + | |
343 | + 7. Additional Terms. | |
344 | + | |
345 | + "Additional permissions" are terms that supplement the terms of this | |
346 | +License by making exceptions from one or more of its conditions. | |
347 | +Additional permissions that are applicable to the entire Program shall | |
348 | +be treated as though they were included in this License, to the extent | |
349 | +that they are valid under applicable law. If additional permissions | |
350 | +apply only to part of the Program, that part may be used separately | |
351 | +under those permissions, but the entire Program remains governed by | |
352 | +this License without regard to the additional permissions. | |
353 | + | |
354 | + When you convey a copy of a covered work, you may at your option | |
355 | +remove any additional permissions from that copy, or from any part of | |
356 | +it. (Additional permissions may be written to require their own | |
357 | +removal in certain cases when you modify the work.) You may place | |
358 | +additional permissions on material, added by you to a covered work, | |
359 | +for which you have or can give appropriate copyright permission. | |
360 | + | |
361 | + Notwithstanding any other provision of this License, for material you | |
362 | +add to a covered work, you may (if authorized by the copyright holders of | |
363 | +that material) supplement the terms of this License with terms: | |
364 | + | |
365 | + a) Disclaiming warranty or limiting liability differently from the | |
366 | + terms of sections 15 and 16 of this License; or | |
367 | + | |
368 | + b) Requiring preservation of specified reasonable legal notices or | |
369 | + author attributions in that material or in the Appropriate Legal | |
370 | + Notices displayed by works containing it; or | |
371 | + | |
372 | + c) Prohibiting misrepresentation of the origin of that material, or | |
373 | + requiring that modified versions of such material be marked in | |
374 | + reasonable ways as different from the original version; or | |
375 | + | |
376 | + d) Limiting the use for publicity purposes of names of licensors or | |
377 | + authors of the material; or | |
378 | + | |
379 | + e) Declining to grant rights under trademark law for use of some | |
380 | + trade names, trademarks, or service marks; or | |
381 | + | |
382 | + f) Requiring indemnification of licensors and authors of that | |
383 | + material by anyone who conveys the material (or modified versions of | |
384 | + it) with contractual assumptions of liability to the recipient, for | |
385 | + any liability that these contractual assumptions directly impose on | |
386 | + those licensors and authors. | |
387 | + | |
388 | + All other non-permissive additional terms are considered "further | |
389 | +restrictions" within the meaning of section 10. If the Program as you | |
390 | +received it, or any part of it, contains a notice stating that it is | |
391 | +governed by this License along with a term that is a further | |
392 | +restriction, you may remove that term. If a license document contains | |
393 | +a further restriction but permits relicensing or conveying under this | |
394 | +License, you may add to a covered work material governed by the terms | |
395 | +of that license document, provided that the further restriction does | |
396 | +not survive such relicensing or conveying. | |
397 | + | |
398 | + If you add terms to a covered work in accord with this section, you | |
399 | +must place, in the relevant source files, a statement of the | |
400 | +additional terms that apply to those files, or a notice indicating | |
401 | +where to find the applicable terms. | |
402 | + | |
403 | + Additional terms, permissive or non-permissive, may be stated in the | |
404 | +form of a separately written license, or stated as exceptions; | |
405 | +the above requirements apply either way. | |
406 | + | |
407 | + 8. Termination. | |
408 | + | |
409 | + You may not propagate or modify a covered work except as expressly | |
410 | +provided under this License. Any attempt otherwise to propagate or | |
411 | +modify it is void, and will automatically terminate your rights under | |
412 | +this License (including any patent licenses granted under the third | |
413 | +paragraph of section 11). | |
414 | + | |
415 | + However, if you cease all violation of this License, then your | |
416 | +license from a particular copyright holder is reinstated (a) | |
417 | +provisionally, unless and until the copyright holder explicitly and | |
418 | +finally terminates your license, and (b) permanently, if the copyright | |
419 | +holder fails to notify you of the violation by some reasonable means | |
420 | +prior to 60 days after the cessation. | |
421 | + | |
422 | + Moreover, your license from a particular copyright holder is | |
423 | +reinstated permanently if the copyright holder notifies you of the | |
424 | +violation by some reasonable means, this is the first time you have | |
425 | +received notice of violation of this License (for any work) from that | |
426 | +copyright holder, and you cure the violation prior to 30 days after | |
427 | +your receipt of the notice. | |
428 | + | |
429 | + Termination of your rights under this section does not terminate the | |
430 | +licenses of parties who have received copies or rights from you under | |
431 | +this License. If your rights have been terminated and not permanently | |
432 | +reinstated, you do not qualify to receive new licenses for the same | |
433 | +material under section 10. | |
434 | + | |
435 | + 9. Acceptance Not Required for Having Copies. | |
436 | + | |
437 | + You are not required to accept this License in order to receive or | |
438 | +run a copy of the Program. Ancillary propagation of a covered work | |
439 | +occurring solely as a consequence of using peer-to-peer transmission | |
440 | +to receive a copy likewise does not require acceptance. However, | |
441 | +nothing other than this License grants you permission to propagate or | |
442 | +modify any covered work. These actions infringe copyright if you do | |
443 | +not accept this License. Therefore, by modifying or propagating a | |
444 | +covered work, you indicate your acceptance of this License to do so. | |
445 | + | |
446 | + 10. Automatic Licensing of Downstream Recipients. | |
447 | + | |
448 | + Each time you convey a covered work, the recipient automatically | |
449 | +receives a license from the original licensors, to run, modify and | |
450 | +propagate that work, subject to this License. You are not responsible | |
451 | +for enforcing compliance by third parties with this License. | |
452 | + | |
453 | + An "entity transaction" is a transaction transferring control of an | |
454 | +organization, or substantially all assets of one, or subdividing an | |
455 | +organization, or merging organizations. If propagation of a covered | |
456 | +work results from an entity transaction, each party to that | |
457 | +transaction who receives a copy of the work also receives whatever | |
458 | +licenses to the work the party's predecessor in interest had or could | |
459 | +give under the previous paragraph, plus a right to possession of the | |
460 | +Corresponding Source of the work from the predecessor in interest, if | |
461 | +the predecessor has it or can get it with reasonable efforts. | |
462 | + | |
463 | + You may not impose any further restrictions on the exercise of the | |
464 | +rights granted or affirmed under this License. For example, you may | |
465 | +not impose a license fee, royalty, or other charge for exercise of | |
466 | +rights granted under this License, and you may not initiate litigation | |
467 | +(including a cross-claim or counterclaim in a lawsuit) alleging that | |
468 | +any patent claim is infringed by making, using, selling, offering for | |
469 | +sale, or importing the Program or any portion of it. | |
470 | + | |
471 | + 11. Patents. | |
472 | + | |
473 | + A "contributor" is a copyright holder who authorizes use under this | |
474 | +License of the Program or a work on which the Program is based. The | |
475 | +work thus licensed is called the contributor's "contributor version". | |
476 | + | |
477 | + A contributor's "essential patent claims" are all patent claims | |
478 | +owned or controlled by the contributor, whether already acquired or | |
479 | +hereafter acquired, that would be infringed by some manner, permitted | |
480 | +by this License, of making, using, or selling its contributor version, | |
481 | +but do not include claims that would be infringed only as a | |
482 | +consequence of further modification of the contributor version. For | |
483 | +purposes of this definition, "control" includes the right to grant | |
484 | +patent sublicenses in a manner consistent with the requirements of | |
485 | +this License. | |
486 | + | |
487 | + Each contributor grants you a non-exclusive, worldwide, royalty-free | |
488 | +patent license under the contributor's essential patent claims, to | |
489 | +make, use, sell, offer for sale, import and otherwise run, modify and | |
490 | +propagate the contents of its contributor version. | |
491 | + | |
492 | + In the following three paragraphs, a "patent license" is any express | |
493 | +agreement or commitment, however denominated, not to enforce a patent | |
494 | +(such as an express permission to practice a patent or covenant not to | |
495 | +sue for patent infringement). To "grant" such a patent license to a | |
496 | +party means to make such an agreement or commitment not to enforce a | |
497 | +patent against the party. | |
498 | + | |
499 | + If you convey a covered work, knowingly relying on a patent license, | |
500 | +and the Corresponding Source of the work is not available for anyone | |
501 | +to copy, free of charge and under the terms of this License, through a | |
502 | +publicly available network server or other readily accessible means, | |
503 | +then you must either (1) cause the Corresponding Source to be so | |
504 | +available, or (2) arrange to deprive yourself of the benefit of the | |
505 | +patent license for this particular work, or (3) arrange, in a manner | |
506 | +consistent with the requirements of this License, to extend the patent | |
507 | +license to downstream recipients. "Knowingly relying" means you have | |
508 | +actual knowledge that, but for the patent license, your conveying the | |
509 | +covered work in a country, or your recipient's use of the covered work | |
510 | +in a country, would infringe one or more identifiable patents in that | |
511 | +country that you have reason to believe are valid. | |
512 | + | |
513 | + If, pursuant to or in connection with a single transaction or | |
514 | +arrangement, you convey, or propagate by procuring conveyance of, a | |
515 | +covered work, and grant a patent license to some of the parties | |
516 | +receiving the covered work authorizing them to use, propagate, modify | |
517 | +or convey a specific copy of the covered work, then the patent license | |
518 | +you grant is automatically extended to all recipients of the covered | |
519 | +work and works based on it. | |
520 | + | |
521 | + A patent license is "discriminatory" if it does not include within | |
522 | +the scope of its coverage, prohibits the exercise of, or is | |
523 | +conditioned on the non-exercise of one or more of the rights that are | |
524 | +specifically granted under this License. You may not convey a covered | |
525 | +work if you are a party to an arrangement with a third party that is | |
526 | +in the business of distributing software, under which you make payment | |
527 | +to the third party based on the extent of your activity of conveying | |
528 | +the work, and under which the third party grants, to any of the | |
529 | +parties who would receive the covered work from you, a discriminatory | |
530 | +patent license (a) in connection with copies of the covered work | |
531 | +conveyed by you (or copies made from those copies), or (b) primarily | |
532 | +for and in connection with specific products or compilations that | |
533 | +contain the covered work, unless you entered into that arrangement, | |
534 | +or that patent license was granted, prior to 28 March 2007. | |
535 | + | |
536 | + Nothing in this License shall be construed as excluding or limiting | |
537 | +any implied license or other defenses to infringement that may | |
538 | +otherwise be available to you under applicable patent law. | |
539 | + | |
540 | + 12. No Surrender of Others' Freedom. | |
541 | + | |
542 | + If conditions are imposed on you (whether by court order, agreement or | |
543 | +otherwise) that contradict the conditions of this License, they do not | |
544 | +excuse you from the conditions of this License. If you cannot convey a | |
545 | +covered work so as to satisfy simultaneously your obligations under this | |
546 | +License and any other pertinent obligations, then as a consequence you may | |
547 | +not convey it at all. For example, if you agree to terms that obligate you | |
548 | +to collect a royalty for further conveying from those to whom you convey | |
549 | +the Program, the only way you could satisfy both those terms and this | |
550 | +License would be to refrain entirely from conveying the Program. | |
551 | + | |
552 | + 13. Use with the GNU Affero General Public License. | |
553 | + | |
554 | + Notwithstanding any other provision of this License, you have | |
555 | +permission to link or combine any covered work with a work licensed | |
556 | +under version 3 of the GNU Affero General Public License into a single | |
557 | +combined work, and to convey the resulting work. The terms of this | |
558 | +License will continue to apply to the part which is the covered work, | |
559 | +but the special requirements of the GNU Affero General Public License, | |
560 | +section 13, concerning interaction through a network will apply to the | |
561 | +combination as such. | |
562 | + | |
563 | + 14. Revised Versions of this License. | |
564 | + | |
565 | + The Free Software Foundation may publish revised and/or new versions of | |
566 | +the GNU General Public License from time to time. Such new versions will | |
567 | +be similar in spirit to the present version, but may differ in detail to | |
568 | +address new problems or concerns. | |
569 | + | |
570 | + Each version is given a distinguishing version number. If the | |
571 | +Program specifies that a certain numbered version of the GNU General | |
572 | +Public License "or any later version" applies to it, you have the | |
573 | +option of following the terms and conditions either of that numbered | |
574 | +version or of any later version published by the Free Software | |
575 | +Foundation. If the Program does not specify a version number of the | |
576 | +GNU General Public License, you may choose any version ever published | |
577 | +by the Free Software Foundation. | |
578 | + | |
579 | + If the Program specifies that a proxy can decide which future | |
580 | +versions of the GNU General Public License can be used, that proxy's | |
581 | +public statement of acceptance of a version permanently authorizes you | |
582 | +to choose that version for the Program. | |
583 | + | |
584 | + Later license versions may give you additional or different | |
585 | +permissions. However, no additional obligations are imposed on any | |
586 | +author or copyright holder as a result of your choosing to follow a | |
587 | +later version. | |
588 | + | |
589 | + 15. Disclaimer of Warranty. | |
590 | + | |
591 | + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | |
592 | +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | |
593 | +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | |
594 | +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | |
595 | +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
596 | +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | |
597 | +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | |
598 | +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | |
599 | + | |
600 | + 16. Limitation of Liability. | |
601 | + | |
602 | + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |
603 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | |
604 | +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | |
605 | +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | |
606 | +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | |
607 | +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | |
608 | +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | |
609 | +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | |
610 | +SUCH DAMAGES. | |
611 | + | |
612 | + 17. Interpretation of Sections 15 and 16. | |
613 | + | |
614 | + If the disclaimer of warranty and limitation of liability provided | |
615 | +above cannot be given local legal effect according to their terms, | |
616 | +reviewing courts shall apply local law that most closely approximates | |
617 | +an absolute waiver of all civil liability in connection with the | |
618 | +Program, unless a warranty or assumption of liability accompanies a | |
619 | +copy of the Program in return for a fee. | |
620 | + | |
621 | + END OF TERMS AND CONDITIONS | |
622 | + | |
623 | + How to Apply These Terms to Your New Programs | |
624 | + | |
625 | + If you develop a new program, and you want it to be of the greatest | |
626 | +possible use to the public, the best way to achieve this is to make it | |
627 | +free software which everyone can redistribute and change under these terms. | |
628 | + | |
629 | + To do so, attach the following notices to the program. It is safest | |
630 | +to attach them to the start of each source file to most effectively | |
631 | +state the exclusion of warranty; and each file should have at least | |
632 | +the "copyright" line and a pointer to where the full notice is found. | |
633 | + | |
634 | + <one line to give the program's name and a brief idea of what it does.> | |
635 | + Copyright (C) <year> <name of author> | |
636 | + | |
637 | + This program is free software: you can redistribute it and/or modify | |
638 | + it under the terms of the GNU General Public License as published by | |
639 | + the Free Software Foundation, either version 3 of the License, or | |
640 | + (at your option) any later version. | |
641 | + | |
642 | + This program is distributed in the hope that it will be useful, | |
643 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
644 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
645 | + GNU General Public License for more details. | |
646 | + | |
647 | + You should have received a copy of the GNU General Public License | |
648 | + along with this program. If not, see <http://www.gnu.org/licenses/>. | |
649 | + | |
650 | +Also add information on how to contact you by electronic and paper mail. | |
651 | + | |
652 | + If the program does terminal interaction, make it output a short | |
653 | +notice like this when it starts in an interactive mode: | |
654 | + | |
655 | + <program> Copyright (C) <year> <name of author> | |
656 | + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | |
657 | + This is free software, and you are welcome to redistribute it | |
658 | + under certain conditions; type `show c' for details. | |
659 | + | |
660 | +The hypothetical commands `show w' and `show c' should show the appropriate | |
661 | +parts of the General Public License. Of course, your program's commands | |
662 | +might be different; for a GUI interface, you would use an "about box". | |
663 | + | |
664 | + You should also get your employer (if you work as a programmer) or school, | |
665 | +if any, to sign a "copyright disclaimer" for the program, if necessary. | |
666 | +For more information on this, and how to apply and follow the GNU GPL, see | |
667 | +<http://www.gnu.org/licenses/>. | |
668 | + | |
669 | + The GNU General Public License does not permit incorporating your program | |
670 | +into proprietary programs. If your program is a subroutine library, you | |
671 | +may consider it more useful to permit linking proprietary applications with | |
672 | +the library. If this is what you want to do, use the GNU Lesser General | |
673 | +Public License instead of this License. But first, please read | |
674 | +<http://www.gnu.org/philosophy/why-not-lgpl.html>. | ... | ... |
export/PHPRtfLite-1.3.1/COPYING.LESSER
0 โ 100644
1 | + GNU LESSER GENERAL PUBLIC LICENSE | |
2 | + Version 3, 29 June 2007 | |
3 | + | |
4 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
5 | + Everyone is permitted to copy and distribute verbatim copies | |
6 | + of this license document, but changing it is not allowed. | |
7 | + | |
8 | + | |
9 | + This version of the GNU Lesser General Public License incorporates | |
10 | +the terms and conditions of version 3 of the GNU General Public | |
11 | +License, supplemented by the additional permissions listed below. | |
12 | + | |
13 | + 0. Additional Definitions. | |
14 | + | |
15 | + As used herein, "this License" refers to version 3 of the GNU Lesser | |
16 | +General Public License, and the "GNU GPL" refers to version 3 of the GNU | |
17 | +General Public License. | |
18 | + | |
19 | + "The Library" refers to a covered work governed by this License, | |
20 | +other than an Application or a Combined Work as defined below. | |
21 | + | |
22 | + An "Application" is any work that makes use of an interface provided | |
23 | +by the Library, but which is not otherwise based on the Library. | |
24 | +Defining a subclass of a class defined by the Library is deemed a mode | |
25 | +of using an interface provided by the Library. | |
26 | + | |
27 | + A "Combined Work" is a work produced by combining or linking an | |
28 | +Application with the Library. The particular version of the Library | |
29 | +with which the Combined Work was made is also called the "Linked | |
30 | +Version". | |
31 | + | |
32 | + The "Minimal Corresponding Source" for a Combined Work means the | |
33 | +Corresponding Source for the Combined Work, excluding any source code | |
34 | +for portions of the Combined Work that, considered in isolation, are | |
35 | +based on the Application, and not on the Linked Version. | |
36 | + | |
37 | + The "Corresponding Application Code" for a Combined Work means the | |
38 | +object code and/or source code for the Application, including any data | |
39 | +and utility programs needed for reproducing the Combined Work from the | |
40 | +Application, but excluding the System Libraries of the Combined Work. | |
41 | + | |
42 | + 1. Exception to Section 3 of the GNU GPL. | |
43 | + | |
44 | + You may convey a covered work under sections 3 and 4 of this License | |
45 | +without being bound by section 3 of the GNU GPL. | |
46 | + | |
47 | + 2. Conveying Modified Versions. | |
48 | + | |
49 | + If you modify a copy of the Library, and, in your modifications, a | |
50 | +facility refers to a function or data to be supplied by an Application | |
51 | +that uses the facility (other than as an argument passed when the | |
52 | +facility is invoked), then you may convey a copy of the modified | |
53 | +version: | |
54 | + | |
55 | + a) under this License, provided that you make a good faith effort to | |
56 | + ensure that, in the event an Application does not supply the | |
57 | + function or data, the facility still operates, and performs | |
58 | + whatever part of its purpose remains meaningful, or | |
59 | + | |
60 | + b) under the GNU GPL, with none of the additional permissions of | |
61 | + this License applicable to that copy. | |
62 | + | |
63 | + 3. Object Code Incorporating Material from Library Header Files. | |
64 | + | |
65 | + The object code form of an Application may incorporate material from | |
66 | +a header file that is part of the Library. You may convey such object | |
67 | +code under terms of your choice, provided that, if the incorporated | |
68 | +material is not limited to numerical parameters, data structure | |
69 | +layouts and accessors, or small macros, inline functions and templates | |
70 | +(ten or fewer lines in length), you do both of the following: | |
71 | + | |
72 | + a) Give prominent notice with each copy of the object code that the | |
73 | + Library is used in it and that the Library and its use are | |
74 | + covered by this License. | |
75 | + | |
76 | + b) Accompany the object code with a copy of the GNU GPL and this license | |
77 | + document. | |
78 | + | |
79 | + 4. Combined Works. | |
80 | + | |
81 | + You may convey a Combined Work under terms of your choice that, | |
82 | +taken together, effectively do not restrict modification of the | |
83 | +portions of the Library contained in the Combined Work and reverse | |
84 | +engineering for debugging such modifications, if you also do each of | |
85 | +the following: | |
86 | + | |
87 | + a) Give prominent notice with each copy of the Combined Work that | |
88 | + the Library is used in it and that the Library and its use are | |
89 | + covered by this License. | |
90 | + | |
91 | + b) Accompany the Combined Work with a copy of the GNU GPL and this license | |
92 | + document. | |
93 | + | |
94 | + c) For a Combined Work that displays copyright notices during | |
95 | + execution, include the copyright notice for the Library among | |
96 | + these notices, as well as a reference directing the user to the | |
97 | + copies of the GNU GPL and this license document. | |
98 | + | |
99 | + d) Do one of the following: | |
100 | + | |
101 | + 0) Convey the Minimal Corresponding Source under the terms of this | |
102 | + License, and the Corresponding Application Code in a form | |
103 | + suitable for, and under terms that permit, the user to | |
104 | + recombine or relink the Application with a modified version of | |
105 | + the Linked Version to produce a modified Combined Work, in the | |
106 | + manner specified by section 6 of the GNU GPL for conveying | |
107 | + Corresponding Source. | |
108 | + | |
109 | + 1) Use a suitable shared library mechanism for linking with the | |
110 | + Library. A suitable mechanism is one that (a) uses at run time | |
111 | + a copy of the Library already present on the user's computer | |
112 | + system, and (b) will operate properly with a modified version | |
113 | + of the Library that is interface-compatible with the Linked | |
114 | + Version. | |
115 | + | |
116 | + e) Provide Installation Information, but only if you would otherwise | |
117 | + be required to provide such information under section 6 of the | |
118 | + GNU GPL, and only to the extent that such information is | |
119 | + necessary to install and execute a modified version of the | |
120 | + Combined Work produced by recombining or relinking the | |
121 | + Application with a modified version of the Linked Version. (If | |
122 | + you use option 4d0, the Installation Information must accompany | |
123 | + the Minimal Corresponding Source and Corresponding Application | |
124 | + Code. If you use option 4d1, you must provide the Installation | |
125 | + Information in the manner specified by section 6 of the GNU GPL | |
126 | + for conveying Corresponding Source.) | |
127 | + | |
128 | + 5. Combined Libraries. | |
129 | + | |
130 | + You may place library facilities that are a work based on the | |
131 | +Library side by side in a single library together with other library | |
132 | +facilities that are not Applications and are not covered by this | |
133 | +License, and convey such a combined library under terms of your | |
134 | +choice, if you do both of the following: | |
135 | + | |
136 | + a) Accompany the combined library with a copy of the same work based | |
137 | + on the Library, uncombined with any other library facilities, | |
138 | + conveyed under the terms of this License. | |
139 | + | |
140 | + b) Give prominent notice with the combined library that part of it | |
141 | + is a work based on the Library, and explaining where to find the | |
142 | + accompanying uncombined form of the same work. | |
143 | + | |
144 | + 6. Revised Versions of the GNU Lesser General Public License. | |
145 | + | |
146 | + The Free Software Foundation may publish revised and/or new versions | |
147 | +of the GNU Lesser General Public License from time to time. Such new | |
148 | +versions will be similar in spirit to the present version, but may | |
149 | +differ in detail to address new problems or concerns. | |
150 | + | |
151 | + Each version is given a distinguishing version number. If the | |
152 | +Library as you received it specifies that a certain numbered version | |
153 | +of the GNU Lesser General Public License "or any later version" | |
154 | +applies to it, you have the option of following the terms and | |
155 | +conditions either of that published version or of any later version | |
156 | +published by the Free Software Foundation. If the Library as you | |
157 | +received it does not specify a version number of the GNU Lesser | |
158 | +General Public License, you may choose any version of the GNU Lesser | |
159 | +General Public License ever published by the Free Software Foundation. | |
160 | + | |
161 | + If the Library as you received it specifies that a proxy can decide | |
162 | +whether future versions of the GNU Lesser General Public License shall | |
163 | +apply, that proxy's public statement of acceptance of any version is | |
164 | +permanent authorization for you to choose that version for the | |
165 | +Library. | ... | ... |
export/PHPRtfLite-1.3.1/README.md
0 โ 100644
1 | +PHPRtfLite | |
2 | +=== | |
3 | +PHPRtfLite is an API enabling developers to create rtf documents with php. PHPRtfLite is designed on OOP principles. | |
4 | + | |
5 | +Project links | |
6 | +--- | |
7 | +* [PHPRtfLite Web Site](https://sourceforge.net/projects/phprtf/) | |
8 | +* [PHPRtfLite Documentation](http://sigma-scripts.de/phprtflite/docs/) | |
9 | + | |
10 | +Features | |
11 | +--- | |
12 | +* Paragraphs | |
13 | +* Sections | |
14 | +* Fonts | |
15 | +* Images | |
16 | +* Tables | |
17 | +* Nested Tables | |
18 | +* Footer / Header | |
19 | +* Footnotes / Endnotes | |
20 | +* UTF8 support | |
21 | +* Enumerations / Numberings | |
22 | +* Form fields (Checkbox, Dropdown, Text) | |
0 | 23 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/composer.json
0 โ 100644
1 | +{ | |
2 | + "name": "phprtflite/phprtflite", | |
3 | + "description": "PHPRtfLite is an API enabling developers to create rtf documents with php.", | |
4 | + "version": "1.3.1", | |
5 | + "license": "GPL-3.0", | |
6 | + "authors": [ | |
7 | + { | |
8 | + "name": "Steffen Zeidler", | |
9 | + "email": "sigma_z@sigma-scripts.de" | |
10 | + } | |
11 | + ], | |
12 | + "minimum-stability": "stable", | |
13 | + "require": { | |
14 | + | |
15 | + } | |
16 | +} | ... | ... |
export/PHPRtfLite-1.3.1/docs/doctrees/bug-feature.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/document-settings.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/enumerations-numberings.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/environment.pickle
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/feature-overview.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/footnotes-endnotes.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/formatting.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/formfields.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/getting-started.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/header-footer.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/images.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/index.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/intro.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/introduction.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/license.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/page-layouts.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/sections.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/styling.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/tables.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/tutorials/introducation.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/doctrees/tutorials/introduction.doctree
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/html/.buildinfo
0 โ 100644
export/PHPRtfLite-1.3.1/docs/html/_sources/bug-feature.txt
0 โ 100644
1 | +Bugs and feature requests | |
2 | +************************* | |
3 | + | |
4 | +If you find a bug or think it should work in another way, or you have a good idea to improve the library, please let me know. | |
5 | + | |
6 | +- Please submit bugs at `<http://sourceforge.net/tracker/?group_id=217109&atid=1039236>`_. | |
7 | +- Please submit feature requests at `<http://sourceforge.net/tracker/?group_id=217109&atid=1039236>`_. | |
8 | +- Please submit errors found in the documentation to: sigma_z(at)web.de | |
0 | 9 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/document-settings.txt
0 โ 100644
1 | +Document settings | |
2 | +***************** | |
3 | + | |
4 | +Page orientation | |
5 | +---------------- | |
6 | + | |
7 | +You can use between ``landscape`` and ``portrait`` (default) page orientation. | |
8 | + | |
9 | +.. code-block:: php | |
10 | + | |
11 | + <?php | |
12 | + // rtf document instance | |
13 | + $rtf = new PHPRtfLite(); | |
14 | + // landscape page orientation | |
15 | + $rtf->setLandscape(); | |
16 | + | |
17 | + | |
18 | +.. _doc-settings_page-margins: | |
19 | + | |
20 | +Page margins | |
21 | +------------ | |
22 | + | |
23 | +You can set margins for the document and for sections, too. Section margins will overwrite document margins. | |
24 | + | |
25 | +.. code-block:: php | |
26 | + | |
27 | + <?php | |
28 | + $rtf = new PHPRtfLite(); | |
29 | + // margin left: 1cm | |
30 | + $rtf->setMarginLeft(1); | |
31 | + // margin right: 2cm | |
32 | + $rtf->setMarginRight(2); | |
33 | + // margin top: 3cm | |
34 | + $rtf->setMarginTop(3); | |
35 | + // margin bottom: 4cm | |
36 | + $rtf->setMarginBottom(4); | |
37 | + | |
38 | + | |
39 | +The code example below does the same in a shorter way. | |
40 | + | |
41 | +.. code-block:: php | |
42 | + | |
43 | + <?php | |
44 | + $rtf = new PHPRtfLite(); | |
45 | + // margins: left 1cm, top 3cm, right 2cm, bottom 4cm | |
46 | + $rtf->setMargins(1, 3, 2, 4); | |
47 | + | |
48 | + | |
49 | +You can define that odd and even pages uses mirrored margins. Section margins can be mirrored, too, and will overwrite the document setting. | |
50 | + | |
51 | +.. code-block:: php | |
52 | + | |
53 | + <?php | |
54 | + $rtf = new PHPRtfLite(); | |
55 | + // margin left: 2cm | |
56 | + $rtf->setMarginLeft(2); | |
57 | + // margin right: 1cm | |
58 | + $rtf->setMarginRight(1); | |
59 | + // odd pages: left 2cm, right 1cm | |
60 | + // even pages: left 1cm, right 2cm | |
61 | + $rtf->setMirrorMarings(); | |
62 | + | |
63 | +.. _doc-settings_page-size: | |
64 | + | |
65 | +Page size | |
66 | +--------- | |
67 | + | |
68 | +The paper width and height can be set for sections, too, which will overwrite the document settings. | |
69 | + | |
70 | +.. code-block:: php | |
71 | + | |
72 | + <?php | |
73 | + $rtf = new PHPRtfLite(); | |
74 | + $rtf->setPaperWidth(14); // in cm | |
75 | + $rtf->setPaperHeight(25); // in cm | |
76 | + | |
77 | + | |
78 | +Units in RTF | |
79 | +========================== | |
80 | + | |
81 | +RTF uses TWIP ("TWentieth of an Inch Point" - 1/20 Point = 1/1440 Inch) [#f1]_ as internal unit. PHPRtfLite uses centimeter as default unit for all measuring unit inputs. | |
82 | + | |
83 | +.. code-block:: php | |
84 | + | |
85 | + <?php | |
86 | + PHPRtfLite_Unit::setGlobalUnit(PHPRtfLite_Unit::UNIT_CM); // inputs used as centimeters | |
87 | + PHPRtfLite_Unit::setGlobalUnit(PHPRtfLite_Unit::UNIT_INCH); // inputs used as inches | |
88 | + PHPRtfLite_Unit::setGlobalUnit(PHPRtfLite_Unit::UNIT_POINT); // inputs used as points | |
89 | + | |
90 | + | |
91 | +.. [#f1] `<http://en.wikipedia.org/wiki/Twip>`_ | |
92 | + | |
93 | + | |
94 | +Character set (text input) | |
95 | +========================== | |
96 | + | |
97 | +.. code-block:: php | |
98 | + | |
99 | + <?php | |
100 | + $rtf = new PHPRtfLite(); | |
101 | + $rtf->setCharset('Latin1'); // use Latin1 instead of UTF-8 | |
102 | + | |
103 | + | |
104 | +Hyphenation | |
105 | +===================== | |
106 | + | |
107 | +.. code-block:: php | |
108 | + | |
109 | + <?php | |
110 | + $rtf = new PHPRtfLite(); | |
111 | + $rtf->setHyphenation(); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/enumerations-numberings.txt
0 โ 100644
1 | +Enumerations / Numberings | |
2 | +************************* | |
3 | + | |
4 | +Enumerations and numberings can be added to table cells and sections. They can be nested. | |
5 | + | |
6 | + | |
7 | +Enumerations | |
8 | +============= | |
9 | + | |
10 | +Enumeration example: | |
11 | + | |
12 | +.. code-block:: php | |
13 | + | |
14 | + <?php | |
15 | + // first level enumeration | |
16 | + $enum = new PHPRtfLite_List_Enumeration($rtf); | |
17 | + $enum->addItem('hello world'); | |
18 | + $enum->addItem('foo'); | |
19 | + $enum->addItem('bar'); | |
20 | + // second level enumeration | |
21 | + $subEnum = new PHPRtfLite_List_Enumeration($rtf); | |
22 | + $subEnum->addItem('hello world'); | |
23 | + $subEnum->addItem('foo'); | |
24 | + $subEnum->addItem('bar'); | |
25 | + $enum->addList($subEnum); | |
26 | + | |
27 | + $section = $rtf->addSection(); | |
28 | + // add enumeration to a section | |
29 | + $section->addList($enum); | |
30 | + | |
31 | + | |
32 | +For enumerations the following types are supported: | |
33 | + | |
34 | +- TYPE_BULLET uses bullets as enumeration characters (default) | |
35 | +- TYPE_ARROW uses arrows as enumeration characters | |
36 | +- TYPE_CIRCLE uses circles as enumeration characters | |
37 | +- TYPE_SQUARE uses squares as enumeration characters | |
38 | +- TYPE_DIAMOND uses diamonds as enumeration characters | |
39 | + | |
40 | +The bullet character are the default character for enumerations. | |
41 | + | |
42 | + | |
43 | +Numberings | |
44 | +============= | |
45 | + | |
46 | +Numbering example: | |
47 | + | |
48 | +.. code-block:: php | |
49 | + | |
50 | + <?php | |
51 | + // first level numbering | |
52 | + $numList = new PHPRtfLite_List_Numbering($rtf); | |
53 | + $numList->addItem('hello world'); | |
54 | + $numList->addItem('foo'); | |
55 | + $numList->addItem('bar'); | |
56 | + | |
57 | + // second level numbering | |
58 | + $subNumList = new PHPRtfLite_List_Numbering($rtf); | |
59 | + $subNumList->addItem('hello world'); | |
60 | + $subNumList->addItem('foo'); | |
61 | + $subNumList->addItem('bar'); | |
62 | + $numList->addList($subNumList); | |
63 | + // add item in the first level | |
64 | + $numList->addItem('foobar'); | |
65 | + | |
66 | + $section = $rtf->addSection(); | |
67 | + // add numbering to a section | |
68 | + $section->addList($numList); | |
69 | + | |
70 | + | |
71 | +For numberings the following types are supported: | |
72 | + | |
73 | +- TYPE_ARABIC_NUM counting in arabic numbers (default) | |
74 | +- TYPE_ALPHA_UPPER counting in alphanumeric characters in upper case | |
75 | +- TYPE_ALPHA_LOWER counting in alphanumeric characters in lower case | |
76 | +- TYPE_ROMAN_UPPER counting in roman characters in upper case | |
77 | +- TYPE_ROMAN_LOWER counting in roman characters in lower case | |
78 | + | |
79 | +Arabic numbering is the default type. | |
0 | 80 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/feature-overview.txt
0 โ 100644
1 | +Feature overview | |
2 | +**************** | |
3 | + | |
4 | +These are the main features PHPRtfLite offers: | |
5 | + | |
6 | +- Table support (even nested) | |
7 | +- Image support | |
8 | +- Header/Footer | |
9 | +- Hyperlinks | |
10 | +- Footnotes/Endnotes | |
11 | +- Form fields (Checkbox, Dropdown, Text) | |
12 | +- Enumerations/Numberings | |
13 | +- UTF-8 support | |
14 | + | |
0 | 15 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/footnotes-endnotes.txt
0 โ 100644
1 | +Footnotes / Endnotes | |
2 | +********************* | |
3 | + | |
4 | +The difference between foot- and endnotes is that footnotes appear directly after the section where they are defined while endnotes appear at the page bottom. There is no difference in the handling. They can be defined for tables cells and sections. | |
5 | + | |
6 | +Foot note example: | |
7 | + | |
8 | +.. code-block:: php | |
9 | + | |
10 | + <?php | |
11 | + $section->writeText('Text ...'); | |
12 | + $section->addFootnote('This is the footnote text'); | |
13 | + $section->writeText('Text after footnote mark ...'); | |
0 | 14 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/formatting.txt
0 โ 100644
1 | +Formatting | |
2 | +*************** | |
3 | + | |
4 | +Fonts | |
5 | +--------------- | |
6 | + | |
7 | +Size, Font family, Font color, Background color | |
8 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
9 | + | |
10 | +To format text, you can use the ``PHPRtfLite_Font``. | |
11 | + | |
12 | +Example sets size to 12pt, font family to Arial, font color to red, and background color to blue: | |
13 | + | |
14 | +.. code-block:: php | |
15 | + | |
16 | + <?php | |
17 | + // some bootstraping here | |
18 | + | |
19 | + $section = $rtf->addSection(); | |
20 | + $font = new PHPRtfLite_Font(12, 'Arial', '#FF0000', '#0000FF'); | |
21 | + $section->writeText('Lorem ipsum', $font); | |
22 | + | |
23 | + | |
24 | +Text formatting | |
25 | +~~~~~~~~~~~~~~~ | |
26 | + | |
27 | +.. code-block:: php | |
28 | + | |
29 | + <?php | |
30 | + // some bootstraping here | |
31 | + | |
32 | + $section = $rtf->addSection(); | |
33 | + $font = new PHPRtfLite_Font(); | |
34 | + $font->setBold(); // bold font | |
35 | + $font->setItalic(); // italic font | |
36 | + $font->setUnderline(); // underline font | |
37 | + $font->setStriked(); // strike text | |
38 | + $font->setDoubleStriked(); // double strike text | |
39 | + $section->writeText('Lorem ipsum', $font); | |
40 | + | |
41 | + | |
42 | +HTML-Tags as text formatting | |
43 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
44 | + | |
45 | +You can use HTML-Tags in your text to format text: | |
46 | + | |
47 | +.. code-block:: php | |
48 | + | |
49 | + <?php | |
50 | + // some bootstraping here | |
51 | + | |
52 | + $section = $rtf->addSection(); | |
53 | + | |
54 | + // text will be displayed as bold | |
55 | + $section->writeText('<strong>text</strong>'); | |
56 | + $section->writeText('<b>text</b>'); | |
57 | + | |
58 | + // text will be displayed as italic | |
59 | + $section->writeText('<em>text</em>'); | |
60 | + $section->writeText('<i>text</i>'); | |
61 | + | |
62 | + // text will be displayed as underlined | |
63 | + $section->writeText('<u>text</u>'); | |
64 | + | |
65 | + // text will start with a bullet | |
66 | + $section->writeText('<bullet> text'); | |
67 | + | |
68 | + // text will have a line break after | |
69 | + $section->writeText('text<br>'); | |
70 | + | |
71 | + // text will have a horizontal rule after | |
72 | + $section->writeText('text<hr>'); | |
73 | + | |
74 | + // tabulator will be displayed between text | |
75 | + $section->writeText('text<tab>text'); | |
76 | + | |
77 | + // will display section number before "hello world" | |
78 | + $section->writeText('<sectnum> hello world'); | |
79 | + | |
80 | + // will display page number before "hello world" | |
81 | + $section->writeText('<pagenum> hello world'); | |
82 | + | |
83 | + | |
84 | +Text animation | |
85 | +~~~~~~~~~~~~~~ | |
86 | + | |
87 | +Class constants for text animation: | |
88 | + | |
89 | +- ``ANIMATE_LAS_VEGAS_LIGHTS`` | |
90 | +- ``ANIMATE_BLINKING_BACKGROUND`` | |
91 | +- ``ANIMATE_SPARKLE_TEXT`` | |
92 | +- ``ANIMATE_MARCHING_BLACK_ANTS`` | |
93 | +- ``ANIMATE_MARCHING_RED_ANTS`` | |
94 | +- ``ANIMATE_SHIMMER`` | |
95 | + | |
96 | +.. code-block:: php | |
97 | + | |
98 | + <?php | |
99 | + // some bootstraping here | |
100 | + | |
101 | + $section = $rtf->addSection(); | |
102 | + $font = new PHPRtfLite_Font(); | |
103 | + // text with marching black ants around | |
104 | + $font->setAnimation(PHPRtfLite_Font::ANIMATE_MARCHING_BLACK_ANTS); | |
105 | + $section->writeText('Lorem ipsum', $font); | |
106 | + | |
107 | + | |
108 | +Paragraph formatting | |
109 | +-------------------- | |
110 | + | |
111 | +Text alignment | |
112 | +~~~~~~~~~~~~~~~~~~~~ | |
113 | + | |
114 | +Class constants for text alignment: | |
115 | + | |
116 | +- ``TEXT_ALIGN_LEFT`` | |
117 | +- ``TEXT_ALIGN_RIGHT`` | |
118 | +- ``TEXT_ALIGN_CENTER`` | |
119 | +- ``TEXT_ALIGN_JUSTIFY`` | |
120 | + | |
121 | +.. code-block:: php | |
122 | + | |
123 | + <?php | |
124 | + // some bootstraping here | |
125 | + | |
126 | + $section = $rtf->addSection(); | |
127 | + // centered text | |
128 | + $parFormat = new PHPRtfLite_ParFormat(PHPRtfLite_ParFormat::TEXT_ALIGN_CENTER); | |
129 | + $section->writeText('Lorem ipsum', null, $parFormat); | |
130 | + | |
131 | + | |
132 | +Paragraph indention | |
133 | +~~~~~~~~~~~~~~~~~~~~ | |
134 | + | |
135 | +First line indention: | |
136 | + | |
137 | +.. code-block:: php | |
138 | + | |
139 | + <?php | |
140 | + // some bootstraping here | |
141 | + | |
142 | + $section = $rtf->addSection(); | |
143 | + $parFormat = new PHPRtfLite_ParFormat(); | |
144 | + // first line of paragraph will be indented by 1cm | |
145 | + $parFormat->setIndentFirstLine(1); | |
146 | + $section->writeText('Lorem ipsum', null, $parFormat); | |
147 | + | |
148 | + | |
149 | +Indent the whole paragraph left or/and right: | |
150 | + | |
151 | +.. code-block:: php | |
152 | + | |
153 | + <?php | |
154 | + // some bootstraping here | |
155 | + $parFormat = new PHPRtfLite_ParFormat(); | |
156 | + // paragraph will be indented by 1cm from the left and right | |
157 | + $parFormat->setIndentLeft(1); | |
158 | + $parFormat->setIndentRight(1); | |
159 | + | |
160 | + | |
161 | +Space between paragraphs | |
162 | +~~~~~~~~~~~~~~~~~~~~~~~~~ | |
163 | + | |
164 | +.. code-block:: php | |
165 | + | |
166 | + <?php | |
167 | + // some bootstraping here | |
168 | + $parFormat = new PHPRtfLite_ParFormat(); | |
169 | + // spaces in lines after the paragraph | |
170 | + $parFormat->setSpaceAfter(1); | |
171 | + // spaces in lines before the paragraph | |
172 | + $parFormat->setSpaceBefore(1); | |
173 | + | |
174 | + | |
175 | +Space between lines | |
176 | +~~~~~~~~~~~~~~~~~~~~~~~~~ | |
177 | + | |
178 | +.. code-block:: php | |
179 | + | |
180 | + <?php | |
181 | + // some bootstraping here | |
182 | + $parFormat = new PHPRtfLite_ParFormat(); | |
183 | + // spaces between lines | |
184 | + $parFormat->setSpaceBetweenLines(1); | |
185 | + | |
186 | + | |
187 | +Background color | |
188 | +~~~~~~~~~~~~~~~~~~~~~~~~ | |
189 | + | |
190 | +Paragraph background color: | |
191 | + | |
192 | +.. code-block:: php | |
193 | + | |
194 | + <?php | |
195 | + // some bootstraping here | |
196 | + $parFormat = new PHPRtfLite_ParFormat(); | |
197 | + $parFormat->setBackgroundColor('#FF0000'); | |
198 | + | |
199 | + | |
200 | +.. _borders: | |
201 | + | |
202 | +Borders | |
203 | +~~~~~~~~~~~~~~~~ | |
204 | + | |
205 | +.. code-block:: php | |
206 | + | |
207 | + <?php | |
208 | + // some bootstraping here | |
209 | + | |
210 | + $border = new PHPRtfLite_Border( | |
211 | + $rtf, // PHPRtfLite instance | |
212 | + new PHPRtfLite_Border_Format(2, '#00FF00'), // left border: 2pt, green color | |
213 | + new PHPRtfLite_Border_Format(1, '#FFFF00'), // top border: 1pt, yellow color | |
214 | + new PHPRtfLite_Border_Format(2, '#FF0000'), // right border: 2pt, red color | |
215 | + new PHPRtfLite_Border_Format(1, '#0000FF') // bottom border: 1pt, blue color | |
216 | + ); | |
217 | + $parFormat = new PHPRtfLite_ParFormat(); | |
218 | + $parFormat->setBorder($border); | |
219 | + | |
220 | + | |
221 | +There are some alternative ways to create borders: | |
222 | + | |
223 | +.. code-block:: php | |
224 | + | |
225 | + <?php | |
226 | + // some bootstraping here | |
227 | + | |
228 | + // creating border in a different way: 1pt dotted red border with 0.5cm space | |
229 | + $border = PHPRtfLite_Border::create($rtf, 1, '#FF3333', PHPRtfLite_Border_Format::TYPE_DOT, 0.5); | |
230 | + | |
231 | + | |
232 | +.. code-block:: php | |
233 | + | |
234 | + <?php | |
235 | + // some bootstraping here | |
236 | + | |
237 | + // creating border in a different way: 1pt dotted red border | |
238 | + $border = new PHPRtfLite_Border($rtf); | |
239 | + // 2pt border in green color | |
240 | + $border->setBorders(new PHPRtfLite_Border_Format(2, '#00FF00')); | |
241 | + | |
242 | + | |
243 | +Border style types | |
244 | +^^^^^^^^^^^^^^^^^^ | |
245 | + | |
246 | +Border style types represented as class constants of ``PHPRtfLite_Border_Format`` are: | |
247 | + | |
248 | +- ``TYPE_SINGLE`` | |
249 | +- ``TYPE_DOT`` | |
250 | +- ``TYPE_DASH`` | |
251 | +- ``TYPE_DOTDASH`` | |
0 | 252 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/formfields.txt
0 โ 100644
1 | +Form fields | |
2 | +************* | |
3 | + | |
4 | +Form fields can be used in cells and sections. The supported form fields in PHPRtfLite are | |
5 | + | |
6 | +- Checkboxes | |
7 | +- Dropdown boxes and | |
8 | +- Text fields | |
9 | + | |
10 | + | |
11 | +Checkbox | |
12 | +============= | |
13 | + | |
14 | +Checkbox example: | |
15 | + | |
16 | +.. code-block:: php | |
17 | + | |
18 | + <?php | |
19 | + $checkbox = $cell->addCheckbox(); | |
20 | + // checkbox is checked | |
21 | + $checkbox->setChecked(); | |
22 | + $cell->writeText('checkbox label'); | |
23 | + | |
24 | + | |
25 | +Dropdown | |
26 | +============= | |
27 | + | |
28 | +Dropdown box example: | |
29 | + | |
30 | +.. code-block:: php | |
31 | + | |
32 | + <?php | |
33 | + $cell->writeText('dropdown label'); | |
34 | + $dropdown = $cell->addDropdown(); | |
35 | + // set dropdown items | |
36 | + $dropdown->setItems(array('pear', 'apple', 'pineapple')); | |
37 | + // add dropdown item | |
38 | + $dropdown->addItem('orange'); | |
39 | + | |
40 | + | |
41 | +Text field | |
42 | +============= | |
43 | + | |
44 | +Text field example: | |
45 | + | |
46 | +.. code-block:: php | |
47 | + | |
48 | + <?php | |
49 | + $cell->writeText('text field label'); | |
50 | + $textField = $cell->addTextField(); | |
51 | + // set text field text | |
52 | + $textField->setDefaultValue('Lorem ipsum'); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/getting-started.txt
0 โ 100644
1 | +Getting started | |
2 | +*************** | |
3 | + | |
4 | +Autoloading | |
5 | +=============== | |
6 | + | |
7 | +You can choose if you want to use the PHPRtfLite autoloader or handle loading PHPRtfLite classes on your own. In most cases you are already using a class loading strategy and just need to add PHPRtfLite to it, which is recommended. For a quick start you may use the shipped PHPRtfLite autoloader. | |
8 | + | |
9 | +.. code-block:: php | |
10 | + | |
11 | + <?php | |
12 | + require_once '/path/to/your/library/PHPRtfLite.php'; | |
13 | + | |
14 | + // registers PHPRtfLite autoloader (spl) | |
15 | + PHPRtfLite::registerAutoloader(); | |
16 | + // rtf document instance | |
17 | + $rtf = new PHPRtfLite(); | |
18 | + | |
19 | + | |
20 | +Hello world example | |
21 | +=================== | |
22 | + | |
23 | +This is a short "Hello world" example: | |
24 | + | |
25 | +.. code-block:: php | |
26 | + | |
27 | + <?php | |
28 | + // rtf document instance | |
29 | + $rtf = new PHPRtfLite(); | |
30 | + // add section | |
31 | + $sect = $rtf->addSection(); | |
32 | + // write text | |
33 | + $sect->writeText('Hello world!', new PHPRtfLite_Font(), new PHPRtfLite_ParFormat()); | |
34 | + | |
35 | + // save rtf document to hello_world.rtf | |
36 | + $rtf->save('hello_world.rtf'); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/header-footer.txt
0 โ 100644
1 | +.. _header-footer: | |
2 | + | |
3 | +Headers and footers | |
4 | +******************** | |
5 | + | |
6 | +Headers and footers can be defined for the RTF document. When sections are used, headers and footers must be defined through the sections, otherwise the headers and footers must be defined through the PHPRtfLite instance. | |
7 | + | |
8 | +Header / footer types: | |
9 | + | |
10 | +- TYPE_ALL (default) | |
11 | +- TYPE_LEFT | |
12 | +- TYPE_RIGHT | |
13 | +- TYPE_FIRST | |
14 | + | |
15 | + | |
16 | +TYPE_ALL | |
17 | +========= | |
18 | + | |
19 | +Example for setting the header and footer of the RTF document: | |
20 | + | |
21 | +.. code-block:: php | |
22 | + | |
23 | + <?php | |
24 | + // rtf document instance | |
25 | + $rtf = new PHPRtfLite(); | |
26 | + // add section | |
27 | + $section = $rtf->addSection(); | |
28 | + // add header | |
29 | + $header = $section->addHeader(); | |
30 | + $header->writeText('header text'); | |
31 | + // add footer | |
32 | + $footer = $section->addFooter(); | |
33 | + $footer->writeText('footer text'); | |
34 | + | |
35 | +By default headers and footers are displayed for all pages. | |
36 | + | |
37 | + | |
38 | +TYPE_LEFT and TYPE_RIGHT | |
39 | +======================== | |
40 | + | |
41 | +To define different headers for odd and even pages, the RTF document must be set to use different headers/footers for odd and even pages: | |
42 | + | |
43 | +.. code-block:: php | |
44 | + | |
45 | + <?php | |
46 | + // rtf document instance | |
47 | + $rtf = new PHPRtfLite(); | |
48 | + // use different headers and footers for odd and even pages | |
49 | + $rtf->setOddEvenDifferent(); | |
50 | + // section | |
51 | + $section = $rtf->addSection(); | |
52 | + // add left header | |
53 | + $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_LEFT); | |
54 | + $header->writeText('left header'); | |
55 | + // add right header | |
56 | + $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_RIGHT); | |
57 | + $header->writeText('right header'); | |
58 | + | |
59 | + | |
60 | +TYPE_FIRST | |
61 | +=================== | |
62 | + | |
63 | +If you want to specify, that the header or the footer should only appear on the first page, use can use the type TYPE_FIRST: | |
64 | + | |
65 | +.. code-block:: php | |
66 | + | |
67 | + <?php | |
68 | + // rtf document instance | |
69 | + $rtf = new PHPRtfLite(); | |
70 | + // section | |
71 | + $section = $rtf->addSection(); | |
72 | + // add header only for the first page | |
73 | + $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_FIRST); | |
74 | + $header->writeText('this header should only appear on the first page'); | |
75 | + | |
76 | + | |
77 | + | |
78 | + | |
79 | +Tables and images in headers / footers | |
80 | +====================================== | |
81 | + | |
82 | +Of course you can use tables and images in headers and footers: | |
83 | + | |
84 | +.. code-block:: php | |
85 | + | |
86 | + <?php | |
87 | + // rtf document instance | |
88 | + $rtf = new PHPRtfLite(); | |
89 | + // section | |
90 | + $section = $rtf->addSection(); | |
91 | + // add header | |
92 | + $header = $section->addHeader(); | |
93 | + // add table | |
94 | + $table = $header->addTable(); | |
95 | + $table->addRows(1); | |
96 | + $table->addColumnsList(array(2, 2, 2)); | |
97 | + // add image to table in header | |
98 | + $image = $table->addImageToCell(1, 1, '/path/to/image/file'); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/images.txt
0 โ 100644
1 | +.. _images: | |
2 | + | |
3 | +Images | |
4 | +******************** | |
5 | + | |
6 | +In PHPRtfLite you can add images to headers and footers, to table cells, and sections. | |
7 | + | |
8 | + | |
9 | +Image resize | |
10 | +==================== | |
11 | + | |
12 | +You can specify the width and the height of the image in the RTF document. Note, that adding large images will cause large RTF documents, even if the images is scaled down by RTF. | |
13 | + | |
14 | +.. code-block:: php | |
15 | + | |
16 | + <?php | |
17 | + $imageFile = '/path/to/image/file'; | |
18 | + $image = $section->addImage($imageFile); | |
19 | + // width to 1cm | |
20 | + $image->setWidth(1); | |
21 | + // height to 1cm | |
22 | + $image->setHeight(1); | |
23 | + | |
24 | + | |
25 | +Image border | |
26 | +==================== | |
27 | + | |
28 | +.. code-block:: php | |
29 | + | |
30 | + <?php | |
31 | + $border = new PHPRtfLite_Border( | |
32 | + $rtf, // PHPRtfLite instance | |
33 | + new PHPRtfLite_Border_Format(2, '#00FF00'), // left border: 2pt, green color | |
34 | + new PHPRtfLite_Border_Format(1, '#FFFF00'), // top border: 1pt, yellow color | |
35 | + new PHPRtfLite_Border_Format(2, '#FF0000'), // right border: 2pt, red color | |
36 | + new PHPRtfLite_Border_Format(1, '#0000FF') // bottom border: 1pt, blue color | |
37 | + ); | |
38 | + // image with border | |
39 | + $image->setBorder($border); | |
40 | + | |
41 | +Read more about creating borders here: :ref:`borders`. | |
0 | 42 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/index.txt
0 โ 100644
1 | +.. PHPRtfLite documentation master file, created by | |
2 | + sphinx-quickstart on Fri Feb 25 23:24:57 2011. | |
3 | + You can adapt this file completely to your liking, but it should at least | |
4 | + contain the root `toctree` directive. | |
5 | + | |
6 | +Welcome to PHPRtfLite's documentation | |
7 | +======================================== | |
8 | + | |
9 | +.. toctree:: | |
10 | + | |
11 | + introduction | |
12 | + feature-overview | |
13 | + getting-started | |
14 | + document-settings | |
15 | + sections | |
16 | + formatting | |
17 | + tables | |
18 | + images | |
19 | + header-footer | |
20 | + enumerations-numberings | |
21 | + footnotes-endnotes | |
22 | + formfields | |
23 | + bug-feature | |
24 | + license | |
0 | 25 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/intro.txt
0 โ 100644
export/PHPRtfLite-1.3.1/docs/html/_sources/introduction.txt
0 โ 100644
1 | +Introduction | |
2 | +************ | |
3 | + | |
4 | +PHPRtfLite is a RTF (Rich-Text-Format) writer written in PHP. | |
5 | + | |
6 | +RTF specification was defined by Microsoft(c). There are many text editors, that can interpret rtf code, but as it is specified by Microsoft Microsoft Word is (afaik) the only one with full support. For example OpenOffice.org Writer does not support nested tables. | |
7 | + | |
8 | +The samples files (provided in the release) were tested: | |
9 | + | |
10 | +- OpenOffice 3 Writer (does not support much) | |
11 | +- SoftMaker TextMaker Viewer 2010 rev577 (full support for all features in PHPRtfLite) | |
12 | +- Microsoft Word 2003 (full support for all features in PHPRtfLite) | |
13 | + | |
14 | +The project home is on sourceforge.net: `<https://sourceforge.net/projects/phprtf>`_ | |
15 | + | |
16 | + | |
17 | +Requirements | |
18 | +============ | |
19 | + | |
20 | +PHPRtfLite requires a minimum of PHP 5.0. | |
21 | + | |
22 | +When working with character sets different than UTF-8, the iconv extension needs to be activated. | |
23 | + | |
24 | + | |
25 | +Installation | |
26 | +============ | |
27 | + | |
28 | +To use PHPRtfLite use can download the sources from sourceforge.net or use the svn repository. | |
29 | + | |
30 | + | |
31 | +Download | |
32 | +------------ | |
33 | + | |
34 | +The download is available on sourceforge.net: | |
35 | + | |
36 | +- `Download page for PHPRtfLite 1.1 <http://sourceforge.net/projects/phprtf/files/phprtflite/phprtflite-1.1>`_ | |
37 | + | |
38 | + | |
39 | +SVN | |
40 | +------------ | |
41 | + | |
42 | +Installation via SVN repository: | |
43 | + | |
44 | +*PHPRtfLite 1.1 Branch* | |
45 | + | |
46 | +.. code-block:: bash | |
47 | + | |
48 | + $ svn co https://phprtf.svn.sourceforge.net/svnroot/phprtf/branches/1.1 | |
49 | + | |
50 | +*PHPRtfLite Trunk* | |
51 | + | |
52 | +.. code-block:: bash | |
53 | + | |
54 | + $ svn co https://phprtf.svn.sourceforge.net/svnroot/phprtf/trunk | |
55 | + | |
56 | + | |
57 | +Disclaimer | |
58 | +============= | |
59 | + | |
60 | +This is the PHPRftLite documentation. It shows how to use PHPRtfLite and gives a quick overview about the main concepts. Note, that not every functionality is documentated in full details. Please refer to the source code. | |
0 | 61 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/license.txt
0 โ 100644
1 | +License | |
2 | +***************** | |
3 | + | |
4 | +PHPRtfLite is released under GNU Lesser General Public License. | |
5 | + | |
6 | +PHPRtfLite is free software: you can redistribute it and/or modify | |
7 | +it under the terms of the GNU Lesser General Public License as published by | |
8 | +the Free Software Foundation, either version 3 of the License, or | |
9 | +(at your option) any later version. | |
10 | + | |
11 | +PHPRtfLite is distributed in the hope that it will be useful, | |
12 | +but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | +GNU Lesser General Public License for more details. | |
15 | + | |
16 | +See also `<http://www.gnu.org/licenses/lgpl.html>`_ | |
0 | 17 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/page-layouts.txt
0 โ 100644
1 | +Page settings | |
2 | +**************** | |
3 | + | |
4 | +Page layout | |
5 | +=========== | |
6 | + | |
7 | +Page orientation | |
8 | +---------------- | |
9 | + | |
10 | +You can use between ``landscape`` and ``portrait`` (default) page orientation. | |
11 | + | |
12 | +.. code-block:: php | |
13 | + | |
14 | + <?php | |
15 | + // rtf document instance | |
16 | + $rtf = new PHPRtfLite(); | |
17 | + // landscape page orientation | |
18 | + $rtf->setLandscape(); | |
19 | + | |
20 | + | |
21 | +Page margins | |
22 | +------------ | |
23 | + | |
24 | +You can set margins for the document and for sections, too. Section margins will overwrite document margins. | |
25 | + | |
26 | +.. code-block:: php | |
27 | + | |
28 | + <?php | |
29 | + $rtf = new PHPRtfLite(); | |
30 | + // margin left: 1cm | |
31 | + $rtf->setMarginLeft(1); | |
32 | + // margin right: 2cm | |
33 | + $rtf->setMarginRight(2); | |
34 | + // margin top: 3cm | |
35 | + $rtf->setMarginTop(3); | |
36 | + // margin bottom: 4cm | |
37 | + $rtf->setMarginBottom(4); | |
38 | + | |
39 | + | |
40 | +The code example below does the same in a shorter way. | |
41 | + | |
42 | +.. code-block:: php | |
43 | + | |
44 | + <?php | |
45 | + $rtf = new PHPRtfLite(); | |
46 | + // margins: left 1cm, top 3cm, right 2cm, bottom 4cm | |
47 | + $rtf->setMargins(1, 3, 2, 4); | |
48 | + | |
49 | + | |
50 | +You can define that odd and even pages uses mirrored margins. | |
51 | + | |
52 | +.. code-block:: php | |
53 | + | |
54 | + <?php | |
55 | + $rtf = new PHPRtfLite(); | |
56 | + // margin left: 2cm | |
57 | + $rtf->setMarginLeft(2); | |
58 | + // margin right: 1cm | |
59 | + $rtf->setMarginRight(1); | |
60 | + // odd pages: left 2cm, right 1 cm | |
61 | + // even pages: left 1cm, right 2 cm | |
62 | + $rtf->setMirrorMarings(); | |
63 | + | |
64 | + | |
65 | +Page width / page height | |
66 | +------------------------ | |
67 | + | |
68 | +.. code-block:: php | |
69 | + | |
70 | + <?php | |
71 | + $rtf = new PHPRtfLite(); | |
72 | + $rtf->setPageWidth(14); // in cm | |
73 | + $rtf->setPageHeight(25); // in cm | |
74 | + | |
75 | + | |
76 | +Character set (text input) | |
77 | +========================== | |
78 | + | |
79 | +.. code-block:: php | |
80 | + | |
81 | + <?php | |
82 | + $rtf = new PHPRtfLite(); | |
83 | + $rtf->setCharset('Latin1'); // use Latin1 instead of UTF-8 | |
84 | + | |
85 | + | |
86 | +Hyphenation | |
87 | +===================== | |
88 | + | |
89 | +.. code-block:: php | |
90 | + | |
91 | + <?php | |
92 | + $rtf = new PHPRtfLite(); | |
93 | + $rtf->setHyphenation(); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/sections.txt
0 โ 100644
1 | +Sections | |
2 | +************ | |
3 | + | |
4 | +Sections margins and paper width and height can be specified in the same way like for the RTF document. Sections margin and paper width/height will overwrite RTF document margins and paper width/heigth. | |
5 | + | |
6 | +.. note:: | |
7 | + | |
8 | + See *Document settings* > :ref:`doc-settings_page-margins` and *Document settings* > :ref:`doc-settings_page-size`. | |
9 | + | |
10 | + | |
11 | +Section columns | |
12 | +=============== | |
13 | + | |
14 | +Section text can be spreaded over columns (all having the same width): | |
15 | + | |
16 | +.. code-block:: php | |
17 | + | |
18 | + <?php | |
19 | + // some bootstraping here | |
20 | + | |
21 | + $section = $rtf->addSection(); | |
22 | + // text will spreaded over 3 columns | |
23 | + $section->setNumberOfColumns(3); | |
24 | + | |
25 | + | |
26 | +Another way to define section columns with particular column widths: | |
27 | + | |
28 | +.. code-block:: php | |
29 | + | |
30 | + <?php | |
31 | + // some bootstraping here | |
32 | + | |
33 | + $section = $rtf->addSection(); | |
34 | + // text will spreaded over 3 columns (widths are: 1cm, 2cm, and 3cm) | |
35 | + $section->setColumnWidths(array(1, 2, 3)); | |
36 | + | |
37 | + | |
38 | +Separate your section columns with a line, if you like to: | |
39 | + | |
40 | +.. code-block:: php | |
41 | + | |
42 | + <?php | |
43 | + // some bootstraping here | |
44 | + | |
45 | + $section = $rtf->addSection(); | |
46 | + // text will spreaded over 3 columns (widths are: 1cm, 2cm, and 3cm) | |
47 | + $section->setColumnWidths(array(1, 2, 3)); | |
48 | + // line between section columns | |
49 | + $section->setLineBetweenColumns(); | |
50 | + $section->writeText('Lorem ipsum'); | |
51 | + | |
52 | + | |
53 | +There is also the posibility to add space between the columns: | |
54 | + | |
55 | +.. code-block:: php | |
56 | + | |
57 | + <?php | |
58 | + // some bootstraping here | |
59 | + | |
60 | + $section = $rtf->addSection(); | |
61 | + // text will spreaded over 3 columns (widths are: 1cm, 2cm, and 3cm) | |
62 | + $section->setColumnWidths(array(1, 2, 3)); | |
63 | + // 0.2cm of space between section columns | |
64 | + $section->setSpaceBetweenColumns(0.2); | |
65 | + $section->writeText('Lorem ipsum'); | |
66 | + | |
67 | + | |
68 | +Page breaks | |
69 | +================ | |
70 | + | |
71 | +Explizit page break: | |
72 | + | |
73 | +.. code-block:: php | |
74 | + | |
75 | + <?php | |
76 | + // some bootstraping here | |
77 | + | |
78 | + $section = $rtf->addSection(); | |
79 | + $section->writeText('Lorem ipsum'); | |
80 | + // insert a page break | |
81 | + $section->insertPageBreak(); | |
82 | + $section->writeText('Text on the next page'); | |
83 | + | |
84 | + | |
85 | +To prevent a page break, if possible, you can do the following: | |
86 | + | |
87 | +.. code-block:: php | |
88 | + | |
89 | + <?php | |
90 | + // some bootstraping here | |
91 | + | |
92 | + $section = $rtf->addSection(); | |
93 | + $section->writeText('Lorem ipsum'); | |
94 | + // prevent page break | |
95 | + $section->setNoBreak(); | |
96 | + $section->writeText('Text on the next page'); | |
97 | + | |
98 | + | |
99 | +Hyperlinks | |
100 | +=================== | |
101 | + | |
102 | +To add a hyperlink: | |
103 | + | |
104 | +.. code-block:: php | |
105 | + | |
106 | + <?php | |
107 | + // some bootstraping here | |
108 | + | |
109 | + $section = $rtf->addSection(); | |
110 | + $section->writeText('Lorem ipsum: '); | |
111 | + $section->writeHyperLink('http://lipsum.lipsum.com/', 'Lorem ipsum'); | |
112 | + | |
113 | + | |
114 | +Borders | |
115 | +============== | |
116 | + | |
117 | +.. code-block:: php | |
118 | + | |
119 | + <?php | |
120 | + // some bootstraping here | |
121 | + | |
122 | + $border = new PHPRtfLite_Border( | |
123 | + $rtf, // PHPRtfLite instance | |
124 | + new PHPRtfLite_Border_Format(2, '#00FF00'), // left border: 2pt, green color | |
125 | + new PHPRtfLite_Border_Format(1, '#FFFF00'), // top border: 1pt, yellow color | |
126 | + new PHPRtfLite_Border_Format(2, '#FF0000'), // right border: 2pt, red color | |
127 | + new PHPRtfLite_Border_Format(1, '#0000FF') // bottom border: 1pt, blue color | |
128 | + ); | |
129 | + $section = $rtf->addSection(); | |
130 | + // set section border | |
131 | + $section->setBorder($border); | |
132 | + | |
133 | + // set one border format for top, left, right, and bottom | |
134 | + $section->setBorders(new PHPRtfLite_Border_Format(2, '#00FF00')); | |
135 | + | |
136 | + | |
137 | +Read more about creating borders here: :ref:`borders`. | |
0 | 138 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/styling.txt
0 โ 100644
export/PHPRtfLite-1.3.1/docs/html/_sources/tables.txt
0 โ 100644
1 | +Tables | |
2 | +**************** | |
3 | + | |
4 | +PHPRtfLite supports tables and nested tables. | |
5 | + | |
6 | +.. code-block:: php | |
7 | + | |
8 | + <?php | |
9 | + // some bootstraping here | |
10 | + | |
11 | + $section = $rtf->addSection(); | |
12 | + $table = $section->addTable(); | |
13 | + // add 2 rows with a height of 1cm for each of them | |
14 | + $table->addRows(3, 1); | |
15 | + // add a row with a height of 2cm (table has now 4 rows) | |
16 | + $table->addRow(2); | |
17 | + // add 3 columns (first: 1cm, second: 2cm, third: 3cm) | |
18 | + $table->addColumnsList(array(1,2,3)); | |
19 | + | |
20 | + | |
21 | +Cells | |
22 | +==================== | |
23 | + | |
24 | +Cells can contain images, texts, paragraphs and (nested) tables as well. | |
25 | + | |
26 | + | |
27 | +Text in cells | |
28 | +-------------------- | |
29 | + | |
30 | +Please mind that row and column indexes are starting with 1. | |
31 | + | |
32 | +.. code-block:: php | |
33 | + | |
34 | + <?php | |
35 | + // writing text to a cell for row 1 and column 2 | |
36 | + $table->writeToCell(1, 2, 'text'); | |
37 | + // writing text via cell object for row 1 and column 3 | |
38 | + $cell = $table->getCell(1, 3); | |
39 | + $cell->writeText('text'); | |
40 | + | |
41 | + | |
42 | +Cell formatting | |
43 | +-------------------- | |
44 | + | |
45 | +Cell font | |
46 | +~~~~~~~~~~~~~~~~~~~~ | |
47 | + | |
48 | +Setting the font for a cell or a cell, cell range, column or row. | |
49 | + | |
50 | +.. code-block:: php | |
51 | + | |
52 | + <?php | |
53 | + // set "Arial" with red color to a single cell | |
54 | + $fontRed = new PHPRtfLite_Font(12, 'Arial', '#f00'); | |
55 | + $cell = $table->getCell(1, 3); | |
56 | + $cell->setFont($fontRed); | |
57 | + | |
58 | + // set "Times New Roman" with green color to a cell range | |
59 | + $fontGreen = new PHPRtfLite_Font(12, 'Times New Roman', '#0f0'); | |
60 | + $table->setFontForCellRange($fontGreen, 1, 1, 4, 2); | |
61 | + | |
62 | + // set "Times New Roman" with blue color to a column | |
63 | + $fontBlue = new PHPRtfLite_Font(12, 'Times New Roman', '#00f'); | |
64 | + $table->getColumn(1)->setFont($fontBlue); | |
65 | + | |
66 | + // set "Tahoma" with yellow color to a row | |
67 | + $fontYellow = new PHPRtfLite_Font(12, 'Tahoma', '#ff0'); | |
68 | + $table->getRow(1)->setFont($fontYellow); | |
69 | + | |
70 | + | |
71 | + | |
72 | +Cell alignment | |
73 | +~~~~~~~~~~~~~~~~~~~~ | |
74 | + | |
75 | +Cells can be aligned horizontal and vertical. | |
76 | + | |
77 | +Horizontal alignment is also called text alignment. These types are availble as class constants: | |
78 | + | |
79 | +- ``TEXT_ALIGN_LEFT`` | |
80 | +- ``TEXT_ALIGN_RIGHT`` | |
81 | +- ``TEXT_ALIGN_CENTER`` | |
82 | +- ``TEXT_ALIGN_JUSTIFY`` | |
83 | + | |
84 | +Vertical alignment types available via class constants are: | |
85 | + | |
86 | +- ``VERTICAL_ALIGN_TOP`` | |
87 | +- ``VERTICAL_ALIGN_BOTTOM`` | |
88 | +- ``VERTICAL_ALIGN_CENTER`` | |
89 | + | |
90 | + | |
91 | +.. code-block:: php | |
92 | + | |
93 | + <?php | |
94 | + $cell = $table->getCell(1, 3); | |
95 | + $cell->setTextAlignment(); | |
96 | + | |
97 | + | |
98 | + | |
99 | +Cell padding | |
100 | +~~~~~~~~~~~~~~~~~~~~ | |
101 | + | |
102 | +Using Microsoft Word top and bottom cell paddings are applied to all cells in a row. | |
103 | + | |
104 | +.. code-block:: php | |
105 | + | |
106 | + <?php | |
107 | + $cell = $table->getCell(1, 3); | |
108 | + // cell padding left: 0.2cm | |
109 | + $cell->setCellPaddingLeft(0.2); | |
110 | + // cell padding right: 0.2cm | |
111 | + $cell->setCellPaddingRight(0.2); | |
112 | + // cell padding left: 0.4cm | |
113 | + $cell->setCellPaddingTop(0.4); | |
114 | + // cell padding left: 0.4cm | |
115 | + $cell->setCellPaddingBottom(0.4); | |
116 | + | |
117 | + // or the same in a shorter way | |
118 | + $cell->setCellPaddings(0.2, 0.4, 0.2, 0.4); | |
119 | + | |
120 | + | |
121 | +Background color | |
122 | +~~~~~~~~~~~~~~~~ | |
123 | + | |
124 | +The background color can be set for a single cell or for a range of cells. | |
125 | + | |
126 | +.. code-block:: php | |
127 | + | |
128 | + <?php | |
129 | + $cell = $table->getCell(1, 3); | |
130 | + // set background color of cell to red | |
131 | + $cell->setBackgroundColor('#FF0000'); | |
132 | + // set background color for a cell range (from row 1 column 1 to row 4 column 4) to blue | |
133 | + $table->setBackgroundForCellRange('#0000FF', 1, 1, 4, 2); | |
134 | + | |
135 | + | |
136 | +Border formatting | |
137 | +~~~~~~~~~~~~~~~~~ | |
138 | + | |
139 | +Cell borders can be set for a single cell or for a range of cells. | |
140 | + | |
141 | +.. code-block:: php | |
142 | + | |
143 | + <?php | |
144 | + $border = new PHPRtfLite_Border( | |
145 | + $rtf, // PHPRtfLite instance | |
146 | + new PHPRtfLite_Border_Format(2, '#00FF00'), // left border: 2pt, green color | |
147 | + new PHPRtfLite_Border_Format(1, '#FFFF00'), // top border: 1pt, yellow color | |
148 | + new PHPRtfLite_Border_Format(2, '#FF0000'), // right border: 2pt, red color | |
149 | + new PHPRtfLite_Border_Format(1, '#0000FF') // bottom border: 1pt, blue color | |
150 | + ); | |
151 | + $cell = $table->getCell(1, 3); | |
152 | + // cell with border | |
153 | + $cell->setBorder($border); | |
154 | + | |
155 | + // set border for cell range (from row 1 and column 1 to row 3 and column 2) | |
156 | + $table->setBorderForCellRange($border, 1, 1, 3, 2); | |
157 | + | |
158 | +Read more about creating borders here: :ref:`borders`. | |
159 | + | |
160 | + | |
161 | +Rotate text in cells | |
162 | +~~~~~~~~~~~~~~~~~~~~ | |
163 | + | |
164 | +Cell text can be rotated to left and right. | |
165 | + | |
166 | +.. code-block:: php | |
167 | + | |
168 | + <?php | |
169 | + $cell = $table->getCell(1, 3); | |
170 | + // rotate text in cell to left | |
171 | + $cell->rotateTo(PHPRtfLite_Container_Cell::ROTATE_LEFT); | |
172 | + | |
173 | + // rotate text for a cell range (from row 1, column 2 to row 3, column 4) to right | |
174 | + $table->rotateCellRange(PHPRtfLite_Container_Cell::ROTATE_RIGHT, 1, 2, 3, 4) | |
175 | + | |
176 | + | |
177 | +Images | |
178 | +-------------------- | |
179 | + | |
180 | +Images can be added to a table cell. | |
181 | + | |
182 | +.. code-block:: php | |
183 | + | |
184 | + <?php | |
185 | + $cell = $table->getCell(1, 3); | |
186 | + // adding image to cell row 1 and column 3 | |
187 | + $imageFile = '/path/to/image/example.jpg'; | |
188 | + $image = $cell->addImage($imageFile); | |
189 | + // image width 3cm and height 3cm | |
190 | + $image->setWidth(3); | |
191 | + $image->setHeight(3); | |
192 | + | |
193 | + // the same as short cut | |
194 | + $image->addImageToCell(1, 3, $imageFile, new PHPRtfLite_ParFormat, 3, 3); | |
195 | + | |
196 | +Adding images to the RTF document is also described in :ref:`images`. | |
197 | + | |
198 | + | |
199 | +Merging a cell range | |
200 | +-------------------- | |
201 | + | |
202 | +Cells can be merged horizontal, vertically and both. | |
203 | + | |
204 | +.. code-block:: php | |
205 | + | |
206 | + <?php | |
207 | + // merge cells from row 1 column 1 to row 2 and column 3 | |
208 | + $table->mergeCellRange(1, 1, 2, 3); | |
209 | + | |
210 | + | |
211 | +Nested tables | |
212 | +================ | |
213 | + | |
214 | +Nested tables are not supported by OpenOffice 3.2. | |
215 | + | |
216 | +.. code-block:: php | |
217 | + | |
218 | + <?php | |
219 | + $cell = $table->getCell(1, 3); | |
220 | + $cell->writeText('Text before nested table'); | |
221 | + // nested cell | |
222 | + $nestedTable = $cell->addTable(); | |
223 | + $nestedTable->addRow(1); | |
224 | + $nestedTable->addColumnsList(array(1,2)); | |
225 | + $nestedTable->writeToCell(1, 1, 'Text for first nested cell'); | |
226 | + | |
227 | + $cell->writeText('Text after nested table!'); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_sources/tutorials/introducation.txt
0 โ 100644
export/PHPRtfLite-1.3.1/docs/html/_sources/tutorials/introduction.txt
0 โ 100644
1 | +.. introduction: | |
2 | + | |
3 | +************ | |
4 | +Introduction | |
5 | +************ | |
6 | + | |
7 | +Labber sรผlz | |
8 | + | |
9 | +Products can also be created: | |
10 | + | |
11 | +.. code-block:: php | |
12 | + | |
13 | + <?php | |
14 | + $newProductName = "My Product"; | |
15 | + | |
16 | + $product = new Product(); | |
17 | + $product->name = $newProductName; | |
18 | + | |
19 | + $entityManager->persist($product); | |
20 | + $entityManager->flush(); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/basic.css
0 โ 100644
1 | +/* | |
2 | + * basic.css | |
3 | + * ~~~~~~~~~ | |
4 | + * | |
5 | + * Sphinx stylesheet -- basic theme. | |
6 | + * | |
7 | + * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
8 | + * :license: BSD, see LICENSE for details. | |
9 | + * | |
10 | + */ | |
11 | + | |
12 | +/* -- main layout ----------------------------------------------------------- */ | |
13 | + | |
14 | +div.clearer { | |
15 | + clear: both; | |
16 | +} | |
17 | + | |
18 | +/* -- relbar ---------------------------------------------------------------- */ | |
19 | + | |
20 | +div.related { | |
21 | + width: 100%; | |
22 | + font-size: 90%; | |
23 | +} | |
24 | + | |
25 | +div.related h3 { | |
26 | + display: none; | |
27 | +} | |
28 | + | |
29 | +div.related ul { | |
30 | + margin: 0; | |
31 | + padding: 0 0 0 10px; | |
32 | + list-style: none; | |
33 | +} | |
34 | + | |
35 | +div.related li { | |
36 | + display: inline; | |
37 | +} | |
38 | + | |
39 | +div.related li.right { | |
40 | + float: right; | |
41 | + margin-right: 5px; | |
42 | +} | |
43 | + | |
44 | +/* -- sidebar --------------------------------------------------------------- */ | |
45 | + | |
46 | +div.sphinxsidebarwrapper { | |
47 | + padding: 10px 5px 0 10px; | |
48 | +} | |
49 | + | |
50 | +div.sphinxsidebar { | |
51 | + float: left; | |
52 | + width: 230px; | |
53 | + margin-left: -100%; | |
54 | + font-size: 90%; | |
55 | +} | |
56 | + | |
57 | +div.sphinxsidebar ul { | |
58 | + list-style: none; | |
59 | +} | |
60 | + | |
61 | +div.sphinxsidebar ul ul, | |
62 | +div.sphinxsidebar ul.want-points { | |
63 | + margin-left: 20px; | |
64 | + list-style: square; | |
65 | +} | |
66 | + | |
67 | +div.sphinxsidebar ul ul { | |
68 | + margin-top: 0; | |
69 | + margin-bottom: 0; | |
70 | +} | |
71 | + | |
72 | +div.sphinxsidebar form { | |
73 | + margin-top: 10px; | |
74 | +} | |
75 | + | |
76 | +div.sphinxsidebar input { | |
77 | + border: 1px solid #98dbcc; | |
78 | + font-family: sans-serif; | |
79 | + font-size: 1em; | |
80 | +} | |
81 | + | |
82 | +img { | |
83 | + border: 0; | |
84 | +} | |
85 | + | |
86 | +/* -- search page ----------------------------------------------------------- */ | |
87 | + | |
88 | +ul.search { | |
89 | + margin: 10px 0 0 20px; | |
90 | + padding: 0; | |
91 | +} | |
92 | + | |
93 | +ul.search li { | |
94 | + padding: 5px 0 5px 20px; | |
95 | + background-image: url(file.png); | |
96 | + background-repeat: no-repeat; | |
97 | + background-position: 0 7px; | |
98 | +} | |
99 | + | |
100 | +ul.search li a { | |
101 | + font-weight: bold; | |
102 | +} | |
103 | + | |
104 | +ul.search li div.context { | |
105 | + color: #888; | |
106 | + margin: 2px 0 0 30px; | |
107 | + text-align: left; | |
108 | +} | |
109 | + | |
110 | +ul.keywordmatches li.goodmatch a { | |
111 | + font-weight: bold; | |
112 | +} | |
113 | + | |
114 | +/* -- index page ------------------------------------------------------------ */ | |
115 | + | |
116 | +table.contentstable { | |
117 | + width: 90%; | |
118 | +} | |
119 | + | |
120 | +table.contentstable p.biglink { | |
121 | + line-height: 150%; | |
122 | +} | |
123 | + | |
124 | +a.biglink { | |
125 | + font-size: 1.3em; | |
126 | +} | |
127 | + | |
128 | +span.linkdescr { | |
129 | + font-style: italic; | |
130 | + padding-top: 5px; | |
131 | + font-size: 90%; | |
132 | +} | |
133 | + | |
134 | +/* -- general index --------------------------------------------------------- */ | |
135 | + | |
136 | +table.indextable { | |
137 | + width: 100%; | |
138 | +} | |
139 | + | |
140 | +table.indextable td { | |
141 | + text-align: left; | |
142 | + vertical-align: top; | |
143 | +} | |
144 | + | |
145 | +table.indextable dl, table.indextable dd { | |
146 | + margin-top: 0; | |
147 | + margin-bottom: 0; | |
148 | +} | |
149 | + | |
150 | +table.indextable tr.pcap { | |
151 | + height: 10px; | |
152 | +} | |
153 | + | |
154 | +table.indextable tr.cap { | |
155 | + margin-top: 10px; | |
156 | + background-color: #f2f2f2; | |
157 | +} | |
158 | + | |
159 | +img.toggler { | |
160 | + margin-right: 3px; | |
161 | + margin-top: 3px; | |
162 | + cursor: pointer; | |
163 | +} | |
164 | + | |
165 | +div.modindex-jumpbox { | |
166 | + border-top: 1px solid #ddd; | |
167 | + border-bottom: 1px solid #ddd; | |
168 | + margin: 1em 0 1em 0; | |
169 | + padding: 0.4em; | |
170 | +} | |
171 | + | |
172 | +div.genindex-jumpbox { | |
173 | + border-top: 1px solid #ddd; | |
174 | + border-bottom: 1px solid #ddd; | |
175 | + margin: 1em 0 1em 0; | |
176 | + padding: 0.4em; | |
177 | +} | |
178 | + | |
179 | +/* -- general body styles --------------------------------------------------- */ | |
180 | + | |
181 | +a.headerlink { | |
182 | + visibility: hidden; | |
183 | +} | |
184 | + | |
185 | +h1:hover > a.headerlink, | |
186 | +h2:hover > a.headerlink, | |
187 | +h3:hover > a.headerlink, | |
188 | +h4:hover > a.headerlink, | |
189 | +h5:hover > a.headerlink, | |
190 | +h6:hover > a.headerlink, | |
191 | +dt:hover > a.headerlink { | |
192 | + visibility: visible; | |
193 | +} | |
194 | + | |
195 | +div.body p.caption { | |
196 | + text-align: inherit; | |
197 | +} | |
198 | + | |
199 | +div.body td { | |
200 | + text-align: left; | |
201 | +} | |
202 | + | |
203 | +.field-list ul { | |
204 | + padding-left: 1em; | |
205 | +} | |
206 | + | |
207 | +.first { | |
208 | + margin-top: 0 !important; | |
209 | +} | |
210 | + | |
211 | +p.rubric { | |
212 | + margin-top: 30px; | |
213 | + font-weight: bold; | |
214 | +} | |
215 | + | |
216 | +img.align-left, .figure.align-left, object.align-left { | |
217 | + clear: left; | |
218 | + float: left; | |
219 | + margin-right: 1em; | |
220 | +} | |
221 | + | |
222 | +img.align-right, .figure.align-right, object.align-right { | |
223 | + clear: right; | |
224 | + float: right; | |
225 | + margin-left: 1em; | |
226 | +} | |
227 | + | |
228 | +img.align-center, .figure.align-center, object.align-center { | |
229 | + display: block; | |
230 | + margin-left: auto; | |
231 | + margin-right: auto; | |
232 | +} | |
233 | + | |
234 | +.align-left { | |
235 | + text-align: left; | |
236 | +} | |
237 | + | |
238 | +.align-center { | |
239 | + clear: both; | |
240 | + text-align: center; | |
241 | +} | |
242 | + | |
243 | +.align-right { | |
244 | + text-align: right; | |
245 | +} | |
246 | + | |
247 | +/* -- sidebars -------------------------------------------------------------- */ | |
248 | + | |
249 | +div.sidebar { | |
250 | + margin: 0 0 0.5em 1em; | |
251 | + border: 1px solid #ddb; | |
252 | + padding: 7px 7px 0 7px; | |
253 | + background-color: #ffe; | |
254 | + width: 40%; | |
255 | + float: right; | |
256 | +} | |
257 | + | |
258 | +p.sidebar-title { | |
259 | + font-weight: bold; | |
260 | +} | |
261 | + | |
262 | +/* -- topics ---------------------------------------------------------------- */ | |
263 | + | |
264 | +div.topic { | |
265 | + border: 1px solid #ccc; | |
266 | + padding: 7px 7px 0 7px; | |
267 | + margin: 10px 0 10px 0; | |
268 | +} | |
269 | + | |
270 | +p.topic-title { | |
271 | + font-size: 1.1em; | |
272 | + font-weight: bold; | |
273 | + margin-top: 10px; | |
274 | +} | |
275 | + | |
276 | +/* -- admonitions ----------------------------------------------------------- */ | |
277 | + | |
278 | +div.admonition { | |
279 | + margin-top: 10px; | |
280 | + margin-bottom: 10px; | |
281 | + padding: 7px; | |
282 | +} | |
283 | + | |
284 | +div.admonition dt { | |
285 | + font-weight: bold; | |
286 | +} | |
287 | + | |
288 | +div.admonition dl { | |
289 | + margin-bottom: 0; | |
290 | +} | |
291 | + | |
292 | +p.admonition-title { | |
293 | + margin: 0px 10px 5px 0px; | |
294 | + font-weight: bold; | |
295 | +} | |
296 | + | |
297 | +div.body p.centered { | |
298 | + text-align: center; | |
299 | + margin-top: 25px; | |
300 | +} | |
301 | + | |
302 | +/* -- tables ---------------------------------------------------------------- */ | |
303 | + | |
304 | +table.docutils { | |
305 | + border: 0; | |
306 | + border-collapse: collapse; | |
307 | +} | |
308 | + | |
309 | +table.docutils td, table.docutils th { | |
310 | + padding: 1px 8px 1px 5px; | |
311 | + border-top: 0; | |
312 | + border-left: 0; | |
313 | + border-right: 0; | |
314 | + border-bottom: 1px solid #aaa; | |
315 | +} | |
316 | + | |
317 | +table.field-list td, table.field-list th { | |
318 | + border: 0 !important; | |
319 | +} | |
320 | + | |
321 | +table.footnote td, table.footnote th { | |
322 | + border: 0 !important; | |
323 | +} | |
324 | + | |
325 | +th { | |
326 | + text-align: left; | |
327 | + padding-right: 5px; | |
328 | +} | |
329 | + | |
330 | +table.citation { | |
331 | + border-left: solid 1px gray; | |
332 | + margin-left: 1px; | |
333 | +} | |
334 | + | |
335 | +table.citation td { | |
336 | + border-bottom: none; | |
337 | +} | |
338 | + | |
339 | +/* -- other body styles ----------------------------------------------------- */ | |
340 | + | |
341 | +ol.arabic { | |
342 | + list-style: decimal; | |
343 | +} | |
344 | + | |
345 | +ol.loweralpha { | |
346 | + list-style: lower-alpha; | |
347 | +} | |
348 | + | |
349 | +ol.upperalpha { | |
350 | + list-style: upper-alpha; | |
351 | +} | |
352 | + | |
353 | +ol.lowerroman { | |
354 | + list-style: lower-roman; | |
355 | +} | |
356 | + | |
357 | +ol.upperroman { | |
358 | + list-style: upper-roman; | |
359 | +} | |
360 | + | |
361 | +dl { | |
362 | + margin-bottom: 15px; | |
363 | +} | |
364 | + | |
365 | +dd p { | |
366 | + margin-top: 0px; | |
367 | +} | |
368 | + | |
369 | +dd ul, dd table { | |
370 | + margin-bottom: 10px; | |
371 | +} | |
372 | + | |
373 | +dd { | |
374 | + margin-top: 3px; | |
375 | + margin-bottom: 10px; | |
376 | + margin-left: 30px; | |
377 | +} | |
378 | + | |
379 | +dt:target, .highlighted { | |
380 | + background-color: #fbe54e; | |
381 | +} | |
382 | + | |
383 | +dl.glossary dt { | |
384 | + font-weight: bold; | |
385 | + font-size: 1.1em; | |
386 | +} | |
387 | + | |
388 | +.field-list ul { | |
389 | + margin: 0; | |
390 | + padding-left: 1em; | |
391 | +} | |
392 | + | |
393 | +.field-list p { | |
394 | + margin: 0; | |
395 | +} | |
396 | + | |
397 | +.refcount { | |
398 | + color: #060; | |
399 | +} | |
400 | + | |
401 | +.optional { | |
402 | + font-size: 1.3em; | |
403 | +} | |
404 | + | |
405 | +.versionmodified { | |
406 | + font-style: italic; | |
407 | +} | |
408 | + | |
409 | +.system-message { | |
410 | + background-color: #fda; | |
411 | + padding: 5px; | |
412 | + border: 3px solid red; | |
413 | +} | |
414 | + | |
415 | +.footnote:target { | |
416 | + background-color: #ffa; | |
417 | +} | |
418 | + | |
419 | +.line-block { | |
420 | + display: block; | |
421 | + margin-top: 1em; | |
422 | + margin-bottom: 1em; | |
423 | +} | |
424 | + | |
425 | +.line-block .line-block { | |
426 | + margin-top: 0; | |
427 | + margin-bottom: 0; | |
428 | + margin-left: 1.5em; | |
429 | +} | |
430 | + | |
431 | +.guilabel, .menuselection { | |
432 | + font-family: sans-serif; | |
433 | +} | |
434 | + | |
435 | +.accelerator { | |
436 | + text-decoration: underline; | |
437 | +} | |
438 | + | |
439 | +.classifier { | |
440 | + font-style: oblique; | |
441 | +} | |
442 | + | |
443 | +/* -- code displays --------------------------------------------------------- */ | |
444 | + | |
445 | +pre { | |
446 | + overflow: auto; | |
447 | + overflow-y: hidden; /* fixes display issues on Chrome browsers */ | |
448 | +} | |
449 | + | |
450 | +td.linenos pre { | |
451 | + padding: 5px 0px; | |
452 | + border: 0; | |
453 | + background-color: transparent; | |
454 | + color: #aaa; | |
455 | +} | |
456 | + | |
457 | +table.highlighttable { | |
458 | + margin-left: 0.5em; | |
459 | +} | |
460 | + | |
461 | +table.highlighttable td { | |
462 | + padding: 0 0.5em 0 0.5em; | |
463 | +} | |
464 | + | |
465 | +tt.descname { | |
466 | + background-color: transparent; | |
467 | + font-weight: bold; | |
468 | + font-size: 1.2em; | |
469 | +} | |
470 | + | |
471 | +tt.descclassname { | |
472 | + background-color: transparent; | |
473 | +} | |
474 | + | |
475 | +tt.xref, a tt { | |
476 | + background-color: transparent; | |
477 | + font-weight: bold; | |
478 | +} | |
479 | + | |
480 | +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { | |
481 | + background-color: transparent; | |
482 | +} | |
483 | + | |
484 | +.viewcode-link { | |
485 | + float: right; | |
486 | +} | |
487 | + | |
488 | +.viewcode-back { | |
489 | + float: right; | |
490 | + font-family: sans-serif; | |
491 | +} | |
492 | + | |
493 | +div.viewcode-block:target { | |
494 | + margin: -1px -10px; | |
495 | + padding: 0 10px; | |
496 | +} | |
497 | + | |
498 | +/* -- math display ---------------------------------------------------------- */ | |
499 | + | |
500 | +img.math { | |
501 | + vertical-align: middle; | |
502 | +} | |
503 | + | |
504 | +div.body div.math p { | |
505 | + text-align: center; | |
506 | +} | |
507 | + | |
508 | +span.eqno { | |
509 | + float: right; | |
510 | +} | |
511 | + | |
512 | +/* -- printout stylesheet --------------------------------------------------- */ | |
513 | + | |
514 | +@media print { | |
515 | + div.document, | |
516 | + div.documentwrapper, | |
517 | + div.bodywrapper { | |
518 | + margin: 0 !important; | |
519 | + width: 100%; | |
520 | + } | |
521 | + | |
522 | + div.sphinxsidebar, | |
523 | + div.related, | |
524 | + div.footer, | |
525 | + #top-link { | |
526 | + display: none; | |
527 | + } | |
528 | +} | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/default.css
0 โ 100644
1 | +/* | |
2 | + * default.css_t | |
3 | + * ~~~~~~~~~~~~~ | |
4 | + * | |
5 | + * Sphinx stylesheet -- default theme. | |
6 | + * | |
7 | + * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
8 | + * :license: BSD, see LICENSE for details. | |
9 | + * | |
10 | + */ | |
11 | + | |
12 | +@import url("basic.css"); | |
13 | + | |
14 | +/* -- page layout ----------------------------------------------------------- */ | |
15 | + | |
16 | +body { | |
17 | + font-family: sans-serif; | |
18 | + font-size: 100%; | |
19 | + background-color: #11303d; | |
20 | + color: #000; | |
21 | + margin: 0; | |
22 | + padding: 0; | |
23 | +} | |
24 | + | |
25 | +div.document { | |
26 | + background-color: #1c4e63; | |
27 | +} | |
28 | + | |
29 | +div.documentwrapper { | |
30 | + float: left; | |
31 | + width: 100%; | |
32 | +} | |
33 | + | |
34 | +div.bodywrapper { | |
35 | + margin: 0 0 0 230px; | |
36 | +} | |
37 | + | |
38 | +div.body { | |
39 | + background-color: #ffffff; | |
40 | + color: #000000; | |
41 | + padding: 0 20px 30px 20px; | |
42 | +} | |
43 | + | |
44 | +div.footer { | |
45 | + color: #ffffff; | |
46 | + width: 100%; | |
47 | + padding: 9px 0 9px 0; | |
48 | + text-align: center; | |
49 | + font-size: 75%; | |
50 | +} | |
51 | + | |
52 | +div.footer a { | |
53 | + color: #ffffff; | |
54 | + text-decoration: underline; | |
55 | +} | |
56 | + | |
57 | +div.related { | |
58 | + background-color: #133f52; | |
59 | + line-height: 30px; | |
60 | + color: #ffffff; | |
61 | +} | |
62 | + | |
63 | +div.related a { | |
64 | + color: #ffffff; | |
65 | +} | |
66 | + | |
67 | +div.sphinxsidebar { | |
68 | +} | |
69 | + | |
70 | +div.sphinxsidebar h3 { | |
71 | + font-family: 'Trebuchet MS', sans-serif; | |
72 | + color: #ffffff; | |
73 | + font-size: 1.4em; | |
74 | + font-weight: normal; | |
75 | + margin: 0; | |
76 | + padding: 0; | |
77 | +} | |
78 | + | |
79 | +div.sphinxsidebar h3 a { | |
80 | + color: #ffffff; | |
81 | +} | |
82 | + | |
83 | +div.sphinxsidebar h4 { | |
84 | + font-family: 'Trebuchet MS', sans-serif; | |
85 | + color: #ffffff; | |
86 | + font-size: 1.3em; | |
87 | + font-weight: normal; | |
88 | + margin: 5px 0 0 0; | |
89 | + padding: 0; | |
90 | +} | |
91 | + | |
92 | +div.sphinxsidebar p { | |
93 | + color: #ffffff; | |
94 | +} | |
95 | + | |
96 | +div.sphinxsidebar p.topless { | |
97 | + margin: 5px 10px 10px 10px; | |
98 | +} | |
99 | + | |
100 | +div.sphinxsidebar ul { | |
101 | + margin: 10px; | |
102 | + padding: 0; | |
103 | + color: #ffffff; | |
104 | +} | |
105 | + | |
106 | +div.sphinxsidebar a { | |
107 | + color: #98dbcc; | |
108 | +} | |
109 | + | |
110 | +div.sphinxsidebar input { | |
111 | + border: 1px solid #98dbcc; | |
112 | + font-family: sans-serif; | |
113 | + font-size: 1em; | |
114 | +} | |
115 | + | |
116 | + | |
117 | + | |
118 | +/* -- hyperlink styles ------------------------------------------------------ */ | |
119 | + | |
120 | +a { | |
121 | + color: #355f7c; | |
122 | + text-decoration: none; | |
123 | +} | |
124 | + | |
125 | +a:visited { | |
126 | + color: #355f7c; | |
127 | + text-decoration: none; | |
128 | +} | |
129 | + | |
130 | +a:hover { | |
131 | + text-decoration: underline; | |
132 | +} | |
133 | + | |
134 | + | |
135 | + | |
136 | +/* -- body styles ----------------------------------------------------------- */ | |
137 | + | |
138 | +div.body h1, | |
139 | +div.body h2, | |
140 | +div.body h3, | |
141 | +div.body h4, | |
142 | +div.body h5, | |
143 | +div.body h6 { | |
144 | + font-family: 'Trebuchet MS', sans-serif; | |
145 | + background-color: #f2f2f2; | |
146 | + font-weight: normal; | |
147 | + color: #20435c; | |
148 | + border-bottom: 1px solid #ccc; | |
149 | + margin: 20px -20px 10px -20px; | |
150 | + padding: 3px 0 3px 10px; | |
151 | +} | |
152 | + | |
153 | +div.body h1 { margin-top: 0; font-size: 200%; } | |
154 | +div.body h2 { font-size: 160%; } | |
155 | +div.body h3 { font-size: 140%; } | |
156 | +div.body h4 { font-size: 120%; } | |
157 | +div.body h5 { font-size: 110%; } | |
158 | +div.body h6 { font-size: 100%; } | |
159 | + | |
160 | +a.headerlink { | |
161 | + color: #c60f0f; | |
162 | + font-size: 0.8em; | |
163 | + padding: 0 4px 0 4px; | |
164 | + text-decoration: none; | |
165 | +} | |
166 | + | |
167 | +a.headerlink:hover { | |
168 | + background-color: #c60f0f; | |
169 | + color: white; | |
170 | +} | |
171 | + | |
172 | +div.body p, div.body dd, div.body li { | |
173 | + text-align: justify; | |
174 | + line-height: 130%; | |
175 | +} | |
176 | + | |
177 | +div.admonition p.admonition-title + p { | |
178 | + display: inline; | |
179 | +} | |
180 | + | |
181 | +div.admonition p { | |
182 | + margin-bottom: 5px; | |
183 | +} | |
184 | + | |
185 | +div.admonition pre { | |
186 | + margin-bottom: 5px; | |
187 | +} | |
188 | + | |
189 | +div.admonition ul, div.admonition ol { | |
190 | + margin-bottom: 5px; | |
191 | +} | |
192 | + | |
193 | +div.note { | |
194 | + background-color: #eee; | |
195 | + border: 1px solid #ccc; | |
196 | +} | |
197 | + | |
198 | +div.seealso { | |
199 | + background-color: #ffc; | |
200 | + border: 1px solid #ff6; | |
201 | +} | |
202 | + | |
203 | +div.topic { | |
204 | + background-color: #eee; | |
205 | +} | |
206 | + | |
207 | +div.warning { | |
208 | + background-color: #ffe4e4; | |
209 | + border: 1px solid #f66; | |
210 | +} | |
211 | + | |
212 | +p.admonition-title { | |
213 | + display: inline; | |
214 | +} | |
215 | + | |
216 | +p.admonition-title:after { | |
217 | + content: ":"; | |
218 | +} | |
219 | + | |
220 | +pre { | |
221 | + padding: 5px; | |
222 | + background-color: #eeffcc; | |
223 | + color: #333333; | |
224 | + line-height: 120%; | |
225 | + border: 1px solid #ac9; | |
226 | + border-left: none; | |
227 | + border-right: none; | |
228 | +} | |
229 | + | |
230 | +tt { | |
231 | + background-color: #ecf0f3; | |
232 | + padding: 0 1px 0 1px; | |
233 | + font-size: 0.95em; | |
234 | +} | |
235 | + | |
236 | +th { | |
237 | + background-color: #ede; | |
238 | +} | |
239 | + | |
240 | +.warning tt { | |
241 | + background: #efc2c2; | |
242 | +} | |
243 | + | |
244 | +.note tt { | |
245 | + background: #d6d6d6; | |
246 | +} | |
247 | + | |
248 | +.viewcode-back { | |
249 | + font-family: sans-serif; | |
250 | +} | |
251 | + | |
252 | +div.viewcode-block:target { | |
253 | + background-color: #f4debf; | |
254 | + border-top: 1px solid #ac9; | |
255 | + border-bottom: 1px solid #ac9; | |
256 | +} | |
0 | 257 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/doctools.js
0 โ 100644
1 | +/* | |
2 | + * doctools.js | |
3 | + * ~~~~~~~~~~~ | |
4 | + * | |
5 | + * Sphinx JavaScript utilties for all documentation. | |
6 | + * | |
7 | + * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
8 | + * :license: BSD, see LICENSE for details. | |
9 | + * | |
10 | + */ | |
11 | + | |
12 | +/** | |
13 | + * select a different prefix for underscore | |
14 | + */ | |
15 | +$u = _.noConflict(); | |
16 | + | |
17 | +/** | |
18 | + * make the code below compatible with browsers without | |
19 | + * an installed firebug like debugger | |
20 | +if (!window.console || !console.firebug) { | |
21 | + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", | |
22 | + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", | |
23 | + "profile", "profileEnd"]; | |
24 | + window.console = {}; | |
25 | + for (var i = 0; i < names.length; ++i) | |
26 | + window.console[names[i]] = function() {}; | |
27 | +} | |
28 | + */ | |
29 | + | |
30 | +/** | |
31 | + * small helper function to urldecode strings | |
32 | + */ | |
33 | +jQuery.urldecode = function(x) { | |
34 | + return decodeURIComponent(x).replace(/\+/g, ' '); | |
35 | +} | |
36 | + | |
37 | +/** | |
38 | + * small helper function to urlencode strings | |
39 | + */ | |
40 | +jQuery.urlencode = encodeURIComponent; | |
41 | + | |
42 | +/** | |
43 | + * This function returns the parsed url parameters of the | |
44 | + * current request. Multiple values per key are supported, | |
45 | + * it will always return arrays of strings for the value parts. | |
46 | + */ | |
47 | +jQuery.getQueryParameters = function(s) { | |
48 | + if (typeof s == 'undefined') | |
49 | + s = document.location.search; | |
50 | + var parts = s.substr(s.indexOf('?') + 1).split('&'); | |
51 | + var result = {}; | |
52 | + for (var i = 0; i < parts.length; i++) { | |
53 | + var tmp = parts[i].split('=', 2); | |
54 | + var key = jQuery.urldecode(tmp[0]); | |
55 | + var value = jQuery.urldecode(tmp[1]); | |
56 | + if (key in result) | |
57 | + result[key].push(value); | |
58 | + else | |
59 | + result[key] = [value]; | |
60 | + } | |
61 | + return result; | |
62 | +}; | |
63 | + | |
64 | +/** | |
65 | + * small function to check if an array contains | |
66 | + * a given item. | |
67 | + */ | |
68 | +jQuery.contains = function(arr, item) { | |
69 | + for (var i = 0; i < arr.length; i++) { | |
70 | + if (arr[i] == item) | |
71 | + return true; | |
72 | + } | |
73 | + return false; | |
74 | +}; | |
75 | + | |
76 | +/** | |
77 | + * highlight a given string on a jquery object by wrapping it in | |
78 | + * span elements with the given class name. | |
79 | + */ | |
80 | +jQuery.fn.highlightText = function(text, className) { | |
81 | + function highlight(node) { | |
82 | + if (node.nodeType == 3) { | |
83 | + var val = node.nodeValue; | |
84 | + var pos = val.toLowerCase().indexOf(text); | |
85 | + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { | |
86 | + var span = document.createElement("span"); | |
87 | + span.className = className; | |
88 | + span.appendChild(document.createTextNode(val.substr(pos, text.length))); | |
89 | + node.parentNode.insertBefore(span, node.parentNode.insertBefore( | |
90 | + document.createTextNode(val.substr(pos + text.length)), | |
91 | + node.nextSibling)); | |
92 | + node.nodeValue = val.substr(0, pos); | |
93 | + } | |
94 | + } | |
95 | + else if (!jQuery(node).is("button, select, textarea")) { | |
96 | + jQuery.each(node.childNodes, function() { | |
97 | + highlight(this); | |
98 | + }); | |
99 | + } | |
100 | + } | |
101 | + return this.each(function() { | |
102 | + highlight(this); | |
103 | + }); | |
104 | +}; | |
105 | + | |
106 | +/** | |
107 | + * Small JavaScript module for the documentation. | |
108 | + */ | |
109 | +var Documentation = { | |
110 | + | |
111 | + init : function() { | |
112 | + this.fixFirefoxAnchorBug(); | |
113 | + this.highlightSearchWords(); | |
114 | + this.initIndexTable(); | |
115 | + }, | |
116 | + | |
117 | + /** | |
118 | + * i18n support | |
119 | + */ | |
120 | + TRANSLATIONS : {}, | |
121 | + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, | |
122 | + LOCALE : 'unknown', | |
123 | + | |
124 | + // gettext and ngettext don't access this so that the functions | |
125 | + // can safely bound to a different name (_ = Documentation.gettext) | |
126 | + gettext : function(string) { | |
127 | + var translated = Documentation.TRANSLATIONS[string]; | |
128 | + if (typeof translated == 'undefined') | |
129 | + return string; | |
130 | + return (typeof translated == 'string') ? translated : translated[0]; | |
131 | + }, | |
132 | + | |
133 | + ngettext : function(singular, plural, n) { | |
134 | + var translated = Documentation.TRANSLATIONS[singular]; | |
135 | + if (typeof translated == 'undefined') | |
136 | + return (n == 1) ? singular : plural; | |
137 | + return translated[Documentation.PLURALEXPR(n)]; | |
138 | + }, | |
139 | + | |
140 | + addTranslations : function(catalog) { | |
141 | + for (var key in catalog.messages) | |
142 | + this.TRANSLATIONS[key] = catalog.messages[key]; | |
143 | + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); | |
144 | + this.LOCALE = catalog.locale; | |
145 | + }, | |
146 | + | |
147 | + /** | |
148 | + * add context elements like header anchor links | |
149 | + */ | |
150 | + addContextElements : function() { | |
151 | + $('div[id] > :header:first').each(function() { | |
152 | + $('<a class="headerlink">\u00B6</a>'). | |
153 | + attr('href', '#' + this.id). | |
154 | + attr('title', _('Permalink to this headline')). | |
155 | + appendTo(this); | |
156 | + }); | |
157 | + $('dt[id]').each(function() { | |
158 | + $('<a class="headerlink">\u00B6</a>'). | |
159 | + attr('href', '#' + this.id). | |
160 | + attr('title', _('Permalink to this definition')). | |
161 | + appendTo(this); | |
162 | + }); | |
163 | + }, | |
164 | + | |
165 | + /** | |
166 | + * workaround a firefox stupidity | |
167 | + */ | |
168 | + fixFirefoxAnchorBug : function() { | |
169 | + if (document.location.hash && $.browser.mozilla) | |
170 | + window.setTimeout(function() { | |
171 | + document.location.href += ''; | |
172 | + }, 10); | |
173 | + }, | |
174 | + | |
175 | + /** | |
176 | + * highlight the search words provided in the url in the text | |
177 | + */ | |
178 | + highlightSearchWords : function() { | |
179 | + var params = $.getQueryParameters(); | |
180 | + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; | |
181 | + if (terms.length) { | |
182 | + var body = $('div.body'); | |
183 | + window.setTimeout(function() { | |
184 | + $.each(terms, function() { | |
185 | + body.highlightText(this.toLowerCase(), 'highlighted'); | |
186 | + }); | |
187 | + }, 10); | |
188 | + $('<li class="highlight-link"><a href="javascript:Documentation.' + | |
189 | + 'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>') | |
190 | + .appendTo($('.sidebar .this-page-menu')); | |
191 | + } | |
192 | + }, | |
193 | + | |
194 | + /** | |
195 | + * init the domain index toggle buttons | |
196 | + */ | |
197 | + initIndexTable : function() { | |
198 | + var togglers = $('img.toggler').click(function() { | |
199 | + var src = $(this).attr('src'); | |
200 | + var idnum = $(this).attr('id').substr(7); | |
201 | + $('tr.cg-' + idnum).toggle(); | |
202 | + if (src.substr(-9) == 'minus.png') | |
203 | + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); | |
204 | + else | |
205 | + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); | |
206 | + }).css('display', ''); | |
207 | + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { | |
208 | + togglers.click(); | |
209 | + } | |
210 | + }, | |
211 | + | |
212 | + /** | |
213 | + * helper function to hide the search marks again | |
214 | + */ | |
215 | + hideSearchWords : function() { | |
216 | + $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); | |
217 | + $('span.highlighted').removeClass('highlighted'); | |
218 | + }, | |
219 | + | |
220 | + /** | |
221 | + * make the url absolute | |
222 | + */ | |
223 | + makeURL : function(relativeURL) { | |
224 | + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; | |
225 | + }, | |
226 | + | |
227 | + /** | |
228 | + * get the current relative url | |
229 | + */ | |
230 | + getCurrentURL : function() { | |
231 | + var path = document.location.pathname; | |
232 | + var parts = path.split(/\//); | |
233 | + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { | |
234 | + if (this == '..') | |
235 | + parts.pop(); | |
236 | + }); | |
237 | + var url = parts.join('/'); | |
238 | + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); | |
239 | + } | |
240 | +}; | |
241 | + | |
242 | +// quick alias for translations | |
243 | +_ = Documentation.gettext; | |
244 | + | |
245 | +$(document).ready(function() { | |
246 | + Documentation.init(); | |
247 | +}); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/file.png
0 โ 100644
392 Bytes
export/PHPRtfLite-1.3.1/docs/html/_static/jquery.js
0 โ 100644
1 | +/*! | |
2 | + * jQuery JavaScript Library v1.4.2 | |
3 | + * http://jquery.com/ | |
4 | + * | |
5 | + * Copyright 2010, John Resig | |
6 | + * Dual licensed under the MIT or GPL Version 2 licenses. | |
7 | + * http://jquery.org/license | |
8 | + * | |
9 | + * Includes Sizzle.js | |
10 | + * http://sizzlejs.com/ | |
11 | + * Copyright 2010, The Dojo Foundation | |
12 | + * Released under the MIT, BSD, and GPL Licenses. | |
13 | + * | |
14 | + * Date: Sat Feb 13 22:33:48 2010 -0500 | |
15 | + */ | |
16 | +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i? | |
17 | +e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r= | |
18 | +j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, | |
19 | +"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= | |
20 | +true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, | |
21 | +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& | |
22 | +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, | |
23 | +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== | |
24 | +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, | |
25 | +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| | |
26 | +c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", | |
27 | +L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, | |
28 | +"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+ | |
29 | +a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f], | |
30 | +d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]=== | |
31 | +a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& | |
32 | +!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= | |
33 | +true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; | |
34 | +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, | |
35 | +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= | |
36 | +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= | |
37 | +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, | |
38 | +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; | |
39 | +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, | |
40 | +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== | |
41 | +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, | |
42 | +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", | |
43 | +i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", | |
44 | +" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= | |
45 | +this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= | |
46 | +e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= | |
47 | +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | |
48 | +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, | |
49 | +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); | |
50 | +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), | |
51 | +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= | |
52 | +null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= | |
53 | +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& | |
54 | +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; | |
55 | +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), | |
56 | +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| | |
57 | +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, | |
58 | +"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= | |
59 | +a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y, | |
60 | +isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit= | |
61 | +{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; | |
62 | +if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", | |
63 | +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, | |
64 | +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, | |
65 | +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& | |
66 | +!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | |
67 | +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, | |
68 | +u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), | |
69 | +function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; | |
70 | +if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, | |
71 | +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); | |
72 | +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| | |
73 | +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | |
74 | +for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- | |
75 | +1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, | |
76 | +CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, | |
77 | +relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]= | |
78 | +l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[]; | |
79 | +h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, | |
80 | +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, | |
81 | +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, | |
82 | +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, | |
83 | +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= | |
84 | +h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m= | |
85 | +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== | |
86 | +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, | |
87 | +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition|| | |
88 | +!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= | |
89 | +h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& | |
90 | +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>"; | |
91 | +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); | |
92 | +(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: | |
93 | +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/, | |
94 | +gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; | |
95 | +c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= | |
96 | +{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== | |
97 | +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", | |
98 | +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? | |
99 | +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== | |
100 | +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)? | |
101 | +a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= | |
102 | +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, | |
103 | +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | |
104 | +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, | |
105 | +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); | |
106 | +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, | |
107 | +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& | |
108 | +this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| | |
109 | +u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length=== | |
110 | +1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); | |
111 | +return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", | |
112 | +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= | |
113 | +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? | |
114 | +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= | |
115 | +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= | |
116 | +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, | |
117 | +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= | |
118 | +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= | |
119 | +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== | |
120 | +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, | |
121 | +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), | |
122 | +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, | |
123 | +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& | |
124 | +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? | |
125 | +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== | |
126 | +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= | |
127 | +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", | |
128 | +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| | |
129 | +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); | |
130 | +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== | |
131 | +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== | |
132 | +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; | |
133 | +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); | |
134 | +this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a], | |
135 | +"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, | |
136 | +animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= | |
137 | +j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); | |
138 | +this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== | |
139 | +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| | |
140 | +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; | |
141 | +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= | |
142 | +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, | |
143 | +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length|| | |
144 | +c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? | |
145 | +function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= | |
146 | +this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; | |
147 | +k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& | |
148 | +f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; | |
149 | +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); | |
150 | +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, | |
151 | +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- | |
152 | +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": | |
153 | +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in | |
154 | +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/minus.png
0 โ 100644
199 Bytes
export/PHPRtfLite-1.3.1/docs/html/_static/plus.png
0 โ 100644
199 Bytes
export/PHPRtfLite-1.3.1/docs/html/_static/pygments.css
0 โ 100644
1 | +.highlight .hll { background-color: #ffffcc } | |
2 | +.highlight { background: #eeffcc; } | |
3 | +.highlight .c { color: #408090; font-style: italic } /* Comment */ | |
4 | +.highlight .err { border: 1px solid #FF0000 } /* Error */ | |
5 | +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ | |
6 | +.highlight .o { color: #666666 } /* Operator */ | |
7 | +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ | |
8 | +.highlight .cp { color: #007020 } /* Comment.Preproc */ | |
9 | +.highlight .c1 { color: #888888; font-style: italic } /* Comment.Single */ | |
10 | +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ | |
11 | +.highlight .gd { color: #A00000 } /* Generic.Deleted */ | |
12 | +.highlight .ge { font-style: italic } /* Generic.Emph */ | |
13 | +.highlight .gr { color: #FF0000 } /* Generic.Error */ | |
14 | +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ | |
15 | +.highlight .gi { color: #00A000 } /* Generic.Inserted */ | |
16 | +.highlight .go { color: #303030 } /* Generic.Output */ | |
17 | +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ | |
18 | +.highlight .gs { font-weight: bold } /* Generic.Strong */ | |
19 | +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ | |
20 | +.highlight .gt { color: #0040D0 } /* Generic.Traceback */ | |
21 | +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ | |
22 | +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ | |
23 | +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ | |
24 | +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ | |
25 | +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ | |
26 | +.highlight .kt { color: #902000 } /* Keyword.Type */ | |
27 | +.highlight .m { color: #208050 } /* Literal.Number */ | |
28 | +.highlight .s { color: #4070a0 } /* Literal.String */ | |
29 | +.highlight .na { color: #006600 } /* Name.Attribute */ | |
30 | +.highlight .nb { color: #007020 } /* Name.Builtin */ | |
31 | +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ | |
32 | +.highlight .no { color: #60add5 } /* Name.Constant */ | |
33 | +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ | |
34 | +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ | |
35 | +.highlight .ne { color: #007020 } /* Name.Exception */ | |
36 | +.highlight .nf { color: #06287e } /* Name.Function */ | |
37 | +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ | |
38 | +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ | |
39 | +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ | |
40 | +.highlight .nv { color: #aa3333 } /* Name.Variable */ | |
41 | +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ | |
42 | +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ | |
43 | +.highlight .mf { color: #208050 } /* Literal.Number.Float */ | |
44 | +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ | |
45 | +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ | |
46 | +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ | |
47 | +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ | |
48 | +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ | |
49 | +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ | |
50 | +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ | |
51 | +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ | |
52 | +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ | |
53 | +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ | |
54 | +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ | |
55 | +.highlight .sr { color: #235388 } /* Literal.String.Regex */ | |
56 | +.highlight .s1 { color: #cc8866 } /* Literal.String.Single */ | |
57 | +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ | |
58 | +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ | |
59 | +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ | |
60 | +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ | |
61 | +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ | |
62 | +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ | |
0 | 63 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/searchtools.js
0 โ 100644
1 | +/* | |
2 | + * searchtools.js | |
3 | + * ~~~~~~~~~~~~~~ | |
4 | + * | |
5 | + * Sphinx JavaScript utilties for the full-text search. | |
6 | + * | |
7 | + * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
8 | + * :license: BSD, see LICENSE for details. | |
9 | + * | |
10 | + */ | |
11 | + | |
12 | +/** | |
13 | + * helper function to return a node containing the | |
14 | + * search summary for a given text. keywords is a list | |
15 | + * of stemmed words, hlwords is the list of normal, unstemmed | |
16 | + * words. the first one is used to find the occurance, the | |
17 | + * latter for highlighting it. | |
18 | + */ | |
19 | + | |
20 | +jQuery.makeSearchSummary = function(text, keywords, hlwords) { | |
21 | + var textLower = text.toLowerCase(); | |
22 | + var start = 0; | |
23 | + $.each(keywords, function() { | |
24 | + var i = textLower.indexOf(this.toLowerCase()); | |
25 | + if (i > -1) | |
26 | + start = i; | |
27 | + }); | |
28 | + start = Math.max(start - 120, 0); | |
29 | + var excerpt = ((start > 0) ? '...' : '') + | |
30 | + $.trim(text.substr(start, 240)) + | |
31 | + ((start + 240 - text.length) ? '...' : ''); | |
32 | + var rv = $('<div class="context"></div>').text(excerpt); | |
33 | + $.each(hlwords, function() { | |
34 | + rv = rv.highlightText(this, 'highlighted'); | |
35 | + }); | |
36 | + return rv; | |
37 | +} | |
38 | + | |
39 | +/** | |
40 | + * Porter Stemmer | |
41 | + */ | |
42 | +var PorterStemmer = function() { | |
43 | + | |
44 | + var step2list = { | |
45 | + ational: 'ate', | |
46 | + tional: 'tion', | |
47 | + enci: 'ence', | |
48 | + anci: 'ance', | |
49 | + izer: 'ize', | |
50 | + bli: 'ble', | |
51 | + alli: 'al', | |
52 | + entli: 'ent', | |
53 | + eli: 'e', | |
54 | + ousli: 'ous', | |
55 | + ization: 'ize', | |
56 | + ation: 'ate', | |
57 | + ator: 'ate', | |
58 | + alism: 'al', | |
59 | + iveness: 'ive', | |
60 | + fulness: 'ful', | |
61 | + ousness: 'ous', | |
62 | + aliti: 'al', | |
63 | + iviti: 'ive', | |
64 | + biliti: 'ble', | |
65 | + logi: 'log' | |
66 | + }; | |
67 | + | |
68 | + var step3list = { | |
69 | + icate: 'ic', | |
70 | + ative: '', | |
71 | + alize: 'al', | |
72 | + iciti: 'ic', | |
73 | + ical: 'ic', | |
74 | + ful: '', | |
75 | + ness: '' | |
76 | + }; | |
77 | + | |
78 | + var c = "[^aeiou]"; // consonant | |
79 | + var v = "[aeiouy]"; // vowel | |
80 | + var C = c + "[^aeiouy]*"; // consonant sequence | |
81 | + var V = v + "[aeiou]*"; // vowel sequence | |
82 | + | |
83 | + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 | |
84 | + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 | |
85 | + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 | |
86 | + var s_v = "^(" + C + ")?" + v; // vowel in stem | |
87 | + | |
88 | + this.stemWord = function (w) { | |
89 | + var stem; | |
90 | + var suffix; | |
91 | + var firstch; | |
92 | + var origword = w; | |
93 | + | |
94 | + if (w.length < 3) | |
95 | + return w; | |
96 | + | |
97 | + var re; | |
98 | + var re2; | |
99 | + var re3; | |
100 | + var re4; | |
101 | + | |
102 | + firstch = w.substr(0,1); | |
103 | + if (firstch == "y") | |
104 | + w = firstch.toUpperCase() + w.substr(1); | |
105 | + | |
106 | + // Step 1a | |
107 | + re = /^(.+?)(ss|i)es$/; | |
108 | + re2 = /^(.+?)([^s])s$/; | |
109 | + | |
110 | + if (re.test(w)) | |
111 | + w = w.replace(re,"$1$2"); | |
112 | + else if (re2.test(w)) | |
113 | + w = w.replace(re2,"$1$2"); | |
114 | + | |
115 | + // Step 1b | |
116 | + re = /^(.+?)eed$/; | |
117 | + re2 = /^(.+?)(ed|ing)$/; | |
118 | + if (re.test(w)) { | |
119 | + var fp = re.exec(w); | |
120 | + re = new RegExp(mgr0); | |
121 | + if (re.test(fp[1])) { | |
122 | + re = /.$/; | |
123 | + w = w.replace(re,""); | |
124 | + } | |
125 | + } | |
126 | + else if (re2.test(w)) { | |
127 | + var fp = re2.exec(w); | |
128 | + stem = fp[1]; | |
129 | + re2 = new RegExp(s_v); | |
130 | + if (re2.test(stem)) { | |
131 | + w = stem; | |
132 | + re2 = /(at|bl|iz)$/; | |
133 | + re3 = new RegExp("([^aeiouylsz])\\1$"); | |
134 | + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); | |
135 | + if (re2.test(w)) | |
136 | + w = w + "e"; | |
137 | + else if (re3.test(w)) { | |
138 | + re = /.$/; | |
139 | + w = w.replace(re,""); | |
140 | + } | |
141 | + else if (re4.test(w)) | |
142 | + w = w + "e"; | |
143 | + } | |
144 | + } | |
145 | + | |
146 | + // Step 1c | |
147 | + re = /^(.+?)y$/; | |
148 | + if (re.test(w)) { | |
149 | + var fp = re.exec(w); | |
150 | + stem = fp[1]; | |
151 | + re = new RegExp(s_v); | |
152 | + if (re.test(stem)) | |
153 | + w = stem + "i"; | |
154 | + } | |
155 | + | |
156 | + // Step 2 | |
157 | + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; | |
158 | + if (re.test(w)) { | |
159 | + var fp = re.exec(w); | |
160 | + stem = fp[1]; | |
161 | + suffix = fp[2]; | |
162 | + re = new RegExp(mgr0); | |
163 | + if (re.test(stem)) | |
164 | + w = stem + step2list[suffix]; | |
165 | + } | |
166 | + | |
167 | + // Step 3 | |
168 | + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; | |
169 | + if (re.test(w)) { | |
170 | + var fp = re.exec(w); | |
171 | + stem = fp[1]; | |
172 | + suffix = fp[2]; | |
173 | + re = new RegExp(mgr0); | |
174 | + if (re.test(stem)) | |
175 | + w = stem + step3list[suffix]; | |
176 | + } | |
177 | + | |
178 | + // Step 4 | |
179 | + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; | |
180 | + re2 = /^(.+?)(s|t)(ion)$/; | |
181 | + if (re.test(w)) { | |
182 | + var fp = re.exec(w); | |
183 | + stem = fp[1]; | |
184 | + re = new RegExp(mgr1); | |
185 | + if (re.test(stem)) | |
186 | + w = stem; | |
187 | + } | |
188 | + else if (re2.test(w)) { | |
189 | + var fp = re2.exec(w); | |
190 | + stem = fp[1] + fp[2]; | |
191 | + re2 = new RegExp(mgr1); | |
192 | + if (re2.test(stem)) | |
193 | + w = stem; | |
194 | + } | |
195 | + | |
196 | + // Step 5 | |
197 | + re = /^(.+?)e$/; | |
198 | + if (re.test(w)) { | |
199 | + var fp = re.exec(w); | |
200 | + stem = fp[1]; | |
201 | + re = new RegExp(mgr1); | |
202 | + re2 = new RegExp(meq1); | |
203 | + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); | |
204 | + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) | |
205 | + w = stem; | |
206 | + } | |
207 | + re = /ll$/; | |
208 | + re2 = new RegExp(mgr1); | |
209 | + if (re.test(w) && re2.test(w)) { | |
210 | + re = /.$/; | |
211 | + w = w.replace(re,""); | |
212 | + } | |
213 | + | |
214 | + // and turn initial Y back to y | |
215 | + if (firstch == "y") | |
216 | + w = firstch.toLowerCase() + w.substr(1); | |
217 | + return w; | |
218 | + } | |
219 | +} | |
220 | + | |
221 | + | |
222 | +/** | |
223 | + * Search Module | |
224 | + */ | |
225 | +var Search = { | |
226 | + | |
227 | + _index : null, | |
228 | + _queued_query : null, | |
229 | + _pulse_status : -1, | |
230 | + | |
231 | + init : function() { | |
232 | + var params = $.getQueryParameters(); | |
233 | + if (params.q) { | |
234 | + var query = params.q[0]; | |
235 | + $('input[name="q"]')[0].value = query; | |
236 | + this.performSearch(query); | |
237 | + } | |
238 | + }, | |
239 | + | |
240 | + loadIndex : function(url) { | |
241 | + $.ajax({type: "GET", url: url, data: null, success: null, | |
242 | + dataType: "script", cache: true}); | |
243 | + }, | |
244 | + | |
245 | + setIndex : function(index) { | |
246 | + var q; | |
247 | + this._index = index; | |
248 | + if ((q = this._queued_query) !== null) { | |
249 | + this._queued_query = null; | |
250 | + Search.query(q); | |
251 | + } | |
252 | + }, | |
253 | + | |
254 | + hasIndex : function() { | |
255 | + return this._index !== null; | |
256 | + }, | |
257 | + | |
258 | + deferQuery : function(query) { | |
259 | + this._queued_query = query; | |
260 | + }, | |
261 | + | |
262 | + stopPulse : function() { | |
263 | + this._pulse_status = 0; | |
264 | + }, | |
265 | + | |
266 | + startPulse : function() { | |
267 | + if (this._pulse_status >= 0) | |
268 | + return; | |
269 | + function pulse() { | |
270 | + Search._pulse_status = (Search._pulse_status + 1) % 4; | |
271 | + var dotString = ''; | |
272 | + for (var i = 0; i < Search._pulse_status; i++) | |
273 | + dotString += '.'; | |
274 | + Search.dots.text(dotString); | |
275 | + if (Search._pulse_status > -1) | |
276 | + window.setTimeout(pulse, 500); | |
277 | + }; | |
278 | + pulse(); | |
279 | + }, | |
280 | + | |
281 | + /** | |
282 | + * perform a search for something | |
283 | + */ | |
284 | + performSearch : function(query) { | |
285 | + // create the required interface elements | |
286 | + this.out = $('#search-results'); | |
287 | + this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out); | |
288 | + this.dots = $('<span></span>').appendTo(this.title); | |
289 | + this.status = $('<p style="display: none"></p>').appendTo(this.out); | |
290 | + this.output = $('<ul class="search"/>').appendTo(this.out); | |
291 | + | |
292 | + $('#search-progress').text(_('Preparing search...')); | |
293 | + this.startPulse(); | |
294 | + | |
295 | + // index already loaded, the browser was quick! | |
296 | + if (this.hasIndex()) | |
297 | + this.query(query); | |
298 | + else | |
299 | + this.deferQuery(query); | |
300 | + }, | |
301 | + | |
302 | + query : function(query) { | |
303 | + var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in', | |
304 | + 'if', 'for', 'no', 'there', 'their', 'was', 'is', | |
305 | + 'be', 'to', 'that', 'but', 'they', 'not', 'such', | |
306 | + 'with', 'by', 'a', 'on', 'these', 'of', 'will', | |
307 | + 'this', 'near', 'the', 'or', 'at']; | |
308 | + | |
309 | + // stem the searchterms and add them to the correct list | |
310 | + var stemmer = new PorterStemmer(); | |
311 | + var searchterms = []; | |
312 | + var excluded = []; | |
313 | + var hlterms = []; | |
314 | + var tmp = query.split(/\s+/); | |
315 | + var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null; | |
316 | + for (var i = 0; i < tmp.length; i++) { | |
317 | + if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) || | |
318 | + tmp[i] == "") { | |
319 | + // skip this "word" | |
320 | + continue; | |
321 | + } | |
322 | + // stem the word | |
323 | + var word = stemmer.stemWord(tmp[i]).toLowerCase(); | |
324 | + // select the correct list | |
325 | + if (word[0] == '-') { | |
326 | + var toAppend = excluded; | |
327 | + word = word.substr(1); | |
328 | + } | |
329 | + else { | |
330 | + var toAppend = searchterms; | |
331 | + hlterms.push(tmp[i].toLowerCase()); | |
332 | + } | |
333 | + // only add if not already in the list | |
334 | + if (!$.contains(toAppend, word)) | |
335 | + toAppend.push(word); | |
336 | + }; | |
337 | + var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); | |
338 | + | |
339 | + // console.debug('SEARCH: searching for:'); | |
340 | + // console.info('required: ', searchterms); | |
341 | + // console.info('excluded: ', excluded); | |
342 | + | |
343 | + // prepare search | |
344 | + var filenames = this._index.filenames; | |
345 | + var titles = this._index.titles; | |
346 | + var terms = this._index.terms; | |
347 | + var objects = this._index.objects; | |
348 | + var objtypes = this._index.objtypes; | |
349 | + var objnames = this._index.objnames; | |
350 | + var fileMap = {}; | |
351 | + var files = null; | |
352 | + // different result priorities | |
353 | + var importantResults = []; | |
354 | + var objectResults = []; | |
355 | + var regularResults = []; | |
356 | + var unimportantResults = []; | |
357 | + $('#search-progress').empty(); | |
358 | + | |
359 | + // lookup as object | |
360 | + if (object != null) { | |
361 | + for (var prefix in objects) { | |
362 | + for (var name in objects[prefix]) { | |
363 | + var fullname = (prefix ? prefix + '.' : '') + name; | |
364 | + if (fullname.toLowerCase().indexOf(object) > -1) { | |
365 | + match = objects[prefix][name]; | |
366 | + descr = objnames[match[1]] + _(', in ') + titles[match[0]]; | |
367 | + // XXX the generated anchors are not generally correct | |
368 | + // XXX there may be custom prefixes | |
369 | + result = [filenames[match[0]], fullname, '#'+fullname, descr]; | |
370 | + switch (match[2]) { | |
371 | + case 1: objectResults.push(result); break; | |
372 | + case 0: importantResults.push(result); break; | |
373 | + case 2: unimportantResults.push(result); break; | |
374 | + } | |
375 | + } | |
376 | + } | |
377 | + } | |
378 | + } | |
379 | + | |
380 | + // sort results descending | |
381 | + objectResults.sort(function(a, b) { | |
382 | + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); | |
383 | + }); | |
384 | + | |
385 | + importantResults.sort(function(a, b) { | |
386 | + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); | |
387 | + }); | |
388 | + | |
389 | + unimportantResults.sort(function(a, b) { | |
390 | + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); | |
391 | + }); | |
392 | + | |
393 | + | |
394 | + // perform the search on the required terms | |
395 | + for (var i = 0; i < searchterms.length; i++) { | |
396 | + var word = searchterms[i]; | |
397 | + // no match but word was a required one | |
398 | + if ((files = terms[word]) == null) | |
399 | + break; | |
400 | + if (files.length == undefined) { | |
401 | + files = [files]; | |
402 | + } | |
403 | + // create the mapping | |
404 | + for (var j = 0; j < files.length; j++) { | |
405 | + var file = files[j]; | |
406 | + if (file in fileMap) | |
407 | + fileMap[file].push(word); | |
408 | + else | |
409 | + fileMap[file] = [word]; | |
410 | + } | |
411 | + } | |
412 | + | |
413 | + // now check if the files don't contain excluded terms | |
414 | + for (var file in fileMap) { | |
415 | + var valid = true; | |
416 | + | |
417 | + // check if all requirements are matched | |
418 | + if (fileMap[file].length != searchterms.length) | |
419 | + continue; | |
420 | + | |
421 | + // ensure that none of the excluded terms is in the | |
422 | + // search result. | |
423 | + for (var i = 0; i < excluded.length; i++) { | |
424 | + if (terms[excluded[i]] == file || | |
425 | + $.contains(terms[excluded[i]] || [], file)) { | |
426 | + valid = false; | |
427 | + break; | |
428 | + } | |
429 | + } | |
430 | + | |
431 | + // if we have still a valid result we can add it | |
432 | + // to the result list | |
433 | + if (valid) | |
434 | + regularResults.push([filenames[file], titles[file], '', null]); | |
435 | + } | |
436 | + | |
437 | + // delete unused variables in order to not waste | |
438 | + // memory until list is retrieved completely | |
439 | + delete filenames, titles, terms; | |
440 | + | |
441 | + // now sort the regular results descending by title | |
442 | + regularResults.sort(function(a, b) { | |
443 | + var left = a[1].toLowerCase(); | |
444 | + var right = b[1].toLowerCase(); | |
445 | + return (left > right) ? -1 : ((left < right) ? 1 : 0); | |
446 | + }); | |
447 | + | |
448 | + // combine all results | |
449 | + var results = unimportantResults.concat(regularResults) | |
450 | + .concat(objectResults).concat(importantResults); | |
451 | + | |
452 | + // print the results | |
453 | + var resultCount = results.length; | |
454 | + function displayNextItem() { | |
455 | + // results left, load the summary and display it | |
456 | + if (results.length) { | |
457 | + var item = results.pop(); | |
458 | + var listItem = $('<li style="display:none"></li>'); | |
459 | + if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') { | |
460 | + // dirhtml builder | |
461 | + var dirname = item[0] + '/'; | |
462 | + if (dirname.match(/\/index\/$/)) { | |
463 | + dirname = dirname.substring(0, dirname.length-6); | |
464 | + } else if (dirname == 'index/') { | |
465 | + dirname = ''; | |
466 | + } | |
467 | + listItem.append($('<a/>').attr('href', | |
468 | + DOCUMENTATION_OPTIONS.URL_ROOT + dirname + | |
469 | + highlightstring + item[2]).html(item[1])); | |
470 | + } else { | |
471 | + // normal html builders | |
472 | + listItem.append($('<a/>').attr('href', | |
473 | + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + | |
474 | + highlightstring + item[2]).html(item[1])); | |
475 | + } | |
476 | + if (item[3]) { | |
477 | + listItem.append($('<span> (' + item[3] + ')</span>')); | |
478 | + Search.output.append(listItem); | |
479 | + listItem.slideDown(5, function() { | |
480 | + displayNextItem(); | |
481 | + }); | |
482 | + } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { | |
483 | + $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + | |
484 | + item[0] + '.txt', function(data) { | |
485 | + if (data != '') { | |
486 | + listItem.append($.makeSearchSummary(data, searchterms, hlterms)); | |
487 | + Search.output.append(listItem); | |
488 | + } | |
489 | + listItem.slideDown(5, function() { | |
490 | + displayNextItem(); | |
491 | + }); | |
492 | + }); | |
493 | + } else { | |
494 | + // no source available, just display title | |
495 | + Search.output.append(listItem); | |
496 | + listItem.slideDown(5, function() { | |
497 | + displayNextItem(); | |
498 | + }); | |
499 | + } | |
500 | + } | |
501 | + // search finished, update title and status message | |
502 | + else { | |
503 | + Search.stopPulse(); | |
504 | + Search.title.text(_('Search Results')); | |
505 | + if (!resultCount) | |
506 | + Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.')); | |
507 | + else | |
508 | + Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount)); | |
509 | + Search.status.fadeIn(500); | |
510 | + } | |
511 | + } | |
512 | + displayNextItem(); | |
513 | + } | |
514 | +} | |
515 | + | |
516 | +$(document).ready(function() { | |
517 | + Search.init(); | |
518 | +}); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/sidebar.js
0 โ 100644
1 | +/* | |
2 | + * sidebar.js | |
3 | + * ~~~~~~~~~~ | |
4 | + * | |
5 | + * This script makes the Sphinx sidebar collapsible. | |
6 | + * | |
7 | + * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds | |
8 | + * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton | |
9 | + * used to collapse and expand the sidebar. | |
10 | + * | |
11 | + * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden | |
12 | + * and the width of the sidebar and the margin-left of the document | |
13 | + * are decreased. When the sidebar is expanded the opposite happens. | |
14 | + * This script saves a per-browser/per-session cookie used to | |
15 | + * remember the position of the sidebar among the pages. | |
16 | + * Once the browser is closed the cookie is deleted and the position | |
17 | + * reset to the default (expanded). | |
18 | + * | |
19 | + * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
20 | + * :license: BSD, see LICENSE for details. | |
21 | + * | |
22 | + */ | |
23 | + | |
24 | +$(function() { | |
25 | + // global elements used by the functions. | |
26 | + // the 'sidebarbutton' element is defined as global after its | |
27 | + // creation, in the add_sidebar_button function | |
28 | + var bodywrapper = $('.bodywrapper'); | |
29 | + var sidebar = $('.sphinxsidebar'); | |
30 | + var sidebarwrapper = $('.sphinxsidebarwrapper'); | |
31 | + | |
32 | + // original margin-left of the bodywrapper and width of the sidebar | |
33 | + // with the sidebar expanded | |
34 | + var bw_margin_expanded = bodywrapper.css('margin-left'); | |
35 | + var ssb_width_expanded = sidebar.width(); | |
36 | + | |
37 | + // margin-left of the bodywrapper and width of the sidebar | |
38 | + // with the sidebar collapsed | |
39 | + var bw_margin_collapsed = '.8em'; | |
40 | + var ssb_width_collapsed = '.8em'; | |
41 | + | |
42 | + // colors used by the current theme | |
43 | + var dark_color = $('.related').css('background-color'); | |
44 | + var light_color = $('.document').css('background-color'); | |
45 | + | |
46 | + function sidebar_is_collapsed() { | |
47 | + return sidebarwrapper.is(':not(:visible)'); | |
48 | + } | |
49 | + | |
50 | + function toggle_sidebar() { | |
51 | + if (sidebar_is_collapsed()) | |
52 | + expand_sidebar(); | |
53 | + else | |
54 | + collapse_sidebar(); | |
55 | + } | |
56 | + | |
57 | + function collapse_sidebar() { | |
58 | + sidebarwrapper.hide(); | |
59 | + sidebar.css('width', ssb_width_collapsed); | |
60 | + bodywrapper.css('margin-left', bw_margin_collapsed); | |
61 | + sidebarbutton.css({ | |
62 | + 'margin-left': '0', | |
63 | + 'height': bodywrapper.height() | |
64 | + }); | |
65 | + sidebarbutton.find('span').text('ยป'); | |
66 | + sidebarbutton.attr('title', _('Expand sidebar')); | |
67 | + document.cookie = 'sidebar=collapsed'; | |
68 | + } | |
69 | + | |
70 | + function expand_sidebar() { | |
71 | + bodywrapper.css('margin-left', bw_margin_expanded); | |
72 | + sidebar.css('width', ssb_width_expanded); | |
73 | + sidebarwrapper.show(); | |
74 | + sidebarbutton.css({ | |
75 | + 'margin-left': ssb_width_expanded-12, | |
76 | + 'height': bodywrapper.height() | |
77 | + }); | |
78 | + sidebarbutton.find('span').text('ยซ'); | |
79 | + sidebarbutton.attr('title', _('Collapse sidebar')); | |
80 | + document.cookie = 'sidebar=expanded'; | |
81 | + } | |
82 | + | |
83 | + function add_sidebar_button() { | |
84 | + sidebarwrapper.css({ | |
85 | + 'float': 'left', | |
86 | + 'margin-right': '0', | |
87 | + 'width': ssb_width_expanded - 28 | |
88 | + }); | |
89 | + // create the button | |
90 | + sidebar.append( | |
91 | + '<div id="sidebarbutton"><span>«</span></div>' | |
92 | + ); | |
93 | + var sidebarbutton = $('#sidebarbutton'); | |
94 | + light_color = sidebarbutton.css('background-color'); | |
95 | + // find the height of the viewport to center the '<<' in the page | |
96 | + var viewport_height; | |
97 | + if (window.innerHeight) | |
98 | + viewport_height = window.innerHeight; | |
99 | + else | |
100 | + viewport_height = $(window).height(); | |
101 | + sidebarbutton.find('span').css({ | |
102 | + 'display': 'block', | |
103 | + 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 | |
104 | + }); | |
105 | + | |
106 | + sidebarbutton.click(toggle_sidebar); | |
107 | + sidebarbutton.attr('title', _('Collapse sidebar')); | |
108 | + sidebarbutton.css({ | |
109 | + 'color': '#FFFFFF', | |
110 | + 'border-left': '1px solid ' + dark_color, | |
111 | + 'font-size': '1.2em', | |
112 | + 'cursor': 'pointer', | |
113 | + 'height': bodywrapper.height(), | |
114 | + 'padding-top': '1px', | |
115 | + 'margin-left': ssb_width_expanded - 12 | |
116 | + }); | |
117 | + | |
118 | + sidebarbutton.hover( | |
119 | + function () { | |
120 | + $(this).css('background-color', dark_color); | |
121 | + }, | |
122 | + function () { | |
123 | + $(this).css('background-color', light_color); | |
124 | + } | |
125 | + ); | |
126 | + } | |
127 | + | |
128 | + function set_position_from_cookie() { | |
129 | + if (!document.cookie) | |
130 | + return; | |
131 | + var items = document.cookie.split(';'); | |
132 | + for(var k=0; k<items.length; k++) { | |
133 | + var key_val = items[k].split('='); | |
134 | + var key = key_val[0]; | |
135 | + if (key == 'sidebar') { | |
136 | + var value = key_val[1]; | |
137 | + if ((value == 'collapsed') && (!sidebar_is_collapsed())) | |
138 | + collapse_sidebar(); | |
139 | + else if ((value == 'expanded') && (sidebar_is_collapsed())) | |
140 | + expand_sidebar(); | |
141 | + } | |
142 | + } | |
143 | + } | |
144 | + | |
145 | + add_sidebar_button(); | |
146 | + var sidebarbutton = $('#sidebarbutton'); | |
147 | + set_position_from_cookie(); | |
148 | +}); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/_static/underscore.js
0 โ 100644
1 | +(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d, | |
2 | +a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c); | |
3 | +var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c, | |
4 | +d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck= | |
5 | +function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a, | |
6 | +function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a, | |
7 | +0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d, | |
8 | +e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d= | |
9 | +a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)}); | |
10 | +return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length); | |
11 | +var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false; | |
12 | +if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length== | |
13 | +0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&& | |
14 | +a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g, | |
15 | +" ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments); | |
16 | +o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})(); | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/bug-feature.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Bugs and feature requests — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="License" href="license.html" /> | |
27 | + <link rel="prev" title="Form fields" href="formfields.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="license.html" title="License" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="formfields.html" title="Form fields" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="bugs-and-feature-requests"> | |
52 | +<h1>Bugs and feature requests<a class="headerlink" href="#bugs-and-feature-requests" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>If you find a bug or think it should work in another way, or you have a good idea to improve the library, please let me know.</p> | |
54 | +<ul class="simple"> | |
55 | +<li>Please submit bugs at <a class="reference external" href="http://sourceforge.net/tracker/?group_id=217109&atid=1039236">http://sourceforge.net/tracker/?group_id=217109&atid=1039236</a>.</li> | |
56 | +<li>Please submit feature requests at <a class="reference external" href="http://sourceforge.net/tracker/?group_id=217109&atid=1039236">http://sourceforge.net/tracker/?group_id=217109&atid=1039236</a>.</li> | |
57 | +<li>Please submit errors found in the documentation to: sigma_z(at)web.de</li> | |
58 | +</ul> | |
59 | +</div> | |
60 | + | |
61 | + | |
62 | + </div> | |
63 | + </div> | |
64 | + </div> | |
65 | + <div class="sphinxsidebar"> | |
66 | + <div class="sphinxsidebarwrapper"> | |
67 | + <h4>Previous topic</h4> | |
68 | + <p class="topless"><a href="formfields.html" | |
69 | + title="previous chapter">Form fields</a></p> | |
70 | + <h4>Next topic</h4> | |
71 | + <p class="topless"><a href="license.html" | |
72 | + title="next chapter">License</a></p> | |
73 | + <h3>This Page</h3> | |
74 | + <ul class="this-page-menu"> | |
75 | + <li><a href="_sources/bug-feature.txt" | |
76 | + rel="nofollow">Show Source</a></li> | |
77 | + </ul> | |
78 | +<div id="searchbox" style="display: none"> | |
79 | + <h3>Quick search</h3> | |
80 | + <form class="search" action="search.html" method="get"> | |
81 | + <input type="text" name="q" size="18" /> | |
82 | + <input type="submit" value="Go" /> | |
83 | + <input type="hidden" name="check_keywords" value="yes" /> | |
84 | + <input type="hidden" name="area" value="default" /> | |
85 | + </form> | |
86 | + <p class="searchtip" style="font-size: 90%"> | |
87 | + Enter search terms or a module, class or function name. | |
88 | + </p> | |
89 | +</div> | |
90 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
91 | + </div> | |
92 | + </div> | |
93 | + <div class="clearer"></div> | |
94 | + </div> | |
95 | + <div class="related"> | |
96 | + <h3>Navigation</h3> | |
97 | + <ul> | |
98 | + <li class="right" style="margin-right: 10px"> | |
99 | + <a href="genindex.html" title="General Index" | |
100 | + >index</a></li> | |
101 | + <li class="right" > | |
102 | + <a href="license.html" title="License" | |
103 | + >next</a> |</li> | |
104 | + <li class="right" > | |
105 | + <a href="formfields.html" title="Form fields" | |
106 | + >previous</a> |</li> | |
107 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
108 | + </ul> | |
109 | + </div> | |
110 | + <div class="footer"> | |
111 | + © Copyright 2012, sigmaz. | |
112 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
113 | + </div> | |
114 | + </body> | |
115 | +</html> | |
0 | 116 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/document-settings.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Document settings — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Sections" href="sections.html" /> | |
27 | + <link rel="prev" title="Getting started" href="getting-started.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="sections.html" title="Sections" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="getting-started.html" title="Getting started" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="document-settings"> | |
52 | +<h1>Document settings<a class="headerlink" href="#document-settings" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<div class="section" id="page-orientation"> | |
54 | +<h2>Page orientation<a class="headerlink" href="#page-orientation" title="Permalink to this headline">ยถ</a></h2> | |
55 | +<p>You can use between <tt class="docutils literal"><span class="pre">landscape</span></tt> and <tt class="docutils literal"><span class="pre">portrait</span></tt> (default) page orientation.</p> | |
56 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
57 | +<span class="c1">// rtf document instance</span> | |
58 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
59 | +<span class="c1">// landscape page orientation</span> | |
60 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setLandscape</span><span class="p">();</span> | |
61 | +</pre></div> | |
62 | +</div> | |
63 | +</div> | |
64 | +<div class="section" id="page-margins"> | |
65 | +<span id="doc-settings-page-margins"></span><h2>Page margins<a class="headerlink" href="#page-margins" title="Permalink to this headline">ยถ</a></h2> | |
66 | +<p>You can set margins for the document and for sections, too. Section margins will overwrite document margins.</p> | |
67 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
68 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
69 | +<span class="c1">// margin left: 1cm</span> | |
70 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginLeft</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
71 | +<span class="c1">// margin right: 2cm</span> | |
72 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginRight</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span> | |
73 | +<span class="c1">// margin top: 3cm</span> | |
74 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginTop</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span> | |
75 | +<span class="c1">// margin bottom: 4cm</span> | |
76 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginBottom</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span> | |
77 | +</pre></div> | |
78 | +</div> | |
79 | +<p>The code example below does the same in a shorter way.</p> | |
80 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
81 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
82 | +<span class="c1">// margins: left 1cm, top 3cm, right 2cm, bottom 4cm</span> | |
83 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMargins</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">);</span> | |
84 | +</pre></div> | |
85 | +</div> | |
86 | +<p>You can define that odd and even pages uses mirrored margins. Section margins can be mirrored, too, and will overwrite the document setting.</p> | |
87 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
88 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
89 | +<span class="c1">// margin left: 2cm</span> | |
90 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginLeft</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span> | |
91 | +<span class="c1">// margin right: 1cm</span> | |
92 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginRight</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
93 | +<span class="c1">// odd pages: left 2cm, right 1cm</span> | |
94 | +<span class="c1">// even pages: left 1cm, right 2cm</span> | |
95 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMirrorMarings</span><span class="p">();</span> | |
96 | +</pre></div> | |
97 | +</div> | |
98 | +</div> | |
99 | +<div class="section" id="page-size"> | |
100 | +<span id="doc-settings-page-size"></span><h2>Page size<a class="headerlink" href="#page-size" title="Permalink to this headline">ยถ</a></h2> | |
101 | +<p>The paper width and height can be set for sections, too, which will overwrite the document settings.</p> | |
102 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
103 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
104 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setPaperWidth</span><span class="p">(</span><span class="mi">14</span><span class="p">);</span> <span class="c1">// in cm</span> | |
105 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setPaperHeight</span><span class="p">(</span><span class="mi">25</span><span class="p">);</span> <span class="c1">// in cm</span> | |
106 | +</pre></div> | |
107 | +</div> | |
108 | +<div class="section" id="units-in-rtf"> | |
109 | +<h3>Units in RTF<a class="headerlink" href="#units-in-rtf" title="Permalink to this headline">ยถ</a></h3> | |
110 | +<p>RTF uses TWIP (“TWentieth of an Inch Point” - 1/20 Point = 1/1440 Inch) <a class="footnote-reference" href="#f1" id="id1">[1]</a> as internal unit. PHPRtfLite uses centimeter as default unit for all measuring unit inputs.</p> | |
111 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
112 | +<span class="nx">PHPRtfLite_Unit</span><span class="o">::</span><span class="na">setGlobalUnit</span><span class="p">(</span><span class="nx">PHPRtfLite_Unit</span><span class="o">::</span><span class="na">UNIT_CM</span><span class="p">);</span> <span class="c1">// inputs used as centimeters</span> | |
113 | +<span class="nx">PHPRtfLite_Unit</span><span class="o">::</span><span class="na">setGlobalUnit</span><span class="p">(</span><span class="nx">PHPRtfLite_Unit</span><span class="o">::</span><span class="na">UNIT_INCH</span><span class="p">);</span> <span class="c1">// inputs used as inches</span> | |
114 | +<span class="nx">PHPRtfLite_Unit</span><span class="o">::</span><span class="na">setGlobalUnit</span><span class="p">(</span><span class="nx">PHPRtfLite_Unit</span><span class="o">::</span><span class="na">UNIT_POINT</span><span class="p">);</span> <span class="c1">// inputs used as points</span> | |
115 | +</pre></div> | |
116 | +</div> | |
117 | +<table class="docutils footnote" frame="void" id="f1" rules="none"> | |
118 | +<colgroup><col class="label" /><col /></colgroup> | |
119 | +<tbody valign="top"> | |
120 | +<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference external" href="http://en.wikipedia.org/wiki/Twip">http://en.wikipedia.org/wiki/Twip</a></td></tr> | |
121 | +</tbody> | |
122 | +</table> | |
123 | +</div> | |
124 | +<div class="section" id="character-set-text-input"> | |
125 | +<h3>Character set (text input)<a class="headerlink" href="#character-set-text-input" title="Permalink to this headline">ยถ</a></h3> | |
126 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
127 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
128 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setCharset</span><span class="p">(</span><span class="s1">'Latin1'</span><span class="p">);</span> <span class="c1">// use Latin1 instead of UTF-8</span> | |
129 | +</pre></div> | |
130 | +</div> | |
131 | +</div> | |
132 | +<div class="section" id="hyphenation"> | |
133 | +<h3>Hyphenation<a class="headerlink" href="#hyphenation" title="Permalink to this headline">ยถ</a></h3> | |
134 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
135 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
136 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setHyphenation</span><span class="p">();</span> | |
137 | +</pre></div> | |
138 | +</div> | |
139 | +</div> | |
140 | +</div> | |
141 | +</div> | |
142 | + | |
143 | + | |
144 | + </div> | |
145 | + </div> | |
146 | + </div> | |
147 | + <div class="sphinxsidebar"> | |
148 | + <div class="sphinxsidebarwrapper"> | |
149 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
150 | + <ul> | |
151 | +<li><a class="reference internal" href="#">Document settings</a><ul> | |
152 | +<li><a class="reference internal" href="#page-orientation">Page orientation</a></li> | |
153 | +<li><a class="reference internal" href="#page-margins">Page margins</a></li> | |
154 | +<li><a class="reference internal" href="#page-size">Page size</a><ul> | |
155 | +<li><a class="reference internal" href="#units-in-rtf">Units in RTF</a></li> | |
156 | +<li><a class="reference internal" href="#character-set-text-input">Character set (text input)</a></li> | |
157 | +<li><a class="reference internal" href="#hyphenation">Hyphenation</a></li> | |
158 | +</ul> | |
159 | +</li> | |
160 | +</ul> | |
161 | +</li> | |
162 | +</ul> | |
163 | + | |
164 | + <h4>Previous topic</h4> | |
165 | + <p class="topless"><a href="getting-started.html" | |
166 | + title="previous chapter">Getting started</a></p> | |
167 | + <h4>Next topic</h4> | |
168 | + <p class="topless"><a href="sections.html" | |
169 | + title="next chapter">Sections</a></p> | |
170 | + <h3>This Page</h3> | |
171 | + <ul class="this-page-menu"> | |
172 | + <li><a href="_sources/document-settings.txt" | |
173 | + rel="nofollow">Show Source</a></li> | |
174 | + </ul> | |
175 | +<div id="searchbox" style="display: none"> | |
176 | + <h3>Quick search</h3> | |
177 | + <form class="search" action="search.html" method="get"> | |
178 | + <input type="text" name="q" size="18" /> | |
179 | + <input type="submit" value="Go" /> | |
180 | + <input type="hidden" name="check_keywords" value="yes" /> | |
181 | + <input type="hidden" name="area" value="default" /> | |
182 | + </form> | |
183 | + <p class="searchtip" style="font-size: 90%"> | |
184 | + Enter search terms or a module, class or function name. | |
185 | + </p> | |
186 | +</div> | |
187 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
188 | + </div> | |
189 | + </div> | |
190 | + <div class="clearer"></div> | |
191 | + </div> | |
192 | + <div class="related"> | |
193 | + <h3>Navigation</h3> | |
194 | + <ul> | |
195 | + <li class="right" style="margin-right: 10px"> | |
196 | + <a href="genindex.html" title="General Index" | |
197 | + >index</a></li> | |
198 | + <li class="right" > | |
199 | + <a href="sections.html" title="Sections" | |
200 | + >next</a> |</li> | |
201 | + <li class="right" > | |
202 | + <a href="getting-started.html" title="Getting started" | |
203 | + >previous</a> |</li> | |
204 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
205 | + </ul> | |
206 | + </div> | |
207 | + <div class="footer"> | |
208 | + © Copyright 2012, sigmaz. | |
209 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
210 | + </div> | |
211 | + </body> | |
212 | +</html> | |
0 | 213 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/enumerations-numberings.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Enumerations / Numberings — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Footnotes / Endnotes" href="footnotes-endnotes.html" /> | |
27 | + <link rel="prev" title="Headers and footers" href="header-footer.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="footnotes-endnotes.html" title="Footnotes / Endnotes" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="header-footer.html" title="Headers and footers" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="enumerations-numberings"> | |
52 | +<h1>Enumerations / Numberings<a class="headerlink" href="#enumerations-numberings" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>Enumerations and numberings can be added to table cells and sections. They can be nested.</p> | |
54 | +<div class="section" id="enumerations"> | |
55 | +<h2>Enumerations<a class="headerlink" href="#enumerations" title="Permalink to this headline">ยถ</a></h2> | |
56 | +<p>Enumeration example:</p> | |
57 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
58 | +<span class="c1">// first level enumeration</span> | |
59 | +<span class="nv">$enum</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_List_Enumeration</span><span class="p">(</span><span class="nv">$rtf</span><span class="p">);</span> | |
60 | +<span class="nv">$enum</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'hello world'</span><span class="p">);</span> | |
61 | +<span class="nv">$enum</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">);</span> | |
62 | +<span class="nv">$enum</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'bar'</span><span class="p">);</span> | |
63 | +<span class="c1">// second level enumeration</span> | |
64 | +<span class="nv">$subEnum</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_List_Enumeration</span><span class="p">(</span><span class="nv">$rtf</span><span class="p">);</span> | |
65 | +<span class="nv">$subEnum</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'hello world'</span><span class="p">);</span> | |
66 | +<span class="nv">$subEnum</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">);</span> | |
67 | +<span class="nv">$subEnum</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'bar'</span><span class="p">);</span> | |
68 | +<span class="nv">$enum</span><span class="o">-></span><span class="na">addList</span><span class="p">(</span><span class="nv">$subEnum</span><span class="p">);</span> | |
69 | + | |
70 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
71 | +<span class="c1">// add enumeration to a section</span> | |
72 | +<span class="nv">$section</span><span class="o">-></span><span class="na">addList</span><span class="p">(</span><span class="nv">$enum</span><span class="p">);</span> | |
73 | +</pre></div> | |
74 | +</div> | |
75 | +<p>For enumerations the following types are supported:</p> | |
76 | +<ul class="simple"> | |
77 | +<li>TYPE_BULLET uses bullets as enumeration characters (default)</li> | |
78 | +<li>TYPE_ARROW uses arrows as enumeration characters</li> | |
79 | +<li>TYPE_CIRCLE uses circles as enumeration characters</li> | |
80 | +<li>TYPE_SQUARE uses squares as enumeration characters</li> | |
81 | +<li>TYPE_DIAMOND uses diamonds as enumeration characters</li> | |
82 | +</ul> | |
83 | +<p>The bullet character are the default character for enumerations.</p> | |
84 | +</div> | |
85 | +<div class="section" id="numberings"> | |
86 | +<h2>Numberings<a class="headerlink" href="#numberings" title="Permalink to this headline">ยถ</a></h2> | |
87 | +<p>Numbering example:</p> | |
88 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
89 | +<span class="c1">// first level numbering</span> | |
90 | +<span class="nv">$numList</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_List_Numbering</span><span class="p">(</span><span class="nv">$rtf</span><span class="p">);</span> | |
91 | +<span class="nv">$numList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'hello world'</span><span class="p">);</span> | |
92 | +<span class="nv">$numList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">);</span> | |
93 | +<span class="nv">$numList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'bar'</span><span class="p">);</span> | |
94 | + | |
95 | +<span class="c1">// second level numbering</span> | |
96 | +<span class="nv">$subNumList</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_List_Numbering</span><span class="p">(</span><span class="nv">$rtf</span><span class="p">);</span> | |
97 | +<span class="nv">$subNumList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'hello world'</span><span class="p">);</span> | |
98 | +<span class="nv">$subNumList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">);</span> | |
99 | +<span class="nv">$subNumList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'bar'</span><span class="p">);</span> | |
100 | +<span class="nv">$numList</span><span class="o">-></span><span class="na">addList</span><span class="p">(</span><span class="nv">$subNumList</span><span class="p">);</span> | |
101 | +<span class="c1">// add item in the first level</span> | |
102 | +<span class="nv">$numList</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'foobar'</span><span class="p">);</span> | |
103 | + | |
104 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
105 | +<span class="c1">// add numbering to a section</span> | |
106 | +<span class="nv">$section</span><span class="o">-></span><span class="na">addList</span><span class="p">(</span><span class="nv">$numList</span><span class="p">);</span> | |
107 | +</pre></div> | |
108 | +</div> | |
109 | +<p>For numberings the following types are supported:</p> | |
110 | +<ul class="simple"> | |
111 | +<li>TYPE_ARABIC_NUM counting in arabic numbers (default)</li> | |
112 | +<li>TYPE_ALPHA_UPPER counting in alphanumeric characters in upper case</li> | |
113 | +<li>TYPE_ALPHA_LOWER counting in alphanumeric characters in lower case</li> | |
114 | +<li>TYPE_ROMAN_UPPER counting in roman characters in upper case</li> | |
115 | +<li>TYPE_ROMAN_LOWER counting in roman characters in lower case</li> | |
116 | +</ul> | |
117 | +<p>Arabic numbering is the default type.</p> | |
118 | +</div> | |
119 | +</div> | |
120 | + | |
121 | + | |
122 | + </div> | |
123 | + </div> | |
124 | + </div> | |
125 | + <div class="sphinxsidebar"> | |
126 | + <div class="sphinxsidebarwrapper"> | |
127 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
128 | + <ul> | |
129 | +<li><a class="reference internal" href="#">Enumerations / Numberings</a><ul> | |
130 | +<li><a class="reference internal" href="#enumerations">Enumerations</a></li> | |
131 | +<li><a class="reference internal" href="#numberings">Numberings</a></li> | |
132 | +</ul> | |
133 | +</li> | |
134 | +</ul> | |
135 | + | |
136 | + <h4>Previous topic</h4> | |
137 | + <p class="topless"><a href="header-footer.html" | |
138 | + title="previous chapter">Headers and footers</a></p> | |
139 | + <h4>Next topic</h4> | |
140 | + <p class="topless"><a href="footnotes-endnotes.html" | |
141 | + title="next chapter">Footnotes / Endnotes</a></p> | |
142 | + <h3>This Page</h3> | |
143 | + <ul class="this-page-menu"> | |
144 | + <li><a href="_sources/enumerations-numberings.txt" | |
145 | + rel="nofollow">Show Source</a></li> | |
146 | + </ul> | |
147 | +<div id="searchbox" style="display: none"> | |
148 | + <h3>Quick search</h3> | |
149 | + <form class="search" action="search.html" method="get"> | |
150 | + <input type="text" name="q" size="18" /> | |
151 | + <input type="submit" value="Go" /> | |
152 | + <input type="hidden" name="check_keywords" value="yes" /> | |
153 | + <input type="hidden" name="area" value="default" /> | |
154 | + </form> | |
155 | + <p class="searchtip" style="font-size: 90%"> | |
156 | + Enter search terms or a module, class or function name. | |
157 | + </p> | |
158 | +</div> | |
159 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
160 | + </div> | |
161 | + </div> | |
162 | + <div class="clearer"></div> | |
163 | + </div> | |
164 | + <div class="related"> | |
165 | + <h3>Navigation</h3> | |
166 | + <ul> | |
167 | + <li class="right" style="margin-right: 10px"> | |
168 | + <a href="genindex.html" title="General Index" | |
169 | + >index</a></li> | |
170 | + <li class="right" > | |
171 | + <a href="footnotes-endnotes.html" title="Footnotes / Endnotes" | |
172 | + >next</a> |</li> | |
173 | + <li class="right" > | |
174 | + <a href="header-footer.html" title="Headers and footers" | |
175 | + >previous</a> |</li> | |
176 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
177 | + </ul> | |
178 | + </div> | |
179 | + <div class="footer"> | |
180 | + © Copyright 2012, sigmaz. | |
181 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
182 | + </div> | |
183 | + </body> | |
184 | +</html> | |
0 | 185 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/feature-overview.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Feature overview — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Getting started" href="getting-started.html" /> | |
27 | + <link rel="prev" title="Introduction" href="introduction.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="getting-started.html" title="Getting started" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="introduction.html" title="Introduction" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="feature-overview"> | |
52 | +<h1>Feature overview<a class="headerlink" href="#feature-overview" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>These are the main features PHPRtfLite offers:</p> | |
54 | +<ul class="simple"> | |
55 | +<li>Table support (even nested)</li> | |
56 | +<li>Image support</li> | |
57 | +<li>Header/Footer</li> | |
58 | +<li>Hyperlinks</li> | |
59 | +<li>Footnotes/Endnotes</li> | |
60 | +<li>Form fields (Checkbox, Dropdown, Text)</li> | |
61 | +<li>Enumerations/Numberings</li> | |
62 | +<li>UTF-8 support</li> | |
63 | +</ul> | |
64 | +</div> | |
65 | + | |
66 | + | |
67 | + </div> | |
68 | + </div> | |
69 | + </div> | |
70 | + <div class="sphinxsidebar"> | |
71 | + <div class="sphinxsidebarwrapper"> | |
72 | + <h4>Previous topic</h4> | |
73 | + <p class="topless"><a href="introduction.html" | |
74 | + title="previous chapter">Introduction</a></p> | |
75 | + <h4>Next topic</h4> | |
76 | + <p class="topless"><a href="getting-started.html" | |
77 | + title="next chapter">Getting started</a></p> | |
78 | + <h3>This Page</h3> | |
79 | + <ul class="this-page-menu"> | |
80 | + <li><a href="_sources/feature-overview.txt" | |
81 | + rel="nofollow">Show Source</a></li> | |
82 | + </ul> | |
83 | +<div id="searchbox" style="display: none"> | |
84 | + <h3>Quick search</h3> | |
85 | + <form class="search" action="search.html" method="get"> | |
86 | + <input type="text" name="q" size="18" /> | |
87 | + <input type="submit" value="Go" /> | |
88 | + <input type="hidden" name="check_keywords" value="yes" /> | |
89 | + <input type="hidden" name="area" value="default" /> | |
90 | + </form> | |
91 | + <p class="searchtip" style="font-size: 90%"> | |
92 | + Enter search terms or a module, class or function name. | |
93 | + </p> | |
94 | +</div> | |
95 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
96 | + </div> | |
97 | + </div> | |
98 | + <div class="clearer"></div> | |
99 | + </div> | |
100 | + <div class="related"> | |
101 | + <h3>Navigation</h3> | |
102 | + <ul> | |
103 | + <li class="right" style="margin-right: 10px"> | |
104 | + <a href="genindex.html" title="General Index" | |
105 | + >index</a></li> | |
106 | + <li class="right" > | |
107 | + <a href="getting-started.html" title="Getting started" | |
108 | + >next</a> |</li> | |
109 | + <li class="right" > | |
110 | + <a href="introduction.html" title="Introduction" | |
111 | + >previous</a> |</li> | |
112 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
113 | + </ul> | |
114 | + </div> | |
115 | + <div class="footer"> | |
116 | + © Copyright 2012, sigmaz. | |
117 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
118 | + </div> | |
119 | + </body> | |
120 | +</html> | |
0 | 121 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/footnotes-endnotes.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Footnotes / Endnotes — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Form fields" href="formfields.html" /> | |
27 | + <link rel="prev" title="Enumerations / Numberings" href="enumerations-numberings.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="formfields.html" title="Form fields" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="enumerations-numberings.html" title="Enumerations / Numberings" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="footnotes-endnotes"> | |
52 | +<h1>Footnotes / Endnotes<a class="headerlink" href="#footnotes-endnotes" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>The difference between foot- and endnotes is that footnotes appear directly after the section where they are defined while endnotes appear at the page bottom. There is no difference in the handling. They can be defined for tables cells and sections.</p> | |
54 | +<p>Foot note example:</p> | |
55 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
56 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Text ...'</span><span class="p">);</span> | |
57 | +<span class="nv">$section</span><span class="o">-></span><span class="na">addFootnote</span><span class="p">(</span><span class="s1">'This is the footnote text'</span><span class="p">);</span> | |
58 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Text after footnote mark ...'</span><span class="p">);</span> | |
59 | +</pre></div> | |
60 | +</div> | |
61 | +</div> | |
62 | + | |
63 | + | |
64 | + </div> | |
65 | + </div> | |
66 | + </div> | |
67 | + <div class="sphinxsidebar"> | |
68 | + <div class="sphinxsidebarwrapper"> | |
69 | + <h4>Previous topic</h4> | |
70 | + <p class="topless"><a href="enumerations-numberings.html" | |
71 | + title="previous chapter">Enumerations / Numberings</a></p> | |
72 | + <h4>Next topic</h4> | |
73 | + <p class="topless"><a href="formfields.html" | |
74 | + title="next chapter">Form fields</a></p> | |
75 | + <h3>This Page</h3> | |
76 | + <ul class="this-page-menu"> | |
77 | + <li><a href="_sources/footnotes-endnotes.txt" | |
78 | + rel="nofollow">Show Source</a></li> | |
79 | + </ul> | |
80 | +<div id="searchbox" style="display: none"> | |
81 | + <h3>Quick search</h3> | |
82 | + <form class="search" action="search.html" method="get"> | |
83 | + <input type="text" name="q" size="18" /> | |
84 | + <input type="submit" value="Go" /> | |
85 | + <input type="hidden" name="check_keywords" value="yes" /> | |
86 | + <input type="hidden" name="area" value="default" /> | |
87 | + </form> | |
88 | + <p class="searchtip" style="font-size: 90%"> | |
89 | + Enter search terms or a module, class or function name. | |
90 | + </p> | |
91 | +</div> | |
92 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
93 | + </div> | |
94 | + </div> | |
95 | + <div class="clearer"></div> | |
96 | + </div> | |
97 | + <div class="related"> | |
98 | + <h3>Navigation</h3> | |
99 | + <ul> | |
100 | + <li class="right" style="margin-right: 10px"> | |
101 | + <a href="genindex.html" title="General Index" | |
102 | + >index</a></li> | |
103 | + <li class="right" > | |
104 | + <a href="formfields.html" title="Form fields" | |
105 | + >next</a> |</li> | |
106 | + <li class="right" > | |
107 | + <a href="enumerations-numberings.html" title="Enumerations / Numberings" | |
108 | + >previous</a> |</li> | |
109 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
110 | + </ul> | |
111 | + </div> | |
112 | + <div class="footer"> | |
113 | + © Copyright 2012, sigmaz. | |
114 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
115 | + </div> | |
116 | + </body> | |
117 | +</html> | |
0 | 118 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/formatting.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Formatting — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Tables" href="tables.html" /> | |
27 | + <link rel="prev" title="Sections" href="sections.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="tables.html" title="Tables" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="sections.html" title="Sections" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="formatting"> | |
52 | +<h1>Formatting<a class="headerlink" href="#formatting" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<div class="section" id="fonts"> | |
54 | +<h2>Fonts<a class="headerlink" href="#fonts" title="Permalink to this headline">ยถ</a></h2> | |
55 | +<div class="section" id="size-font-family-font-color-background-color"> | |
56 | +<h3>Size, Font family, Font color, Background color<a class="headerlink" href="#size-font-family-font-color-background-color" title="Permalink to this headline">ยถ</a></h3> | |
57 | +<p>To format text, you can use the <tt class="docutils literal"><span class="pre">PHPRtfLite_Font</span></tt>.</p> | |
58 | +<p>Example sets size to 12pt, font family to Arial, font color to red, and background color to blue:</p> | |
59 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
60 | +<span class="c1">// some bootstraping here</span> | |
61 | + | |
62 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
63 | +<span class="nv">$font</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="s1">'Arial'</span><span class="p">,</span> <span class="s1">'#FF0000'</span><span class="p">,</span> <span class="s1">'#0000FF'</span><span class="p">);</span> | |
64 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">,</span> <span class="nv">$font</span><span class="p">);</span> | |
65 | +</pre></div> | |
66 | +</div> | |
67 | +</div> | |
68 | +<div class="section" id="text-formatting"> | |
69 | +<h3>Text formatting<a class="headerlink" href="#text-formatting" title="Permalink to this headline">ยถ</a></h3> | |
70 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
71 | +<span class="c1">// some bootstraping here</span> | |
72 | + | |
73 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
74 | +<span class="nv">$font</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">();</span> | |
75 | +<span class="nv">$font</span><span class="o">-></span><span class="na">setBold</span><span class="p">();</span> <span class="c1">// bold font</span> | |
76 | +<span class="nv">$font</span><span class="o">-></span><span class="na">setItalic</span><span class="p">();</span> <span class="c1">// italic font</span> | |
77 | +<span class="nv">$font</span><span class="o">-></span><span class="na">setUnderline</span><span class="p">();</span> <span class="c1">// underline font</span> | |
78 | +<span class="nv">$font</span><span class="o">-></span><span class="na">setStriked</span><span class="p">();</span> <span class="c1">// strike text</span> | |
79 | +<span class="nv">$font</span><span class="o">-></span><span class="na">setDoubleStriked</span><span class="p">();</span> <span class="c1">// double strike text</span> | |
80 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">,</span> <span class="nv">$font</span><span class="p">);</span> | |
81 | +</pre></div> | |
82 | +</div> | |
83 | +</div> | |
84 | +<div class="section" id="html-tags-as-text-formatting"> | |
85 | +<h3>HTML-Tags as text formatting<a class="headerlink" href="#html-tags-as-text-formatting" title="Permalink to this headline">ยถ</a></h3> | |
86 | +<p>You can use HTML-Tags in your text to format text:</p> | |
87 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
88 | +<span class="c1">// some bootstraping here</span> | |
89 | + | |
90 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
91 | + | |
92 | +<span class="c1">// text will be displayed as bold</span> | |
93 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<strong>text</strong>'</span><span class="p">);</span> | |
94 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<b>text</b>'</span><span class="p">);</span> | |
95 | + | |
96 | +<span class="c1">// text will be displayed as italic</span> | |
97 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<em>text</em>'</span><span class="p">);</span> | |
98 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<i>text</i>'</span><span class="p">);</span> | |
99 | + | |
100 | +<span class="c1">// text will be displayed as underlined</span> | |
101 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<u>text</u>'</span><span class="p">);</span> | |
102 | + | |
103 | +<span class="c1">// text will start with a bullet</span> | |
104 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<bullet> text'</span><span class="p">);</span> | |
105 | + | |
106 | +<span class="c1">// text will have a line break after</span> | |
107 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'text<br>'</span><span class="p">);</span> | |
108 | + | |
109 | +<span class="c1">// text will have a horizontal rule after</span> | |
110 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'text<hr>'</span><span class="p">);</span> | |
111 | + | |
112 | +<span class="c1">// tabulator will be displayed between text</span> | |
113 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'text<tab>text'</span><span class="p">);</span> | |
114 | + | |
115 | +<span class="c1">// will display section number before "hello world"</span> | |
116 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<sectnum> hello world'</span><span class="p">);</span> | |
117 | + | |
118 | +<span class="c1">// will display page number before "hello world"</span> | |
119 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'<pagenum> hello world'</span><span class="p">);</span> | |
120 | +</pre></div> | |
121 | +</div> | |
122 | +</div> | |
123 | +<div class="section" id="text-animation"> | |
124 | +<h3>Text animation<a class="headerlink" href="#text-animation" title="Permalink to this headline">ยถ</a></h3> | |
125 | +<p>Class constants for text animation:</p> | |
126 | +<ul class="simple"> | |
127 | +<li><tt class="docutils literal"><span class="pre">ANIMATE_LAS_VEGAS_LIGHTS</span></tt></li> | |
128 | +<li><tt class="docutils literal"><span class="pre">ANIMATE_BLINKING_BACKGROUND</span></tt></li> | |
129 | +<li><tt class="docutils literal"><span class="pre">ANIMATE_SPARKLE_TEXT</span></tt></li> | |
130 | +<li><tt class="docutils literal"><span class="pre">ANIMATE_MARCHING_BLACK_ANTS</span></tt></li> | |
131 | +<li><tt class="docutils literal"><span class="pre">ANIMATE_MARCHING_RED_ANTS</span></tt></li> | |
132 | +<li><tt class="docutils literal"><span class="pre">ANIMATE_SHIMMER</span></tt></li> | |
133 | +</ul> | |
134 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
135 | +<span class="c1">// some bootstraping here</span> | |
136 | + | |
137 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
138 | +<span class="nv">$font</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">();</span> | |
139 | +<span class="c1">// text with marching black ants around</span> | |
140 | +<span class="nv">$font</span><span class="o">-></span><span class="na">setAnimation</span><span class="p">(</span><span class="nx">PHPRtfLite_Font</span><span class="o">::</span><span class="na">ANIMATE_MARCHING_BLACK_ANTS</span><span class="p">);</span> | |
141 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">,</span> <span class="nv">$font</span><span class="p">);</span> | |
142 | +</pre></div> | |
143 | +</div> | |
144 | +</div> | |
145 | +</div> | |
146 | +<div class="section" id="paragraph-formatting"> | |
147 | +<h2>Paragraph formatting<a class="headerlink" href="#paragraph-formatting" title="Permalink to this headline">ยถ</a></h2> | |
148 | +<div class="section" id="text-alignment"> | |
149 | +<h3>Text alignment<a class="headerlink" href="#text-alignment" title="Permalink to this headline">ยถ</a></h3> | |
150 | +<p>Class constants for text alignment:</p> | |
151 | +<ul class="simple"> | |
152 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_LEFT</span></tt></li> | |
153 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_RIGHT</span></tt></li> | |
154 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_CENTER</span></tt></li> | |
155 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_JUSTIFY</span></tt></li> | |
156 | +</ul> | |
157 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
158 | +<span class="c1">// some bootstraping here</span> | |
159 | + | |
160 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
161 | +<span class="c1">// centered text</span> | |
162 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">(</span><span class="nx">PHPRtfLite_ParFormat</span><span class="o">::</span><span class="na">TEXT_ALIGN_CENTER</span><span class="p">);</span> | |
163 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">,</span> <span class="k">null</span><span class="p">,</span> <span class="nv">$parFormat</span><span class="p">);</span> | |
164 | +</pre></div> | |
165 | +</div> | |
166 | +</div> | |
167 | +<div class="section" id="paragraph-indention"> | |
168 | +<h3>Paragraph indention<a class="headerlink" href="#paragraph-indention" title="Permalink to this headline">ยถ</a></h3> | |
169 | +<p>First line indention:</p> | |
170 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
171 | +<span class="c1">// some bootstraping here</span> | |
172 | + | |
173 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
174 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">();</span> | |
175 | +<span class="c1">// first line of paragraph will be indented by 1cm</span> | |
176 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setIndentFirstLine</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
177 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">,</span> <span class="k">null</span><span class="p">,</span> <span class="nv">$parFormat</span><span class="p">);</span> | |
178 | +</pre></div> | |
179 | +</div> | |
180 | +<p>Indent the whole paragraph left or/and right:</p> | |
181 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
182 | +<span class="c1">// some bootstraping here</span> | |
183 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">();</span> | |
184 | +<span class="c1">// paragraph will be indented by 1cm from the left and right</span> | |
185 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setIndentLeft</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
186 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setIndentRight</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
187 | +</pre></div> | |
188 | +</div> | |
189 | +</div> | |
190 | +<div class="section" id="space-between-paragraphs"> | |
191 | +<h3>Space between paragraphs<a class="headerlink" href="#space-between-paragraphs" title="Permalink to this headline">ยถ</a></h3> | |
192 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
193 | +<span class="c1">// some bootstraping here</span> | |
194 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">();</span> | |
195 | +<span class="c1">// spaces in lines after the paragraph</span> | |
196 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setSpaceAfter</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
197 | +<span class="c1">// spaces in lines before the paragraph</span> | |
198 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setSpaceBefore</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
199 | +</pre></div> | |
200 | +</div> | |
201 | +</div> | |
202 | +<div class="section" id="space-between-lines"> | |
203 | +<h3>Space between lines<a class="headerlink" href="#space-between-lines" title="Permalink to this headline">ยถ</a></h3> | |
204 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
205 | +<span class="c1">// some bootstraping here</span> | |
206 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">();</span> | |
207 | +<span class="c1">// spaces between lines</span> | |
208 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setSpaceBetweenLines</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
209 | +</pre></div> | |
210 | +</div> | |
211 | +</div> | |
212 | +<div class="section" id="background-color"> | |
213 | +<h3>Background color<a class="headerlink" href="#background-color" title="Permalink to this headline">ยถ</a></h3> | |
214 | +<p>Paragraph background color:</p> | |
215 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
216 | +<span class="c1">// some bootstraping here</span> | |
217 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">();</span> | |
218 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setBackgroundColor</span><span class="p">(</span><span class="s1">'#FF0000'</span><span class="p">);</span> | |
219 | +</pre></div> | |
220 | +</div> | |
221 | +</div> | |
222 | +<div class="section" id="borders"> | |
223 | +<span id="id1"></span><h3>Borders<a class="headerlink" href="#borders" title="Permalink to this headline">ยถ</a></h3> | |
224 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
225 | +<span class="c1">// some bootstraping here</span> | |
226 | + | |
227 | +<span class="nv">$border</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Border</span><span class="p">(</span> | |
228 | + <span class="nv">$rtf</span><span class="p">,</span> <span class="c1">// PHPRtfLite instance</span> | |
229 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#00FF00'</span><span class="p">),</span> <span class="c1">// left border: 2pt, green color</span> | |
230 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#FFFF00'</span><span class="p">),</span> <span class="c1">// top border: 1pt, yellow color</span> | |
231 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#FF0000'</span><span class="p">),</span> <span class="c1">// right border: 2pt, red color</span> | |
232 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#0000FF'</span><span class="p">)</span> <span class="c1">// bottom border: 1pt, blue color</span> | |
233 | +<span class="p">);</span> | |
234 | +<span class="nv">$parFormat</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">();</span> | |
235 | +<span class="nv">$parFormat</span><span class="o">-></span><span class="na">setBorder</span><span class="p">(</span><span class="nv">$border</span><span class="p">);</span> | |
236 | +</pre></div> | |
237 | +</div> | |
238 | +<p>There are some alternative ways to create borders:</p> | |
239 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
240 | +<span class="c1">// some bootstraping here</span> | |
241 | + | |
242 | +<span class="c1">// creating border in a different way: 1pt dotted red border with 0.5cm space</span> | |
243 | +<span class="nv">$border</span> <span class="o">=</span> <span class="nx">PHPRtfLite_Border</span><span class="o">::</span><span class="na">create</span><span class="p">(</span><span class="nv">$rtf</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'#FF3333'</span><span class="p">,</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="o">::</span><span class="na">TYPE_DOT</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">);</span> | |
244 | +</pre></div> | |
245 | +</div> | |
246 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
247 | +<span class="c1">// some bootstraping here</span> | |
248 | + | |
249 | +<span class="c1">// creating border in a different way: 1pt dotted red border</span> | |
250 | +<span class="nv">$border</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Border</span><span class="p">(</span><span class="nv">$rtf</span><span class="p">);</span> | |
251 | +<span class="c1">// 2pt border in green color</span> | |
252 | +<span class="nv">$border</span><span class="o">-></span><span class="na">setBorders</span><span class="p">(</span><span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#00FF00'</span><span class="p">));</span> | |
253 | +</pre></div> | |
254 | +</div> | |
255 | +<div class="section" id="border-style-types"> | |
256 | +<h4>Border style types<a class="headerlink" href="#border-style-types" title="Permalink to this headline">ยถ</a></h4> | |
257 | +<p>Border style types represented as class constants of <tt class="docutils literal"><span class="pre">PHPRtfLite_Border_Format</span></tt> are:</p> | |
258 | +<ul class="simple"> | |
259 | +<li><tt class="docutils literal"><span class="pre">TYPE_SINGLE</span></tt></li> | |
260 | +<li><tt class="docutils literal"><span class="pre">TYPE_DOT</span></tt></li> | |
261 | +<li><tt class="docutils literal"><span class="pre">TYPE_DASH</span></tt></li> | |
262 | +<li><tt class="docutils literal"><span class="pre">TYPE_DOTDASH</span></tt></li> | |
263 | +</ul> | |
264 | +</div> | |
265 | +</div> | |
266 | +</div> | |
267 | +</div> | |
268 | + | |
269 | + | |
270 | + </div> | |
271 | + </div> | |
272 | + </div> | |
273 | + <div class="sphinxsidebar"> | |
274 | + <div class="sphinxsidebarwrapper"> | |
275 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
276 | + <ul> | |
277 | +<li><a class="reference internal" href="#">Formatting</a><ul> | |
278 | +<li><a class="reference internal" href="#fonts">Fonts</a><ul> | |
279 | +<li><a class="reference internal" href="#size-font-family-font-color-background-color">Size, Font family, Font color, Background color</a></li> | |
280 | +<li><a class="reference internal" href="#text-formatting">Text formatting</a></li> | |
281 | +<li><a class="reference internal" href="#html-tags-as-text-formatting">HTML-Tags as text formatting</a></li> | |
282 | +<li><a class="reference internal" href="#text-animation">Text animation</a></li> | |
283 | +</ul> | |
284 | +</li> | |
285 | +<li><a class="reference internal" href="#paragraph-formatting">Paragraph formatting</a><ul> | |
286 | +<li><a class="reference internal" href="#text-alignment">Text alignment</a></li> | |
287 | +<li><a class="reference internal" href="#paragraph-indention">Paragraph indention</a></li> | |
288 | +<li><a class="reference internal" href="#space-between-paragraphs">Space between paragraphs</a></li> | |
289 | +<li><a class="reference internal" href="#space-between-lines">Space between lines</a></li> | |
290 | +<li><a class="reference internal" href="#background-color">Background color</a></li> | |
291 | +<li><a class="reference internal" href="#borders">Borders</a><ul> | |
292 | +<li><a class="reference internal" href="#border-style-types">Border style types</a></li> | |
293 | +</ul> | |
294 | +</li> | |
295 | +</ul> | |
296 | +</li> | |
297 | +</ul> | |
298 | +</li> | |
299 | +</ul> | |
300 | + | |
301 | + <h4>Previous topic</h4> | |
302 | + <p class="topless"><a href="sections.html" | |
303 | + title="previous chapter">Sections</a></p> | |
304 | + <h4>Next topic</h4> | |
305 | + <p class="topless"><a href="tables.html" | |
306 | + title="next chapter">Tables</a></p> | |
307 | + <h3>This Page</h3> | |
308 | + <ul class="this-page-menu"> | |
309 | + <li><a href="_sources/formatting.txt" | |
310 | + rel="nofollow">Show Source</a></li> | |
311 | + </ul> | |
312 | +<div id="searchbox" style="display: none"> | |
313 | + <h3>Quick search</h3> | |
314 | + <form class="search" action="search.html" method="get"> | |
315 | + <input type="text" name="q" size="18" /> | |
316 | + <input type="submit" value="Go" /> | |
317 | + <input type="hidden" name="check_keywords" value="yes" /> | |
318 | + <input type="hidden" name="area" value="default" /> | |
319 | + </form> | |
320 | + <p class="searchtip" style="font-size: 90%"> | |
321 | + Enter search terms or a module, class or function name. | |
322 | + </p> | |
323 | +</div> | |
324 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
325 | + </div> | |
326 | + </div> | |
327 | + <div class="clearer"></div> | |
328 | + </div> | |
329 | + <div class="related"> | |
330 | + <h3>Navigation</h3> | |
331 | + <ul> | |
332 | + <li class="right" style="margin-right: 10px"> | |
333 | + <a href="genindex.html" title="General Index" | |
334 | + >index</a></li> | |
335 | + <li class="right" > | |
336 | + <a href="tables.html" title="Tables" | |
337 | + >next</a> |</li> | |
338 | + <li class="right" > | |
339 | + <a href="sections.html" title="Sections" | |
340 | + >previous</a> |</li> | |
341 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
342 | + </ul> | |
343 | + </div> | |
344 | + <div class="footer"> | |
345 | + © Copyright 2012, sigmaz. | |
346 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
347 | + </div> | |
348 | + </body> | |
349 | +</html> | |
0 | 350 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/formfields.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Form fields — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Bugs and feature requests" href="bug-feature.html" /> | |
27 | + <link rel="prev" title="Footnotes / Endnotes" href="footnotes-endnotes.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="bug-feature.html" title="Bugs and feature requests" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="footnotes-endnotes.html" title="Footnotes / Endnotes" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="form-fields"> | |
52 | +<h1>Form fields<a class="headerlink" href="#form-fields" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>Form fields can be used in cells and sections. The supported form fields in PHPRtfLite are</p> | |
54 | +<ul class="simple"> | |
55 | +<li>Checkboxes</li> | |
56 | +<li>Dropdown boxes and</li> | |
57 | +<li>Text fields</li> | |
58 | +</ul> | |
59 | +<div class="section" id="checkbox"> | |
60 | +<h2>Checkbox<a class="headerlink" href="#checkbox" title="Permalink to this headline">ยถ</a></h2> | |
61 | +<p>Checkbox example:</p> | |
62 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
63 | +<span class="nv">$checkbox</span> <span class="o">=</span> <span class="nv">$cell</span><span class="o">-></span><span class="na">addCheckbox</span><span class="p">();</span> | |
64 | +<span class="c1">// checkbox is checked</span> | |
65 | +<span class="nv">$checkbox</span><span class="o">-></span><span class="na">setChecked</span><span class="p">();</span> | |
66 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'checkbox label'</span><span class="p">);</span> | |
67 | +</pre></div> | |
68 | +</div> | |
69 | +</div> | |
70 | +<div class="section" id="dropdown"> | |
71 | +<h2>Dropdown<a class="headerlink" href="#dropdown" title="Permalink to this headline">ยถ</a></h2> | |
72 | +<p>Dropdown box example:</p> | |
73 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
74 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'dropdown label'</span><span class="p">);</span> | |
75 | +<span class="nv">$dropdown</span> <span class="o">=</span> <span class="nv">$cell</span><span class="o">-></span><span class="na">addDropdown</span><span class="p">();</span> | |
76 | +<span class="c1">// set dropdown items</span> | |
77 | +<span class="nv">$dropdown</span><span class="o">-></span><span class="na">setItems</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="s1">'pear'</span><span class="p">,</span> <span class="s1">'apple'</span><span class="p">,</span> <span class="s1">'pineapple'</span><span class="p">));</span> | |
78 | +<span class="c1">// add dropdown item</span> | |
79 | +<span class="nv">$dropdown</span><span class="o">-></span><span class="na">addItem</span><span class="p">(</span><span class="s1">'orange'</span><span class="p">);</span> | |
80 | +</pre></div> | |
81 | +</div> | |
82 | +</div> | |
83 | +<div class="section" id="text-field"> | |
84 | +<h2>Text field<a class="headerlink" href="#text-field" title="Permalink to this headline">ยถ</a></h2> | |
85 | +<p>Text field example:</p> | |
86 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
87 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'text field label'</span><span class="p">);</span> | |
88 | +<span class="nv">$textField</span> <span class="o">=</span> <span class="nv">$cell</span><span class="o">-></span><span class="na">addTextField</span><span class="p">();</span> | |
89 | +<span class="c1">// set text field text</span> | |
90 | +<span class="nv">$textField</span><span class="o">-></span><span class="na">setDefaultValue</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">);</span> | |
91 | +</pre></div> | |
92 | +</div> | |
93 | +</div> | |
94 | +</div> | |
95 | + | |
96 | + | |
97 | + </div> | |
98 | + </div> | |
99 | + </div> | |
100 | + <div class="sphinxsidebar"> | |
101 | + <div class="sphinxsidebarwrapper"> | |
102 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
103 | + <ul> | |
104 | +<li><a class="reference internal" href="#">Form fields</a><ul> | |
105 | +<li><a class="reference internal" href="#checkbox">Checkbox</a></li> | |
106 | +<li><a class="reference internal" href="#dropdown">Dropdown</a></li> | |
107 | +<li><a class="reference internal" href="#text-field">Text field</a></li> | |
108 | +</ul> | |
109 | +</li> | |
110 | +</ul> | |
111 | + | |
112 | + <h4>Previous topic</h4> | |
113 | + <p class="topless"><a href="footnotes-endnotes.html" | |
114 | + title="previous chapter">Footnotes / Endnotes</a></p> | |
115 | + <h4>Next topic</h4> | |
116 | + <p class="topless"><a href="bug-feature.html" | |
117 | + title="next chapter">Bugs and feature requests</a></p> | |
118 | + <h3>This Page</h3> | |
119 | + <ul class="this-page-menu"> | |
120 | + <li><a href="_sources/formfields.txt" | |
121 | + rel="nofollow">Show Source</a></li> | |
122 | + </ul> | |
123 | +<div id="searchbox" style="display: none"> | |
124 | + <h3>Quick search</h3> | |
125 | + <form class="search" action="search.html" method="get"> | |
126 | + <input type="text" name="q" size="18" /> | |
127 | + <input type="submit" value="Go" /> | |
128 | + <input type="hidden" name="check_keywords" value="yes" /> | |
129 | + <input type="hidden" name="area" value="default" /> | |
130 | + </form> | |
131 | + <p class="searchtip" style="font-size: 90%"> | |
132 | + Enter search terms or a module, class or function name. | |
133 | + </p> | |
134 | +</div> | |
135 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
136 | + </div> | |
137 | + </div> | |
138 | + <div class="clearer"></div> | |
139 | + </div> | |
140 | + <div class="related"> | |
141 | + <h3>Navigation</h3> | |
142 | + <ul> | |
143 | + <li class="right" style="margin-right: 10px"> | |
144 | + <a href="genindex.html" title="General Index" | |
145 | + >index</a></li> | |
146 | + <li class="right" > | |
147 | + <a href="bug-feature.html" title="Bugs and feature requests" | |
148 | + >next</a> |</li> | |
149 | + <li class="right" > | |
150 | + <a href="footnotes-endnotes.html" title="Footnotes / Endnotes" | |
151 | + >previous</a> |</li> | |
152 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
153 | + </ul> | |
154 | + </div> | |
155 | + <div class="footer"> | |
156 | + © Copyright 2012, sigmaz. | |
157 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
158 | + </div> | |
159 | + </body> | |
160 | +</html> | |
0 | 161 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/genindex.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Index — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + </head> | |
27 | + <body> | |
28 | + <div class="related"> | |
29 | + <h3>Navigation</h3> | |
30 | + <ul> | |
31 | + <li class="right" style="margin-right: 10px"> | |
32 | + <a href="#" title="General Index" | |
33 | + accesskey="I">index</a></li> | |
34 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
35 | + </ul> | |
36 | + </div> | |
37 | + | |
38 | + <div class="document"> | |
39 | + <div class="documentwrapper"> | |
40 | + <div class="bodywrapper"> | |
41 | + <div class="body"> | |
42 | + | |
43 | + | |
44 | + <h1 id="index">Index</h1> | |
45 | + | |
46 | + <div class="genindex-jumpbox"> | |
47 | + | |
48 | + </div> | |
49 | + | |
50 | + | |
51 | + </div> | |
52 | + </div> | |
53 | + </div> | |
54 | + <div class="sphinxsidebar"> | |
55 | + <div class="sphinxsidebarwrapper"> | |
56 | + | |
57 | + | |
58 | + | |
59 | +<div id="searchbox" style="display: none"> | |
60 | + <h3>Quick search</h3> | |
61 | + <form class="search" action="search.html" method="get"> | |
62 | + <input type="text" name="q" size="18" /> | |
63 | + <input type="submit" value="Go" /> | |
64 | + <input type="hidden" name="check_keywords" value="yes" /> | |
65 | + <input type="hidden" name="area" value="default" /> | |
66 | + </form> | |
67 | + <p class="searchtip" style="font-size: 90%"> | |
68 | + Enter search terms or a module, class or function name. | |
69 | + </p> | |
70 | +</div> | |
71 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
72 | + </div> | |
73 | + </div> | |
74 | + <div class="clearer"></div> | |
75 | + </div> | |
76 | + <div class="related"> | |
77 | + <h3>Navigation</h3> | |
78 | + <ul> | |
79 | + <li class="right" style="margin-right: 10px"> | |
80 | + <a href="#" title="General Index" | |
81 | + >index</a></li> | |
82 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
83 | + </ul> | |
84 | + </div> | |
85 | + <div class="footer"> | |
86 | + © Copyright 2012, sigmaz. | |
87 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
88 | + </div> | |
89 | + </body> | |
90 | +</html> | |
0 | 91 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/getting-started.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Getting started — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Document settings" href="document-settings.html" /> | |
27 | + <link rel="prev" title="Feature overview" href="feature-overview.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="document-settings.html" title="Document settings" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="feature-overview.html" title="Feature overview" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="getting-started"> | |
52 | +<h1>Getting started<a class="headerlink" href="#getting-started" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<div class="section" id="autoloading"> | |
54 | +<h2>Autoloading<a class="headerlink" href="#autoloading" title="Permalink to this headline">ยถ</a></h2> | |
55 | +<p>You can choose if you want to use the PHPRtfLite autoloader or handle loading PHPRtfLite classes on your own. In most cases you are already using a class loading strategy and just need to add PHPRtfLite to it, which is recommended. For a quick start you may use the shipped PHPRtfLite autoloader.</p> | |
56 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
57 | +<span class="k">require_once</span> <span class="s1">'/path/to/your/library/PHPRtfLite.php'</span><span class="p">;</span> | |
58 | + | |
59 | +<span class="c1">// registers PHPRtfLite autoloader (spl)</span> | |
60 | +<span class="nx">PHPRtfLite</span><span class="o">::</span><span class="na">registerAutoloader</span><span class="p">();</span> | |
61 | +<span class="c1">// rtf document instance</span> | |
62 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
63 | +</pre></div> | |
64 | +</div> | |
65 | +</div> | |
66 | +<div class="section" id="hello-world-example"> | |
67 | +<h2>Hello world example<a class="headerlink" href="#hello-world-example" title="Permalink to this headline">ยถ</a></h2> | |
68 | +<p>This is a short “Hello world” example:</p> | |
69 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
70 | +<span class="c1">// rtf document instance</span> | |
71 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
72 | +<span class="c1">// add section</span> | |
73 | +<span class="nv">$sect</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
74 | +<span class="c1">// write text</span> | |
75 | +<span class="nv">$sect</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Hello world!'</span><span class="p">,</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">(),</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">());</span> | |
76 | + | |
77 | +<span class="c1">// save rtf document to hello_world.rtf</span> | |
78 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">save</span><span class="p">(</span><span class="s1">'hello_world.rtf'</span><span class="p">);</span> | |
79 | +</pre></div> | |
80 | +</div> | |
81 | +</div> | |
82 | +</div> | |
83 | + | |
84 | + | |
85 | + </div> | |
86 | + </div> | |
87 | + </div> | |
88 | + <div class="sphinxsidebar"> | |
89 | + <div class="sphinxsidebarwrapper"> | |
90 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
91 | + <ul> | |
92 | +<li><a class="reference internal" href="#">Getting started</a><ul> | |
93 | +<li><a class="reference internal" href="#autoloading">Autoloading</a></li> | |
94 | +<li><a class="reference internal" href="#hello-world-example">Hello world example</a></li> | |
95 | +</ul> | |
96 | +</li> | |
97 | +</ul> | |
98 | + | |
99 | + <h4>Previous topic</h4> | |
100 | + <p class="topless"><a href="feature-overview.html" | |
101 | + title="previous chapter">Feature overview</a></p> | |
102 | + <h4>Next topic</h4> | |
103 | + <p class="topless"><a href="document-settings.html" | |
104 | + title="next chapter">Document settings</a></p> | |
105 | + <h3>This Page</h3> | |
106 | + <ul class="this-page-menu"> | |
107 | + <li><a href="_sources/getting-started.txt" | |
108 | + rel="nofollow">Show Source</a></li> | |
109 | + </ul> | |
110 | +<div id="searchbox" style="display: none"> | |
111 | + <h3>Quick search</h3> | |
112 | + <form class="search" action="search.html" method="get"> | |
113 | + <input type="text" name="q" size="18" /> | |
114 | + <input type="submit" value="Go" /> | |
115 | + <input type="hidden" name="check_keywords" value="yes" /> | |
116 | + <input type="hidden" name="area" value="default" /> | |
117 | + </form> | |
118 | + <p class="searchtip" style="font-size: 90%"> | |
119 | + Enter search terms or a module, class or function name. | |
120 | + </p> | |
121 | +</div> | |
122 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
123 | + </div> | |
124 | + </div> | |
125 | + <div class="clearer"></div> | |
126 | + </div> | |
127 | + <div class="related"> | |
128 | + <h3>Navigation</h3> | |
129 | + <ul> | |
130 | + <li class="right" style="margin-right: 10px"> | |
131 | + <a href="genindex.html" title="General Index" | |
132 | + >index</a></li> | |
133 | + <li class="right" > | |
134 | + <a href="document-settings.html" title="Document settings" | |
135 | + >next</a> |</li> | |
136 | + <li class="right" > | |
137 | + <a href="feature-overview.html" title="Feature overview" | |
138 | + >previous</a> |</li> | |
139 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
140 | + </ul> | |
141 | + </div> | |
142 | + <div class="footer"> | |
143 | + © Copyright 2012, sigmaz. | |
144 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
145 | + </div> | |
146 | + </body> | |
147 | +</html> | |
0 | 148 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/header-footer.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Headers and footers — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Enumerations / Numberings" href="enumerations-numberings.html" /> | |
27 | + <link rel="prev" title="Images" href="images.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="enumerations-numberings.html" title="Enumerations / Numberings" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="images.html" title="Images" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="headers-and-footers"> | |
52 | +<span id="header-footer"></span><h1>Headers and footers<a class="headerlink" href="#headers-and-footers" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>Headers and footers can be defined for the RTF document. When sections are used, headers and footers must be defined through the sections, otherwise the headers and footers must be defined through the PHPRtfLite instance.</p> | |
54 | +<p>Header / footer types:</p> | |
55 | +<ul class="simple"> | |
56 | +<li>TYPE_ALL (default)</li> | |
57 | +<li>TYPE_LEFT</li> | |
58 | +<li>TYPE_RIGHT</li> | |
59 | +<li>TYPE_FIRST</li> | |
60 | +</ul> | |
61 | +<div class="section" id="type-all"> | |
62 | +<h2>TYPE_ALL<a class="headerlink" href="#type-all" title="Permalink to this headline">ยถ</a></h2> | |
63 | +<p>Example for setting the header and footer of the RTF document:</p> | |
64 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
65 | +<span class="c1">// rtf document instance</span> | |
66 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
67 | +<span class="c1">// add section</span> | |
68 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
69 | +<span class="c1">// add header</span> | |
70 | +<span class="nv">$header</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addHeader</span><span class="p">();</span> | |
71 | +<span class="nv">$header</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'header text'</span><span class="p">);</span> | |
72 | +<span class="c1">// add footer</span> | |
73 | +<span class="nv">$footer</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addFooter</span><span class="p">();</span> | |
74 | +<span class="nv">$footer</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'footer text'</span><span class="p">);</span> | |
75 | +</pre></div> | |
76 | +</div> | |
77 | +<p>By default headers and footers are displayed for all pages.</p> | |
78 | +</div> | |
79 | +<div class="section" id="type-left-and-type-right"> | |
80 | +<h2>TYPE_LEFT and TYPE_RIGHT<a class="headerlink" href="#type-left-and-type-right" title="Permalink to this headline">ยถ</a></h2> | |
81 | +<p>To define different headers for odd and even pages, the RTF document must be set to use different headers/footers for odd and even pages:</p> | |
82 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
83 | +<span class="c1">// rtf document instance</span> | |
84 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
85 | +<span class="c1">// use different headers and footers for odd and even pages</span> | |
86 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setOddEvenDifferent</span><span class="p">();</span> | |
87 | +<span class="c1">// section</span> | |
88 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
89 | +<span class="c1">// add left header</span> | |
90 | +<span class="nv">$header</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addHeader</span><span class="p">(</span><span class="nx">PHPRtfLite_Container_Header</span><span class="o">::</span><span class="na">TYPE_LEFT</span><span class="p">);</span> | |
91 | +<span class="nv">$header</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'left header'</span><span class="p">);</span> | |
92 | +<span class="c1">// add right header</span> | |
93 | +<span class="nv">$header</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addHeader</span><span class="p">(</span><span class="nx">PHPRtfLite_Container_Header</span><span class="o">::</span><span class="na">TYPE_RIGHT</span><span class="p">);</span> | |
94 | +<span class="nv">$header</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'right header'</span><span class="p">);</span> | |
95 | +</pre></div> | |
96 | +</div> | |
97 | +</div> | |
98 | +<div class="section" id="type-first"> | |
99 | +<h2>TYPE_FIRST<a class="headerlink" href="#type-first" title="Permalink to this headline">ยถ</a></h2> | |
100 | +<p>If you want to specify, that the header or the footer should only appear on the first page, use can use the type TYPE_FIRST:</p> | |
101 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
102 | +<span class="c1">// rtf document instance</span> | |
103 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
104 | +<span class="c1">// section</span> | |
105 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
106 | +<span class="c1">// add header only for the first page</span> | |
107 | +<span class="nv">$header</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addHeader</span><span class="p">(</span><span class="nx">PHPRtfLite_Container_Header</span><span class="o">::</span><span class="na">TYPE_FIRST</span><span class="p">);</span> | |
108 | +<span class="nv">$header</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'this header should only appear on the first page'</span><span class="p">);</span> | |
109 | +</pre></div> | |
110 | +</div> | |
111 | +</div> | |
112 | +<div class="section" id="tables-and-images-in-headers-footers"> | |
113 | +<h2>Tables and images in headers / footers<a class="headerlink" href="#tables-and-images-in-headers-footers" title="Permalink to this headline">ยถ</a></h2> | |
114 | +<p>Of course you can use tables and images in headers and footers:</p> | |
115 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
116 | +<span class="c1">// rtf document instance</span> | |
117 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
118 | +<span class="c1">// section</span> | |
119 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
120 | +<span class="c1">// add header</span> | |
121 | +<span class="nv">$header</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addHeader</span><span class="p">();</span> | |
122 | +<span class="c1">// add table</span> | |
123 | +<span class="nv">$table</span> <span class="o">=</span> <span class="nv">$header</span><span class="o">-></span><span class="na">addTable</span><span class="p">();</span> | |
124 | +<span class="nv">$table</span><span class="o">-></span><span class="na">addRows</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
125 | +<span class="nv">$table</span><span class="o">-></span><span class="na">addColumnsList</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">));</span> | |
126 | +<span class="c1">// add image to table in header</span> | |
127 | +<span class="nv">$image</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">addImageToCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'/path/to/image/file'</span><span class="p">);</span> | |
128 | +</pre></div> | |
129 | +</div> | |
130 | +</div> | |
131 | +</div> | |
132 | + | |
133 | + | |
134 | + </div> | |
135 | + </div> | |
136 | + </div> | |
137 | + <div class="sphinxsidebar"> | |
138 | + <div class="sphinxsidebarwrapper"> | |
139 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
140 | + <ul> | |
141 | +<li><a class="reference internal" href="#">Headers and footers</a><ul> | |
142 | +<li><a class="reference internal" href="#type-all">TYPE_ALL</a></li> | |
143 | +<li><a class="reference internal" href="#type-left-and-type-right">TYPE_LEFT and TYPE_RIGHT</a></li> | |
144 | +<li><a class="reference internal" href="#type-first">TYPE_FIRST</a></li> | |
145 | +<li><a class="reference internal" href="#tables-and-images-in-headers-footers">Tables and images in headers / footers</a></li> | |
146 | +</ul> | |
147 | +</li> | |
148 | +</ul> | |
149 | + | |
150 | + <h4>Previous topic</h4> | |
151 | + <p class="topless"><a href="images.html" | |
152 | + title="previous chapter">Images</a></p> | |
153 | + <h4>Next topic</h4> | |
154 | + <p class="topless"><a href="enumerations-numberings.html" | |
155 | + title="next chapter">Enumerations / Numberings</a></p> | |
156 | + <h3>This Page</h3> | |
157 | + <ul class="this-page-menu"> | |
158 | + <li><a href="_sources/header-footer.txt" | |
159 | + rel="nofollow">Show Source</a></li> | |
160 | + </ul> | |
161 | +<div id="searchbox" style="display: none"> | |
162 | + <h3>Quick search</h3> | |
163 | + <form class="search" action="search.html" method="get"> | |
164 | + <input type="text" name="q" size="18" /> | |
165 | + <input type="submit" value="Go" /> | |
166 | + <input type="hidden" name="check_keywords" value="yes" /> | |
167 | + <input type="hidden" name="area" value="default" /> | |
168 | + </form> | |
169 | + <p class="searchtip" style="font-size: 90%"> | |
170 | + Enter search terms or a module, class or function name. | |
171 | + </p> | |
172 | +</div> | |
173 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
174 | + </div> | |
175 | + </div> | |
176 | + <div class="clearer"></div> | |
177 | + </div> | |
178 | + <div class="related"> | |
179 | + <h3>Navigation</h3> | |
180 | + <ul> | |
181 | + <li class="right" style="margin-right: 10px"> | |
182 | + <a href="genindex.html" title="General Index" | |
183 | + >index</a></li> | |
184 | + <li class="right" > | |
185 | + <a href="enumerations-numberings.html" title="Enumerations / Numberings" | |
186 | + >next</a> |</li> | |
187 | + <li class="right" > | |
188 | + <a href="images.html" title="Images" | |
189 | + >previous</a> |</li> | |
190 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
191 | + </ul> | |
192 | + </div> | |
193 | + <div class="footer"> | |
194 | + © Copyright 2012, sigmaz. | |
195 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
196 | + </div> | |
197 | + </body> | |
198 | +</html> | |
0 | 199 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/images.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Images — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Headers and footers" href="header-footer.html" /> | |
27 | + <link rel="prev" title="Tables" href="tables.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="header-footer.html" title="Headers and footers" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="tables.html" title="Tables" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="images"> | |
52 | +<span id="id1"></span><h1>Images<a class="headerlink" href="#images" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>In PHPRtfLite you can add images to headers and footers, to table cells, and sections.</p> | |
54 | +<div class="section" id="image-resize"> | |
55 | +<h2>Image resize<a class="headerlink" href="#image-resize" title="Permalink to this headline">ยถ</a></h2> | |
56 | +<p>You can specify the width and the height of the image in the RTF document. Note, that adding large images will cause large RTF documents, even if the images is scaled down by RTF.</p> | |
57 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
58 | +<span class="nv">$imageFile</span> <span class="o">=</span> <span class="s1">'/path/to/image/file'</span><span class="p">;</span> | |
59 | +<span class="nv">$image</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addImage</span><span class="p">(</span><span class="nv">$imageFile</span><span class="p">);</span> | |
60 | +<span class="c1">// width to 1cm</span> | |
61 | +<span class="nv">$image</span><span class="o">-></span><span class="na">setWidth</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
62 | +<span class="c1">// height to 1cm</span> | |
63 | +<span class="nv">$image</span><span class="o">-></span><span class="na">setHeight</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
64 | +</pre></div> | |
65 | +</div> | |
66 | +</div> | |
67 | +<div class="section" id="image-border"> | |
68 | +<h2>Image border<a class="headerlink" href="#image-border" title="Permalink to this headline">ยถ</a></h2> | |
69 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
70 | +<span class="nv">$border</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Border</span><span class="p">(</span> | |
71 | + <span class="nv">$rtf</span><span class="p">,</span> <span class="c1">// PHPRtfLite instance</span> | |
72 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#00FF00'</span><span class="p">),</span> <span class="c1">// left border: 2pt, green color</span> | |
73 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#FFFF00'</span><span class="p">),</span> <span class="c1">// top border: 1pt, yellow color</span> | |
74 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#FF0000'</span><span class="p">),</span> <span class="c1">// right border: 2pt, red color</span> | |
75 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#0000FF'</span><span class="p">)</span> <span class="c1">// bottom border: 1pt, blue color</span> | |
76 | +<span class="p">);</span> | |
77 | +<span class="c1">// image with border</span> | |
78 | +<span class="nv">$image</span><span class="o">-></span><span class="na">setBorder</span><span class="p">(</span><span class="nv">$border</span><span class="p">);</span> | |
79 | +</pre></div> | |
80 | +</div> | |
81 | +<p>Read more about creating borders here: <a class="reference internal" href="formatting.html#borders"><em>Borders</em></a>.</p> | |
82 | +</div> | |
83 | +</div> | |
84 | + | |
85 | + | |
86 | + </div> | |
87 | + </div> | |
88 | + </div> | |
89 | + <div class="sphinxsidebar"> | |
90 | + <div class="sphinxsidebarwrapper"> | |
91 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
92 | + <ul> | |
93 | +<li><a class="reference internal" href="#">Images</a><ul> | |
94 | +<li><a class="reference internal" href="#image-resize">Image resize</a></li> | |
95 | +<li><a class="reference internal" href="#image-border">Image border</a></li> | |
96 | +</ul> | |
97 | +</li> | |
98 | +</ul> | |
99 | + | |
100 | + <h4>Previous topic</h4> | |
101 | + <p class="topless"><a href="tables.html" | |
102 | + title="previous chapter">Tables</a></p> | |
103 | + <h4>Next topic</h4> | |
104 | + <p class="topless"><a href="header-footer.html" | |
105 | + title="next chapter">Headers and footers</a></p> | |
106 | + <h3>This Page</h3> | |
107 | + <ul class="this-page-menu"> | |
108 | + <li><a href="_sources/images.txt" | |
109 | + rel="nofollow">Show Source</a></li> | |
110 | + </ul> | |
111 | +<div id="searchbox" style="display: none"> | |
112 | + <h3>Quick search</h3> | |
113 | + <form class="search" action="search.html" method="get"> | |
114 | + <input type="text" name="q" size="18" /> | |
115 | + <input type="submit" value="Go" /> | |
116 | + <input type="hidden" name="check_keywords" value="yes" /> | |
117 | + <input type="hidden" name="area" value="default" /> | |
118 | + </form> | |
119 | + <p class="searchtip" style="font-size: 90%"> | |
120 | + Enter search terms or a module, class or function name. | |
121 | + </p> | |
122 | +</div> | |
123 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
124 | + </div> | |
125 | + </div> | |
126 | + <div class="clearer"></div> | |
127 | + </div> | |
128 | + <div class="related"> | |
129 | + <h3>Navigation</h3> | |
130 | + <ul> | |
131 | + <li class="right" style="margin-right: 10px"> | |
132 | + <a href="genindex.html" title="General Index" | |
133 | + >index</a></li> | |
134 | + <li class="right" > | |
135 | + <a href="header-footer.html" title="Headers and footers" | |
136 | + >next</a> |</li> | |
137 | + <li class="right" > | |
138 | + <a href="tables.html" title="Tables" | |
139 | + >previous</a> |</li> | |
140 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
141 | + </ul> | |
142 | + </div> | |
143 | + <div class="footer"> | |
144 | + © Copyright 2012, sigmaz. | |
145 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
146 | + </div> | |
147 | + </body> | |
148 | +</html> | |
0 | 149 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/index.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Welcome to PHPRtfLiteโs documentation — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="#" /> | |
26 | + <link rel="next" title="Introduction" href="introduction.html" /> | |
27 | + </head> | |
28 | + <body> | |
29 | + <div class="related"> | |
30 | + <h3>Navigation</h3> | |
31 | + <ul> | |
32 | + <li class="right" style="margin-right: 10px"> | |
33 | + <a href="genindex.html" title="General Index" | |
34 | + accesskey="I">index</a></li> | |
35 | + <li class="right" > | |
36 | + <a href="introduction.html" title="Introduction" | |
37 | + accesskey="N">next</a> |</li> | |
38 | + <li><a href="#">PHPRtfLite v1.x documentation</a> »</li> | |
39 | + </ul> | |
40 | + </div> | |
41 | + | |
42 | + <div class="document"> | |
43 | + <div class="documentwrapper"> | |
44 | + <div class="bodywrapper"> | |
45 | + <div class="body"> | |
46 | + | |
47 | + <div class="section" id="welcome-to-phprtflite-s-documentation"> | |
48 | +<h1>Welcome to PHPRtfLite’s documentation<a class="headerlink" href="#welcome-to-phprtflite-s-documentation" title="Permalink to this headline">ยถ</a></h1> | |
49 | +<div class="toctree-wrapper compound"> | |
50 | +<ul> | |
51 | +<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a><ul> | |
52 | +<li class="toctree-l2"><a class="reference internal" href="introduction.html#requirements">Requirements</a></li> | |
53 | +<li class="toctree-l2"><a class="reference internal" href="introduction.html#installation">Installation</a><ul> | |
54 | +<li class="toctree-l3"><a class="reference internal" href="introduction.html#download">Download</a></li> | |
55 | +<li class="toctree-l3"><a class="reference internal" href="introduction.html#svn">SVN</a></li> | |
56 | +</ul> | |
57 | +</li> | |
58 | +<li class="toctree-l2"><a class="reference internal" href="introduction.html#disclaimer">Disclaimer</a></li> | |
59 | +</ul> | |
60 | +</li> | |
61 | +<li class="toctree-l1"><a class="reference internal" href="feature-overview.html">Feature overview</a></li> | |
62 | +<li class="toctree-l1"><a class="reference internal" href="getting-started.html">Getting started</a><ul> | |
63 | +<li class="toctree-l2"><a class="reference internal" href="getting-started.html#autoloading">Autoloading</a></li> | |
64 | +<li class="toctree-l2"><a class="reference internal" href="getting-started.html#hello-world-example">Hello world example</a></li> | |
65 | +</ul> | |
66 | +</li> | |
67 | +<li class="toctree-l1"><a class="reference internal" href="document-settings.html">Document settings</a><ul> | |
68 | +<li class="toctree-l2"><a class="reference internal" href="document-settings.html#page-orientation">Page orientation</a></li> | |
69 | +<li class="toctree-l2"><a class="reference internal" href="document-settings.html#page-margins">Page margins</a></li> | |
70 | +<li class="toctree-l2"><a class="reference internal" href="document-settings.html#page-size">Page size</a><ul> | |
71 | +<li class="toctree-l3"><a class="reference internal" href="document-settings.html#units-in-rtf">Units in RTF</a></li> | |
72 | +<li class="toctree-l3"><a class="reference internal" href="document-settings.html#character-set-text-input">Character set (text input)</a></li> | |
73 | +<li class="toctree-l3"><a class="reference internal" href="document-settings.html#hyphenation">Hyphenation</a></li> | |
74 | +</ul> | |
75 | +</li> | |
76 | +</ul> | |
77 | +</li> | |
78 | +<li class="toctree-l1"><a class="reference internal" href="sections.html">Sections</a><ul> | |
79 | +<li class="toctree-l2"><a class="reference internal" href="sections.html#section-columns">Section columns</a></li> | |
80 | +<li class="toctree-l2"><a class="reference internal" href="sections.html#page-breaks">Page breaks</a></li> | |
81 | +<li class="toctree-l2"><a class="reference internal" href="sections.html#hyperlinks">Hyperlinks</a></li> | |
82 | +<li class="toctree-l2"><a class="reference internal" href="sections.html#borders">Borders</a></li> | |
83 | +</ul> | |
84 | +</li> | |
85 | +<li class="toctree-l1"><a class="reference internal" href="formatting.html">Formatting</a><ul> | |
86 | +<li class="toctree-l2"><a class="reference internal" href="formatting.html#fonts">Fonts</a><ul> | |
87 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#size-font-family-font-color-background-color">Size, Font family, Font color, Background color</a></li> | |
88 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#text-formatting">Text formatting</a></li> | |
89 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#html-tags-as-text-formatting">HTML-Tags as text formatting</a></li> | |
90 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#text-animation">Text animation</a></li> | |
91 | +</ul> | |
92 | +</li> | |
93 | +<li class="toctree-l2"><a class="reference internal" href="formatting.html#paragraph-formatting">Paragraph formatting</a><ul> | |
94 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#text-alignment">Text alignment</a></li> | |
95 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#paragraph-indention">Paragraph indention</a></li> | |
96 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#space-between-paragraphs">Space between paragraphs</a></li> | |
97 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#space-between-lines">Space between lines</a></li> | |
98 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#background-color">Background color</a></li> | |
99 | +<li class="toctree-l3"><a class="reference internal" href="formatting.html#borders">Borders</a><ul> | |
100 | +<li class="toctree-l4"><a class="reference internal" href="formatting.html#border-style-types">Border style types</a></li> | |
101 | +</ul> | |
102 | +</li> | |
103 | +</ul> | |
104 | +</li> | |
105 | +</ul> | |
106 | +</li> | |
107 | +<li class="toctree-l1"><a class="reference internal" href="tables.html">Tables</a><ul> | |
108 | +<li class="toctree-l2"><a class="reference internal" href="tables.html#cells">Cells</a><ul> | |
109 | +<li class="toctree-l3"><a class="reference internal" href="tables.html#text-in-cells">Text in cells</a></li> | |
110 | +<li class="toctree-l3"><a class="reference internal" href="tables.html#cell-formatting">Cell formatting</a><ul> | |
111 | +<li class="toctree-l4"><a class="reference internal" href="tables.html#cell-font">Cell font</a></li> | |
112 | +<li class="toctree-l4"><a class="reference internal" href="tables.html#cell-alignment">Cell alignment</a></li> | |
113 | +<li class="toctree-l4"><a class="reference internal" href="tables.html#cell-padding">Cell padding</a></li> | |
114 | +<li class="toctree-l4"><a class="reference internal" href="tables.html#background-color">Background color</a></li> | |
115 | +<li class="toctree-l4"><a class="reference internal" href="tables.html#border-formatting">Border formatting</a></li> | |
116 | +<li class="toctree-l4"><a class="reference internal" href="tables.html#rotate-text-in-cells">Rotate text in cells</a></li> | |
117 | +</ul> | |
118 | +</li> | |
119 | +<li class="toctree-l3"><a class="reference internal" href="tables.html#images">Images</a></li> | |
120 | +<li class="toctree-l3"><a class="reference internal" href="tables.html#merging-a-cell-range">Merging a cell range</a></li> | |
121 | +</ul> | |
122 | +</li> | |
123 | +<li class="toctree-l2"><a class="reference internal" href="tables.html#nested-tables">Nested tables</a></li> | |
124 | +</ul> | |
125 | +</li> | |
126 | +<li class="toctree-l1"><a class="reference internal" href="images.html">Images</a><ul> | |
127 | +<li class="toctree-l2"><a class="reference internal" href="images.html#image-resize">Image resize</a></li> | |
128 | +<li class="toctree-l2"><a class="reference internal" href="images.html#image-border">Image border</a></li> | |
129 | +</ul> | |
130 | +</li> | |
131 | +<li class="toctree-l1"><a class="reference internal" href="header-footer.html">Headers and footers</a><ul> | |
132 | +<li class="toctree-l2"><a class="reference internal" href="header-footer.html#type-all">TYPE_ALL</a></li> | |
133 | +<li class="toctree-l2"><a class="reference internal" href="header-footer.html#type-left-and-type-right">TYPE_LEFT and TYPE_RIGHT</a></li> | |
134 | +<li class="toctree-l2"><a class="reference internal" href="header-footer.html#type-first">TYPE_FIRST</a></li> | |
135 | +<li class="toctree-l2"><a class="reference internal" href="header-footer.html#tables-and-images-in-headers-footers">Tables and images in headers / footers</a></li> | |
136 | +</ul> | |
137 | +</li> | |
138 | +<li class="toctree-l1"><a class="reference internal" href="enumerations-numberings.html">Enumerations / Numberings</a><ul> | |
139 | +<li class="toctree-l2"><a class="reference internal" href="enumerations-numberings.html#enumerations">Enumerations</a></li> | |
140 | +<li class="toctree-l2"><a class="reference internal" href="enumerations-numberings.html#numberings">Numberings</a></li> | |
141 | +</ul> | |
142 | +</li> | |
143 | +<li class="toctree-l1"><a class="reference internal" href="footnotes-endnotes.html">Footnotes / Endnotes</a></li> | |
144 | +<li class="toctree-l1"><a class="reference internal" href="formfields.html">Form fields</a><ul> | |
145 | +<li class="toctree-l2"><a class="reference internal" href="formfields.html#checkbox">Checkbox</a></li> | |
146 | +<li class="toctree-l2"><a class="reference internal" href="formfields.html#dropdown">Dropdown</a></li> | |
147 | +<li class="toctree-l2"><a class="reference internal" href="formfields.html#text-field">Text field</a></li> | |
148 | +</ul> | |
149 | +</li> | |
150 | +<li class="toctree-l1"><a class="reference internal" href="bug-feature.html">Bugs and feature requests</a></li> | |
151 | +<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li> | |
152 | +</ul> | |
153 | +</div> | |
154 | +</div> | |
155 | + | |
156 | + | |
157 | + </div> | |
158 | + </div> | |
159 | + </div> | |
160 | + <div class="sphinxsidebar"> | |
161 | + <div class="sphinxsidebarwrapper"> | |
162 | + <h4>Next topic</h4> | |
163 | + <p class="topless"><a href="introduction.html" | |
164 | + title="next chapter">Introduction</a></p> | |
165 | + <h3>This Page</h3> | |
166 | + <ul class="this-page-menu"> | |
167 | + <li><a href="_sources/index.txt" | |
168 | + rel="nofollow">Show Source</a></li> | |
169 | + </ul> | |
170 | +<div id="searchbox" style="display: none"> | |
171 | + <h3>Quick search</h3> | |
172 | + <form class="search" action="search.html" method="get"> | |
173 | + <input type="text" name="q" size="18" /> | |
174 | + <input type="submit" value="Go" /> | |
175 | + <input type="hidden" name="check_keywords" value="yes" /> | |
176 | + <input type="hidden" name="area" value="default" /> | |
177 | + </form> | |
178 | + <p class="searchtip" style="font-size: 90%"> | |
179 | + Enter search terms or a module, class or function name. | |
180 | + </p> | |
181 | +</div> | |
182 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
183 | + </div> | |
184 | + </div> | |
185 | + <div class="clearer"></div> | |
186 | + </div> | |
187 | + <div class="related"> | |
188 | + <h3>Navigation</h3> | |
189 | + <ul> | |
190 | + <li class="right" style="margin-right: 10px"> | |
191 | + <a href="genindex.html" title="General Index" | |
192 | + >index</a></li> | |
193 | + <li class="right" > | |
194 | + <a href="introduction.html" title="Introduction" | |
195 | + >next</a> |</li> | |
196 | + <li><a href="#">PHPRtfLite v1.x documentation</a> »</li> | |
197 | + </ul> | |
198 | + </div> | |
199 | + <div class="footer"> | |
200 | + © Copyright 2012, sigmaz. | |
201 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
202 | + </div> | |
203 | + </body> | |
204 | +</html> | |
0 | 205 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/introduction.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Introduction — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Feature overview" href="feature-overview.html" /> | |
27 | + <link rel="prev" title="Welcome to PHPRtfLiteโs documentation" href="index.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="feature-overview.html" title="Feature overview" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="index.html" title="Welcome to PHPRtfLiteโs documentation" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="introduction"> | |
52 | +<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>PHPRtfLite is a RTF (Rich-Text-Format) writer written in PHP.</p> | |
54 | +<p>RTF specification was defined by Microsoft(c). There are many text editors, that can interpret rtf code, but as it is specified by Microsoft Microsoft Word is (afaik) the only one with full support. For example OpenOffice.org Writer does not support nested tables.</p> | |
55 | +<p>The samples files (provided in the release) were tested:</p> | |
56 | +<ul class="simple"> | |
57 | +<li>OpenOffice 3 Writer (does not support much)</li> | |
58 | +<li>SoftMaker TextMaker Viewer 2010 rev577 (full support for all features in PHPRtfLite)</li> | |
59 | +<li>Microsoft Word 2003 (full support for all features in PHPRtfLite)</li> | |
60 | +</ul> | |
61 | +<p>The project home is on sourceforge.net: <a class="reference external" href="https://sourceforge.net/projects/phprtf">https://sourceforge.net/projects/phprtf</a></p> | |
62 | +<div class="section" id="requirements"> | |
63 | +<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">ยถ</a></h2> | |
64 | +<p>PHPRtfLite requires a minimum of PHP 5.0.</p> | |
65 | +<p>When working with character sets different than UTF-8, the iconv extension needs to be activated.</p> | |
66 | +</div> | |
67 | +<div class="section" id="installation"> | |
68 | +<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">ยถ</a></h2> | |
69 | +<p>To use PHPRtfLite use can download the sources from sourceforge.net or use the svn repository.</p> | |
70 | +<div class="section" id="download"> | |
71 | +<h3>Download<a class="headerlink" href="#download" title="Permalink to this headline">ยถ</a></h3> | |
72 | +<p>The download is available on sourceforge.net:</p> | |
73 | +<ul class="simple"> | |
74 | +<li><a class="reference external" href="http://sourceforge.net/projects/phprtf/files/phprtflite/phprtflite-1.1">Download page for PHPRtfLite 1.1</a></li> | |
75 | +</ul> | |
76 | +</div> | |
77 | +<div class="section" id="svn"> | |
78 | +<h3>SVN<a class="headerlink" href="#svn" title="Permalink to this headline">ยถ</a></h3> | |
79 | +<p>Installation via SVN repository:</p> | |
80 | +<p><em>PHPRtfLite 1.1 Branch</em></p> | |
81 | +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>svn co https://phprtf.svn.sourceforge.net/svnroot/phprtf/branches/1.1 | |
82 | +</pre></div> | |
83 | +</div> | |
84 | +<p><em>PHPRtfLite Trunk</em></p> | |
85 | +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>svn co https://phprtf.svn.sourceforge.net/svnroot/phprtf/trunk | |
86 | +</pre></div> | |
87 | +</div> | |
88 | +</div> | |
89 | +</div> | |
90 | +<div class="section" id="disclaimer"> | |
91 | +<h2>Disclaimer<a class="headerlink" href="#disclaimer" title="Permalink to this headline">ยถ</a></h2> | |
92 | +<p>This is the PHPRftLite documentation. It shows how to use PHPRtfLite and gives a quick overview about the main concepts. Note, that not every functionality is documentated in full details. Please refer to the source code.</p> | |
93 | +</div> | |
94 | +</div> | |
95 | + | |
96 | + | |
97 | + </div> | |
98 | + </div> | |
99 | + </div> | |
100 | + <div class="sphinxsidebar"> | |
101 | + <div class="sphinxsidebarwrapper"> | |
102 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
103 | + <ul> | |
104 | +<li><a class="reference internal" href="#">Introduction</a><ul> | |
105 | +<li><a class="reference internal" href="#requirements">Requirements</a></li> | |
106 | +<li><a class="reference internal" href="#installation">Installation</a><ul> | |
107 | +<li><a class="reference internal" href="#download">Download</a></li> | |
108 | +<li><a class="reference internal" href="#svn">SVN</a></li> | |
109 | +</ul> | |
110 | +</li> | |
111 | +<li><a class="reference internal" href="#disclaimer">Disclaimer</a></li> | |
112 | +</ul> | |
113 | +</li> | |
114 | +</ul> | |
115 | + | |
116 | + <h4>Previous topic</h4> | |
117 | + <p class="topless"><a href="index.html" | |
118 | + title="previous chapter">Welcome to PHPRtfLite’s documentation</a></p> | |
119 | + <h4>Next topic</h4> | |
120 | + <p class="topless"><a href="feature-overview.html" | |
121 | + title="next chapter">Feature overview</a></p> | |
122 | + <h3>This Page</h3> | |
123 | + <ul class="this-page-menu"> | |
124 | + <li><a href="_sources/introduction.txt" | |
125 | + rel="nofollow">Show Source</a></li> | |
126 | + </ul> | |
127 | +<div id="searchbox" style="display: none"> | |
128 | + <h3>Quick search</h3> | |
129 | + <form class="search" action="search.html" method="get"> | |
130 | + <input type="text" name="q" size="18" /> | |
131 | + <input type="submit" value="Go" /> | |
132 | + <input type="hidden" name="check_keywords" value="yes" /> | |
133 | + <input type="hidden" name="area" value="default" /> | |
134 | + </form> | |
135 | + <p class="searchtip" style="font-size: 90%"> | |
136 | + Enter search terms or a module, class or function name. | |
137 | + </p> | |
138 | +</div> | |
139 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
140 | + </div> | |
141 | + </div> | |
142 | + <div class="clearer"></div> | |
143 | + </div> | |
144 | + <div class="related"> | |
145 | + <h3>Navigation</h3> | |
146 | + <ul> | |
147 | + <li class="right" style="margin-right: 10px"> | |
148 | + <a href="genindex.html" title="General Index" | |
149 | + >index</a></li> | |
150 | + <li class="right" > | |
151 | + <a href="feature-overview.html" title="Feature overview" | |
152 | + >next</a> |</li> | |
153 | + <li class="right" > | |
154 | + <a href="index.html" title="Welcome to PHPRtfLiteโs documentation" | |
155 | + >previous</a> |</li> | |
156 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
157 | + </ul> | |
158 | + </div> | |
159 | + <div class="footer"> | |
160 | + © Copyright 2012, sigmaz. | |
161 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
162 | + </div> | |
163 | + </body> | |
164 | +</html> | |
0 | 165 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/license.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>License — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="prev" title="Bugs and feature requests" href="bug-feature.html" /> | |
27 | + </head> | |
28 | + <body> | |
29 | + <div class="related"> | |
30 | + <h3>Navigation</h3> | |
31 | + <ul> | |
32 | + <li class="right" style="margin-right: 10px"> | |
33 | + <a href="genindex.html" title="General Index" | |
34 | + accesskey="I">index</a></li> | |
35 | + <li class="right" > | |
36 | + <a href="bug-feature.html" title="Bugs and feature requests" | |
37 | + accesskey="P">previous</a> |</li> | |
38 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
39 | + </ul> | |
40 | + </div> | |
41 | + | |
42 | + <div class="document"> | |
43 | + <div class="documentwrapper"> | |
44 | + <div class="bodywrapper"> | |
45 | + <div class="body"> | |
46 | + | |
47 | + <div class="section" id="license"> | |
48 | +<h1>License<a class="headerlink" href="#license" title="Permalink to this headline">ยถ</a></h1> | |
49 | +<p>PHPRtfLite is released under GNU Lesser General Public License.</p> | |
50 | +<p>PHPRtfLite is free software: you can redistribute it and/or modify | |
51 | +it under the terms of the GNU Lesser General Public License as published by | |
52 | +the Free Software Foundation, either version 3 of the License, or | |
53 | +(at your option) any later version.</p> | |
54 | +<p>PHPRtfLite is distributed in the hope that it will be useful, | |
55 | +but WITHOUT ANY WARRANTY; without even the implied warranty of | |
56 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
57 | +GNU Lesser General Public License for more details.</p> | |
58 | +<p>See also <a class="reference external" href="http://www.gnu.org/licenses/lgpl.html">http://www.gnu.org/licenses/lgpl.html</a></p> | |
59 | +</div> | |
60 | + | |
61 | + | |
62 | + </div> | |
63 | + </div> | |
64 | + </div> | |
65 | + <div class="sphinxsidebar"> | |
66 | + <div class="sphinxsidebarwrapper"> | |
67 | + <h4>Previous topic</h4> | |
68 | + <p class="topless"><a href="bug-feature.html" | |
69 | + title="previous chapter">Bugs and feature requests</a></p> | |
70 | + <h3>This Page</h3> | |
71 | + <ul class="this-page-menu"> | |
72 | + <li><a href="_sources/license.txt" | |
73 | + rel="nofollow">Show Source</a></li> | |
74 | + </ul> | |
75 | +<div id="searchbox" style="display: none"> | |
76 | + <h3>Quick search</h3> | |
77 | + <form class="search" action="search.html" method="get"> | |
78 | + <input type="text" name="q" size="18" /> | |
79 | + <input type="submit" value="Go" /> | |
80 | + <input type="hidden" name="check_keywords" value="yes" /> | |
81 | + <input type="hidden" name="area" value="default" /> | |
82 | + </form> | |
83 | + <p class="searchtip" style="font-size: 90%"> | |
84 | + Enter search terms or a module, class or function name. | |
85 | + </p> | |
86 | +</div> | |
87 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
88 | + </div> | |
89 | + </div> | |
90 | + <div class="clearer"></div> | |
91 | + </div> | |
92 | + <div class="related"> | |
93 | + <h3>Navigation</h3> | |
94 | + <ul> | |
95 | + <li class="right" style="margin-right: 10px"> | |
96 | + <a href="genindex.html" title="General Index" | |
97 | + >index</a></li> | |
98 | + <li class="right" > | |
99 | + <a href="bug-feature.html" title="Bugs and feature requests" | |
100 | + >previous</a> |</li> | |
101 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
102 | + </ul> | |
103 | + </div> | |
104 | + <div class="footer"> | |
105 | + © Copyright 2012, sigmaz. | |
106 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
107 | + </div> | |
108 | + </body> | |
109 | +</html> | |
0 | 110 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/objects.inv
0 โ 100644
No preview for this file type
export/PHPRtfLite-1.3.1/docs/html/page-layouts.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Page settings — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Sections" href="sections.html" /> | |
27 | + <link rel="prev" title="Getting started" href="getting-started.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="sections.html" title="Sections" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="getting-started.html" title="Getting started" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="page-settings"> | |
52 | +<h1>Page settings<a class="headerlink" href="#page-settings" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<div class="section" id="page-layout"> | |
54 | +<h2>Page layout<a class="headerlink" href="#page-layout" title="Permalink to this headline">ยถ</a></h2> | |
55 | +<div class="section" id="page-orientation"> | |
56 | +<h3>Page orientation<a class="headerlink" href="#page-orientation" title="Permalink to this headline">ยถ</a></h3> | |
57 | +<p>You can use between <tt class="docutils literal"><span class="pre">landscape</span></tt> and <tt class="docutils literal"><span class="pre">portrait</span></tt> (default) page orientation.</p> | |
58 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
59 | +<span class="c1">// rtf document instance</span> | |
60 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
61 | +<span class="c1">// landscape page orientation</span> | |
62 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setLandscape</span><span class="p">();</span> | |
63 | +</pre></div> | |
64 | +</div> | |
65 | +</div> | |
66 | +<div class="section" id="page-margins"> | |
67 | +<h3>Page margins<a class="headerlink" href="#page-margins" title="Permalink to this headline">ยถ</a></h3> | |
68 | +<p>You can set margins for the document and for sections, too. Section margins will overwrite document margins.</p> | |
69 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
70 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
71 | +<span class="c1">// margin left: 1cm</span> | |
72 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginLeft</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
73 | +<span class="c1">// margin right: 2cm</span> | |
74 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginRight</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span> | |
75 | +<span class="c1">// margin top: 3cm</span> | |
76 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginTop</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span> | |
77 | +<span class="c1">// margin bottom: 4cm</span> | |
78 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginBottom</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span> | |
79 | +</pre></div> | |
80 | +</div> | |
81 | +<p>The code example below does the same in a shorter way.</p> | |
82 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
83 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
84 | +<span class="c1">// margins: left 1cm, top 3cm, right 2cm, bottom 4cm</span> | |
85 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMargins</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">);</span> | |
86 | +</pre></div> | |
87 | +</div> | |
88 | +<p>You can define that odd and even pages uses mirrored margins.</p> | |
89 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
90 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
91 | +<span class="c1">// margin left: 2cm</span> | |
92 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginLeft</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span> | |
93 | +<span class="c1">// margin right: 1cm</span> | |
94 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMarginRight</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
95 | +<span class="c1">// odd pages: left 2cm, right 1 cm</span> | |
96 | +<span class="c1">// even pages: left 1cm, right 2 cm</span> | |
97 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setMirrorMarings</span><span class="p">();</span> | |
98 | +</pre></div> | |
99 | +</div> | |
100 | +</div> | |
101 | +<div class="section" id="page-width-page-height"> | |
102 | +<h3>Page width / page height<a class="headerlink" href="#page-width-page-height" title="Permalink to this headline">ยถ</a></h3> | |
103 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
104 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
105 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setPageWidth</span><span class="p">(</span><span class="mi">14</span><span class="p">);</span> <span class="c1">// in cm</span> | |
106 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setPageHeight</span><span class="p">(</span><span class="mi">25</span><span class="p">);</span> <span class="c1">// in cm</span> | |
107 | +</pre></div> | |
108 | +</div> | |
109 | +</div> | |
110 | +</div> | |
111 | +<div class="section" id="character-set-text-input"> | |
112 | +<h2>Character set (text input)<a class="headerlink" href="#character-set-text-input" title="Permalink to this headline">ยถ</a></h2> | |
113 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
114 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
115 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setCharset</span><span class="p">(</span><span class="s1">'Latin1'</span><span class="p">);</span> <span class="c1">// use Latin1 instead of UTF-8</span> | |
116 | +</pre></div> | |
117 | +</div> | |
118 | +</div> | |
119 | +<div class="section" id="hyphenation"> | |
120 | +<h2>Hyphenation<a class="headerlink" href="#hyphenation" title="Permalink to this headline">ยถ</a></h2> | |
121 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
122 | +<span class="nv">$rtf</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite</span><span class="p">();</span> | |
123 | +<span class="nv">$rtf</span><span class="o">-></span><span class="na">setHyphenation</span><span class="p">();</span> | |
124 | +</pre></div> | |
125 | +</div> | |
126 | +</div> | |
127 | +</div> | |
128 | + | |
129 | + | |
130 | + </div> | |
131 | + </div> | |
132 | + </div> | |
133 | + <div class="sphinxsidebar"> | |
134 | + <div class="sphinxsidebarwrapper"> | |
135 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
136 | + <ul> | |
137 | +<li><a class="reference internal" href="#">Page settings</a><ul> | |
138 | +<li><a class="reference internal" href="#page-layout">Page layout</a><ul> | |
139 | +<li><a class="reference internal" href="#page-orientation">Page orientation</a></li> | |
140 | +<li><a class="reference internal" href="#page-margins">Page margins</a></li> | |
141 | +<li><a class="reference internal" href="#page-width-page-height">Page width / page height</a></li> | |
142 | +</ul> | |
143 | +</li> | |
144 | +<li><a class="reference internal" href="#character-set-text-input">Character set (text input)</a></li> | |
145 | +<li><a class="reference internal" href="#hyphenation">Hyphenation</a></li> | |
146 | +</ul> | |
147 | +</li> | |
148 | +</ul> | |
149 | + | |
150 | + <h4>Previous topic</h4> | |
151 | + <p class="topless"><a href="getting-started.html" | |
152 | + title="previous chapter">Getting started</a></p> | |
153 | + <h4>Next topic</h4> | |
154 | + <p class="topless"><a href="sections.html" | |
155 | + title="next chapter">Sections</a></p> | |
156 | + <h3>This Page</h3> | |
157 | + <ul class="this-page-menu"> | |
158 | + <li><a href="_sources/page-layouts.txt" | |
159 | + rel="nofollow">Show Source</a></li> | |
160 | + </ul> | |
161 | +<div id="searchbox" style="display: none"> | |
162 | + <h3>Quick search</h3> | |
163 | + <form class="search" action="search.html" method="get"> | |
164 | + <input type="text" name="q" size="18" /> | |
165 | + <input type="submit" value="Go" /> | |
166 | + <input type="hidden" name="check_keywords" value="yes" /> | |
167 | + <input type="hidden" name="area" value="default" /> | |
168 | + </form> | |
169 | + <p class="searchtip" style="font-size: 90%"> | |
170 | + Enter search terms or a module, class or function name. | |
171 | + </p> | |
172 | +</div> | |
173 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
174 | + </div> | |
175 | + </div> | |
176 | + <div class="clearer"></div> | |
177 | + </div> | |
178 | + <div class="related"> | |
179 | + <h3>Navigation</h3> | |
180 | + <ul> | |
181 | + <li class="right" style="margin-right: 10px"> | |
182 | + <a href="genindex.html" title="General Index" | |
183 | + >index</a></li> | |
184 | + <li class="right" > | |
185 | + <a href="sections.html" title="Sections" | |
186 | + >next</a> |</li> | |
187 | + <li class="right" > | |
188 | + <a href="getting-started.html" title="Getting started" | |
189 | + >previous</a> |</li> | |
190 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
191 | + </ul> | |
192 | + </div> | |
193 | + <div class="footer"> | |
194 | + © Copyright 2011, sigmaz. | |
195 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
196 | + </div> | |
197 | + </body> | |
198 | +</html> | |
0 | 199 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/search.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Search — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <script type="text/javascript" src="_static/searchtools.js"></script> | |
26 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
27 | + <script type="text/javascript"> | |
28 | + jQuery(function() { Search.loadIndex("searchindex.js"); }); | |
29 | + </script> | |
30 | + | |
31 | + | |
32 | + </head> | |
33 | + <body> | |
34 | + <div class="related"> | |
35 | + <h3>Navigation</h3> | |
36 | + <ul> | |
37 | + <li class="right" style="margin-right: 10px"> | |
38 | + <a href="genindex.html" title="General Index" | |
39 | + accesskey="I">index</a></li> | |
40 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
41 | + </ul> | |
42 | + </div> | |
43 | + | |
44 | + <div class="document"> | |
45 | + <div class="documentwrapper"> | |
46 | + <div class="bodywrapper"> | |
47 | + <div class="body"> | |
48 | + | |
49 | + <h1 id="search-documentation">Search</h1> | |
50 | + <div id="fallback" class="admonition warning"> | |
51 | + <script type="text/javascript">$('#fallback').hide();</script> | |
52 | + <p> | |
53 | + Please activate JavaScript to enable the search | |
54 | + functionality. | |
55 | + </p> | |
56 | + </div> | |
57 | + <p> | |
58 | + From here you can search these documents. Enter your search | |
59 | + words into the box below and click "search". Note that the search | |
60 | + function will automatically search for all of the words. Pages | |
61 | + containing fewer words won't appear in the result list. | |
62 | + </p> | |
63 | + <form action="" method="get"> | |
64 | + <input type="text" name="q" value="" /> | |
65 | + <input type="submit" value="search" /> | |
66 | + <span id="search-progress" style="padding-left: 10px"></span> | |
67 | + </form> | |
68 | + | |
69 | + <div id="search-results"> | |
70 | + | |
71 | + </div> | |
72 | + | |
73 | + </div> | |
74 | + </div> | |
75 | + </div> | |
76 | + <div class="sphinxsidebar"> | |
77 | + <div class="sphinxsidebarwrapper"> | |
78 | + </div> | |
79 | + </div> | |
80 | + <div class="clearer"></div> | |
81 | + </div> | |
82 | + <div class="related"> | |
83 | + <h3>Navigation</h3> | |
84 | + <ul> | |
85 | + <li class="right" style="margin-right: 10px"> | |
86 | + <a href="genindex.html" title="General Index" | |
87 | + >index</a></li> | |
88 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
89 | + </ul> | |
90 | + </div> | |
91 | + <div class="footer"> | |
92 | + © Copyright 2012, sigmaz. | |
93 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
94 | + </div> | |
95 | + </body> | |
96 | +</html> | |
0 | 97 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/searchindex.js
0 โ 100644
1 | +Search.setIndex({objects:{},terms:{setstrik:9,all:[6,5,14,3,13],code:[6,14],yellow:[11,5,9,13],concept:6,phprtflite_border_format:[11,5,9,13],tahoma:5,follow:[1,13],phprtflite_unit:14,row:5,footnot:[8,0,12],iconv:6,lgpl:4,addfootnot:8,under:4,introduc:[],merchant:4,setpagewidth:[],everi:6,string:[],type_bullet:1,"0f0":5,"1pt":[11,5,9,13],level:1,item:[1,7],vertical_align_cent:5,type_alpha_low:1,quick:[6,2],require_onc:2,pleas:[6,5,10],prevent:13,impli:4,addenumer:[],setcheck:7,second:[5,1],download:[6,0],odd:[14,3],even:[11,12,3,14,4],index:5,getcolumn:5,appear:[8,3],setspaceaft:9,animate_shimm:9,section:[0,1,2,3,5,7,8,9,11,14,13],sectnum:9,phprtf:6,cell:[0,1,5,7,8,11],version:4,settextalign:5,"new":[5,1,2,3,9,11,14,13],net:[6,10],"public":4,full:6,dropdown:[0,12,7],gener:4,here:[11,5,9,13],disclaim:[6,0],let:10,twentieth:14,type_squar:1,path:[11,5,2,3],rotate_right:5,vertic:5,text_align_right:[5,9],interpret:6,box:7,rotatecellrang:5,search:[],vertical_align_bottom:5,phprtflite_bord:[11,5,9,13],via:[6,5],appli:5,modul:[],foundat:4,vertical_align_top:5,famili:[0,9],instal:[6,0],unit:[0,14],fontyellow:5,from:[6,5,9],describ:5,doubl:9,regist:2,next:13,call:5,f00:5,recommend:2,strike:9,type:[0,1,9,3,5],registerautoload:2,more:[11,5,13,4],diamond:1,ital:9,setital:9,particular:[13,4],addnumb:[],must:3,word:[6,5],work:[6,10],rev577:6,paragraph:[0,9,5],can:[5,1,2,3,4,6,7,8,9,11,14,13],tabul:9,purpos:4,setindentleft:9,setheight:[11,5],sethyphen:14,give:6,indic:[],topic:[],getcel:5,sourc:6,spl:2,want:[2,3],type_arrow:1,cours:3,anoth:[13,10],write:[5,2],addtabl:[5,3],setbackgroundforcellrang:5,setborderforcellrang:5,instead:14,writetocel:5,numlist:1,newproductnam:[],product:[],after:[8,5,9],minimum:6,befor:[5,9],ff0000:[11,5,9,13],mai:2,"5cm":9,"short":[5,2],third:5,footer:[11,0,12,3],bootstrap:[5,9,13],caus:11,green:[11,5,9,13],sect:2,setoddevendiffer:3,checkbox:[0,12,7],rotat:[0,5],softwar:4,over:13,top:[11,5,14,9,13],orang:7,autoload:[0,2],paper:[14,13],setmarginleft:14,setbord:[11,5,9,13],sigma_z:10,style:[0,9],arial:[5,9],fit:4,how:6,type_left:[0,3],animate_las_vegas_light:9,type_dash:9,persist:[],main:[6,12],might:[],them:5,good:10,thei:[8,1],handl:[8,2],labber:[],setbold:9,ff0:5,"break":[0,9,13],setspacebetweenlin:9,addimag:[11,5],writehyperlink:13,introduct:[6,0],setpageheight:[],term:4,name:[],softmak:6,animate_marching_black_:9,fontr:5,separ:13,setmarginright:14,arrow:1,each:5,found:10,idea:10,phprtflite_list_numb:1,redistribut:4,setspacebefor:9,type_circl:1,setindentright:9,todo:[],orient:[0,14],setcharset:14,space:[0,9,13],setitem:7,publish:4,content:[],type_dot:9,ref:[],red:[11,5,9,13],type_roman_upp:1,free:4,getrow:5,releas:[6,4],org:[6,14,4],setmargintop:14,indent:[0,9],think:10,first:[5,1,9,3],rotate_left:5,rang:[0,5],directli:8,upper:1,arrai:[5,7,3,13],number:[0,1,9,12],lipsum:13,alreadi:2,overwrit:[14,13],stabl:[],size:[0,14,9,13],differ:[6,8,9,3],width:[11,5,14,13],licens:[0,4],type_first:[0,3],underlin:9,too:14,circl:1,type_right:[0,3],option:4,setbackgroundcolor:[5,9],addcheckbox:7,specifi:[6,11,3,13],modifi:4,textfield:7,than:6,instanc:[5,2,3,9,11,14,13],provid:6,posibl:13,charact:[6,0,1,14],project:6,setmargin:14,were:6,viewer:6,svnroot:6,adddropdown:7,ant:9,have:[13,9,10],tabl:[0,1,3,5,6,8,11,12],need:[6,2],"null":9,border:[11,0,9,13,5],atid:10,squar:1,centimet:14,note:[6,11,8,13],also:[5,13,4],exampl:[0,1,2,3,5,6,7,9,8,14],addhead:3,which:[14,2],"s\u00fclz":[],singl:5,blue:[11,5,9,13],distribut:4,"enum":1,object:5,textmak:6,"class":[5,2,9],warranti:4,latin1:14,later:4,request:[0,10],doe:[6,14],explizit:13,microsoft:[6,5],dot:9,rtf:[0,1,2,3,5,6,9,11,14,13],show:6,enumer:[0,1,12],alphanumer:1,"0000ff":[11,5,9,13],setpaperwidth:14,font:[0,9,5],find:10,current:[],onli:[6,3],layout:[],writer:6,activ:6,should:[10,3],black:9,setpaperheight:14,rich:6,hello_world:2,hope:4,get:[0,2],ff3333:9,insertpagebreak:13,requir:[6,0],setnumberofcolumn:13,bar:1,phprtflite_container_cel:5,setindentfirstlin:9,"00ff00":[11,5,9,13],type_roman_low:1,contain:5,through:3,where:8,wiki:14,"3cm":[5,14,13],set:[0,3,5,6,7,9,14,13],setdoublestrik:9,animate_marching_red_:9,see:[13,4],portrait:14,setglobalunit:14,horizont:[5,9],unit_inch:14,wikipedia:14,label:7,written:6,between:[8,0,14,9,13],altern:9,ipsum:[9,7,13],"2pt":[11,5,9,13],type_alpha_upp:1,extens:6,cut:5,type_arabic_num:1,setlinebetweencolumn:13,text_align_left:[5,9],hyperlink:[0,12,13],formfield:[],roman:[5,1],tutori:[],text_align_justifi:[5,9],mani:6,com:13,setcellpaddingleft:5,load:2,afaik:6,color:[11,0,9,13,5],overview:[6,0,12],hyphen:[0,14],trunk:6,twip:14,height:[11,5,14,13],header:[11,0,12,3],guid:[],strong:9,nestedt:5,animate_sparkle_text:9,parformat:9,mark:8,setunderlin:9,much:6,subenum:1,strategi:2,writetext:[5,2,3,7,9,8,13],fontgreen:5,both:5,endnot:[8,0,12],mind:5,imag:[11,0,12,3,5],phprtflite:[0,2,3,4,5,6,7,9,11,12,13,14],ani:4,text_align_cent:[5,9],phprtflite_font:[5,2,9],setcellpaddingtop:5,animate_blinking_background:9,addlist:1,"case":[1,2],gnu:4,setwidth:[11,5],align:[0,9,5],additem:[1,7],sourceforg:[6,10],ffff00:[11,5,9,13],lesser:4,defin:[6,8,14,3,13],"while":8,error:10,margin:[0,14,13],"00f":5,setmarginbottom:14,jpg:5,anim:[0,9],setfont:5,welcom:0,format:[6,0,9,13,5],same:[5,14,13],shorter:[5,14],html:[0,9,4],pad:[0,5],inch:14,document:[0,2,3,5,6,10,11,14,13],unit_point:14,http:[6,13,14,10,4],nest:[6,0,1,12,5],addfoot:3,"4cm":[5,14],improv:10,phprtflite_parformat:[5,2,9],php:[5,1,2,3,6,7,8,9,11,14,13],entitymanag:[],lower:1,center:9,whole:9,well:5,justifi:[],without:4,thi:[6,8,2,3],choos:2,"1cm":[11,5,14,9,13],left:[5,3,9,11,14,13],just:2,foot:8,sytl:[],web:10,now:5,phprtflite_container_head:3,type_al:[0,3],point:14,setdefaultvalu:7,add:[5,1,2,3,7,11,13],spread:13,addtextfield:7,setlandscap:14,foobar:1,input:[0,14],save:2,setanim:9,fontblu:5,march:9,around:9,heigth:13,read:[11,5,13],setcolumnwidth:13,arab:1,know:10,background:[0,9,5],world:[0,1,2,9],phprftlite:6,insert:13,like:13,specif:6,setnobreak:13,either:4,resiz:[11,0],group_id:10,imagefil:[11,5],page:[0,3,6,9,8,14,13],www:4,right:[5,3,9,11,14,13],setcellpad:5,"12pt":9,some:[5,9,13],setfontforcellrang:5,intern:14,sampl:6,flush:[],home:6,librari:[2,10],scale:11,bottom:[5,8,9,11,14,13],landscap:14,tracker:10,larg:11,setcellpaddingright:5,foo:1,refer:6,bold:9,addsect:[5,1,2,3,9,13],type_diamond:1,repositori:6,chapter:[],about:[6,5,11,13],most:2,column:[0,13,5],"2cm":[5,14,13],own:2,pagenum:9,phprtflite_list_enumer:1,mergecellrang:5,tag:[0,9],setmirrormar:14,down:11,availbl:5,your:[9,2,13,4],merg:[0,5],wai:[5,14,9,10,13],support:[6,5,1,7,12],submit:10,avail:[6,5],start:[0,2,9,5],appl:7,editor:6,subnumlist:1,"function":6,setspacebetweencolumn:13,form:[0,12,7],offer:12,addcolumnslist:[5,3],link:[],measur:14,line:[0,9,13],bug:[0,10],count:1,utf:[6,12,14],tab:9,possibl:13,"default":[1,3,14],displai:[9,3],below:14,rotateto:5,otherwis:3,featur:[6,0,12,10],constant:[5,9],creat:[11,5,9,13],mirror:14,repres:9,addrow:[5,3],file:[6,11,3],addimagetocel:[5,3],ship:2,check:7,phprtflite_contain:[],titl:[],when:[6,3],detail:[6,4],field:[0,12,7],branch:6,test:6,you:[2,3,4,9,10,11,14,13],pineappl:7,setcellpaddingbottom:5,pear:7,type_singl:9,unit_cm:14,lorem:[9,7,13],svn:[6,0],bullet:[1,9],type_dotdash:9,rule:9,text:[0,2,3,5,6,7,9,8,12,13,14],openoffic:[6,5],time:5,hello:[0,1,2,9]},objtypes:{},titles:["Welcome to PHPRtfLite’s documentation","Enumerations / Numberings","Getting started","Headers and footers","License","Tables","Introduction","Form fields","Footnotes / Endnotes","Formatting","Bugs and feature requests","Images","Feature overview","Sections","Document settings"],objnames:{},filenames:["index","enumerations-numberings","getting-started","header-footer","license","tables","introduction","formfields","footnotes-endnotes","formatting","bug-feature","images","feature-overview","sections","document-settings"]}) | |
0 | 2 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/sections.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Sections — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Formatting" href="formatting.html" /> | |
27 | + <link rel="prev" title="Document settings" href="document-settings.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="formatting.html" title="Formatting" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="document-settings.html" title="Document settings" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="sections"> | |
52 | +<h1>Sections<a class="headerlink" href="#sections" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>Sections margins and paper width and height can be specified in the same way like for the RTF document. Sections margin and paper width/height will overwrite RTF document margins and paper width/heigth.</p> | |
54 | +<div class="admonition note"> | |
55 | +<p class="first admonition-title">Note</p> | |
56 | +<p class="last">See <em>Document settings</em> > <a class="reference internal" href="document-settings.html#doc-settings-page-margins"><em>Page margins</em></a> and <em>Document settings</em> > <a class="reference internal" href="document-settings.html#doc-settings-page-size"><em>Page size</em></a>.</p> | |
57 | +</div> | |
58 | +<div class="section" id="section-columns"> | |
59 | +<h2>Section columns<a class="headerlink" href="#section-columns" title="Permalink to this headline">ยถ</a></h2> | |
60 | +<p>Section text can be spreaded over columns (all having the same width):</p> | |
61 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
62 | +<span class="c1">// some bootstraping here</span> | |
63 | + | |
64 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
65 | +<span class="c1">// text will spreaded over 3 columns</span> | |
66 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setNumberOfColumns</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span> | |
67 | +</pre></div> | |
68 | +</div> | |
69 | +<p>Another way to define section columns with particular column widths:</p> | |
70 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
71 | +<span class="c1">// some bootstraping here</span> | |
72 | + | |
73 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
74 | +<span class="c1">// text will spreaded over 3 columns (widths are: 1cm, 2cm, and 3cm)</span> | |
75 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setColumnWidths</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">));</span> | |
76 | +</pre></div> | |
77 | +</div> | |
78 | +<p>Separate your section columns with a line, if you like to:</p> | |
79 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
80 | +<span class="c1">// some bootstraping here</span> | |
81 | + | |
82 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
83 | +<span class="c1">// text will spreaded over 3 columns (widths are: 1cm, 2cm, and 3cm)</span> | |
84 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setColumnWidths</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">));</span> | |
85 | +<span class="c1">// line between section columns</span> | |
86 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setLineBetweenColumns</span><span class="p">();</span> | |
87 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">);</span> | |
88 | +</pre></div> | |
89 | +</div> | |
90 | +<p>There is also the posibility to add space between the columns:</p> | |
91 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
92 | +<span class="c1">// some bootstraping here</span> | |
93 | + | |
94 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
95 | +<span class="c1">// text will spreaded over 3 columns (widths are: 1cm, 2cm, and 3cm)</span> | |
96 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setColumnWidths</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">));</span> | |
97 | +<span class="c1">// 0.2cm of space between section columns</span> | |
98 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setSpaceBetweenColumns</span><span class="p">(</span><span class="mf">0.2</span><span class="p">);</span> | |
99 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">);</span> | |
100 | +</pre></div> | |
101 | +</div> | |
102 | +</div> | |
103 | +<div class="section" id="page-breaks"> | |
104 | +<h2>Page breaks<a class="headerlink" href="#page-breaks" title="Permalink to this headline">ยถ</a></h2> | |
105 | +<p>Explizit page break:</p> | |
106 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
107 | +<span class="c1">// some bootstraping here</span> | |
108 | + | |
109 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
110 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">);</span> | |
111 | +<span class="c1">// insert a page break</span> | |
112 | +<span class="nv">$section</span><span class="o">-></span><span class="na">insertPageBreak</span><span class="p">();</span> | |
113 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Text on the next page'</span><span class="p">);</span> | |
114 | +</pre></div> | |
115 | +</div> | |
116 | +<p>To prevent a page break, if possible, you can do the following:</p> | |
117 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
118 | +<span class="c1">// some bootstraping here</span> | |
119 | + | |
120 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
121 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum'</span><span class="p">);</span> | |
122 | +<span class="c1">// prevent page break</span> | |
123 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setNoBreak</span><span class="p">();</span> | |
124 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Text on the next page'</span><span class="p">);</span> | |
125 | +</pre></div> | |
126 | +</div> | |
127 | +</div> | |
128 | +<div class="section" id="hyperlinks"> | |
129 | +<h2>Hyperlinks<a class="headerlink" href="#hyperlinks" title="Permalink to this headline">ยถ</a></h2> | |
130 | +<p>To add a hyperlink:</p> | |
131 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
132 | +<span class="c1">// some bootstraping here</span> | |
133 | + | |
134 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
135 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Lorem ipsum: '</span><span class="p">);</span> | |
136 | +<span class="nv">$section</span><span class="o">-></span><span class="na">writeHyperLink</span><span class="p">(</span><span class="s1">'http://lipsum.lipsum.com/'</span><span class="p">,</span> <span class="s1">'Lorem ipsum'</span><span class="p">);</span> | |
137 | +</pre></div> | |
138 | +</div> | |
139 | +</div> | |
140 | +<div class="section" id="borders"> | |
141 | +<h2>Borders<a class="headerlink" href="#borders" title="Permalink to this headline">ยถ</a></h2> | |
142 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
143 | +<span class="c1">// some bootstraping here</span> | |
144 | + | |
145 | +<span class="nv">$border</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Border</span><span class="p">(</span> | |
146 | + <span class="nv">$rtf</span><span class="p">,</span> <span class="c1">// PHPRtfLite instance</span> | |
147 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#00FF00'</span><span class="p">),</span> <span class="c1">// left border: 2pt, green color</span> | |
148 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#FFFF00'</span><span class="p">),</span> <span class="c1">// top border: 1pt, yellow color</span> | |
149 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#FF0000'</span><span class="p">),</span> <span class="c1">// right border: 2pt, red color</span> | |
150 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#0000FF'</span><span class="p">)</span> <span class="c1">// bottom border: 1pt, blue color</span> | |
151 | +<span class="p">);</span> | |
152 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
153 | +<span class="c1">// set section border</span> | |
154 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setBorder</span><span class="p">(</span><span class="nv">$border</span><span class="p">);</span> | |
155 | + | |
156 | +<span class="c1">// set one border format for top, left, right, and bottom</span> | |
157 | +<span class="nv">$section</span><span class="o">-></span><span class="na">setBorders</span><span class="p">(</span><span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#00FF00'</span><span class="p">));</span> | |
158 | +</pre></div> | |
159 | +</div> | |
160 | +<p>Read more about creating borders here: <a class="reference internal" href="formatting.html#borders"><em>Borders</em></a>.</p> | |
161 | +</div> | |
162 | +</div> | |
163 | + | |
164 | + | |
165 | + </div> | |
166 | + </div> | |
167 | + </div> | |
168 | + <div class="sphinxsidebar"> | |
169 | + <div class="sphinxsidebarwrapper"> | |
170 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
171 | + <ul> | |
172 | +<li><a class="reference internal" href="#">Sections</a><ul> | |
173 | +<li><a class="reference internal" href="#section-columns">Section columns</a></li> | |
174 | +<li><a class="reference internal" href="#page-breaks">Page breaks</a></li> | |
175 | +<li><a class="reference internal" href="#hyperlinks">Hyperlinks</a></li> | |
176 | +<li><a class="reference internal" href="#borders">Borders</a></li> | |
177 | +</ul> | |
178 | +</li> | |
179 | +</ul> | |
180 | + | |
181 | + <h4>Previous topic</h4> | |
182 | + <p class="topless"><a href="document-settings.html" | |
183 | + title="previous chapter">Document settings</a></p> | |
184 | + <h4>Next topic</h4> | |
185 | + <p class="topless"><a href="formatting.html" | |
186 | + title="next chapter">Formatting</a></p> | |
187 | + <h3>This Page</h3> | |
188 | + <ul class="this-page-menu"> | |
189 | + <li><a href="_sources/sections.txt" | |
190 | + rel="nofollow">Show Source</a></li> | |
191 | + </ul> | |
192 | +<div id="searchbox" style="display: none"> | |
193 | + <h3>Quick search</h3> | |
194 | + <form class="search" action="search.html" method="get"> | |
195 | + <input type="text" name="q" size="18" /> | |
196 | + <input type="submit" value="Go" /> | |
197 | + <input type="hidden" name="check_keywords" value="yes" /> | |
198 | + <input type="hidden" name="area" value="default" /> | |
199 | + </form> | |
200 | + <p class="searchtip" style="font-size: 90%"> | |
201 | + Enter search terms or a module, class or function name. | |
202 | + </p> | |
203 | +</div> | |
204 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
205 | + </div> | |
206 | + </div> | |
207 | + <div class="clearer"></div> | |
208 | + </div> | |
209 | + <div class="related"> | |
210 | + <h3>Navigation</h3> | |
211 | + <ul> | |
212 | + <li class="right" style="margin-right: 10px"> | |
213 | + <a href="genindex.html" title="General Index" | |
214 | + >index</a></li> | |
215 | + <li class="right" > | |
216 | + <a href="formatting.html" title="Formatting" | |
217 | + >next</a> |</li> | |
218 | + <li class="right" > | |
219 | + <a href="document-settings.html" title="Document settings" | |
220 | + >previous</a> |</li> | |
221 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
222 | + </ul> | |
223 | + </div> | |
224 | + <div class="footer"> | |
225 | + © Copyright 2012, sigmaz. | |
226 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
227 | + </div> | |
228 | + </body> | |
229 | +</html> | |
0 | 230 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/styling.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Sytling — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Tables" href="tables.html" /> | |
27 | + <link rel="prev" title="Sections" href="sections.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="tables.html" title="Tables" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="sections.html" title="Sections" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="sytling"> | |
52 | +<h1>Sytling<a class="headerlink" href="#sytling" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<div class="section" id="fonts"> | |
54 | +<h2>Fonts<a class="headerlink" href="#fonts" title="Permalink to this headline">ยถ</a></h2> | |
55 | +</div> | |
56 | +<div class="section" id="paragraph-formatting"> | |
57 | +<h2>Paragraph formatting<a class="headerlink" href="#paragraph-formatting" title="Permalink to this headline">ยถ</a></h2> | |
58 | +</div> | |
59 | +<div class="section" id="borders"> | |
60 | +<h2>Borders<a class="headerlink" href="#borders" title="Permalink to this headline">ยถ</a></h2> | |
61 | +</div> | |
62 | +</div> | |
63 | + | |
64 | + | |
65 | + </div> | |
66 | + </div> | |
67 | + </div> | |
68 | + <div class="sphinxsidebar"> | |
69 | + <div class="sphinxsidebarwrapper"> | |
70 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
71 | + <ul> | |
72 | +<li><a class="reference internal" href="#">Sytling</a><ul> | |
73 | +<li><a class="reference internal" href="#fonts">Fonts</a></li> | |
74 | +<li><a class="reference internal" href="#paragraph-formatting">Paragraph formatting</a></li> | |
75 | +<li><a class="reference internal" href="#borders">Borders</a></li> | |
76 | +</ul> | |
77 | +</li> | |
78 | +</ul> | |
79 | + | |
80 | + <h4>Previous topic</h4> | |
81 | + <p class="topless"><a href="sections.html" | |
82 | + title="previous chapter">Sections</a></p> | |
83 | + <h4>Next topic</h4> | |
84 | + <p class="topless"><a href="tables.html" | |
85 | + title="next chapter">Tables</a></p> | |
86 | + <h3>This Page</h3> | |
87 | + <ul class="this-page-menu"> | |
88 | + <li><a href="_sources/styling.txt" | |
89 | + rel="nofollow">Show Source</a></li> | |
90 | + </ul> | |
91 | +<div id="searchbox" style="display: none"> | |
92 | + <h3>Quick search</h3> | |
93 | + <form class="search" action="search.html" method="get"> | |
94 | + <input type="text" name="q" size="18" /> | |
95 | + <input type="submit" value="Go" /> | |
96 | + <input type="hidden" name="check_keywords" value="yes" /> | |
97 | + <input type="hidden" name="area" value="default" /> | |
98 | + </form> | |
99 | + <p class="searchtip" style="font-size: 90%"> | |
100 | + Enter search terms or a module, class or function name. | |
101 | + </p> | |
102 | +</div> | |
103 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
104 | + </div> | |
105 | + </div> | |
106 | + <div class="clearer"></div> | |
107 | + </div> | |
108 | + <div class="related"> | |
109 | + <h3>Navigation</h3> | |
110 | + <ul> | |
111 | + <li class="right" style="margin-right: 10px"> | |
112 | + <a href="genindex.html" title="General Index" | |
113 | + >index</a></li> | |
114 | + <li class="right" > | |
115 | + <a href="tables.html" title="Tables" | |
116 | + >next</a> |</li> | |
117 | + <li class="right" > | |
118 | + <a href="sections.html" title="Sections" | |
119 | + >previous</a> |</li> | |
120 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
121 | + </ul> | |
122 | + </div> | |
123 | + <div class="footer"> | |
124 | + © Copyright 2011, sigmaz. | |
125 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
126 | + </div> | |
127 | + </body> | |
128 | +</html> | |
0 | 129 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/docs/html/tables.html
0 โ 100644
1 | + | |
2 | + | |
3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | + <head> | |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
9 | + | |
10 | + <title>Tables — PHPRtfLite v1.x documentation</title> | |
11 | + <link rel="stylesheet" href="_static/default.css" type="text/css" /> | |
12 | + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
13 | + <script type="text/javascript"> | |
14 | + var DOCUMENTATION_OPTIONS = { | |
15 | + URL_ROOT: '', | |
16 | + VERSION: '1.x', | |
17 | + COLLAPSE_INDEX: false, | |
18 | + FILE_SUFFIX: '.html', | |
19 | + HAS_SOURCE: true | |
20 | + }; | |
21 | + </script> | |
22 | + <script type="text/javascript" src="_static/jquery.js"></script> | |
23 | + <script type="text/javascript" src="_static/underscore.js"></script> | |
24 | + <script type="text/javascript" src="_static/doctools.js"></script> | |
25 | + <link rel="top" title="PHPRtfLite v1.x documentation" href="index.html" /> | |
26 | + <link rel="next" title="Images" href="images.html" /> | |
27 | + <link rel="prev" title="Formatting" href="formatting.html" /> | |
28 | + </head> | |
29 | + <body> | |
30 | + <div class="related"> | |
31 | + <h3>Navigation</h3> | |
32 | + <ul> | |
33 | + <li class="right" style="margin-right: 10px"> | |
34 | + <a href="genindex.html" title="General Index" | |
35 | + accesskey="I">index</a></li> | |
36 | + <li class="right" > | |
37 | + <a href="images.html" title="Images" | |
38 | + accesskey="N">next</a> |</li> | |
39 | + <li class="right" > | |
40 | + <a href="formatting.html" title="Formatting" | |
41 | + accesskey="P">previous</a> |</li> | |
42 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
43 | + </ul> | |
44 | + </div> | |
45 | + | |
46 | + <div class="document"> | |
47 | + <div class="documentwrapper"> | |
48 | + <div class="bodywrapper"> | |
49 | + <div class="body"> | |
50 | + | |
51 | + <div class="section" id="tables"> | |
52 | +<h1>Tables<a class="headerlink" href="#tables" title="Permalink to this headline">ยถ</a></h1> | |
53 | +<p>PHPRtfLite supports tables and nested tables.</p> | |
54 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
55 | +<span class="c1">// some bootstraping here</span> | |
56 | + | |
57 | +<span class="nv">$section</span> <span class="o">=</span> <span class="nv">$rtf</span><span class="o">-></span><span class="na">addSection</span><span class="p">();</span> | |
58 | +<span class="nv">$table</span> <span class="o">=</span> <span class="nv">$section</span><span class="o">-></span><span class="na">addTable</span><span class="p">();</span> | |
59 | +<span class="c1">// add 2 rows with a height of 1cm for each of them</span> | |
60 | +<span class="nv">$table</span><span class="o">-></span><span class="na">addRows</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span> | |
61 | +<span class="c1">// add a row with a height of 2cm (table has now 4 rows)</span> | |
62 | +<span class="nv">$table</span><span class="o">-></span><span class="na">addRow</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span> | |
63 | +<span class="c1">// add 3 columns (first: 1cm, second: 2cm, third: 3cm)</span> | |
64 | +<span class="nv">$table</span><span class="o">-></span><span class="na">addColumnsList</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">));</span> | |
65 | +</pre></div> | |
66 | +</div> | |
67 | +<div class="section" id="cells"> | |
68 | +<h2>Cells<a class="headerlink" href="#cells" title="Permalink to this headline">ยถ</a></h2> | |
69 | +<p>Cells can contain images, texts, paragraphs and (nested) tables as well.</p> | |
70 | +<div class="section" id="text-in-cells"> | |
71 | +<h3>Text in cells<a class="headerlink" href="#text-in-cells" title="Permalink to this headline">ยถ</a></h3> | |
72 | +<p>Please mind that row and column indexes are starting with 1.</p> | |
73 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
74 | +<span class="c1">// writing text to a cell for row 1 and column 2</span> | |
75 | +<span class="nv">$table</span><span class="o">-></span><span class="na">writeToCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'text'</span><span class="p">);</span> | |
76 | +<span class="c1">// writing text via cell object for row 1 and column 3</span> | |
77 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
78 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'text'</span><span class="p">);</span> | |
79 | +</pre></div> | |
80 | +</div> | |
81 | +</div> | |
82 | +<div class="section" id="cell-formatting"> | |
83 | +<h3>Cell formatting<a class="headerlink" href="#cell-formatting" title="Permalink to this headline">ยถ</a></h3> | |
84 | +<div class="section" id="cell-font"> | |
85 | +<h4>Cell font<a class="headerlink" href="#cell-font" title="Permalink to this headline">ยถ</a></h4> | |
86 | +<p>Setting the font for a cell or a cell, cell range, column or row.</p> | |
87 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
88 | +<span class="c1">// set "Arial" with red color to a single cell</span> | |
89 | +<span class="nv">$fontRed</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="s1">'Arial'</span><span class="p">,</span> <span class="s1">'#f00'</span><span class="p">);</span> | |
90 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
91 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setFont</span><span class="p">(</span><span class="nv">$fontRed</span><span class="p">);</span> | |
92 | + | |
93 | +<span class="c1">// set "Times New Roman" with green color to a cell range</span> | |
94 | +<span class="nv">$fontGreen</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="s1">'Times New Roman'</span><span class="p">,</span> <span class="s1">'#0f0'</span><span class="p">);</span> | |
95 | +<span class="nv">$table</span><span class="o">-></span><span class="na">setFontForCellRange</span><span class="p">(</span><span class="nv">$fontGreen</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span> | |
96 | + | |
97 | +<span class="c1">// set "Times New Roman" with blue color to a column</span> | |
98 | +<span class="nv">$fontBlue</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="s1">'Times New Roman'</span><span class="p">,</span> <span class="s1">'#00f'</span><span class="p">);</span> | |
99 | +<span class="nv">$table</span><span class="o">-></span><span class="na">getColumn</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="o">-></span><span class="na">setFont</span><span class="p">(</span><span class="nv">$fontBlue</span><span class="p">);</span> | |
100 | + | |
101 | +<span class="c1">// set "Tahoma" with yellow color to a row</span> | |
102 | +<span class="nv">$fontYellow</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Font</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="s1">'Tahoma'</span><span class="p">,</span> <span class="s1">'#ff0'</span><span class="p">);</span> | |
103 | +<span class="nv">$table</span><span class="o">-></span><span class="na">getRow</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="o">-></span><span class="na">setFont</span><span class="p">(</span><span class="nv">$fontYellow</span><span class="p">);</span> | |
104 | +</pre></div> | |
105 | +</div> | |
106 | +</div> | |
107 | +<div class="section" id="cell-alignment"> | |
108 | +<h4>Cell alignment<a class="headerlink" href="#cell-alignment" title="Permalink to this headline">ยถ</a></h4> | |
109 | +<p>Cells can be aligned horizontal and vertical.</p> | |
110 | +<p>Horizontal alignment is also called text alignment. These types are availble as class constants:</p> | |
111 | +<ul class="simple"> | |
112 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_LEFT</span></tt></li> | |
113 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_RIGHT</span></tt></li> | |
114 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_CENTER</span></tt></li> | |
115 | +<li><tt class="docutils literal"><span class="pre">TEXT_ALIGN_JUSTIFY</span></tt></li> | |
116 | +</ul> | |
117 | +<p>Vertical alignment types available via class constants are:</p> | |
118 | +<ul class="simple"> | |
119 | +<li><tt class="docutils literal"><span class="pre">VERTICAL_ALIGN_TOP</span></tt></li> | |
120 | +<li><tt class="docutils literal"><span class="pre">VERTICAL_ALIGN_BOTTOM</span></tt></li> | |
121 | +<li><tt class="docutils literal"><span class="pre">VERTICAL_ALIGN_CENTER</span></tt></li> | |
122 | +</ul> | |
123 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
124 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
125 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setTextAlignment</span><span class="p">();</span> | |
126 | +</pre></div> | |
127 | +</div> | |
128 | +</div> | |
129 | +<div class="section" id="cell-padding"> | |
130 | +<h4>Cell padding<a class="headerlink" href="#cell-padding" title="Permalink to this headline">ยถ</a></h4> | |
131 | +<p>Using Microsoft Word top and bottom cell paddings are applied to all cells in a row.</p> | |
132 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
133 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
134 | +<span class="c1">// cell padding left: 0.2cm</span> | |
135 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setCellPaddingLeft</span><span class="p">(</span><span class="mf">0.2</span><span class="p">);</span> | |
136 | +<span class="c1">// cell padding right: 0.2cm</span> | |
137 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setCellPaddingRight</span><span class="p">(</span><span class="mf">0.2</span><span class="p">);</span> | |
138 | +<span class="c1">// cell padding left: 0.4cm</span> | |
139 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setCellPaddingTop</span><span class="p">(</span><span class="mf">0.4</span><span class="p">);</span> | |
140 | +<span class="c1">// cell padding left: 0.4cm</span> | |
141 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setCellPaddingBottom</span><span class="p">(</span><span class="mf">0.4</span><span class="p">);</span> | |
142 | + | |
143 | +<span class="c1">// or the same in a shorter way</span> | |
144 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setCellPaddings</span><span class="p">(</span><span class="mf">0.2</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">);</span> | |
145 | +</pre></div> | |
146 | +</div> | |
147 | +</div> | |
148 | +<div class="section" id="background-color"> | |
149 | +<h4>Background color<a class="headerlink" href="#background-color" title="Permalink to this headline">ยถ</a></h4> | |
150 | +<p>The background color can be set for a single cell or for a range of cells.</p> | |
151 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
152 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
153 | +<span class="c1">// set background color of cell to red</span> | |
154 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setBackgroundColor</span><span class="p">(</span><span class="s1">'#FF0000'</span><span class="p">);</span> | |
155 | +<span class="c1">// set background color for a cell range (from row 1 column 1 to row 4 column 4) to blue</span> | |
156 | +<span class="nv">$table</span><span class="o">-></span><span class="na">setBackgroundForCellRange</span><span class="p">(</span><span class="s1">'#0000FF'</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span> | |
157 | +</pre></div> | |
158 | +</div> | |
159 | +</div> | |
160 | +<div class="section" id="border-formatting"> | |
161 | +<h4>Border formatting<a class="headerlink" href="#border-formatting" title="Permalink to this headline">ยถ</a></h4> | |
162 | +<p>Cell borders can be set for a single cell or for a range of cells.</p> | |
163 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
164 | +<span class="nv">$border</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">PHPRtfLite_Border</span><span class="p">(</span> | |
165 | + <span class="nv">$rtf</span><span class="p">,</span> <span class="c1">// PHPRtfLite instance</span> | |
166 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#00FF00'</span><span class="p">),</span> <span class="c1">// left border: 2pt, green color</span> | |
167 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#FFFF00'</span><span class="p">),</span> <span class="c1">// top border: 1pt, yellow color</span> | |
168 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'#FF0000'</span><span class="p">),</span> <span class="c1">// right border: 2pt, red color</span> | |
169 | + <span class="k">new</span> <span class="nx">PHPRtfLite_Border_Format</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'#0000FF'</span><span class="p">)</span> <span class="c1">// bottom border: 1pt, blue color</span> | |
170 | +<span class="p">);</span> | |
171 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
172 | +<span class="c1">// cell with border</span> | |
173 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">setBorder</span><span class="p">(</span><span class="nv">$border</span><span class="p">);</span> | |
174 | + | |
175 | +<span class="c1">// set border for cell range (from row 1 and column 1 to row 3 and column 2)</span> | |
176 | +<span class="nv">$table</span><span class="o">-></span><span class="na">setBorderForCellRange</span><span class="p">(</span><span class="nv">$border</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span> | |
177 | +</pre></div> | |
178 | +</div> | |
179 | +<p>Read more about creating borders here: <a class="reference internal" href="formatting.html#borders"><em>Borders</em></a>.</p> | |
180 | +</div> | |
181 | +<div class="section" id="rotate-text-in-cells"> | |
182 | +<h4>Rotate text in cells<a class="headerlink" href="#rotate-text-in-cells" title="Permalink to this headline">ยถ</a></h4> | |
183 | +<p>Cell text can be rotated to left and right.</p> | |
184 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
185 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
186 | +<span class="c1">// rotate text in cell to left</span> | |
187 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">rotateTo</span><span class="p">(</span><span class="nx">PHPRtfLite_Container_Cell</span><span class="o">::</span><span class="na">ROTATE_LEFT</span><span class="p">);</span> | |
188 | + | |
189 | +<span class="c1">// rotate text for a cell range (from row 1, column 2 to row 3, column 4) to right</span> | |
190 | +<span class="nv">$table</span><span class="o">-></span><span class="na">rotateCellRange</span><span class="p">(</span><span class="nx">PHPRtfLite_Container_Cell</span><span class="o">::</span><span class="na">ROTATE_RIGHT</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span> | |
191 | +</pre></div> | |
192 | +</div> | |
193 | +</div> | |
194 | +</div> | |
195 | +<div class="section" id="images"> | |
196 | +<h3>Images<a class="headerlink" href="#images" title="Permalink to this headline">ยถ</a></h3> | |
197 | +<p>Images can be added to a table cell.</p> | |
198 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
199 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
200 | +<span class="c1">// adding image to cell row 1 and column 3</span> | |
201 | +<span class="nv">$imageFile</span> <span class="o">=</span> <span class="s1">'/path/to/image/example.jpg'</span><span class="p">;</span> | |
202 | +<span class="nv">$image</span> <span class="o">=</span> <span class="nv">$cell</span><span class="o">-></span><span class="na">addImage</span><span class="p">(</span><span class="nv">$imageFile</span><span class="p">);</span> | |
203 | +<span class="c1">// image width 3cm and height 3cm</span> | |
204 | +<span class="nv">$image</span><span class="o">-></span><span class="na">setWidth</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span> | |
205 | +<span class="nv">$image</span><span class="o">-></span><span class="na">setHeight</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span> | |
206 | + | |
207 | +<span class="c1">// the same as short cut</span> | |
208 | +<span class="nv">$image</span><span class="o">-></span><span class="na">addImageToCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="nv">$imageFile</span><span class="p">,</span> <span class="k">new</span> <span class="nx">PHPRtfLite_ParFormat</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
209 | +</pre></div> | |
210 | +</div> | |
211 | +<p>Adding images to the RTF document is also described in <a class="reference internal" href="images.html#images"><em>Images</em></a>.</p> | |
212 | +</div> | |
213 | +<div class="section" id="merging-a-cell-range"> | |
214 | +<h3>Merging a cell range<a class="headerlink" href="#merging-a-cell-range" title="Permalink to this headline">ยถ</a></h3> | |
215 | +<p>Cells can be merged horizontal, vertically and both.</p> | |
216 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
217 | +<span class="c1">// merge cells from row 1 column 1 to row 2 and column 3</span> | |
218 | +<span class="nv">$table</span><span class="o">-></span><span class="na">mergeCellRange</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
219 | +</pre></div> | |
220 | +</div> | |
221 | +</div> | |
222 | +</div> | |
223 | +<div class="section" id="nested-tables"> | |
224 | +<h2>Nested tables<a class="headerlink" href="#nested-tables" title="Permalink to this headline">ยถ</a></h2> | |
225 | +<p>Nested tables are not supported by OpenOffice 3.2.</p> | |
226 | +<div class="highlight-php"><div class="highlight"><pre><span class="cp"><?php</span> | |
227 | +<span class="nv">$cell</span> <span class="o">=</span> <span class="nv">$table</span><span class="o">-></span><span class="na">getCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> | |
228 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Text before nested table'</span><span class="p">);</span> | |
229 | +<span class="c1">// nested cell</span> | |
230 | +<span class="nv">$nestedTable</span> <span class="o">=</span> <span class="nv">$cell</span><span class="o">-></span><span class="na">addTable</span><span class="p">();</span> | |
231 | +<span class="nv">$nestedTable</span><span class="o">-></span><span class="na">addRow</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> | |
232 | +<span class="nv">$nestedTable</span><span class="o">-></span><span class="na">addColumnsList</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">));</span> | |
233 | +<span class="nv">$nestedTable</span><span class="o">-></span><span class="na">writeToCell</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'Text for first nested cell'</span><span class="p">);</span> | |
234 | + | |
235 | +<span class="nv">$cell</span><span class="o">-></span><span class="na">writeText</span><span class="p">(</span><span class="s1">'Text after nested table!'</span><span class="p">);</span> | |
236 | +</pre></div> | |
237 | +</div> | |
238 | +</div> | |
239 | +</div> | |
240 | + | |
241 | + | |
242 | + </div> | |
243 | + </div> | |
244 | + </div> | |
245 | + <div class="sphinxsidebar"> | |
246 | + <div class="sphinxsidebarwrapper"> | |
247 | + <h3><a href="index.html">Table Of Contents</a></h3> | |
248 | + <ul> | |
249 | +<li><a class="reference internal" href="#">Tables</a><ul> | |
250 | +<li><a class="reference internal" href="#cells">Cells</a><ul> | |
251 | +<li><a class="reference internal" href="#text-in-cells">Text in cells</a></li> | |
252 | +<li><a class="reference internal" href="#cell-formatting">Cell formatting</a><ul> | |
253 | +<li><a class="reference internal" href="#cell-font">Cell font</a></li> | |
254 | +<li><a class="reference internal" href="#cell-alignment">Cell alignment</a></li> | |
255 | +<li><a class="reference internal" href="#cell-padding">Cell padding</a></li> | |
256 | +<li><a class="reference internal" href="#background-color">Background color</a></li> | |
257 | +<li><a class="reference internal" href="#border-formatting">Border formatting</a></li> | |
258 | +<li><a class="reference internal" href="#rotate-text-in-cells">Rotate text in cells</a></li> | |
259 | +</ul> | |
260 | +</li> | |
261 | +<li><a class="reference internal" href="#images">Images</a></li> | |
262 | +<li><a class="reference internal" href="#merging-a-cell-range">Merging a cell range</a></li> | |
263 | +</ul> | |
264 | +</li> | |
265 | +<li><a class="reference internal" href="#nested-tables">Nested tables</a></li> | |
266 | +</ul> | |
267 | +</li> | |
268 | +</ul> | |
269 | + | |
270 | + <h4>Previous topic</h4> | |
271 | + <p class="topless"><a href="formatting.html" | |
272 | + title="previous chapter">Formatting</a></p> | |
273 | + <h4>Next topic</h4> | |
274 | + <p class="topless"><a href="images.html" | |
275 | + title="next chapter">Images</a></p> | |
276 | + <h3>This Page</h3> | |
277 | + <ul class="this-page-menu"> | |
278 | + <li><a href="_sources/tables.txt" | |
279 | + rel="nofollow">Show Source</a></li> | |
280 | + </ul> | |
281 | +<div id="searchbox" style="display: none"> | |
282 | + <h3>Quick search</h3> | |
283 | + <form class="search" action="search.html" method="get"> | |
284 | + <input type="text" name="q" size="18" /> | |
285 | + <input type="submit" value="Go" /> | |
286 | + <input type="hidden" name="check_keywords" value="yes" /> | |
287 | + <input type="hidden" name="area" value="default" /> | |
288 | + </form> | |
289 | + <p class="searchtip" style="font-size: 90%"> | |
290 | + Enter search terms or a module, class or function name. | |
291 | + </p> | |
292 | +</div> | |
293 | +<script type="text/javascript">$('#searchbox').show(0);</script> | |
294 | + </div> | |
295 | + </div> | |
296 | + <div class="clearer"></div> | |
297 | + </div> | |
298 | + <div class="related"> | |
299 | + <h3>Navigation</h3> | |
300 | + <ul> | |
301 | + <li class="right" style="margin-right: 10px"> | |
302 | + <a href="genindex.html" title="General Index" | |
303 | + >index</a></li> | |
304 | + <li class="right" > | |
305 | + <a href="images.html" title="Images" | |
306 | + >next</a> |</li> | |
307 | + <li class="right" > | |
308 | + <a href="formatting.html" title="Formatting" | |
309 | + >previous</a> |</li> | |
310 | + <li><a href="index.html">PHPRtfLite v1.x documentation</a> »</li> | |
311 | + </ul> | |
312 | + </div> | |
313 | + <div class="footer"> | |
314 | + © Copyright 2012, sigmaz. | |
315 | + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. | |
316 | + </div> | |
317 | + </body> | |
318 | +</html> | |
0 | 319 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for creating rtf documents. | |
25 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
26 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
27 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
28 | + * @package PHPRtfLite | |
29 | + */ | |
30 | +class PHPRtfLite | |
31 | +{ | |
32 | + | |
33 | + const VERSION = '1.3.1'; | |
34 | + | |
35 | + const PAPER_A3 = 'a3'; | |
36 | + const PAPER_A4 = 'a4'; | |
37 | + const PAPER_A5 = 'a5'; | |
38 | + const PAPER_LETTER = 'letter'; | |
39 | + const PAPER_LEGAL = 'legal'; | |
40 | + | |
41 | + const SPACE_IN_POINTS = 20; // used for twips conversion | |
42 | + const SPACE_IN_LINES = 240; // used for twips conversion | |
43 | + | |
44 | + /** | |
45 | + * constants defining view modes | |
46 | + */ | |
47 | + const VIEW_MODE_NONE = 0; | |
48 | + const VIEW_MODE_PAGE_LAYOUT = 1; | |
49 | + const VIEW_MODE_OUTLINE = 2; | |
50 | + const VIEW_MODE_MASTER = 3; | |
51 | + const VIEW_MODE_NORMAL = 4; | |
52 | + const VIEW_MODE_ONLINE_LAYOUT = 5; | |
53 | + | |
54 | + /** | |
55 | + * constants defining zoom modes | |
56 | + */ | |
57 | + const ZOOM_MODE_NONE = 0; | |
58 | + const ZOOM_MODE_FULL_PAGE = 1; | |
59 | + const ZOOM_MODE_BEST_FIT = 2; | |
60 | + | |
61 | + | |
62 | + /** | |
63 | + * @var array | |
64 | + */ | |
65 | + protected $_paperFormats = array( | |
66 | + self::PAPER_A3 => array(29.7, 42.0), | |
67 | + self::PAPER_A4 => array(21.0, 29.7), | |
68 | + self::PAPER_A5 => array(14.85, 21.0), | |
69 | + self::PAPER_LETTER => array(21.59, 27.94), | |
70 | + self::PAPER_LEGAL => array(21.59, 35.56) | |
71 | + ); | |
72 | + | |
73 | + /** | |
74 | + * rtf sections | |
75 | + * @var PHPRtfLite_Container_Section[] | |
76 | + */ | |
77 | + protected $_sections = array(); | |
78 | + | |
79 | + /** | |
80 | + * rtf headers | |
81 | + * @var PHPRtfLite_Container_Header[] | |
82 | + */ | |
83 | + protected $_headers = array(); | |
84 | + | |
85 | + /** | |
86 | + * rtf footers | |
87 | + * @var PHPRtfLite_Container_Footer[] | |
88 | + */ | |
89 | + protected $_footers = array(); | |
90 | + | |
91 | + /** | |
92 | + * charset of text inputs for rtf document, default is UTF-8 | |
93 | + * @var string | |
94 | + */ | |
95 | + private $_charset = 'UTF-8'; | |
96 | + | |
97 | + /** | |
98 | + * paper width | |
99 | + * @var float | |
100 | + */ | |
101 | + private $_paperWidth = 0; | |
102 | + | |
103 | + /** | |
104 | + * paper height | |
105 | + * @var float | |
106 | + */ | |
107 | + private $_paperHeight = 0; | |
108 | + | |
109 | + /** | |
110 | + * left margin | |
111 | + * @var float | |
112 | + */ | |
113 | + private $_marginLeft = 3; | |
114 | + | |
115 | + /** | |
116 | + * right margin | |
117 | + * @var float | |
118 | + */ | |
119 | + private $_marginRight = 3; | |
120 | + | |
121 | + /** | |
122 | + * top margin | |
123 | + * @var float | |
124 | + */ | |
125 | + private $_marginTop = 1; | |
126 | + | |
127 | + /** | |
128 | + * bottom margin | |
129 | + * @var float | |
130 | + */ | |
131 | + private $_marginBottom = 2; | |
132 | + | |
133 | + /** | |
134 | + * flag, if true, even and odd pages are using different layouts | |
135 | + * @var boolean | |
136 | + */ | |
137 | + private $_useOddEvenDifferent = false; | |
138 | + | |
139 | + /** | |
140 | + * font table instance | |
141 | + * @var PHPRtfLite_DocHead_FontTable | |
142 | + */ | |
143 | + protected $_fontTable; | |
144 | + | |
145 | + /** | |
146 | + * color table instance | |
147 | + * @var PHPRtfLite_DocHead_ColorTable | |
148 | + */ | |
149 | + protected $_colorTable; | |
150 | + | |
151 | + /** | |
152 | + * default font | |
153 | + * @var PHPRtfLite_Font | |
154 | + */ | |
155 | + protected $_defaultFont; | |
156 | + | |
157 | + /** | |
158 | + * rtf properties | |
159 | + * @var array | |
160 | + */ | |
161 | + protected $_properties = array(); | |
162 | + | |
163 | + /** | |
164 | + * @var bool | |
165 | + */ | |
166 | + protected $_borderSurroundsHeader = false; | |
167 | + | |
168 | + /** | |
169 | + * @var bool | |
170 | + */ | |
171 | + protected $_borderSurroundsFooter = false; | |
172 | + | |
173 | + /** | |
174 | + * default tab width | |
175 | + * @var float | |
176 | + */ | |
177 | + private $_defaultTabWidth = 2.29; | |
178 | + | |
179 | + /** | |
180 | + * view mode | |
181 | + * @var string | |
182 | + */ | |
183 | + private $_viewMode; | |
184 | + | |
185 | + /** | |
186 | + * zoom level | |
187 | + * @var integer | |
188 | + */ | |
189 | + private $_zoomLevel; | |
190 | + | |
191 | + /** | |
192 | + * zoom mode | |
193 | + * @var integer | |
194 | + */ | |
195 | + private $_zoomMode; | |
196 | + | |
197 | + /** | |
198 | + * gutter | |
199 | + * @var float | |
200 | + */ | |
201 | + private $_gutter; | |
202 | + | |
203 | + /** | |
204 | + * flag, if true margins will be the opposite for odd and even pages | |
205 | + * @var boolean | |
206 | + */ | |
207 | + private $_useMirrorMargins = false; | |
208 | + | |
209 | + /** | |
210 | + * start with page number | |
211 | + * @var integer | |
212 | + */ | |
213 | + private $_pageNumberStart = 1; | |
214 | + | |
215 | + /** | |
216 | + * flag, if true first page has special layout | |
217 | + * @var boolean | |
218 | + */ | |
219 | + private $_titlepg = false; | |
220 | + | |
221 | + /** | |
222 | + * rtf border | |
223 | + * @var PHPRtfLite_Border | |
224 | + */ | |
225 | + private $_border; | |
226 | + | |
227 | + /** | |
228 | + * flag, if true use landscape layout | |
229 | + * @var boolean | |
230 | + */ | |
231 | + private $_isLandscape = false; | |
232 | + | |
233 | + /** | |
234 | + * using hyphnation | |
235 | + * @var boolean | |
236 | + */ | |
237 | + private $_isHyphenation = false; | |
238 | + | |
239 | + /** | |
240 | + * document head definition for notes | |
241 | + * @var PHPRtfLite_DocHead_Note | |
242 | + */ | |
243 | + private $_noteDocHead = null; | |
244 | + | |
245 | + /** | |
246 | + * output stream | |
247 | + * @var PHPRtfLite_Writer_Interface | |
248 | + */ | |
249 | + private $_writer; | |
250 | + | |
251 | + /** | |
252 | + * flag, if true PHPRtfLite writes the output into a temporary file, | |
253 | + * which is slowing down a bit because of the io operations but uses less memory | |
254 | + * @var boolean | |
255 | + */ | |
256 | + private $_useTemporaryFile = false; | |
257 | + | |
258 | + | |
259 | + public function __construct() | |
260 | + { | |
261 | + $this->setPaperFormat(self::PAPER_A4); | |
262 | + } | |
263 | + | |
264 | + | |
265 | + /** | |
266 | + * registers autoloader for PHPRtfLite classes | |
267 | + * | |
268 | + * @return boolean | |
269 | + */ | |
270 | + public static function registerAutoloader() | |
271 | + { | |
272 | + $baseClassDir = dirname(__FILE__); | |
273 | + require_once $baseClassDir . '/PHPRtfLite/Autoloader.php'; | |
274 | + PHPRtfLite_Autoloader::setBaseDir($baseClassDir); | |
275 | + | |
276 | + return spl_autoload_register(array('PHPRtfLite_Autoloader', 'autoload')); | |
277 | + } | |
278 | + | |
279 | + | |
280 | + /** | |
281 | + * unregisters autoloader for PHPRtfLite classes | |
282 | + * | |
283 | + * @return boolean | |
284 | + */ | |
285 | + public static function unregisterAutoloader() | |
286 | + { | |
287 | + return spl_autoload_unregister(array('PHPRtfLite_Autoloader', 'autoload')); | |
288 | + } | |
289 | + | |
290 | + | |
291 | + /** | |
292 | + * set that a temporary file should be used for creating the output | |
293 | + * NOTE: is slowing down the rendering because of the io operations, but uses less memory | |
294 | + * | |
295 | + * @param boolean $flag default is true | |
296 | + */ | |
297 | + public function setUseTemporaryFile($flag = true) | |
298 | + { | |
299 | + $this->_useTemporaryFile = $flag; | |
300 | + } | |
301 | + | |
302 | + | |
303 | + /** | |
304 | + * sets charset for rtf text inputs | |
305 | + * | |
306 | + * @param string $charset | |
307 | + */ | |
308 | + public function setCharset($charset) | |
309 | + { | |
310 | + $this->_charset = $charset; | |
311 | + } | |
312 | + | |
313 | + | |
314 | + /** | |
315 | + * gets charset for rtf text inputs | |
316 | + * | |
317 | + * @return string | |
318 | + */ | |
319 | + public function getCharset() | |
320 | + { | |
321 | + return $this->_charset; | |
322 | + } | |
323 | + | |
324 | + | |
325 | + /** | |
326 | + * sets document information properties | |
327 | + * | |
328 | + * @param string $name Property of document. Possible properties: <br> | |
329 | + * 'title' => title of the document (value string)<br> | |
330 | + * 'subject' => subject of the document (value string)<br> | |
331 | + * 'author' => author of the document (value string)<br> | |
332 | + * 'manager' => manager of the document (value string)<br> | |
333 | + * 'company' => company of author (value string)<br> | |
334 | + * 'operator' => operator of document. Operator is a person who last made changes to the document. (value string) <br> | |
335 | + * 'category' => category of document (value string)<br> | |
336 | + * 'keywords' => keywords of document (value string)<br> | |
337 | + * 'doccomm' => comments of document (value string)<br> | |
338 | + * 'creatim' => creation time (value int) <br> | |
339 | + * 'revtim' => last revision time (value int) <br> | |
340 | + * 'buptim' => last backup time (value int) <br> | |
341 | + * 'printim' => last print time (value int) <br> | |
342 | + * @param mixed $value Value | |
343 | + */ | |
344 | + public function setProperty($name, $value) | |
345 | + { | |
346 | + switch ($name) { | |
347 | + case 'creatim': | |
348 | + case 'revtim': | |
349 | + case 'buptim': | |
350 | + case 'printim': | |
351 | + $year = date('Y', $value); | |
352 | + $month = date('m', $value); | |
353 | + $day = date('d', $value); | |
354 | + $hours = date('H', $value); | |
355 | + $minutes = date('i', $value); | |
356 | + | |
357 | + $value = '\yr' . $year | |
358 | + . '\mo' . $month | |
359 | + . '\dy' . $day | |
360 | + . '\hr' . $hours | |
361 | + . '\min' . $minutes; | |
362 | + break; | |
363 | + default: | |
364 | + $value = self::quoteRtfCode($value); | |
365 | + } | |
366 | + | |
367 | + $this->_properties[$name] = $value; | |
368 | + } | |
369 | + | |
370 | + | |
371 | + /** | |
372 | + * gets rtf property | |
373 | + * | |
374 | + * @param string $name | |
375 | + * @return string | |
376 | + */ | |
377 | + public function getProperty($name) | |
378 | + { | |
379 | + return isset($this->_properties[$name]) | |
380 | + ? $this->_properties[$name] | |
381 | + : null; | |
382 | + } | |
383 | + | |
384 | + | |
385 | + /** | |
386 | + * gets document head definition for notes | |
387 | + * | |
388 | + * @return PHPRtfLite_DocHead_Note | |
389 | + */ | |
390 | + public function getNoteDocHead() | |
391 | + { | |
392 | + if ($this->_noteDocHead === null) { | |
393 | + $this->_noteDocHead = new PHPRtfLite_DocHead_Note(); | |
394 | + } | |
395 | + | |
396 | + return $this->_noteDocHead; | |
397 | + } | |
398 | + | |
399 | + | |
400 | + /** | |
401 | + * sets footnote numbering type | |
402 | + * | |
403 | + * @param integer $numberingType | |
404 | + */ | |
405 | + public function setFootnoteNumberingType($numberingType) | |
406 | + { | |
407 | + $this->getNoteDocHead()->setFootnoteNumberingType($numberingType); | |
408 | + } | |
409 | + | |
410 | + | |
411 | + /** | |
412 | + * gets footnote numbering type | |
413 | + * | |
414 | + * @return integer | |
415 | + */ | |
416 | + public function getFootnoteNumberingType() | |
417 | + { | |
418 | + return $this->getNoteDocHead()->getFootnoteNumberingType(); | |
419 | + } | |
420 | + | |
421 | + | |
422 | + /** | |
423 | + * sets endnote numbering type | |
424 | + * | |
425 | + * @param integer $numberingType | |
426 | + */ | |
427 | + public function setEndnoteNumberingType($numberingType) | |
428 | + { | |
429 | + $this->getNoteDocHead()->setEndnoteNumberingType($numberingType); | |
430 | + } | |
431 | + | |
432 | + | |
433 | + /** | |
434 | + * gets endnote numbering type | |
435 | + * | |
436 | + * @return integer | |
437 | + */ | |
438 | + public function getEndnoteNumberingType() | |
439 | + { | |
440 | + return $this->getNoteDocHead()->getEndnoteNumberingType(); | |
441 | + } | |
442 | + | |
443 | + | |
444 | + /** | |
445 | + * sets footnote start number | |
446 | + * | |
447 | + * @param integer $startNumber | |
448 | + */ | |
449 | + public function setFootnoteStartNumber($startNumber) | |
450 | + { | |
451 | + $this->getNoteDocHead()->setFootnoteStartNumber($startNumber); | |
452 | + } | |
453 | + | |
454 | + | |
455 | + /** | |
456 | + * gets footnote start number | |
457 | + * | |
458 | + * @return integer | |
459 | + */ | |
460 | + public function getFootnoteStartNumber() | |
461 | + { | |
462 | + return $this->getNoteDocHead()->getFootnoteStartNumber(); | |
463 | + } | |
464 | + | |
465 | + | |
466 | + /** | |
467 | + * sets endnote start number | |
468 | + * | |
469 | + * @param integer $startNumber | |
470 | + */ | |
471 | + public function setEndnoteStartNumber($startNumber) | |
472 | + { | |
473 | + $this->getNoteDocHead()->setEndnoteStartNumber($startNumber); | |
474 | + } | |
475 | + | |
476 | + | |
477 | + /** | |
478 | + * gets endnote start number | |
479 | + * | |
480 | + * @return integer | |
481 | + */ | |
482 | + public function getEndnoteStartNumber() | |
483 | + { | |
484 | + return $this->getNoteDocHead()->getEndnoteStartNumber(); | |
485 | + } | |
486 | + | |
487 | + | |
488 | + /** | |
489 | + * sets restart footnote number on each page | |
490 | + */ | |
491 | + public function setRestartFootnoteNumberEachPage() | |
492 | + { | |
493 | + $this->getNoteDocHead()->setRestartFootnoteNumberEachPage(); | |
494 | + } | |
495 | + | |
496 | + | |
497 | + /** | |
498 | + * checks, if footnote numbering shall be started on each page | |
499 | + * | |
500 | + * @return boolean | |
501 | + */ | |
502 | + public function setRestartEndnoteNumberEachPage() | |
503 | + { | |
504 | + $this->getNoteDocHead()->setRestartEndnoteNumberEachPage(); | |
505 | + } | |
506 | + | |
507 | + | |
508 | + /** | |
509 | + * sets restart endnote number on each page | |
510 | + * | |
511 | + * @return bool | |
512 | + */ | |
513 | + public function isRestartFootnoteNumberEachPage() | |
514 | + { | |
515 | + return $this->getNoteDocHead()->isRestartFootnoteNumberEachPage(); | |
516 | + } | |
517 | + | |
518 | + | |
519 | + /** | |
520 | + * checks, if endnote numbering shall be started on each page | |
521 | + * | |
522 | + * @return boolean | |
523 | + */ | |
524 | + public function isRestartEndnoteNumberEachPage() | |
525 | + { | |
526 | + return $this->getNoteDocHead()->isRestartEndnoteNumberEachPage(); | |
527 | + } | |
528 | + | |
529 | + | |
530 | + /** | |
531 | + * sets default font for notes | |
532 | + * | |
533 | + * @param PHPRtfLite_Font $font | |
534 | + */ | |
535 | + public function setDefaultFontForNotes(PHPRtfLite_Font $font) | |
536 | + { | |
537 | + PHPRtfLite_Footnote::setDefaultFont($font); | |
538 | + } | |
539 | + | |
540 | + | |
541 | + /** | |
542 | + * gets default font for notes | |
543 | + * | |
544 | + * @return PHPRtfLite_Font | |
545 | + */ | |
546 | + public function getDefaultFontForNotes() | |
547 | + { | |
548 | + return PHPRtfLite_Footnote::getDefaultFont(); | |
549 | + } | |
550 | + | |
551 | + | |
552 | + /** | |
553 | + * adds section to rtf document | |
554 | + * | |
555 | + * @param PHPRtfLite_Container_Section $section | |
556 | + * @return PHPRtfLite_Container_Section | |
557 | + */ | |
558 | + public function addSection(PHPRtfLite_Container_Section $section = null) | |
559 | + { | |
560 | + if ($section === null) { | |
561 | + $section = new PHPRtfLite_Container_Section($this); | |
562 | + } | |
563 | + | |
564 | + $this->_sections[] = $section; | |
565 | + | |
566 | + return $section; | |
567 | + } | |
568 | + | |
569 | + | |
570 | + /** | |
571 | + * gets sections | |
572 | + * | |
573 | + * @return array | |
574 | + */ | |
575 | + public function getSections() | |
576 | + { | |
577 | + return $this->_sections; | |
578 | + } | |
579 | + | |
580 | + | |
581 | + /** | |
582 | + * sets default tab width of the document | |
583 | + * | |
584 | + * @param float $defaultTabWidth Default tab width | |
585 | + */ | |
586 | + public function setDefaultTabWidth($defaultTabWidth) | |
587 | + { | |
588 | + $this->_defaultTabWidth = $defaultTabWidth; | |
589 | + } | |
590 | + | |
591 | + | |
592 | + /** | |
593 | + * sets default tab width of the document | |
594 | + * | |
595 | + * @return float $defaultTabWidth Default tab width | |
596 | + */ | |
597 | + public function getDefaultTabWidth() | |
598 | + { | |
599 | + return $this->_defaultTabWidth; | |
600 | + } | |
601 | + | |
602 | + | |
603 | + /** | |
604 | + * sets the paper format | |
605 | + * | |
606 | + * @param string $paperFormat represented by class constants PAPER_* | |
607 | + * @throws PHPRtfLite_Exception | |
608 | + */ | |
609 | + public function setPaperFormat($paperFormat) | |
610 | + { | |
611 | + if (!isset($this->_paperFormats[$paperFormat])) { | |
612 | + throw new PHPRtfLite_Exception("Paper format: '$paperFormat' is not supported!"); | |
613 | + } | |
614 | + | |
615 | + list($width, $height) = $this->_paperFormats[$paperFormat]; | |
616 | + | |
617 | + $defaultUnit = PHPRtfLite_Unit::getGlobalUnit(); | |
618 | + $this->_paperWidth = PHPRtfLite_Unit::convertTo($width, PHPRtfLite_Unit::UNIT_CM, $defaultUnit); | |
619 | + $this->_paperHeight = PHPRtfLite_Unit::convertTo($height, PHPRtfLite_Unit::UNIT_CM, $defaultUnit); | |
620 | + } | |
621 | + | |
622 | + | |
623 | + /** | |
624 | + * sets the paper width of document | |
625 | + * | |
626 | + * @param float $width pager width | |
627 | + */ | |
628 | + public function setPaperWidth($width) | |
629 | + { | |
630 | + $this->_paperWidth = $width; | |
631 | + } | |
632 | + | |
633 | + | |
634 | + /** | |
635 | + * gets the paper width of document | |
636 | + * | |
637 | + * @return float $paperWidth paper width | |
638 | + */ | |
639 | + public function getPaperWidth() | |
640 | + { | |
641 | + return $this->_paperWidth; | |
642 | + } | |
643 | + | |
644 | + | |
645 | + /** | |
646 | + * sets the paper height of document | |
647 | + * | |
648 | + * @param float $height paper height | |
649 | + */ | |
650 | + public function setPaperHeight($height) | |
651 | + { | |
652 | + $this->_paperHeight = $height; | |
653 | + } | |
654 | + | |
655 | + | |
656 | + /** | |
657 | + * gets the paper height of document | |
658 | + * | |
659 | + * @return float $paperHeight paper height | |
660 | + */ | |
661 | + public function getPaperHeight() | |
662 | + { | |
663 | + return $this->_paperHeight; | |
664 | + } | |
665 | + | |
666 | + | |
667 | + /** | |
668 | + * sets the margins of document pages | |
669 | + * | |
670 | + * @param float $marginLeft Margin left (default 3 cm) | |
671 | + * @param float $marginTop Margin top (default 1 cm) | |
672 | + * @param float $marginRight Margin right (default 3 cm) | |
673 | + * @param float $marginBottom Margin bottom (default 2 cm) | |
674 | + */ | |
675 | + public function setMargins($marginLeft, $marginTop, $marginRight, $marginBottom) | |
676 | + { | |
677 | + $this->_marginLeft = $marginLeft; | |
678 | + $this->_marginTop = $marginTop; | |
679 | + $this->_marginRight = $marginRight; | |
680 | + $this->_marginBottom = $marginBottom; | |
681 | + } | |
682 | + | |
683 | + | |
684 | + /** | |
685 | + * sets the left margin of document pages | |
686 | + * | |
687 | + * @param float $margin | |
688 | + */ | |
689 | + public function setMarginLeft($margin) | |
690 | + { | |
691 | + $this->_marginLeft = $margin; | |
692 | + } | |
693 | + | |
694 | + | |
695 | + /** | |
696 | + * gets the left margin of document pages | |
697 | + * | |
698 | + * @return float $margin | |
699 | + */ | |
700 | + public function getMarginLeft() | |
701 | + { | |
702 | + return $this->_marginLeft; | |
703 | + } | |
704 | + | |
705 | + | |
706 | + /** | |
707 | + * sets the right margin of document pages | |
708 | + * | |
709 | + * @param float $margin | |
710 | + */ | |
711 | + public function setMarginRight($margin) | |
712 | + { | |
713 | + $this->_marginRight = $margin; | |
714 | + } | |
715 | + | |
716 | + | |
717 | + /** | |
718 | + * gets the right margin of document pages | |
719 | + * | |
720 | + * @return float $margin | |
721 | + */ | |
722 | + public function getMarginRight() | |
723 | + { | |
724 | + return $this->_marginRight; | |
725 | + } | |
726 | + | |
727 | + | |
728 | + /** | |
729 | + * sets the top margin of document pages | |
730 | + * | |
731 | + * @param float $margin | |
732 | + */ | |
733 | + public function setMarginTop($margin) | |
734 | + { | |
735 | + $this->_marginTop = $margin; | |
736 | + } | |
737 | + | |
738 | + | |
739 | + /** | |
740 | + * gets the top margin of document pages | |
741 | + * | |
742 | + * @return float $margin | |
743 | + */ | |
744 | + public function getMarginTop() | |
745 | + { | |
746 | + return $this->_marginTop; | |
747 | + } | |
748 | + | |
749 | + | |
750 | + /** | |
751 | + * sets the bottom margin of document pages | |
752 | + * | |
753 | + * @param float $margin | |
754 | + */ | |
755 | + public function setMarginBottom($margin) | |
756 | + { | |
757 | + $this->_marginBottom = $margin; | |
758 | + } | |
759 | + | |
760 | + | |
761 | + /** | |
762 | + * gets the bottom margin of document pages | |
763 | + * | |
764 | + * @return float $margin | |
765 | + */ | |
766 | + public function getMarginBottom() | |
767 | + { | |
768 | + return $this->_marginBottom; | |
769 | + } | |
770 | + | |
771 | + | |
772 | + /** | |
773 | + * sets the margin definitions on left and right pages. <br> | |
774 | + * NOTICE: Does not work with OpenOffice. | |
775 | + */ | |
776 | + public function setMirrorMargins() | |
777 | + { | |
778 | + $this->_useMirrorMargins = true; | |
779 | + } | |
780 | + | |
781 | + | |
782 | + /** | |
783 | + * returns true, if use mirror margins should be used | |
784 | + * @return boolean | |
785 | + */ | |
786 | + public function isMirrorMargins() | |
787 | + { | |
788 | + return $this->_useMirrorMargins; | |
789 | + } | |
790 | + | |
791 | + | |
792 | + /** | |
793 | + * sets the gutter width. <br> | |
794 | + * NOTICE: Does not work with OpenOffice. | |
795 | + * | |
796 | + * @param float $gutter gutter width | |
797 | + */ | |
798 | + public function setGutter($gutter) | |
799 | + { | |
800 | + $this->_gutter = $gutter; | |
801 | + } | |
802 | + | |
803 | + | |
804 | + /** | |
805 | + * gets the gutter width | |
806 | + * | |
807 | + * @return float $gutter gutter width | |
808 | + */ | |
809 | + public function getGutter() | |
810 | + { | |
811 | + return $this->_gutter; | |
812 | + } | |
813 | + | |
814 | + | |
815 | + /** | |
816 | + * sets the beginning page number | |
817 | + * | |
818 | + * @param integer $pageNumber Beginning page number (if not defined, Word uses 1) | |
819 | + */ | |
820 | + public function setPageNumberStart($pageNumber) | |
821 | + { | |
822 | + $this->_pageNumberStart = $pageNumber; | |
823 | + } | |
824 | + | |
825 | + | |
826 | + /** | |
827 | + * gets the beginning page number | |
828 | + * | |
829 | + * @return integer | |
830 | + */ | |
831 | + public function getPageNumberStart() | |
832 | + { | |
833 | + return $this->_pageNumberStart; | |
834 | + } | |
835 | + | |
836 | + | |
837 | + /** | |
838 | + * sets the view mode of the document | |
839 | + * | |
840 | + * @param integer $viewMode View Mode. Represented as class constants VIEW_MODE_*<br> | |
841 | + * Possible values: <br> | |
842 | + * VIEW_MODE_NONE => 0 - None <br> | |
843 | + * VIEW_MODE_PAGE_LAYOUT => 1 - Page Layout view <br> | |
844 | + * VIEW_MODE_OUTLINE => 2 - Outline view <br> | |
845 | + * VIEW_MODE_MASTER => 3 - Master Document view <br> | |
846 | + * VIEW_MODE_NORMAL => 4 - Normal view <br> | |
847 | + * VIEW_MODE_ONLINE_LAYOUT => 5 - Online Layout view | |
848 | + */ | |
849 | + public function setViewMode($viewMode) | |
850 | + { | |
851 | + $this->_viewMode = $viewMode; | |
852 | + } | |
853 | + | |
854 | + | |
855 | + /** | |
856 | + * gets the view mode of the document | |
857 | + * | |
858 | + * @return integer view mode represented as class constants VIEW_MODE_* | |
859 | + */ | |
860 | + public function getViewMode() | |
861 | + { | |
862 | + return $this->_viewMode; | |
863 | + } | |
864 | + | |
865 | + | |
866 | + /** | |
867 | + * sets the zoom level (in percents) of the document. By default word uses 100%. <br> | |
868 | + * NOTICE: if zoom mode is defined, zoom level is not used. | |
869 | + * | |
870 | + * @param integer $zoom zoom level | |
871 | + */ | |
872 | + public function setZoomLevel($zoom) | |
873 | + { | |
874 | + $this->_zoomLevel = $zoom; | |
875 | + } | |
876 | + | |
877 | + | |
878 | + /** | |
879 | + * gets the zoom level (in percents) of the document | |
880 | + * | |
881 | + * @return integer $zoom zoom level | |
882 | + */ | |
883 | + public function getZoomLevel() | |
884 | + { | |
885 | + return $this->_zoomLevel; | |
886 | + } | |
887 | + | |
888 | + | |
889 | + /** | |
890 | + * sets the zoom mode of the document | |
891 | + * | |
892 | + * @param integer $zoomMode zoom mode. Represented as class constants. | |
893 | + * Possible values: <br> | |
894 | + * ZOOM_MODE_NONE => 0 - None <br> | |
895 | + * ZOOM_MODE_FULL_PAGE => 1 - Full Page <br> | |
896 | + * ZOOM_MODE_BEST_FIT => 2 - Best Fit | |
897 | + */ | |
898 | + public function setZoomMode($zoomMode) | |
899 | + { | |
900 | + $this->_zoomMode = $zoomMode; | |
901 | + } | |
902 | + | |
903 | + | |
904 | + /** | |
905 | + * gets the zoom mode of the document | |
906 | + * | |
907 | + * @return integer | |
908 | + */ | |
909 | + public function getZoomMode() | |
910 | + { | |
911 | + return $this->_zoomMode; | |
912 | + } | |
913 | + | |
914 | + | |
915 | + /** | |
916 | + * sets landscape orientation for the document | |
917 | + */ | |
918 | + public function setLandscape() | |
919 | + { | |
920 | + $this->_isLandscape = true; | |
921 | + } | |
922 | + | |
923 | + | |
924 | + /** | |
925 | + * returns true, if landscape layout should be used | |
926 | + * | |
927 | + * @return boolean | |
928 | + */ | |
929 | + public function isLandscape() | |
930 | + { | |
931 | + return $this->_isLandscape; | |
932 | + } | |
933 | + | |
934 | + | |
935 | + /** | |
936 | + * sets using hyphenation | |
937 | + */ | |
938 | + public function setHyphenation() | |
939 | + { | |
940 | + $this->_isHyphenation = true; | |
941 | + } | |
942 | + | |
943 | + | |
944 | + /** | |
945 | + * Sets border to rtf document. Sections may override this border. | |
946 | + * | |
947 | + * @param PHPRtfLite_Border $border | |
948 | + */ | |
949 | + public function setBorder(PHPRtfLite_Border $border) | |
950 | + { | |
951 | + $this->_border = $border; | |
952 | + } | |
953 | + | |
954 | + /** | |
955 | + * gets border of document | |
956 | + * | |
957 | + * @return PHPRtfLite_Border | |
958 | + */ | |
959 | + public function getBorder() | |
960 | + { | |
961 | + return $this->_border; | |
962 | + } | |
963 | + | |
964 | + | |
965 | + /** | |
966 | + * sets border surrounds header | |
967 | + * | |
968 | + * @param bool $borderSurroundsHeader | |
969 | + * @return PHPRtfLite | |
970 | + */ | |
971 | + public function setBorderSurroundsHeader($borderSurroundsHeader = true) | |
972 | + { | |
973 | + $this->_borderSurroundsHeader = $borderSurroundsHeader; | |
974 | + return $this; | |
975 | + } | |
976 | + | |
977 | + | |
978 | + /** | |
979 | + * checks, if border surrounds header | |
980 | + * | |
981 | + * @return bool | |
982 | + */ | |
983 | + public function borderSurroundsHeader() | |
984 | + { | |
985 | + return $this->_borderSurroundsHeader; | |
986 | + } | |
987 | + | |
988 | + | |
989 | + /** | |
990 | + * @param bool $borderSurroundsFooter | |
991 | + * @return PHPRtfLite | |
992 | + */ | |
993 | + public function setBorderSurroundsFooter($borderSurroundsFooter = true) | |
994 | + { | |
995 | + $this->_borderSurroundsFooter = $borderSurroundsFooter; | |
996 | + return $this; | |
997 | + } | |
998 | + | |
999 | + | |
1000 | + /** | |
1001 | + * checks, if border surrounds footer | |
1002 | + * | |
1003 | + * @return bool | |
1004 | + */ | |
1005 | + public function borderSurroundsFooter() | |
1006 | + { | |
1007 | + return $this->_borderSurroundsFooter; | |
1008 | + } | |
1009 | + | |
1010 | + | |
1011 | + /** | |
1012 | + * Sets borders to rtf document. Sections may override this border. | |
1013 | + * | |
1014 | + * @param PHPRtfLite_Border_Format $borderFormat | |
1015 | + * @param boolean $left | |
1016 | + * @param boolean $top | |
1017 | + * @param boolean $right | |
1018 | + * @param boolean $bottom | |
1019 | + */ | |
1020 | + public function setBorders(PHPRtfLite_Border_Format $borderFormat, | |
1021 | + $left = true, $top = true, | |
1022 | + $right = true, $bottom = true) | |
1023 | + { | |
1024 | + if ($this->_border === null) { | |
1025 | + $this->_border = new PHPRtfLite_Border($this); | |
1026 | + } | |
1027 | + $this->_border->setBorders($borderFormat, $left, $top, $right, $bottom); | |
1028 | + } | |
1029 | + | |
1030 | + | |
1031 | + /** | |
1032 | + * sets if odd and even headers/footers are different | |
1033 | + * | |
1034 | + * @param boolean $different | |
1035 | + */ | |
1036 | + public function setOddEvenDifferent($different = true) | |
1037 | + { | |
1038 | + $this->_useOddEvenDifferent = $different; | |
1039 | + } | |
1040 | + | |
1041 | + | |
1042 | + /** | |
1043 | + * gets if odd and even headers/footers are different | |
1044 | + * | |
1045 | + * @return boolean | |
1046 | + */ | |
1047 | + public function isOddEvenDifferent() | |
1048 | + { | |
1049 | + return $this->_useOddEvenDifferent; | |
1050 | + } | |
1051 | + | |
1052 | + | |
1053 | + /** | |
1054 | + * creates header for the document | |
1055 | + * | |
1056 | + * @param string $type | |
1057 | + * Represented by class constants PHPRtfLite_Container_Header::TYPE_* <br> | |
1058 | + * Possible values: <br> | |
1059 | + * PHPRtfLite_Container_Header::TYPE_ALL | |
1060 | + * all pages (different odd and even headers/footers must be not set) <br> | |
1061 | + * PHPRtfLite_Container_Header::TYPE_LEFT | |
1062 | + * left pages (different odd and even headers/footers must be set) <br> | |
1063 | + * PHPRtfLite_Container_Header::TYPE_RIGHT | |
1064 | + * right pages (different odd and even headers/footers must be set <br> | |
1065 | + * PHPRtfLite_Container_Header::TYPE_FIRST | |
1066 | + * first page | |
1067 | + * @param PHPRtfLite_Container_Header $header | |
1068 | + * | |
1069 | + * @return PHPRtfLite_Container_Header | |
1070 | + */ | |
1071 | + public function addHeader($type = PHPRtfLite_Container_Header::TYPE_ALL, PHPRtfLite_Container_Header $header = null) | |
1072 | + { | |
1073 | + if ($header === null) { | |
1074 | + $header = new PHPRtfLite_Container_Header($this, $type); | |
1075 | + } | |
1076 | + $this->_headers[$type] = $header; | |
1077 | + | |
1078 | + return $header; | |
1079 | + } | |
1080 | + | |
1081 | + | |
1082 | + /** | |
1083 | + * gets defined headers for document pages | |
1084 | + * | |
1085 | + * @return array contains PHPRtfLite_Container_Header objects | |
1086 | + */ | |
1087 | + public function getHeaders() | |
1088 | + { | |
1089 | + return $this->_headers; | |
1090 | + } | |
1091 | + | |
1092 | + | |
1093 | + /** | |
1094 | + * creates footer for the document | |
1095 | + * | |
1096 | + * @param string $type | |
1097 | + * Represented by class constants PHPRtfLite_Container_Footer::TYPE_* <br> | |
1098 | + * Possible values: <br> | |
1099 | + * PHPRtfLite_Container_Footer::TYPE_ALL | |
1100 | + * all pages (different odd and even headers/footers must be not set) <br> | |
1101 | + * PHPRtfLite_Container_Footer::TYPE_LEFT | |
1102 | + * left pages (different odd and even headers/footers must be set) <br> | |
1103 | + * PHPRtfLite_Container_Footer::TYPE_RIGHT | |
1104 | + * right pages (different odd and even headers/footers must be set) <br> | |
1105 | + * PHPRtfLite_Container_Footer::TYPE_FIRST | |
1106 | + * first page | |
1107 | + * @param PHPRtfLite_Container_Footer $footer | |
1108 | + * | |
1109 | + * @return PHPRtfLite_Container_Footer | |
1110 | + */ | |
1111 | + public function addFooter($type = PHPRtfLite_Container_Footer::TYPE_ALL, PHPRtfLite_Container_Footer $footer = null) | |
1112 | + { | |
1113 | + if ($footer === null) { | |
1114 | + $footer = new PHPRtfLite_Container_Footer($this, $type); | |
1115 | + } | |
1116 | + $this->_footers[$type] = $footer; | |
1117 | + | |
1118 | + return $footer; | |
1119 | + } | |
1120 | + | |
1121 | + | |
1122 | + /** | |
1123 | + * gets defined footers for document pages | |
1124 | + * | |
1125 | + * @return array contains PHPRtfLite_Container_FOOTER objects | |
1126 | + */ | |
1127 | + public function getFooters() | |
1128 | + { | |
1129 | + return $this->_footers; | |
1130 | + } | |
1131 | + | |
1132 | + | |
1133 | + /** | |
1134 | + * gets color table | |
1135 | + * | |
1136 | + * @return PHPRtfLite_DocHead_ColorTable | |
1137 | + */ | |
1138 | + public function getColorTable() | |
1139 | + { | |
1140 | + if ($this->_colorTable === null) { | |
1141 | + $this->_colorTable = new PHPRtfLite_DocHead_ColorTable(); | |
1142 | + } | |
1143 | + return $this->_colorTable; | |
1144 | + } | |
1145 | + | |
1146 | + /** | |
1147 | + * gets font table | |
1148 | + * | |
1149 | + * @return PHPRtfLite_DocHead_FontTable | |
1150 | + */ | |
1151 | + public function getFontTable() | |
1152 | + { | |
1153 | + if ($this->_fontTable === null) { | |
1154 | + $this->_fontTable = new PHPRtfLite_DocHead_FontTable(); | |
1155 | + } | |
1156 | + return $this->_fontTable; | |
1157 | + } | |
1158 | + | |
1159 | + | |
1160 | + /** | |
1161 | + * registers the font in color table and font table | |
1162 | + * | |
1163 | + * @param PHPRtfLite_Font $font | |
1164 | + */ | |
1165 | + public function registerFont(PHPRtfLite_Font $font) | |
1166 | + { | |
1167 | + $font->setColorTable($this->getColorTable()); | |
1168 | + $font->setFontTable($this->getFontTable()); | |
1169 | + } | |
1170 | + | |
1171 | + | |
1172 | + /** | |
1173 | + * sets default font | |
1174 | + * | |
1175 | + * @param PHPRtfLite_Font $font | |
1176 | + */ | |
1177 | + public function setDefaultFont(PHPRtfLite_Font $font) | |
1178 | + { | |
1179 | + $this->_defaultFont = $font; | |
1180 | + $this->registerFont($font); | |
1181 | + } | |
1182 | + | |
1183 | + | |
1184 | + /** | |
1185 | + * gets default font | |
1186 | + * | |
1187 | + * @return PHPRtfLite_Font | |
1188 | + */ | |
1189 | + public function getDefaultFont() | |
1190 | + { | |
1191 | + return $this->_defaultFont; | |
1192 | + } | |
1193 | + | |
1194 | + | |
1195 | + /** | |
1196 | + * registers the par format in color table | |
1197 | + * | |
1198 | + * @param PHPRtfLite_ParFormat $parFormat | |
1199 | + */ | |
1200 | + public function registerParFormat(PHPRtfLite_ParFormat $parFormat) | |
1201 | + { | |
1202 | + $parFormat->setColorTable($this->getColorTable()); | |
1203 | + } | |
1204 | + | |
1205 | + | |
1206 | + /** | |
1207 | + * gets rtf document code | |
1208 | + * | |
1209 | + * @return string | |
1210 | + */ | |
1211 | + public function getContent() | |
1212 | + { | |
1213 | + $this->createWriter(); | |
1214 | + $this->render(); | |
1215 | + return $this->_writer->getContent(); | |
1216 | + } | |
1217 | + | |
1218 | + | |
1219 | + /** | |
1220 | + * saves rtf document to file | |
1221 | + * | |
1222 | + * @param string $file Name of file | |
1223 | + */ | |
1224 | + public function save($file) | |
1225 | + { | |
1226 | + $this->createWriter($file); | |
1227 | + $this->render(); | |
1228 | + } | |
1229 | + | |
1230 | + | |
1231 | + /** | |
1232 | + * sends rtf content as file attachment | |
1233 | + * | |
1234 | + * @param string $filename | |
1235 | + */ | |
1236 | + public function sendRtf($filename = 'simple') | |
1237 | + { | |
1238 | + $pathInfo = pathinfo($filename); | |
1239 | + | |
1240 | + if (empty($pathInfo['extension'])) { | |
1241 | + $filename .= '.rtf'; | |
1242 | + } | |
1243 | + | |
1244 | + if (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.5')) { | |
1245 | + header('Content-Disposition: filename="' . $filename . '"'); | |
1246 | + } | |
1247 | + else { | |
1248 | + header('Content-Disposition: attachment; filename="' . $filename . '"'); | |
1249 | + } | |
1250 | + header('Content-type: application/msword'); | |
1251 | + header('Expires: 0'); | |
1252 | + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); | |
1253 | + header('Pragma: public'); | |
1254 | + | |
1255 | + $this->createWriter(); | |
1256 | + $this->render(); | |
1257 | + echo $this->_writer->getContent(); | |
1258 | + } | |
1259 | + | |
1260 | + | |
1261 | + /** | |
1262 | + * gets rtf info part | |
1263 | + * | |
1264 | + * @return string | |
1265 | + */ | |
1266 | + protected function getInfoPart() | |
1267 | + { | |
1268 | + $part = '{\info'."\r\n"; | |
1269 | + | |
1270 | + foreach ($this->_properties as $key => $value) { | |
1271 | + $value = PHPRtfLite_Utf8::getUnicodeEntities($value, $this->_charset); | |
1272 | + $part .= '{\\' . $key . ' ' . $value . '}'."\r\n"; | |
1273 | + } | |
1274 | + | |
1275 | + $part .= '}'."\r\n"; | |
1276 | + | |
1277 | + return $part; | |
1278 | + } | |
1279 | + | |
1280 | + | |
1281 | + /** | |
1282 | + * sets that first page has a special layout | |
1283 | + * | |
1284 | + * @param boolean $specialLayout | |
1285 | + */ | |
1286 | + public function setSpecialLayoutForFirstPage($specialLayout = true) | |
1287 | + { | |
1288 | + $this->_titlepg = $specialLayout; | |
1289 | + } | |
1290 | + | |
1291 | + | |
1292 | + /** | |
1293 | + * returns true, if first page has special layout | |
1294 | + * | |
1295 | + * @return boolean | |
1296 | + */ | |
1297 | + public function hasSpecialLayoutForFirstPage() | |
1298 | + { | |
1299 | + return $this->_titlepg; | |
1300 | + } | |
1301 | + | |
1302 | + | |
1303 | + /** | |
1304 | + * quotes rtf code | |
1305 | + * | |
1306 | + * @param string $text | |
1307 | + * @param boolean $convertNewlines | |
1308 | + * @return string | |
1309 | + */ | |
1310 | + public static function quoteRtfCode($text, $convertNewlines = true) | |
1311 | + { | |
1312 | + // escape backslashes and curly brackets | |
1313 | + $text = str_replace(array('\\', '{', '}'), array('\\\\', '\\{', '\\}'), $text); | |
1314 | + if ($convertNewlines) { | |
1315 | + $text = self::convertNewlinesToRtfCode($text); | |
1316 | + } | |
1317 | + | |
1318 | + return $text; | |
1319 | + } | |
1320 | + | |
1321 | + | |
1322 | + /** | |
1323 | + * convert new lines to rtf line breaks | |
1324 | + * | |
1325 | + * @param string $text | |
1326 | + * @return string | |
1327 | + */ | |
1328 | + public static function convertNewlinesToRtfCode($text) | |
1329 | + { | |
1330 | + // convert breaks into rtf break | |
1331 | + $text = str_replace(array("\r\n", "\n", "\r"), '\line ', $text); | |
1332 | + | |
1333 | + return $text; | |
1334 | + } | |
1335 | + | |
1336 | + | |
1337 | + /** | |
1338 | + * creates writer | |
1339 | + * | |
1340 | + * @param string $file | |
1341 | + */ | |
1342 | + private function createWriter($file = null) | |
1343 | + { | |
1344 | + if ($file || $this->_useTemporaryFile) { | |
1345 | + if (!($this->_writer instanceof PHPRtfLite_StreamOutput)) { | |
1346 | + $this->_writer = new PHPRtfLite_StreamOutput(); | |
1347 | + } | |
1348 | + if (is_null($file)) { | |
1349 | + $file = sys_get_temp_dir() . '/' . md5(microtime(true)) . '.rtf'; | |
1350 | + } | |
1351 | + $this->_writer->setFilename($file); | |
1352 | + } | |
1353 | + else if (!($this->_writer instanceof PHPRtfLite_Writer_String)) { | |
1354 | + $this->_writer = new PHPRtfLite_Writer_String(); | |
1355 | + } | |
1356 | + } | |
1357 | + | |
1358 | + | |
1359 | + /** | |
1360 | + * sets writer | |
1361 | + * | |
1362 | + * @param PHPRtfLite_Writer_Interface $writer | |
1363 | + */ | |
1364 | + public function setWriter(PHPRtfLite_Writer_Interface $writer) | |
1365 | + { | |
1366 | + $this->_writer = $writer; | |
1367 | + } | |
1368 | + | |
1369 | + | |
1370 | + /** | |
1371 | + * gets writer | |
1372 | + * | |
1373 | + * @return PHPRtfLite_Writer_Interface | |
1374 | + */ | |
1375 | + public function getWriter() | |
1376 | + { | |
1377 | + return $this->_writer; | |
1378 | + } | |
1379 | + | |
1380 | + | |
1381 | + /** | |
1382 | + * prepares rtf contents | |
1383 | + */ | |
1384 | + protected function render() | |
1385 | + { | |
1386 | + $this->_writer->open(); | |
1387 | + | |
1388 | + $defaultFontSize = 20; | |
1389 | + $defaultFontIndex = 0; | |
1390 | + if ($this->_defaultFont) { | |
1391 | + $defaultFontIndex = $this->getFontTable()->getFontIndex($this->_defaultFont->getFontFamily()); | |
1392 | + $defaultFontSize = $this->_defaultFont->getSize() * 2; | |
1393 | + } | |
1394 | + | |
1395 | + $this->_writer->write('{\rtf\ansi\deff' . $defaultFontIndex . '\fs' . $defaultFontSize . "\r\n"); | |
1396 | + | |
1397 | + $this->_writer->write($this->getFontTable()->getContent()); | |
1398 | + $this->_writer->write($this->getColorTable()->getContent()); | |
1399 | + | |
1400 | + $this->_writer->write($this->getInfoPart()); | |
1401 | + | |
1402 | + $paperWidth = $this->_paperWidth; | |
1403 | + $paperHeight = $this->_paperHeight; | |
1404 | + | |
1405 | + // page properties | |
1406 | + if ($this->_isLandscape) { | |
1407 | + $this->_writer->write('\landscape '); | |
1408 | + if ($paperWidth < $paperHeight) { | |
1409 | + $tmp = $paperHeight; | |
1410 | + $paperHeight = $paperWidth; | |
1411 | + $paperWidth = $tmp; | |
1412 | + } | |
1413 | + } | |
1414 | + | |
1415 | + $this->_writer->write('\paperw' . PHPRtfLite_Unit::getUnitInTwips($paperWidth) .' '); | |
1416 | + $this->_writer->write('\paperh' . PHPRtfLite_Unit::getUnitInTwips($paperHeight) . ' '); | |
1417 | + | |
1418 | + // hyphenation | |
1419 | + if ($this->_isHyphenation) { | |
1420 | + $this->_writer->write('\hyphauto1'); | |
1421 | + } | |
1422 | + $this->_writer->write('\deftab' . PHPRtfLite_Unit::getUnitInTwips($this->_defaultTabWidth) . ' '); | |
1423 | + $this->_writer->write('\margl' . PHPRtfLite_Unit::getUnitInTwips($this->_marginLeft) . ' '); | |
1424 | + $this->_writer->write('\margr' . PHPRtfLite_Unit::getUnitInTwips($this->_marginRight) . ' '); | |
1425 | + $this->_writer->write('\margt' . PHPRtfLite_Unit::getUnitInTwips($this->_marginTop) . ' '); | |
1426 | + $this->_writer->write('\margb' . PHPRtfLite_Unit::getUnitInTwips($this->_marginBottom) . ' '); | |
1427 | + | |
1428 | + if (null !== $this->_gutter) { | |
1429 | + $this->_writer->write('\gutter' . PHPRtfLite_Unit::getUnitInTwips($this->_gutter) . ' '); | |
1430 | + } | |
1431 | + | |
1432 | + if (true == $this->_useMirrorMargins) { | |
1433 | + $this->_writer->write('\margmirror '); | |
1434 | + } | |
1435 | + | |
1436 | + if (null !== $this->_viewMode) { | |
1437 | + $this->_writer->write('\viewkind' . $this->_viewMode . ' '); | |
1438 | + } | |
1439 | + | |
1440 | + if (null !== $this->_zoomMode) { | |
1441 | + $this->_writer->write('\viewzk' . $this->_zoomMode . ' '); | |
1442 | + } | |
1443 | + | |
1444 | + if (null !== $this->_zoomLevel) { | |
1445 | + $this->_writer->write('\viewscale' . $this->_zoomLevel . ' '); | |
1446 | + } | |
1447 | + | |
1448 | + // page numbering start | |
1449 | + $this->_writer->write('\pgnstart' . $this->_pageNumberStart); | |
1450 | + | |
1451 | + // headers and footers properties | |
1452 | + if ($this->_useOddEvenDifferent) { | |
1453 | + $this->_writer->write('\facingp '); | |
1454 | + } | |
1455 | + if ($this->_titlepg) { | |
1456 | + $this->_writer->write('\titlepg '); | |
1457 | + } | |
1458 | + | |
1459 | + // document header definition for footnotes and endnotes | |
1460 | + $this->_writer->write($this->getNoteDocHead()->getContent()); | |
1461 | + | |
1462 | + // default font | |
1463 | + if ($this->_defaultFont) { | |
1464 | + $this->_writer->write($this->_defaultFont->getContent()); | |
1465 | + } | |
1466 | + | |
1467 | + // headers and footers if there are no sections | |
1468 | + if (count($this->_sections) == 0) { | |
1469 | + foreach ($this->_headers as $header) { | |
1470 | + $header->render(); | |
1471 | + } | |
1472 | + | |
1473 | + foreach ($this->_footers as $footer) { | |
1474 | + $footer->render(); | |
1475 | + } | |
1476 | + } | |
1477 | + | |
1478 | + // sections | |
1479 | + foreach ($this->_sections as $key => $section) { | |
1480 | + if ($key != 0) { | |
1481 | + $this->_writer->write('\sect\sectd '); | |
1482 | + } | |
1483 | + $section->render(); | |
1484 | + } | |
1485 | + | |
1486 | + $this->_writer->write('}'); | |
1487 | + $this->_writer->close(); | |
1488 | + } | |
1489 | + | |
1490 | +} | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Autoloader.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
5 | + | |
6 | + This file is part of PHPRtfLite. | |
7 | + | |
8 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU Lesser General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + PHPRtfLite is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU Lesser General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU Lesser General Public License | |
19 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
20 | +*/ | |
21 | + | |
22 | +/** | |
23 | + * Class for autoloading PHPRtfLite classes. | |
24 | + * @version 1.2 | |
25 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
26 | + * @copyright 2010-2012 Steffen Zeidler | |
27 | + * @package PHPRtfLite | |
28 | + */ | |
29 | +class PHPRtfLite_Autoloader | |
30 | +{ | |
31 | + | |
32 | + /** | |
33 | + * base dir of the PHPRtfLite package | |
34 | + * @var string | |
35 | + */ | |
36 | + protected static $_baseDir; | |
37 | + | |
38 | + | |
39 | + /** | |
40 | + * sets the base dir, where PHPRtfLite classes can be found | |
41 | + * | |
42 | + * @param string $dir | |
43 | + */ | |
44 | + public static function setBaseDir($dir) | |
45 | + { | |
46 | + self::$_baseDir = $dir; | |
47 | + } | |
48 | + | |
49 | + | |
50 | + /** | |
51 | + * loads PHPRtfLite classes | |
52 | + * | |
53 | + * @param string $className | |
54 | + * @return boolean returns true, if class could be loaded | |
55 | + */ | |
56 | + public static function autoload($className) | |
57 | + { | |
58 | + // validate classname | |
59 | + if (!preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/m', $className)) { | |
60 | + throw new Exception("Class name '$className' is invalid"); | |
61 | + } | |
62 | + | |
63 | + $classFile = self::$_baseDir . '/' . str_replace('_', '/', $className) . '.php'; | |
64 | + | |
65 | + // check if file exists | |
66 | + if (!file_exists($classFile)) { | |
67 | + throw new Exception("File $classFile does not exist!"); | |
68 | + } | |
69 | + | |
70 | + require $classFile; | |
71 | + | |
72 | + if (!class_exists($className) && !interface_exists($className)) { | |
73 | + throw new Exception("Class $className could not be found!"); | |
74 | + } | |
75 | + } | |
76 | + | |
77 | +} | |
0 | 78 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Border.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for creating borders within rtf documents. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + * @subpackage PHPRtfLite_Border | |
31 | + */ | |
32 | +class PHPRtfLite_Border | |
33 | +{ | |
34 | + | |
35 | + /** | |
36 | + * @var PHPRtfLite | |
37 | + */ | |
38 | + protected $_rtf; | |
39 | + /** | |
40 | + * @var PHPRtfLite_Border_Format | |
41 | + */ | |
42 | + protected $_borderLeft; | |
43 | + /** | |
44 | + * @var PHPRtfLite_Border_Format | |
45 | + */ | |
46 | + protected $_borderRight; | |
47 | + /** | |
48 | + * @var PHPRtfLite_Border_Format | |
49 | + */ | |
50 | + protected $_borderTop; | |
51 | + /** | |
52 | + * @var PHPRtfLite_Border_Format | |
53 | + */ | |
54 | + protected $_borderBottom; | |
55 | + | |
56 | + | |
57 | + /** | |
58 | + * constructor | |
59 | + * | |
60 | + * @param PHPRtfLite $rtf | |
61 | + * @param PHPRtfLite_Border_Format $left | |
62 | + * @param PHPRtfLite_Border_Format $top | |
63 | + * @param PHPRtfLite_Border_Format $right | |
64 | + * @param PHPRtfLite_Border_Format $bottom | |
65 | + */ | |
66 | + public function __construct(PHPRtfLite $rtf, | |
67 | + PHPRtfLite_Border_Format $left = null, | |
68 | + PHPRtfLite_Border_Format $top = null, | |
69 | + PHPRtfLite_Border_Format $right = null, | |
70 | + PHPRtfLite_Border_Format $bottom = null) | |
71 | + { | |
72 | + $this->_rtf = $rtf; | |
73 | + if ($left) { | |
74 | + $left->setColorTable($rtf->getColorTable()); | |
75 | + } | |
76 | + $this->_borderLeft = $left; | |
77 | + | |
78 | + if ($top) { | |
79 | + $top->setColorTable($rtf->getColorTable()); | |
80 | + } | |
81 | + $this->_borderTop = $top; | |
82 | + | |
83 | + if ($right) { | |
84 | + $right->setColorTable($rtf->getColorTable()); | |
85 | + } | |
86 | + $this->_borderRight = $right; | |
87 | + | |
88 | + if ($bottom) { | |
89 | + $bottom->setColorTable($rtf->getColorTable()); | |
90 | + } | |
91 | + $this->_borderBottom = $bottom; | |
92 | + } | |
93 | + | |
94 | + | |
95 | + /** | |
96 | + * creates border by defining border format | |
97 | + * | |
98 | + * @param PHPRtfLite $rtf | |
99 | + * @param integer $size size of border | |
100 | + * @param string $color color of border (example '#ff0000' or '#f00') | |
101 | + * @param string $type represented by class constants PHPRtfLite_Border_Format::TYPE_*<br> | |
102 | + * Possible values:<br> | |
103 | + * PHPRtfLite_Border_Format::TYPE_SINGLE 'single'<br> | |
104 | + * PHPRtfLite_Border_Format::TYPE_DOT 'dot'<br> | |
105 | + * PHPRtfLite_Border_Format::TYPE_DASH 'dash'<br> | |
106 | + * PHPRtfLite_Border_Format::TYPE_DOTDASH 'dotdash' | |
107 | + * @param float $space space between borders and the paragraph | |
108 | + * @param boolean $left left border | |
109 | + * @param boolean $top top border | |
110 | + * @param boolean $right right border | |
111 | + * @param boolean $bottom bottom border | |
112 | + * @return PHPRtfLite_Border | |
113 | + */ | |
114 | + public static function create(PHPRtfLite $rtf, $size = 0, $color = null, $type = null, $space = 0.0, | |
115 | + $left = true, $top = true, $right = true, $bottom = true) | |
116 | + { | |
117 | + $border = new self($rtf); | |
118 | + $border->setBorders(new PHPRtfLite_Border_Format($size, $color, $type, $space), $left, $top, $right, $bottom); | |
119 | + | |
120 | + return $border; | |
121 | + } | |
122 | + | |
123 | + | |
124 | + /** | |
125 | + * sets border format of element | |
126 | + * | |
127 | + * @param PHPRtfLite_Border_Format $borderFormat | |
128 | + * @param boolean $left | |
129 | + * @param boolean $top | |
130 | + * @param boolean $right | |
131 | + * @param boolean $bottom | |
132 | + */ | |
133 | + public function setBorders(PHPRtfLite_Border_Format $borderFormat, | |
134 | + $left = true, $top = true, $right = true, $bottom = true) | |
135 | + { | |
136 | + $borderFormat->setColorTable($this->_rtf->getColorTable()); | |
137 | + | |
138 | + if ($left) { | |
139 | + $this->_borderLeft = $borderFormat; | |
140 | + } | |
141 | + | |
142 | + if ($top) { | |
143 | + $this->_borderTop = $borderFormat; | |
144 | + } | |
145 | + | |
146 | + if ($right) { | |
147 | + $this->_borderRight = $borderFormat; | |
148 | + } | |
149 | + | |
150 | + if ($bottom) { | |
151 | + $this->_borderBottom = $borderFormat; | |
152 | + } | |
153 | + } | |
154 | + | |
155 | + | |
156 | + /** | |
157 | + * sets border format for left border | |
158 | + * | |
159 | + * @param PHPRtfLite_Border_Format $borderFormat | |
160 | + */ | |
161 | + public function setBorderLeft(PHPRtfLite_Border_Format $borderFormat) | |
162 | + { | |
163 | + $borderFormat->setColorTable($this->_rtf->getColorTable()); | |
164 | + $this->_borderLeft = $borderFormat; | |
165 | + } | |
166 | + | |
167 | + | |
168 | + /** | |
169 | + * gets border format of left border | |
170 | + * | |
171 | + * @return PHPRtfLite_Border_Format | |
172 | + */ | |
173 | + public function getBorderLeft() | |
174 | + { | |
175 | + return $this->_borderLeft; | |
176 | + } | |
177 | + | |
178 | + | |
179 | + /** | |
180 | + * sets border format for right border | |
181 | + * | |
182 | + * @param PHPRtfLite_Border_Format $borderFormat | |
183 | + */ | |
184 | + public function setBorderRight(PHPRtfLite_Border_Format $borderFormat) | |
185 | + { | |
186 | + $borderFormat->setColorTable($this->_rtf->getColorTable()); | |
187 | + $this->_borderRight = $borderFormat; | |
188 | + } | |
189 | + | |
190 | + | |
191 | + /** | |
192 | + * gets border format of right border | |
193 | + * | |
194 | + * @return PHPRtfLite_Border_Format | |
195 | + */ | |
196 | + public function getBorderRight() | |
197 | + { | |
198 | + return $this->_borderRight; | |
199 | + } | |
200 | + | |
201 | + | |
202 | + /** | |
203 | + * sets border format for top border | |
204 | + * | |
205 | + * @param PHPRtfLite_Border_Format $borderFormat | |
206 | + */ | |
207 | + public function setBorderTop(PHPRtfLite_Border_Format $borderFormat) | |
208 | + { | |
209 | + $borderFormat->setColorTable($this->_rtf->getColorTable()); | |
210 | + $this->_borderTop = $borderFormat; | |
211 | + } | |
212 | + | |
213 | + | |
214 | + /** | |
215 | + * gets border format of top border | |
216 | + * | |
217 | + * @return PHPRtfLite_Border_Format | |
218 | + */ | |
219 | + public function getBorderTop() | |
220 | + { | |
221 | + return $this->_borderTop; | |
222 | + } | |
223 | + | |
224 | + | |
225 | + /** | |
226 | + * sets border format for bottom border | |
227 | + * | |
228 | + * @param PHPRtfLite_Border_Format $borderFormat | |
229 | + */ | |
230 | + public function setBorderBottom(PHPRtfLite_Border_Format $borderFormat) | |
231 | + { | |
232 | + $borderFormat->setColorTable($this->_rtf->getColorTable()); | |
233 | + $this->_borderBottom = $borderFormat; | |
234 | + } | |
235 | + | |
236 | + | |
237 | + /** | |
238 | + * gets border format of bottom border | |
239 | + * | |
240 | + * @return PHPRtfLite_Border_Format | |
241 | + */ | |
242 | + public function getBorderBottom() | |
243 | + { | |
244 | + return $this->_borderBottom; | |
245 | + } | |
246 | + | |
247 | + | |
248 | + /** | |
249 | + * gets rtf code of object | |
250 | + * | |
251 | + * @param string $type rtf code part | |
252 | + * @return string rtf code | |
253 | + */ | |
254 | + public function getContent($type = '\\') | |
255 | + { | |
256 | + $content = ''; | |
257 | + if ($this->_borderLeft) { | |
258 | + $content .= $type . 'brdrl' . $this->_borderLeft->getContent(); | |
259 | + } | |
260 | + if ($this->_borderRight) { | |
261 | + $content .= $type . 'brdrr' . $this->_borderRight->getContent(); | |
262 | + } | |
263 | + if ($this->_borderTop) { | |
264 | + $content .= $type . 'brdrt' . $this->_borderTop->getContent(); | |
265 | + } | |
266 | + if ($this->_borderBottom) { | |
267 | + $content .= $type . 'brdrb' . $this->_borderBottom->getContent(); | |
268 | + } | |
269 | + return $content; | |
270 | + } | |
271 | + | |
272 | +} | |
0 | 273 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Border/Format.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for border format. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + * @subpackage PHPRtfLite_Border | |
31 | + */ | |
32 | +class PHPRtfLite_Border_Format | |
33 | +{ | |
34 | + | |
35 | + /** | |
36 | + * constants for border format type | |
37 | + */ | |
38 | + const TYPE_SINGLE = 'single'; | |
39 | + const TYPE_DOT = 'dot'; | |
40 | + const TYPE_DASH = 'dash'; | |
41 | + const TYPE_DOTDASH = 'dotdash'; | |
42 | + | |
43 | + | |
44 | + /** | |
45 | + * @var integer | |
46 | + */ | |
47 | + protected $_size; | |
48 | + | |
49 | + /** | |
50 | + * @var string | |
51 | + */ | |
52 | + protected $_type; | |
53 | + | |
54 | + /** | |
55 | + * @var string | |
56 | + */ | |
57 | + protected $_color; | |
58 | + | |
59 | + /** | |
60 | + * rtf color table | |
61 | + * @var PHPRtfLite_DocHead_ColorTable | |
62 | + */ | |
63 | + protected $_colorTable; | |
64 | + | |
65 | + /** | |
66 | + * @var integer | |
67 | + */ | |
68 | + protected $_space; | |
69 | + | |
70 | + | |
71 | + /** | |
72 | + * constructor | |
73 | + * | |
74 | + * @param float $size size of border | |
75 | + * @param string $color color of border (example '#ff0000' or '#f00') | |
76 | + * @param string $type represented by class constants PHPRtfLite_Border_Format::TYPE_*<br> | |
77 | + * Possible values:<br> | |
78 | + * TYPE_SINGLE: single (default)<br> | |
79 | + * TYPE_DOT: dot<br> | |
80 | + * TYPE_DASH: dash<br> | |
81 | + * TYPE_DOTDASH: dotdash<br> | |
82 | + * @param float $space space between borders and the paragraph | |
83 | + */ | |
84 | + public function __construct($size = 0.0, $color = null, $type = null, $space = 0.0) | |
85 | + { | |
86 | + $this->_size = round($size * PHPRtfLite::SPACE_IN_POINTS); // convert points to twips | |
87 | + $this->_type = $type; | |
88 | + $this->_color = $color; | |
89 | + $this->_space = PHPRtfLite_Unit::getUnitInTwips($space); | |
90 | + } | |
91 | + | |
92 | + | |
93 | + /** | |
94 | + * Gets border format type as rtf code | |
95 | + * | |
96 | + * @return string rtf code | |
97 | + */ | |
98 | + private function getTypeAsRtfCode() | |
99 | + { | |
100 | + switch ($this->_type) { | |
101 | + case self::TYPE_DOT: | |
102 | + return '\brdrdot'; | |
103 | + | |
104 | + case self::TYPE_DASH: | |
105 | + return '\brdrdash'; | |
106 | + | |
107 | + case self::TYPE_DOTDASH: | |
108 | + return '\brdrdashd'; | |
109 | + | |
110 | + default: | |
111 | + return '\brdrs'; | |
112 | + } | |
113 | + } | |
114 | + | |
115 | + | |
116 | + /** | |
117 | + * gets border format type | |
118 | + * | |
119 | + * @return string | |
120 | + */ | |
121 | + public function getType() | |
122 | + { | |
123 | + return $this->_type; | |
124 | + } | |
125 | + | |
126 | + | |
127 | + /** | |
128 | + * gets border color | |
129 | + * | |
130 | + * @return string | |
131 | + */ | |
132 | + public function getColor() | |
133 | + { | |
134 | + return $this->_color; | |
135 | + } | |
136 | + | |
137 | + | |
138 | + /** | |
139 | + * gets size in twips | |
140 | + * | |
141 | + * @return integer | |
142 | + */ | |
143 | + public function getSize() | |
144 | + { | |
145 | + return $this->_size; | |
146 | + } | |
147 | + | |
148 | + | |
149 | + /** | |
150 | + * gets border space | |
151 | + * | |
152 | + * @return float | |
153 | + */ | |
154 | + public function getSpace() | |
155 | + { | |
156 | + return $this->_space; | |
157 | + } | |
158 | + | |
159 | + | |
160 | + /** | |
161 | + * sets rtf color table | |
162 | + * | |
163 | + * @param PHPRtfLite_DocHead_ColorTable $colorTable | |
164 | + */ | |
165 | + public function setColorTable(PHPRtfLite_DocHead_ColorTable $colorTable) | |
166 | + { | |
167 | + if ($this->_color) { | |
168 | + $colorTable->add($this->_color); | |
169 | + } | |
170 | + $this->_colorTable = $colorTable; | |
171 | + } | |
172 | + | |
173 | + | |
174 | + /** | |
175 | + * gets rtf code | |
176 | + * | |
177 | + * @return string rtf code | |
178 | + */ | |
179 | + public function getContent() | |
180 | + { | |
181 | + $content = ($this->_size > 0 ? $this->getTypeAsRtfCode() : '') | |
182 | + . '\brdrw' . $this->_size | |
183 | + . '\brsp' . $this->_space; | |
184 | + | |
185 | + if ($this->_color && $this->_colorTable) { | |
186 | + $colorIndex = $this->_colorTable->getColorIndex($this->_color); | |
187 | + if ($colorIndex !== false) { | |
188 | + $content .= '\brdrcf' . $colorIndex; | |
189 | + } | |
190 | + } | |
191 | + | |
192 | + return $content . ' '; | |
193 | + } | |
194 | + | |
195 | +} | |
0 | 196 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Container.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Abstract class for creating containers like sections, footers and headers. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + * @subpackage PHPRtfLite_Container | |
31 | + */ | |
32 | +abstract class PHPRtfLite_Container extends PHPRtfLite_Container_Base | |
33 | +{ | |
34 | + | |
35 | + /** | |
36 | + * adds a footnote | |
37 | + * | |
38 | + * @param string $noteText | |
39 | + * @param PHPRtfLite_Font $font | |
40 | + * @param PHPRtfLite_ParFormat $parFormat | |
41 | + * | |
42 | + * @return PHPRtfLite_Footnote | |
43 | + */ | |
44 | + public function addFootnote($noteText, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
45 | + { | |
46 | + $footnote = new PHPRtfLite_Footnote($this->_rtf, $noteText, $font, $parFormat); | |
47 | + $this->_elements[] = $footnote; | |
48 | + return $footnote; | |
49 | + } | |
50 | + | |
51 | + | |
52 | + /** | |
53 | + * adds an endnote | |
54 | + * | |
55 | + * @param string $noteText | |
56 | + * @param PHPRtfLite_Font $font | |
57 | + * @param PHPRtfLite_ParFormat $parFormat | |
58 | + * | |
59 | + * @return PHPRtfLite_Endnote | |
60 | + */ | |
61 | + public function addEndnote($noteText, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
62 | + { | |
63 | + $endnote = new PHPRtfLite_Endnote($this->_rtf, $noteText, $font, $parFormat); | |
64 | + $this->_elements[] = $endnote; | |
65 | + return $endnote; | |
66 | + } | |
67 | + | |
68 | + | |
69 | + /** | |
70 | + * adds list (enumeration/numbering) | |
71 | + * | |
72 | + * @param PHPRtfLite_List $list | |
73 | + */ | |
74 | + public function addList(PHPRtfLite_List $list) | |
75 | + { | |
76 | + $this->_elements[] = $list; | |
77 | + } | |
78 | + | |
79 | + | |
80 | + /** | |
81 | + * adds enumeration | |
82 | + * | |
83 | + * @param PHPRtfLite_List_Enumeration $enum | |
84 | + */ | |
85 | + public function addEnumeration(PHPRtfLite_List_Enumeration $enum) | |
86 | + { | |
87 | + $this->_elements[] = $enum; | |
88 | + } | |
89 | + | |
90 | + | |
91 | + /** | |
92 | + * adds numbering | |
93 | + * | |
94 | + * @param PHPRtfLite_List_Numbering $numList | |
95 | + */ | |
96 | + public function addNumbering(PHPRtfLite_List_Numbering $numList) | |
97 | + { | |
98 | + $this->_elements[] = $numList; | |
99 | + } | |
100 | + | |
101 | + | |
102 | + /** | |
103 | + * adds checkbox field | |
104 | + * | |
105 | + * @param PHPRtfLite_Font $font | |
106 | + * @param PHPRtfLite_ParFormat $parFormat | |
107 | + * @return PHPRtfLite_FormField_Checkbox | |
108 | + */ | |
109 | + public function addCheckbox(PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
110 | + { | |
111 | + $checkBox = new PHPRtfLite_FormField_Checkbox($this->_rtf, $font, $parFormat); | |
112 | + $this->_elements[] = $checkBox; | |
113 | + return $checkBox; | |
114 | + } | |
115 | + | |
116 | + | |
117 | + /** | |
118 | + * adds dropdown field | |
119 | + * | |
120 | + * @param PHPRtfLite_Font $font | |
121 | + * @param PHPRtfLite_ParFormat $parFormat | |
122 | + * @return PHPRtfLite_FormField_Dropdown | |
123 | + */ | |
124 | + public function addDropdown(PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
125 | + { | |
126 | + $dropdown = new PHPRtfLite_FormField_Dropdown($this->_rtf, $font, $parFormat); | |
127 | + $this->_elements[] = $dropdown; | |
128 | + return $dropdown; | |
129 | + } | |
130 | + | |
131 | + | |
132 | + /** | |
133 | + * adds text field | |
134 | + * | |
135 | + * @param PHPRtfLite_Font $font | |
136 | + * @param PHPRtfLite_ParFormat $parFormat | |
137 | + * @return PHPRtfLite_FormField_Text | |
138 | + */ | |
139 | + public function addTextField(PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
140 | + { | |
141 | + $textField = new PHPRtfLite_FormField_Text($this->_rtf, $font, $parFormat); | |
142 | + $this->_elements[] = $textField; | |
143 | + return $textField; | |
144 | + } | |
145 | + | |
146 | + | |
147 | + /** | |
148 | + * @deprecated will be removed soon, use addEmptyParagraph instead | |
149 | + * @see PHPRtfLite_Container::addEmptyParagraph | |
150 | + * | |
151 | + * @param PHPRtfLite_Font $font | |
152 | + * @param PHPRtfLite_ParFormat $parFormat | |
153 | + */ | |
154 | + public function emptyParagraph(PHPRtfLite_Font $font, PHPRtfLite_ParFormat $parFormat) | |
155 | + { | |
156 | + $this->addEmptyParagraph($font, $parFormat); | |
157 | + } | |
158 | + | |
159 | +} | |
0 | 160 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Container/Base.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
5 | + | |
6 | + This file is part of PHPRtfLite. | |
7 | + | |
8 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU Lesser General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + PHPRtfLite is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU Lesser General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU Lesser General Public License | |
19 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
20 | +*/ | |
21 | + | |
22 | +/** | |
23 | + * Base class for rtf containers. | |
24 | + * @version 1.2 | |
25 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
26 | + * @copyright 2010-2012 Steffen Zeidler | |
27 | + * @package PHPRtfLite | |
28 | + * @subpackage PHPRtfLite_Container | |
29 | + */ | |
30 | +abstract class PHPRtfLite_Container_Base | |
31 | +{ | |
32 | + | |
33 | + /** | |
34 | + * @var PHPRtfLite | |
35 | + */ | |
36 | + protected $_rtf; | |
37 | + | |
38 | + /** | |
39 | + * @var array | |
40 | + */ | |
41 | + protected $_elements = array(); | |
42 | + | |
43 | + /** | |
44 | + * @var string | |
45 | + */ | |
46 | + protected $_pard = '\pard '; | |
47 | + | |
48 | + | |
49 | + /** | |
50 | + * constructor | |
51 | + * | |
52 | + * @param PHPRtfLite $rtf | |
53 | + */ | |
54 | + public function __construct(PHPRtfLite $rtf) | |
55 | + { | |
56 | + $this->_rtf = $rtf; | |
57 | + } | |
58 | + | |
59 | + | |
60 | + /** | |
61 | + * gets rtf object | |
62 | + * | |
63 | + * @return PHPRtfLite | |
64 | + */ | |
65 | + public function getRtf() | |
66 | + { | |
67 | + return $this->_rtf; | |
68 | + } | |
69 | + | |
70 | + | |
71 | + /** | |
72 | + * counts container elements | |
73 | + * | |
74 | + * @return integer | |
75 | + */ | |
76 | + public function countElements() | |
77 | + { | |
78 | + return count($this->_elements); | |
79 | + } | |
80 | + | |
81 | + | |
82 | + /** | |
83 | + * gets container elements | |
84 | + * | |
85 | + * @return array | |
86 | + */ | |
87 | + public function getElements() | |
88 | + { | |
89 | + return $this->_elements; | |
90 | + } | |
91 | + | |
92 | + | |
93 | + /** | |
94 | + * adds element with rtf code directly | |
95 | + * (no converting will be made by PHPRtfLite) | |
96 | + * | |
97 | + * @param string $code | |
98 | + * @param PHPRtfLite_Font $font | |
99 | + * @param PHPRtfLite_ParFormat $parFormat | |
100 | + * @return PHPRtfLite_Element | |
101 | + */ | |
102 | + public function writeRtfCode($code, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
103 | + { | |
104 | + $element = new PHPRtfLite_Element($this->_rtf, $code, $font, $parFormat); | |
105 | + $element->setIsRtfCode(); | |
106 | + $this->_elements[] = $element; | |
107 | + | |
108 | + return $element; | |
109 | + } | |
110 | + | |
111 | + | |
112 | + /** | |
113 | + * adds element with plain rtf code directly | |
114 | + * (no converting will be made by PHPRtfLite - even no opening and closing curly brackets) | |
115 | + * | |
116 | + * @param string $code | |
117 | + * @return PHPRtfLite_Element | |
118 | + */ | |
119 | + public function writePlainRtfCode($code) | |
120 | + { | |
121 | + $element = new PHPRtfLite_Element_Plain($this->_rtf, $code); | |
122 | + $element->setIsRtfCode(); | |
123 | + $this->_elements[] = $element; | |
124 | + | |
125 | + return $element; | |
126 | + } | |
127 | + | |
128 | + | |
129 | + /** | |
130 | + * adds empty paragraph to container. | |
131 | + * | |
132 | + * @param PHPRtfLite_Font $font | |
133 | + * @param PHPRtfLite_ParFormat $parFormat | |
134 | + * @return PHPRtfLite_Element | |
135 | + */ | |
136 | + public function addEmptyParagraph(PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) | |
137 | + { | |
138 | + if ($parFormat === null) { | |
139 | + $parFormat = new PHPRtfLite_ParFormat(); | |
140 | + } | |
141 | + $element = new PHPRtfLite_Element($this->_rtf, '\\par', $font, $parFormat); | |
142 | + $element->setIsRtfCode(); | |
143 | + $this->_elements[] = $element; | |
144 | + | |
145 | + return $element; | |
146 | + } | |
147 | + | |
148 | + | |
149 | + /** | |
150 | + * writes text to container. | |
151 | + * | |
152 | + * @param string $text Text. Also you can use html style tags. Possible tags:<br> | |
153 | + * strong, b- bold; <br> | |
154 | + * em - ; <br> | |
155 | + * i - italic; <br> | |
156 | + * u - underline; <br> | |
157 | + * br - line break; <br> | |
158 | + * chdate - current date; <br> | |
159 | + * chdpl - current date in long format; <br> | |
160 | + * chdpa - current date in abbreviated format; <br> | |
161 | + * chtime - current time; <br> | |
162 | + * chpgn, pagenum - page number ; <br> | |
163 | + * tab - tab | |
164 | + * sectnum - section number; <br> | |
165 | + * line - line break; <br> | |
166 | + * page - page break; <br> | |
167 | + * sect - section break; <br> | |
168 | + * @param PHPRtfLite_Font $font font of text | |
169 | + * @param PHPRtfLite_ParFormat $parFormat paragraph format, if null, text is written in the same paragraph. | |
170 | + * @param boolean $convertTagsToRtf if false, then html style tags are not replaced with rtf code | |
171 | + * @return PHPRtfLite_Element | |
172 | + */ | |
173 | + public function writeText($text, | |
174 | + PHPRtfLite_Font $font = null, | |
175 | + PHPRtfLite_ParFormat $parFormat = null, | |
176 | + $convertTagsToRtf = true) | |
177 | + { | |
178 | + $element = new PHPRtfLite_Element($this->_rtf, $text, $font, $parFormat); | |
179 | + if ($convertTagsToRtf) { | |
180 | + $element->setConvertTagsToRtf(); | |
181 | + } | |
182 | + $this->_elements[] = $element; | |
183 | + | |
184 | + return $element; | |
185 | + } | |
186 | + | |
187 | + | |
188 | + /** | |
189 | + * writes hyperlink to container. | |
190 | + * | |
191 | + * @param string $hyperlink hyperlink url (etc. "http://www.phprtf.com") | |
192 | + * @param string $text hyperlink text, if empty, hyperlink is written in previous paragraph format. | |
193 | + * @param PHPRtfLite_Font $font | |
194 | + * @param PHPRtfLite_ParFormat $parFormat | |
195 | + * @param boolean $convertTagsToRtf if false, then html style tags are not replaced with rtf code | |
196 | + * @return PHPRtfLite_Element | |
197 | + */ | |
198 | + public function writeHyperLink($hyperlink, | |
199 | + $text, | |
200 | + PHPRtfLite_Font $font = null, | |
201 | + PHPRtfLite_ParFormat $parFormat = null, | |
202 | + $convertTagsToRtf = true) | |
203 | + { | |
204 | + $element = new PHPRtfLite_Element_Hyperlink($this->_rtf, $text, $font, $parFormat); | |
205 | + $element->setHyperlink($hyperlink); | |
206 | + if ($convertTagsToRtf) { | |
207 | + $element->setConvertTagsToRtf(); | |
208 | + } | |
209 | + $this->_elements[] = $element; | |
210 | + | |
211 | + return $element; | |
212 | + } | |
213 | + | |
214 | + | |
215 | + /** | |
216 | + * adds table to element container. | |
217 | + * | |
218 | + * @param string $alignment Alingment of table. Represented by class constants PHPRtfLite_Table::ALIGN_*<br> | |
219 | + * Possible values:<br> | |
220 | + * PHPRtfLite_Table::ALIGN_LEFT => 'left',<br> | |
221 | + * PHPRtfLite_Table::ALIGN_CENTER => 'center',<br> | |
222 | + * PHPRtfLite_Table::ALIGN_RIGHT => 'right'<br> | |
223 | + * | |
224 | + * @return PHPRtfLite_Table | |
225 | + */ | |
226 | + public function addTable($alignment = PHPRtfLite_Table::ALIGN_LEFT) | |
227 | + { | |
228 | + $table = new PHPRtfLite_Table($this, $alignment); | |
229 | + $this->_elements[] = $table; | |
230 | + | |
231 | + return $table; | |
232 | + } | |
233 | + | |
234 | + | |
235 | + /** | |
236 | + * adds image to element container. | |
237 | + * | |
238 | + * @param string $fileName name of image file. | |
239 | + * @param PHPRtfLite_ParFormat $parFormat paragraph format, ff null image will appear in the same paragraph. | |
240 | + * @param float $width if null image is displayed by it's height. | |
241 | + * @param float $height if null image is displayed by it's width. | |
242 | + * If boths parameters are null, image is displayed as it is. | |
243 | + * | |
244 | + * @return PHPRtfLite_Image | |
245 | + */ | |
246 | + public function addImage($fileName, PHPRtfLite_ParFormat $parFormat = null, $width = null, $height = null) | |
247 | + { | |
248 | + $image = PHPRtfLite_Image::createFromFile($this->_rtf, $fileName, $width, $height); | |
249 | + if ($parFormat) { | |
250 | + $image->setParFormat($parFormat); | |
251 | + } | |
252 | + $this->_elements[] = $image; | |
253 | + | |
254 | + return $image; | |
255 | + } | |
256 | + | |
257 | + | |
258 | + /** | |
259 | + * adds image to element container. | |
260 | + * | |
261 | + * @param string $string name of image file. | |
262 | + * @param string $type class constants of PHPRtfLite_Image: TYPE_JPEG, TYPE_PNG, TYPE_WMF | |
263 | + * @param PHPRtfLite_ParFormat $parFormat paragraph format, ff null image will appear in the same paragraph. | |
264 | + * @param float $width if null image is displayed by it's height. | |
265 | + * @param float $height if null image is displayed by it's width. | |
266 | + * If boths parameters are null, image is displayed as it is. | |
267 | + * | |
268 | + * @return PHPRtfLite_Image | |
269 | + */ | |
270 | + public function addImageFromString( | |
271 | + $string, | |
272 | + $type, | |
273 | + PHPRtfLite_ParFormat $parFormat = null, | |
274 | + $width = null, | |
275 | + $height = null | |
276 | + ) | |
277 | + { | |
278 | + $image = PHPRtfLite_Image::createFromString($this->_rtf, $string, $type, $width, $height); | |
279 | + if ($parFormat) { | |
280 | + $image->setParFormat($parFormat); | |
281 | + } | |
282 | + $this->_elements[] = $image; | |
283 | + | |
284 | + return $image; | |
285 | + } | |
286 | + | |
287 | + | |
288 | + /** | |
289 | + * adds element | |
290 | + * | |
291 | + * @param $element | |
292 | + */ | |
293 | + public function addElement($element) | |
294 | + { | |
295 | + $this->_elements[] = $element; | |
296 | + } | |
297 | + | |
298 | + | |
299 | + /** | |
300 | + * renders rtf code for that container | |
301 | + * | |
302 | + * @return string rtf code | |
303 | + */ | |
304 | + public function render() | |
305 | + { | |
306 | + $stream = $this->_rtf->getWriter(); | |
307 | + | |
308 | + if ($this instanceof PHPRtfLite_Table_Cell && $this->countElements() == 0) { | |
309 | + $stream->write('{'); | |
310 | + $font = $this->getCellFont($this); | |
311 | + if ($font) { | |
312 | + $stream->write($font->getContent()); | |
313 | + } | |
314 | + if ((!$this->isVerticalMerged() && !$this->isHorizontalMerged()) || $this->isVerticalMergedFirstInRange()) { | |
315 | + $stream->write('{\~}'); | |
316 | + } | |
317 | + $stream->write('}\intbl'); | |
318 | + } | |
319 | + | |
320 | + $lastKey = $this->countElements() - 1; | |
321 | + | |
322 | + foreach ($this->_elements as $key => $element) { | |
323 | + if ($this instanceof PHPRtfLite_Table_Cell && !($element instanceof PHPRtfLite_Table)) { | |
324 | + // table cell initialization | |
325 | + $stream->write('\intbl\itap' . $this->getTable()->getNestDepth() . "\r\n"); | |
326 | + $stream->write($this->getCellAlignment()); | |
327 | + } | |
328 | + | |
329 | + if ($element instanceof PHPRtfLite_Element_Plain) { | |
330 | + $element->render(); | |
331 | + continue; | |
332 | + } | |
333 | + | |
334 | + $parFormat = null; | |
335 | + if (!($element instanceof PHPRtfLite_Table)) { | |
336 | + $parFormat = $element->getParFormat(); | |
337 | + } | |
338 | + | |
339 | + if ($parFormat) { | |
340 | + $stream->write($this->_pard); | |
341 | + if ($this instanceof PHPRtfLite_Table_Cell && $lastKey != $key) { | |
342 | + $stream->write('{'); | |
343 | + } | |
344 | + $stream->write($parFormat->getContent()); | |
345 | + } | |
346 | + | |
347 | + $font = $this->getCellFont($element); | |
348 | + if ($font) { | |
349 | + $stream->write($font->getContent()); | |
350 | + } | |
351 | + | |
352 | + $element->render(); | |
353 | + | |
354 | + if ($this->needToAddParagraphEnd($key)) { | |
355 | + $stream->write('\par '); | |
356 | + } | |
357 | + | |
358 | + if ($font) { | |
359 | + $stream->write($font->getClosingContent()); | |
360 | + } | |
361 | + | |
362 | + if ($parFormat && $this instanceof PHPRtfLite_Table_Cell && $lastKey != $key) { | |
363 | + $stream->write('}'); | |
364 | + } | |
365 | + } | |
366 | + } | |
367 | + | |
368 | + | |
369 | + /** | |
370 | + * checks, if a \par has to be added | |
371 | + * | |
372 | + * @param integer $key | |
373 | + * @return boolean | |
374 | + */ | |
375 | + private function needToAddParagraphEnd($key) | |
376 | + { | |
377 | + if (isset($this->_elements[$key + 1])) { | |
378 | + $nextElement = $this->_elements[$key + 1]; | |
379 | + $element = $this->_elements[$key]; | |
380 | + $isNextElementTable = $nextElement instanceof PHPRtfLite_Table; | |
381 | + | |
382 | + if ($nextElement instanceof PHPRtfLite_List && $element instanceof PHPRtfLite_Element) { | |
383 | + return true; | |
384 | + } | |
385 | + if ($element instanceof PHPRtfLite_Table && $element->getNestDepth() == 1) { | |
386 | + return !$element->getPreventEmptyParagraph(); | |
387 | + } | |
388 | + if ($element instanceof PHPRtfLite_Element) { | |
389 | + return (!$element->isEmptyParagraph() && ($isNextElementTable || $nextElement->getParFormat())); | |
390 | + } | |
391 | + if ($element instanceof PHPRtfLite_Image) { | |
392 | + return ($isNextElementTable || $nextElement->getParFormat()); | |
393 | + } | |
394 | + if ($nextElement instanceof PHPRtfLite_List) { | |
395 | + return true; | |
396 | + } | |
397 | + } | |
398 | + | |
399 | + return false; | |
400 | + } | |
401 | + | |
402 | + | |
403 | + /** | |
404 | + * gets font if container is a cell | |
405 | + * | |
406 | + * @param PHPRtfLite_Table $element | |
407 | + * @return PHPRtfLite_Font $font | |
408 | + */ | |
409 | + private function getCellFont($element) | |
410 | + { | |
411 | + if ($this instanceof PHPRtfLite_Table_Cell && !($element instanceof PHPRtfLite_Table_Nested)) { | |
412 | + return $this->getFont(); | |
413 | + } | |
414 | + return false; | |
415 | + } | |
416 | + | |
417 | +} | |
0 | 418 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Container/Footer.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for creating footers within the rtf document or section. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + * @subpackage PHPRtfLite_Container | |
31 | + */ | |
32 | +class PHPRtfLite_Container_Footer extends PHPRtfLite_Container_Header | |
33 | +{ | |
34 | + | |
35 | + /** | |
36 | + * @var string | |
37 | + */ | |
38 | + protected $_rtfType = 'footer'; | |
39 | + | |
40 | +} | |
0 | 41 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Container/Header.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for creating headers within the rtf document or section. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + * @subpackage PHPRtfLite_Container | |
31 | + */ | |
32 | +class PHPRtfLite_Container_Header extends PHPRtfLite_Container_Base | |
33 | +{ | |
34 | + | |
35 | + /** | |
36 | + * constants defining header types | |
37 | + */ | |
38 | + const TYPE_ALL = 'all'; | |
39 | + const TYPE_LEFT = 'left'; | |
40 | + const TYPE_RIGHT = 'right'; | |
41 | + const TYPE_FIRST = 'first'; | |
42 | + | |
43 | + | |
44 | + /** | |
45 | + * @var string | |
46 | + */ | |
47 | + protected $_type; | |
48 | + | |
49 | + /** | |
50 | + * @var float | |
51 | + */ | |
52 | + protected $_offsetHeight; | |
53 | + | |
54 | + /** | |
55 | + * @var string | |
56 | + */ | |
57 | + protected $_rtfType = 'header'; | |
58 | + | |
59 | + | |
60 | + /** | |
61 | + * Constructor | |
62 | + * | |
63 | + * @param PHPRtfLite $rtf | |
64 | + * @param string $type | |
65 | + */ | |
66 | + public function __construct(PHPRtfLite $rtf, $type = self::TYPE_ALL) | |
67 | + { | |
68 | + $this->_rtf = $rtf; | |
69 | + $this->_type = $type; | |
70 | + | |
71 | + if ($this->_type == self::TYPE_FIRST) { | |
72 | + $rtf->setSpecialLayoutForFirstPage(true); | |
73 | + } | |
74 | + } | |
75 | + | |
76 | + | |
77 | + /** | |
78 | + * Set vertical header position from the top of the page | |
79 | + * | |
80 | + * @param float $height | |
81 | + */ | |
82 | + public function setPosition($height) | |
83 | + { | |
84 | + $this->_offsetHeight = $height; | |
85 | + } | |
86 | + | |
87 | + | |
88 | + /** | |
89 | + * Gets type as rtf code | |
90 | + * | |
91 | + * @return string rtf code | |
92 | + * @throws PHPRtfLite_Exception, if type is not allowed, | |
93 | + * because of the rtf document specific settings. | |
94 | + */ | |
95 | + protected function getTypeAsRtfCode() | |
96 | + { | |
97 | + $rtfType = $this->getRtfType(); | |
98 | + | |
99 | + switch ($this->_type) { | |
100 | + case self::TYPE_ALL: | |
101 | + if (!$this->_rtf->isOddEvenDifferent()) { | |
102 | + return $rtfType; | |
103 | + } | |
104 | + | |
105 | + throw new PHPRtfLite_Exception('Header/Footer type ' . $this->_type . ' is not allowed, ' | |
106 | + . 'when using odd even different!'); | |
107 | + | |
108 | + case self::TYPE_LEFT: | |
109 | + if ($this->_rtf->isOddEvenDifferent()) { | |
110 | + return $rtfType . 'l'; | |
111 | + } | |
112 | + | |
113 | + throw new PHPRtfLite_Exception('Header/Footer type ' . $this->_type . ' is not allowed, ' | |
114 | + . 'when using not odd even different!'); | |
115 | + | |
116 | + case self::TYPE_RIGHT: | |
117 | + if ($this->_rtf->isOddEvenDifferent()) { | |
118 | + return $rtfType . 'r'; | |
119 | + } | |
120 | + | |
121 | + throw new PHPRtfLite_Exception('Header/Footer type ' . $this->_type . ' is not allowed, ' | |
122 | + . 'when using not odd even different!'); | |
123 | + | |
124 | + case self::TYPE_FIRST: | |
125 | + if ($this->_rtf->hasSpecialLayoutForFirstPage()) { | |
126 | + return $rtfType . 'f'; | |
127 | + } | |
128 | + | |
129 | + throw new PHPRtfLite_Exception('Header/Footer type ' . $this->_type . ' is not allowed, ' | |
130 | + . 'when using not special layout for first page!'); | |
131 | + | |
132 | + default: | |
133 | + throw new PHPRtfLite_Exception('Header/Footer type is not defined! You gave me: ', $this->_type); | |
134 | + } | |
135 | + } | |
136 | + | |
137 | + | |
138 | + /** | |
139 | + * gets rtf type | |
140 | + * @return string | |
141 | + */ | |
142 | + protected function getRtfType() | |
143 | + { | |
144 | + return $this->_rtfType; | |
145 | + } | |
146 | + | |
147 | + | |
148 | + /** | |
149 | + * streams rtf code for header/footer | |
150 | + * @return string rtf code | |
151 | + */ | |
152 | + public function render() | |
153 | + { | |
154 | + $stream = $this->_rtf->getWriter(); | |
155 | + | |
156 | + if (isset($this->_offsetHeight)) { | |
157 | + $stream->write('\\' . $this->getRtfType() . 'y' . PHPRtfLite_Unit::getUnitInTwips($this->_offsetHeight)); | |
158 | + } | |
159 | + | |
160 | + $stream->write('{\\' . $this->getTypeAsRtfCode() . ' '); | |
161 | + | |
162 | + parent::render(); | |
163 | + | |
164 | + $containerElements = $this->getElements(); | |
165 | + if ($containerElements && $containerElements[count($containerElements)-1] instanceof PHPRtfLite_Element) { | |
166 | + $stream->write('\par'); | |
167 | + } | |
168 | + $stream->write('}' . "\r\n"); | |
169 | + } | |
170 | + | |
171 | +} | |
0 | 172 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Container/Section.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for creating sections within the rtf document. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + * @subpackage PHPRtfLite_Container | |
31 | + */ | |
32 | +class PHPRtfLite_Container_Section extends PHPRtfLite_Container | |
33 | +{ | |
34 | + | |
35 | + /** | |
36 | + * border for section | |
37 | + * @var PHPRtfLite_Border | |
38 | + */ | |
39 | + protected $_border; | |
40 | + | |
41 | + /** | |
42 | + * number of columns within the section | |
43 | + * @var integer | |
44 | + */ | |
45 | + protected $_numberOfColumns = 1; | |
46 | + | |
47 | + /** | |
48 | + * array of column widths. only used when using more than one column within the section | |
49 | + * @var array | |
50 | + */ | |
51 | + protected $_columnWidths = array(); | |
52 | + | |
53 | + /** | |
54 | + * flag for not breaking within the section, if true do not break | |
55 | + * @var boolean | |
56 | + */ | |
57 | + protected $_doNotBreak = false; | |
58 | + | |
59 | + /** | |
60 | + * flag, if true using lines between the section columns | |
61 | + * @var boolean | |
62 | + */ | |
63 | + protected $_lineBetweenColumns = false; | |
64 | + | |
65 | + /** | |
66 | + * defines space between the section columns | |
67 | + * @var float | |
68 | + */ | |
69 | + protected $_spaceBetweenColumns; | |
70 | + | |
71 | + /** | |
72 | + * flag, if true use landscape layout for this section, isLandscape of rtf must be set to portrait | |
73 | + * @var boolean | |
74 | + */ | |
75 | + private $_isLandscape = false; | |
76 | + | |
77 | + /** | |
78 | + * paper width | |
79 | + * @var float | |
80 | + */ | |
81 | + protected $_paperWidth; | |
82 | + | |
83 | + /** | |
84 | + * paper height | |
85 | + * @var float | |
86 | + */ | |
87 | + protected $_paperHeight; | |
88 | + | |
89 | + /** | |
90 | + * left margin | |
91 | + * @var float | |
92 | + */ | |
93 | + protected $_marginLeft; | |
94 | + | |
95 | + /** | |
96 | + * right margin | |
97 | + * @var float | |
98 | + */ | |
99 | + protected $_marginRight; | |
100 | + | |
101 | + /** | |
102 | + * top margin | |
103 | + * @var float | |
104 | + */ | |
105 | + protected $_marginTop; | |
106 | + | |
107 | + /** | |
108 | + * bottom margin | |
109 | + * @var float | |
110 | + */ | |
111 | + protected $_marginBottom; | |
112 | + | |
113 | + /** | |
114 | + * gutter | |
115 | + * @var float | |
116 | + */ | |
117 | + protected $_gutter; | |
118 | + | |
119 | + /** | |
120 | + * flag, if true margins will be the opposite for odd and even pages | |
121 | + * @var boolean | |
122 | + */ | |
123 | + protected $_useMirrorMargins; | |
124 | + | |
125 | + /** | |
126 | + * rtf headers | |
127 | + * @var PHPRtfLite_Container_Header[] | |
128 | + */ | |
129 | + protected $_headers = array(); | |
130 | + | |
131 | + /** | |
132 | + * rtf footers | |
133 | + * @var PHPRtfLite_Container_Footer[] | |
134 | + */ | |
135 | + protected $_footers = array(); | |
136 | + | |
137 | + /** | |
138 | + * @var PHPRtfLite_Font | |
139 | + */ | |
140 | + protected $_font; | |
141 | + | |
142 | + /** | |
143 | + * @var bool | |
144 | + */ | |
145 | + protected $_borderSurroundsHeader = false; | |
146 | + | |
147 | + /** | |
148 | + * @var bool | |
149 | + */ | |
150 | + protected $_borderSurroundsFooter = false; | |
151 | + | |
152 | + | |
153 | + /** | |
154 | + * sets landscape orientation for the section | |
155 | + */ | |
156 | + public function setLandscape() | |
157 | + { | |
158 | + $this->_isLandscape = true; | |
159 | + } | |
160 | + | |
161 | + | |
162 | + /** | |
163 | + * returns true, if landscape layout should be used | |
164 | + * | |
165 | + * @return boolean | |
166 | + */ | |
167 | + public function isLandscape() | |
168 | + { | |
169 | + return $this->_isLandscape; | |
170 | + } | |
171 | + | |
172 | + | |
173 | + /** | |
174 | + * sets the paper width of pages in section. | |
175 | + * | |
176 | + * @param float $width paper width | |
177 | + */ | |
178 | + public function setPaperWidth($width) | |
179 | + { | |
180 | + $this->_paperWidth = $width; | |
181 | + } | |
182 | + | |
183 | + | |
184 | + /** | |
185 | + * gets the paper width of pages in section. | |
186 | + * | |
187 | + * @return float paper width | |
188 | + */ | |
189 | + public function getPaperWidth() | |
190 | + { | |
191 | + return $this->_paperWidth; | |
192 | + } | |
193 | + | |
194 | + | |
195 | + /** | |
196 | + * sets the paper height of pages in section. | |
197 | + * | |
198 | + * @param float $height paper height | |
199 | + */ | |
200 | + public function setPaperHeight($height) | |
201 | + { | |
202 | + $this->_paperHeight = $height; | |
203 | + } | |
204 | + | |
205 | + | |
206 | + /** | |
207 | + * gets the paper height of pages in section. | |
208 | + * | |
209 | + * @return float paper height | |
210 | + */ | |
211 | + public function getPaperHeight() | |
212 | + { | |
213 | + return $this->_paperHeight; | |
214 | + } | |
215 | + | |
216 | + | |
217 | + /** | |
218 | + * sets the margins of pages in section. | |
219 | + * | |
220 | + * @param float $marginLeft Margin left | |
221 | + * @param float $marginTop Margin top | |
222 | + * @param float $marginRight Margin right | |
223 | + * @param float $marginBottom Margin bottom | |
224 | + */ | |
225 | + public function setMargins($marginLeft, $marginTop, $marginRight, $marginBottom) | |
226 | + { | |
227 | + $this->_marginLeft = $marginLeft; | |
228 | + $this->_marginTop = $marginTop; | |
229 | + $this->_marginRight = $marginRight; | |
230 | + $this->_marginBottom = $marginBottom; | |
231 | + } | |
232 | + | |
233 | + | |
234 | + /** | |
235 | + * sets the left margin of document pages. | |
236 | + * | |
237 | + * @param float $margin | |
238 | + */ | |
239 | + public function setMarginLeft($margin) | |
240 | + { | |
241 | + $this->_marginLeft = $margin; | |
242 | + } | |
243 | + | |
244 | + | |
245 | + /** | |
246 | + * gets the left margin of document pages. | |
247 | + * | |
248 | + * @return float $margin | |
249 | + */ | |
250 | + public function getMarginLeft() | |
251 | + { | |
252 | + return $this->_marginLeft; | |
253 | + } | |
254 | + | |
255 | + | |
256 | + /** | |
257 | + * sets the right margin of document pages. | |
258 | + * | |
259 | + * @param float $margin | |
260 | + */ | |
261 | + public function setMarginRight($margin) | |
262 | + { | |
263 | + $this->_marginRight = $margin; | |
264 | + } | |
265 | + | |
266 | + | |
267 | + /** | |
268 | + * gets the right margin of document pages. | |
269 | + * | |
270 | + * @return float $margin | |
271 | + */ | |
272 | + public function getMarginRight() | |
273 | + { | |
274 | + return $this->_marginRight; | |
275 | + } | |
276 | + | |
277 | + | |
278 | + /** | |
279 | + * sets the top margin of document pages. | |
280 | + * | |
281 | + * @param float $margin | |
282 | + */ | |
283 | + public function setMarginTop($margin) | |
284 | + { | |
285 | + $this->_marginTop = $margin; | |
286 | + } | |
287 | + | |
288 | + | |
289 | + /** | |
290 | + * gets the top margin of document pages. | |
291 | + * | |
292 | + * @return float $margin | |
293 | + */ | |
294 | + public function getMarginTop() | |
295 | + { | |
296 | + return $this->_marginTop; | |
297 | + } | |
298 | + | |
299 | + | |
300 | + /** | |
301 | + * sets the bottom margin of document pages. | |
302 | + * | |
303 | + * @param float $margin | |
304 | + */ | |
305 | + public function setMarginBottom($margin) | |
306 | + { | |
307 | + $this->_marginBottom = $margin; | |
308 | + } | |
309 | + | |
310 | + | |
311 | + /** | |
312 | + * gets the bottom margin of document pages. | |
313 | + * | |
314 | + * @return float $margin | |
315 | + */ | |
316 | + public function getMarginBottom() | |
317 | + { | |
318 | + return $this->_marginBottom; | |
319 | + } | |
320 | + | |
321 | + | |
322 | + /** | |
323 | + * sets the gutter width. <br> | |
324 | + * NOTICE: Does note work with OpenOffice. | |
325 | + * | |
326 | + * @param float $gutter Gutter width | |
327 | + */ | |
328 | + public function setGutter($gutter) | |
329 | + { | |
330 | + $this->_gutter = $gutter; | |
331 | + } | |
332 | + | |
333 | + | |
334 | + /** | |
335 | + * gets the gutter width. | |
336 | + * | |
337 | + * @return float $gutter gutter width | |
338 | + */ | |
339 | + public function getGutter() | |
340 | + { | |
341 | + return $this->_gutter; | |
342 | + } | |
343 | + | |
344 | + | |
345 | + /** | |
346 | + * sets the margin definitions on left and right pages.<br> | |
347 | + * Notice: Does not work with OpenOffice. | |
348 | + */ | |
349 | + public function setMirrorMargins() | |
350 | + { | |
351 | + $this->_useMirrorMargins = true; | |
352 | + } | |
353 | + | |
354 | + | |
355 | + /** | |
356 | + * returns true, if use mirror margins should be used | |
357 | + * | |
358 | + * @return boolean | |
359 | + */ | |
360 | + public function isMirrorMargins() | |
361 | + { | |
362 | + return $this->_useMirrorMargins; | |
363 | + } | |
364 | + | |
365 | + | |
366 | + /** | |
367 | + * gets width of page layout | |
368 | + * | |
369 | + * @return float | |
370 | + * @throws PHPRtfLite_Exception thrown if paper layout width is lower or equal 0 | |
371 | + */ | |
372 | + public function getLayoutWidth() | |
373 | + { | |
374 | + $paperWidth = $this->_paperWidth !== null ? $this->_paperWidth : $this->_rtf->getPaperWidth(); | |
375 | + $marginLeft = $this->_marginLeft !== null ? $this->_marginLeft : $this->_rtf->getMarginLeft(); | |
376 | + $marginRight = $this->_marginRight !== null ? $this->_marginRight : $this->_rtf->getMarginRight(); | |
377 | + $layoutWidth = $paperWidth - $marginLeft - $marginRight; | |
378 | + | |
379 | + if ($layoutWidth <= 0) { | |
380 | + throw new PHPRtfLite_Exception('The paper layout width is lower or equal zero!'); | |
381 | + } | |
382 | + | |
383 | + return $layoutWidth; | |
384 | + } | |
385 | + | |
386 | + | |
387 | + /** | |
388 | + * sets border to rtf document | |
389 | + * | |
390 | + * @param PHPRtfLite_Border $border | |
391 | + */ | |
392 | + public function setBorder(PHPRtfLite_Border $border) | |
393 | + { | |
394 | + $this->_border = $border; | |
395 | + } | |
396 | + | |
397 | + | |
398 | + /** | |
399 | + * gets border of document | |
400 | + * | |
401 | + * @return PHPRtfLite_Border | |
402 | + */ | |
403 | + public function getBorder() | |
404 | + { | |
405 | + return $this->_border; | |
406 | + } | |
407 | + | |
408 | + | |
409 | + /** | |
410 | + * sets borders to rtf document. | |
411 | + * | |
412 | + * @param PHPRtfLite_Border_Format $borderFormat | |
413 | + * @param boolean $left | |
414 | + * @param boolean $top | |
415 | + * @param boolean $right | |
416 | + * @param boolean $bottom | |
417 | + */ | |
418 | + public function setBorders(PHPRtfLite_Border_Format $borderFormat, | |
419 | + $left = true, $top = true, | |
420 | + $right = true, $bottom = true) | |
421 | + { | |
422 | + if ($this->_border === null) { | |
423 | + $this->_border = new PHPRtfLite_Border($this->_rtf); | |
424 | + } | |
425 | + $this->_border->setBorders($borderFormat, $left, $top, $right, $bottom); | |
426 | + } | |
427 | + | |
428 | + | |
429 | + /** | |
430 | + * sets number of columns in section. | |
431 | + * | |
432 | + * @param integer $columnsCount number of columns | |
433 | + */ | |
434 | + public function setNumberOfColumns($columnsCount) | |
435 | + { | |
436 | + $this->_numberOfColumns = $columnsCount; | |
437 | + $this->_columnWidths = array(); | |
438 | + } | |
439 | + | |
440 | + | |
441 | + /** | |
442 | + * gets number of columns in section. | |
443 | + * | |
444 | + * @return integer $columnsCount number of columns | |
445 | + */ | |
446 | + public function getNumberOfColumns() | |
447 | + { | |
448 | + return $this->_numberOfColumns; | |
449 | + } | |
450 | + | |
451 | + | |
452 | + /** | |
453 | + * sets space (width) between columns | |
454 | + * | |
455 | + * @param float $spaceBetweenColumns Space between columns | |
456 | + */ | |
457 | + public function setSpaceBetweenColumns($spaceBetweenColumns) | |
458 | + { | |
459 | + $this->_spaceBetweenColumns = $spaceBetweenColumns; | |
460 | + } | |
461 | + | |
462 | + | |
463 | + /** | |
464 | + * gets space (width) between columns | |
465 | + * | |
466 | + * @return float | |
467 | + */ | |
468 | + public function getSpaceBetweenColumns() | |
469 | + { | |
470 | + return $this->_spaceBetweenColumns; | |
471 | + } | |
472 | + | |
473 | + | |
474 | + /** | |
475 | + * sets section columns with different widths.<br> | |
476 | + * NOTE: If you use this function, you shouldn't use {@see setNumberOfColumns}. | |
477 | + * | |
478 | + * @param array $columnWidths array with columns widths | |
479 | + * @throws PHPRtfLite_Exception, if column widths are exceeding the defined layout width | |
480 | + */ | |
481 | + public function setColumnWidths($columnWidths) | |
482 | + { | |
483 | + if (is_array($columnWidths)) { | |
484 | + $this->_numberOfColumns = count($columnWidths); | |
485 | + $layoutWidth = $this->getLayoutWidth(); | |
486 | + $usedWidth = array_sum($columnWidths); | |
487 | + | |
488 | + if ($usedWidth <= $layoutWidth) { | |
489 | + $this->_columnWidths = $columnWidths; | |
490 | + } | |
491 | + else { | |
492 | + throw new PHPRtfLite_Exception('The section column widths are exceeding the defined layout width!'); | |
493 | + } | |
494 | + } | |
495 | + } | |
496 | + | |
497 | + | |
498 | + /** | |
499 | + * gets widths for columns | |
500 | + * | |
501 | + * @return array | |
502 | + */ | |
503 | + public function getColumnWidths() | |
504 | + { | |
505 | + return $this->_columnWidths; | |
506 | + } | |
507 | + | |
508 | + | |
509 | + /** | |
510 | + * sets that it should not do a break within the section | |
511 | + * NOTE: If foot notes are used in different sections, MS Word will always break sections. | |
512 | + * | |
513 | + * @param boolean $doNotBreak | |
514 | + */ | |
515 | + public function setNoBreak($doNotBreak = true) | |
516 | + { | |
517 | + $this->_doNotBreak = $doNotBreak; | |
518 | + } | |
519 | + | |
520 | + | |
521 | + /** | |
522 | + * sets line between columns. | |
523 | + * | |
524 | + * @param boolean $flag | |
525 | + */ | |
526 | + public function setLineBetweenColumns($flag = true) | |
527 | + { | |
528 | + $this->_lineBetweenColumns = $flag; | |
529 | + } | |
530 | + | |
531 | + | |
532 | + /** | |
533 | + * returns true, if line between columns is sets | |
534 | + * | |
535 | + * @return boolean | |
536 | + */ | |
537 | + public function hasLineBetweenColumns() | |
538 | + { | |
539 | + return $this->_lineBetweenColumns; | |
540 | + } | |
541 | + | |
542 | + | |
543 | + /** | |
544 | + * creates header for sections. | |
545 | + * | |
546 | + * @param string $type Represented by class constants PHPRtfLite_Container_Header::TYPE_* | |
547 | + * Possible values: <br> | |
548 | + * PHPRtfLite_Container_Header::TYPE_ALL => 'all' - all pages (different odd and even headers/footers must be not set) <br> | |
549 | + * PHPRtfLite_Container_Header::TYPE_LEFT => 'left' - left pages (different odd and even headers/footers must be set) <br> | |
550 | + * PHPRtfLite_Container_Header::TYPE_RIGHT => 'right' - right pages (different odd and even headers/footers must be set) <br> | |
551 | + * PHPRtfLite_Container_Header::TYPE_FIRST => 'first' - first page | |
552 | + * | |
553 | + * @return PHPRtfLite_Container_Header | |
554 | + */ | |
555 | + public function addHeader($type = PHPRtfLite_Container_Header::TYPE_ALL) | |
556 | + { | |
557 | + $header = new PHPRtfLite_Container_Header($this->_rtf, $type); | |
558 | + $this->_headers[$type] = $header; | |
559 | + | |
560 | + return $header; | |
561 | + } | |
562 | + | |
563 | + | |
564 | + /** | |
565 | + * gets defined headers for document pages. | |
566 | + * | |
567 | + * @return array contains PHPRtfLite_Container_Header objects | |
568 | + */ | |
569 | + public function getHeaders() | |
570 | + { | |
571 | + return $this->_headers; | |
572 | + } | |
573 | + | |
574 | + | |
575 | + /** | |
576 | + * creates footer for the document. | |
577 | + * | |
578 | + * @param string $type Represented by class constants PHPRtfLite_Container_Footer::TYPE_* | |
579 | + * PHPRtfLite_Container_Footer::TYPE_ALL => 'all' - all pages (different odd and even headers/footers must be not set) <br> | |
580 | + * PHPRtfLite_Container_Footer::TYPE_LEFT => 'left' - left pages (different odd and even headers/footers must be set) <br> | |
581 | + * PHPRtfLite_Container_Footer::TYPE_RIGHT => 'right' - right pages (different odd and even headers/footers must be set) <br> | |
582 | + * PHPRtfLite_Container_Footer::TYPE_FIRST => 'first' - first page | |
583 | + * | |
584 | + * @return PHPRtfLite_Container_Footer | |
585 | + */ | |
586 | + public function addFooter($type = PHPRtfLite_Container_Footer::TYPE_ALL) | |
587 | + { | |
588 | + $footer = new PHPRtfLite_Container_Footer($this->_rtf, $type); | |
589 | + $this->_footers[$type] = $footer; | |
590 | + | |
591 | + return $footer; | |
592 | + } | |
593 | + | |
594 | + | |
595 | + /** | |
596 | + * gets defined footers for document pages. | |
597 | + * | |
598 | + * @return array contains PHPRtfLite_Container_FOOTER objects | |
599 | + */ | |
600 | + public function getFooters() | |
601 | + { | |
602 | + return $this->_footers; | |
603 | + } | |
604 | + | |
605 | + | |
606 | + /** | |
607 | + * insert a page break | |
608 | + */ | |
609 | + public function insertPageBreak() | |
610 | + { | |
611 | + $this->writeRtfCode('\page'); | |
612 | + } | |
613 | + | |
614 | + | |
615 | + /** | |
616 | + * @param PHPRtfLite_Font $font | |
617 | + */ | |
618 | + public function setFont(PHPRtfLite_Font $font) | |
619 | + { | |
620 | + $this->_font = $font; | |
621 | + $this->_rtf->registerFont($font); | |
622 | + } | |
623 | + | |
624 | + | |
625 | + /** | |
626 | + * @return PHPRtfLite_Font | |
627 | + */ | |
628 | + public function getFont() | |
629 | + { | |
630 | + return $this->_font; | |
631 | + } | |
632 | + | |
633 | + | |
634 | + /** | |
635 | + * sets border surrounds header | |
636 | + * | |
637 | + * @param bool $borderSurroundsHeader | |
638 | + * @return PHPRtfLite | |
639 | + */ | |
640 | + public function setBorderSurroundsHeader($borderSurroundsHeader = true) | |
641 | + { | |
642 | + $this->_borderSurroundsHeader = $borderSurroundsHeader; | |
643 | + return $this; | |
644 | + } | |
645 | + | |
646 | + | |
647 | + /** | |
648 | + * checks, if border surrounds header | |
649 | + * | |
650 | + * @return bool | |
651 | + */ | |
652 | + public function borderSurroundsHeader() | |
653 | + { | |
654 | + return $this->_borderSurroundsHeader; | |
655 | + } | |
656 | + | |
657 | + | |
658 | + /** | |
659 | + * @param bool $borderSurroundsFooter | |
660 | + * @return PHPRtfLite | |
661 | + */ | |
662 | + public function setBorderSurroundsFooter($borderSurroundsFooter = true) | |
663 | + { | |
664 | + $this->_borderSurroundsFooter = $borderSurroundsFooter; | |
665 | + return $this; | |
666 | + } | |
667 | + | |
668 | + | |
669 | + /** | |
670 | + * checks, if border surrounds footer | |
671 | + * | |
672 | + * @return bool | |
673 | + */ | |
674 | + public function borderSurroundsFooter() | |
675 | + { | |
676 | + return $this->_borderSurroundsFooter; | |
677 | + } | |
678 | + | |
679 | + | |
680 | + /** | |
681 | + * renders rtf code of section | |
682 | + */ | |
683 | + public function render() | |
684 | + { | |
685 | + $writer = $this->_rtf->getWriter(); | |
686 | + | |
687 | + //headers | |
688 | + $headers = $this->_headers ? $this->_headers : $this->_rtf->getHeaders(); | |
689 | + if (!empty($headers)) { | |
690 | + foreach ($headers as $header) { | |
691 | + $header->render(); | |
692 | + } | |
693 | + } | |
694 | + | |
695 | + //footers | |
696 | + $footers = $this->_footers ? $this->_footers : $this->_rtf->getFooters(); | |
697 | + if (!empty($footers)) { | |
698 | + foreach ($footers as $footer) { | |
699 | + $footer->render(); | |
700 | + } | |
701 | + } | |
702 | + | |
703 | + //borders | |
704 | + if ($this->_border) { | |
705 | + if ($this->_borderSurroundsHeader) { | |
706 | + $writer->write('\pgbrdrhead'); | |
707 | + } | |
708 | + if ($this->_borderSurroundsFooter) { | |
709 | + $writer->write('\pgbrdrfoot'); | |
710 | + } | |
711 | + $writer->write($this->_border->getContent('\pg')); | |
712 | + } | |
713 | + else if ($border = $this->_rtf->getBorder()) { | |
714 | + if ($this->_rtf->borderSurroundsHeader()) { | |
715 | + $writer->write('\pgbrdrhead'); | |
716 | + } | |
717 | + if ($this->_rtf->borderSurroundsFooter()) { | |
718 | + $writer->write('\pgbrdrfoot'); | |
719 | + } | |
720 | + $writer->write($border->getContent('\pg')); | |
721 | + } | |
722 | + | |
723 | + //do not break within the section | |
724 | + if ($this->_doNotBreak) { | |
725 | + $writer->write('\sbknone '); | |
726 | + } | |
727 | + | |
728 | + //set column index, when using more than one column for this section | |
729 | + if ($this->_numberOfColumns > 1) { | |
730 | + $writer->write('\cols' . $this->_numberOfColumns . ' '); | |
731 | + } | |
732 | + | |
733 | + if (empty($this->_columnWidths)) { | |
734 | + if ($this->_spaceBetweenColumns) { | |
735 | + $writer->write('\colsx' . PHPRtfLite_Unit::getUnitInTwips($this->_spaceBetweenColumns) . ' '); | |
736 | + } | |
737 | + } | |
738 | + else { | |
739 | + $width = 0; | |
740 | + foreach ($this->_columnWidths as $value) { | |
741 | + $width += PHPRtfLite_Unit::getUnitInTwips($value); | |
742 | + } | |
743 | + | |
744 | + $printableWidth = $this->_rtf->getPaperWidth() - $this->_rtf->getMarginLeft() - $this->_rtf->getMarginRight(); | |
745 | + $space = round((PHPRtfLite_Unit::getUnitInTwips($printableWidth) - $width) / (count($this->_columnWidths) - 1)); | |
746 | + | |
747 | + $i = 1; | |
748 | + foreach ($this->_columnWidths as $key => $value) { | |
749 | + $writer->write('\colno' . $i . '\colw' . PHPRtfLite_Unit::getUnitInTwips($value)); | |
750 | + if (!empty($this->_columnWidths[$key])) { | |
751 | + $writer->write('\colsr' . $space); | |
752 | + } | |
753 | + $i++; | |
754 | + } | |
755 | + $writer->write(' '); | |
756 | + } | |
757 | + | |
758 | + if ($this->_lineBetweenColumns) { | |
759 | + $writer->write('\linebetcol '); | |
760 | + } | |
761 | + | |
762 | + /*---Page part---*/ | |
763 | + if ($this->_isLandscape) { | |
764 | + $writer->write('\lndscpsxn '); | |
765 | + } | |
766 | + | |
767 | + if ($this->_paperWidth) { | |
768 | + $writer->write('\pgwsxn' . PHPRtfLite_Unit::getUnitInTwips($this->_paperWidth) . ' '); | |
769 | + } | |
770 | + | |
771 | + if ($this->_paperHeight) { | |
772 | + $writer->write('\pghsxn' . PHPRtfLite_Unit::getUnitInTwips($this->_paperHeight) . ' '); | |
773 | + } | |
774 | + | |
775 | + if ($this->_marginLeft) { | |
776 | + $writer->write('\marglsxn' . PHPRtfLite_Unit::getUnitInTwips($this->_marginLeft) . ' '); | |
777 | + } | |
778 | + | |
779 | + if ($this->_marginRight) { | |
780 | + $writer->write('\margrsxn' . PHPRtfLite_Unit::getUnitInTwips($this->_marginRight) . ' '); | |
781 | + } | |
782 | + | |
783 | + if ($this->_marginTop) { | |
784 | + $writer->write('\margtsxn' . PHPRtfLite_Unit::getUnitInTwips($this->_marginTop) . ' '); | |
785 | + } | |
786 | + | |
787 | + if ($this->_marginBottom) { | |
788 | + $writer->write('\margbsxn' . PHPRtfLite_Unit::getUnitInTwips($this->_marginBottom) . ' '); | |
789 | + } | |
790 | + | |
791 | + if ($this->_gutter) { | |
792 | + $writer->write('\guttersxn' . PHPRtfLite_Unit::getUnitInTwips($this->_gutter) . ' '); | |
793 | + } | |
794 | + | |
795 | + if ($this->_useMirrorMargins) { | |
796 | + $writer->write('\margmirsxn '); | |
797 | + } | |
798 | + | |
799 | + if ($this->_font) { | |
800 | + $writer->write($this->_font->getContent()); | |
801 | + } | |
802 | + | |
803 | + $writer->write("\r\n"); | |
804 | + parent::render(); | |
805 | + $writer->write("\r\n"); | |
806 | + } | |
807 | + | |
808 | +} | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/DocHead/ColorTable.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * defines color table for the rtf document head | |
25 | + * @version 1.2 | |
26 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
27 | + * @copyright 2010-2012 Steffen Zeidler | |
28 | + * @package PHPRtfLite | |
29 | + * @subpackage PHPRtfLite_DocHead | |
30 | + */ | |
31 | +class PHPRtfLite_DocHead_ColorTable | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * defined colors for this color table | |
36 | + * @var array | |
37 | + */ | |
38 | + protected $_colors = array('000000'); | |
39 | + | |
40 | + | |
41 | + /** | |
42 | + * gets color in hex code | |
43 | + * | |
44 | + * @param string $color | |
45 | + * @return string | |
46 | + */ | |
47 | + private static function getColorAsFullHexCode($color) | |
48 | + { | |
49 | + $color = ltrim($color, '#'); | |
50 | + | |
51 | + if (strlen($color) == 3) { | |
52 | + $color = str_repeat(substr($color, 0, 1), 2) | |
53 | + . str_repeat(substr($color, 1, 1), 2) | |
54 | + . str_repeat(substr($color, 2, 1), 2); | |
55 | + } | |
56 | + | |
57 | + return strtoupper($color); | |
58 | + } | |
59 | + | |
60 | + | |
61 | + /** | |
62 | + * formats color code. | |
63 | + * | |
64 | + * @param string $color Color | |
65 | + * @return string rtf color | |
66 | + * @throws PHPRtfLite_Exception, if color is not a 3or 6 digit hex number | |
67 | + */ | |
68 | + private static function convertHexColorToRtf($color) | |
69 | + { | |
70 | + if (strlen($color) == 6) { | |
71 | + $red = hexdec(substr($color, 0, 2)); | |
72 | + $green = hexdec(substr($color, 2, 2)); | |
73 | + $blue = hexdec(substr($color, 4, 2)); | |
74 | + | |
75 | + return '\red' . $red . '\green' . $green . '\blue' . $blue; | |
76 | + } | |
77 | + | |
78 | + throw new PHPRtfLite_Exception('Color must be a hex number of length 3 or 6 digits! You gave me: #' . $color); | |
79 | + } | |
80 | + | |
81 | + | |
82 | + /** | |
83 | + * adds color to rtf document | |
84 | + * | |
85 | + * @param string $color color | |
86 | + */ | |
87 | + public function add($color) | |
88 | + { | |
89 | + if (!empty($color)) { | |
90 | + $color = self::getColorAsFullHexCode($color); | |
91 | + if (!in_array($color, $this->_colors)) { | |
92 | + $this->_colors[] = $color; | |
93 | + } | |
94 | + } | |
95 | + } | |
96 | + | |
97 | + | |
98 | + /** | |
99 | + * gets rtf code of color | |
100 | + * | |
101 | + * @param string $color color | |
102 | + * @return string | |
103 | + */ | |
104 | + public function getColorIndex($color) | |
105 | + { | |
106 | + $color = self::getColorAsFullHexCode($color); | |
107 | + $index = array_search($color, $this->_colors); | |
108 | + return $index !== false ? $index + 1 : false; | |
109 | + } | |
110 | + | |
111 | + | |
112 | + /** | |
113 | + * gets rtf color table | |
114 | + * | |
115 | + * @return string | |
116 | + */ | |
117 | + public function getContent() | |
118 | + { | |
119 | + $content = '{\colortbl;'; | |
120 | + | |
121 | + foreach ($this->_colors as $hexColor) { | |
122 | + $rtfColor = self::convertHexColorToRtf($hexColor); | |
123 | + $content .= $rtfColor . ';'; | |
124 | + } | |
125 | + | |
126 | + $content .= '}' . "\r\n"; | |
127 | + | |
128 | + return $content; | |
129 | + } | |
130 | + | |
131 | +} | |
0 | 132 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/DocHead/FontTable.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * defines font table for the rtf document head | |
25 | + * @version 1.2 | |
26 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
27 | + * @copyright 2010-2012 Steffen Zeidler | |
28 | + * @package PHPRtfLite | |
29 | + * @subpackage PHPRtfLite_DocHead | |
30 | + */ | |
31 | +class PHPRtfLite_DocHead_FontTable | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * defined font families for this font table | |
36 | + * @var array | |
37 | + */ | |
38 | + protected $_fontFamilies = array('Times New Roman'); | |
39 | + | |
40 | + | |
41 | + /** | |
42 | + * adds font family to the font table | |
43 | + * | |
44 | + * @param string $fontFamily | |
45 | + */ | |
46 | + public function add($fontFamily) | |
47 | + { | |
48 | + if (!empty($fontFamily)) { | |
49 | + if (!in_array($fontFamily, $this->_fontFamilies)) { | |
50 | + $this->_fontFamilies[] = $fontFamily; | |
51 | + } | |
52 | + } | |
53 | + } | |
54 | + | |
55 | + | |
56 | + /** | |
57 | + * gets font index from font table | |
58 | + * | |
59 | + * @param string $fontFamily | |
60 | + * @return integer | |
61 | + */ | |
62 | + public function getFontIndex($fontFamily) | |
63 | + { | |
64 | + return array_search($fontFamily, $this->_fontFamilies); | |
65 | + } | |
66 | + | |
67 | + | |
68 | + /** | |
69 | + * gets rtf font table | |
70 | + * | |
71 | + * @return string | |
72 | + */ | |
73 | + public function getContent() | |
74 | + { | |
75 | + $content = '{\fonttbl'; | |
76 | + | |
77 | + foreach ($this->_fontFamilies as $key => $value) { | |
78 | + $content .= '{\f' . $key . ' ' . $value . ';}'; | |
79 | + } | |
80 | + | |
81 | + $content .= '}' . "\r\n"; | |
82 | + | |
83 | + return $content; | |
84 | + } | |
85 | + | |
86 | +} | |
0 | 87 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/DocHead/Note.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +/* | |
4 | + PHPRtfLite | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * class for doucment head definition for footnotes and endnotes | |
25 | + * @version 1.2 | |
26 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
27 | + * @copyright 2010-2012 Steffen Zeidler | |
28 | + * @package PHPRtfLite | |
29 | + * @subpackage PHPRtfLite_DocHead | |
30 | + */ | |
31 | +class PHPRtfLite_DocHead_Note | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * footnote type | |
36 | + * @var integer | |
37 | + */ | |
38 | + protected $_footnoteNumberingType = PHPRtfLite_Footnote::NUMTYPE_ARABIC_NUMBERS; | |
39 | + | |
40 | + /** | |
41 | + * endnote type | |
42 | + * @var integer | |
43 | + */ | |
44 | + protected $_endnoteNumberingType = PHPRtfLite_Endnote::NUMTYPE_ROMAN_LC; | |
45 | + | |
46 | + /** | |
47 | + * flag for restarting footnote numbering on each page | |
48 | + * @var boolean | |
49 | + */ | |
50 | + protected $_footnoteRestartEachPage = false; | |
51 | + | |
52 | + /** | |
53 | + * flag for restarting endnote numbering on each page | |
54 | + * @var boolean | |
55 | + */ | |
56 | + protected $_endnoteRestartEachPage = false; | |
57 | + | |
58 | + /** | |
59 | + * start number for footnotes | |
60 | + * @var integer | |
61 | + */ | |
62 | + protected $_footnoteStartNumber = 1; | |
63 | + | |
64 | + /** | |
65 | + * start number for endnotes | |
66 | + * @var integer | |
67 | + */ | |
68 | + protected $_endnoteStartNumber = 1; | |
69 | + | |
70 | + | |
71 | + /** | |
72 | + * sets footnote numbering type | |
73 | + * | |
74 | + * @param integer $numberingType | |
75 | + */ | |
76 | + public function setFootnoteNumberingType($numberingType) | |
77 | + { | |
78 | + $this->_footnoteNumberingType = $numberingType; | |
79 | + } | |
80 | + | |
81 | + | |
82 | + /** | |
83 | + * gets footnote numbering type | |
84 | + * | |
85 | + * @return integer | |
86 | + */ | |
87 | + public function getFootnoteNumberingType() | |
88 | + { | |
89 | + return $this->_footnoteNumberingType; | |
90 | + } | |
91 | + | |
92 | + | |
93 | + /** | |
94 | + * sets endnote numbering type | |
95 | + * | |
96 | + * @param integer $numberingType | |
97 | + */ | |
98 | + public function setEndnoteNumberingType($numberingType) | |
99 | + { | |
100 | + $this->_endnoteNumberingType = $numberingType; | |
101 | + } | |
102 | + | |
103 | + | |
104 | + /** | |
105 | + * gets endnote numbering type | |
106 | + * | |
107 | + * @return integer | |
108 | + */ | |
109 | + public function getEndnoteNumberingType() | |
110 | + { | |
111 | + return $this->_endnoteNumberingType; | |
112 | + } | |
113 | + | |
114 | + | |
115 | + /** | |
116 | + * sets footnote start number | |
117 | + * | |
118 | + * @param integer $startNumber | |
119 | + */ | |
120 | + public function setFootnoteStartNumber($startNumber) | |
121 | + { | |
122 | + $this->_footnoteStartNumber = $startNumber; | |
123 | + } | |
124 | + | |
125 | + | |
126 | + /** | |
127 | + * gets footnote start number | |
128 | + * | |
129 | + * @return integer | |
130 | + */ | |
131 | + public function getFootnoteStartNumber() | |
132 | + { | |
133 | + return $this->_footnoteStartNumber; | |
134 | + } | |
135 | + | |
136 | + | |
137 | + /** | |
138 | + * sets endnote start number | |
139 | + * | |
140 | + * @param integer $startNumber | |
141 | + */ | |
142 | + public function setEndnoteStartNumber($startNumber) | |
143 | + { | |
144 | + $this->_endnoteStartNumber = $startNumber; | |
145 | + } | |
146 | + | |
147 | + | |
148 | + /** | |
149 | + * gets endnote start number | |
150 | + * | |
151 | + * @return integer | |
152 | + */ | |
153 | + public function getEndnoteStartNumber() | |
154 | + { | |
155 | + return $this->_endnoteStartNumber; | |
156 | + } | |
157 | + | |
158 | + | |
159 | + /** | |
160 | + * sets restart footnote number on each page | |
161 | + */ | |
162 | + public function setRestartFootnoteNumberEachPage() | |
163 | + { | |
164 | + $this->_footnoteRestartEachPage = true; | |
165 | + } | |
166 | + | |
167 | + | |
168 | + /** | |
169 | + * checks, if footnote numbering shall be started on each page | |
170 | + * | |
171 | + * @return boolean | |
172 | + */ | |
173 | + public function isRestartFootnoteNumberEachPage() | |
174 | + { | |
175 | + return $this->_endnoteRestartEachPage; | |
176 | + } | |
177 | + | |
178 | + | |
179 | + /** | |
180 | + * sets restart endnote number on each page | |
181 | + */ | |
182 | + public function setRestartEndnoteNumberEachPage() | |
183 | + { | |
184 | + $this->_endnoteRestartEachPage = true; | |
185 | + } | |
186 | + | |
187 | + | |
188 | + /** | |
189 | + * checks, if endnote numbering shall be started on each page | |
190 | + * | |
191 | + * @return boolean | |
192 | + */ | |
193 | + public function isRestartEndnoteNumberEachPage() | |
194 | + { | |
195 | + return $this->_endnoteRestartEachPage; | |
196 | + } | |
197 | + | |
198 | + | |
199 | + /** | |
200 | + * gets numbering type for notes | |
201 | + * | |
202 | + * @param integer $numbering | |
203 | + * @param string $prefix | |
204 | + * @return string | |
205 | + */ | |
206 | + public static function getNumberingTypeAsRtf($numbering, $prefix = '\ftnn') | |
207 | + { | |
208 | + switch ($numbering) { | |
209 | + default: | |
210 | + // const name NUMTYPE_ARABIC_NUMBERS | |
211 | + return $prefix . 'ar'; | |
212 | + case PHPRtfLite_Footnote::NUMTYPE_ALPHABETH_LC: | |
213 | + return $prefix . 'alc'; | |
214 | + case PHPRtfLite_Footnote::NUMTYPE_ALPHABETH_UC: | |
215 | + return $prefix . 'auc'; | |
216 | + case PHPRtfLite_Footnote::NUMTYPE_ROMAN_LC: | |
217 | + return $prefix . 'rlc'; | |
218 | + case PHPRtfLite_Footnote::NUMTYPE_ROMAN_UC: | |
219 | + return $prefix . 'ruc'; | |
220 | + case PHPRtfLite_Footnote::NUMTYPE_CHICAGO; | |
221 | + return $prefix . 'chi'; | |
222 | + case PHPRtfLite_Footnote::NUMTYPE_KOREAN_1: | |
223 | + return $prefix . 'chosung'; | |
224 | + case PHPRtfLite_Footnote::NUMTYPE_KOREAN_2: | |
225 | + return $prefix . 'ganada'; | |
226 | + case PHPRtfLite_Footnote::NUMTYPE_CIRCLE: | |
227 | + return $prefix . 'cnum'; | |
228 | + case PHPRtfLite_Footnote::NUMTYPE_KANJI_1: | |
229 | + return $prefix . 'dbnum'; | |
230 | + case PHPRtfLite_Footnote::NUMTYPE_KANJI_2: | |
231 | + return $prefix . 'dbnumd'; | |
232 | + case PHPRtfLite_Footnote::NUMTYPE_KANJI_3: | |
233 | + return $prefix . 'dbnumt'; | |
234 | + case PHPRtfLite_Footnote::NUMTYPE_KANJI_4: | |
235 | + return $prefix . 'dbnumk'; | |
236 | + case PHPRtfLite_Footnote::NUMTYPE_DOUBLE_BYTE: | |
237 | + return $prefix . 'dbchar'; | |
238 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_1: | |
239 | + return $prefix . 'gbnum'; | |
240 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_2: | |
241 | + return $prefix . 'gbnumd'; | |
242 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_3: | |
243 | + return $prefix . 'gbnuml'; | |
244 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_4: | |
245 | + return $prefix . 'gbnumk'; | |
246 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_ZODIAC_1: | |
247 | + return $prefix . 'zodiac'; | |
248 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_ZODIAC_2: | |
249 | + return $prefix . 'zodiacd'; | |
250 | + case PHPRtfLite_Footnote::NUMTYPE_CHINESE_ZODIAC_3: | |
251 | + return $prefix . 'zodiacl'; | |
252 | + } | |
253 | + } | |
254 | + | |
255 | + | |
256 | + /** | |
257 | + * renders document definition head for footnotes/endnotes | |
258 | + * | |
259 | + * @return string | |
260 | + */ | |
261 | + public function getContent() | |
262 | + { | |
263 | + $content = self::getNumberingTypeAsRtf($this->_footnoteNumberingType) . ' ' | |
264 | + . self::getNumberingTypeAsRtf($this->_endnoteNumberingType, '\aftnn') . ' ' | |
265 | + . '\ftnstart' . $this->_footnoteStartNumber . ' ' | |
266 | + . '\aftnstart' . $this->_endnoteStartNumber . ' '; | |
267 | + | |
268 | + if ($this->_footnoteRestartEachPage) { | |
269 | + $content .= '\ftnrstpg '; | |
270 | + } | |
271 | + if ($this->_endnoteRestartEachPage) { | |
272 | + $content .= '\aftnrstpg '; | |
273 | + } | |
274 | + | |
275 | + return $content; | |
276 | + } | |
277 | + | |
278 | +} | |
0 | 279 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Element.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
5 | + | |
6 | + This file is part of PHPRtfLite. | |
7 | + | |
8 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU Lesser General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + PHPRtfLite is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU Lesser General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU Lesser General Public License | |
19 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
20 | +*/ | |
21 | + | |
22 | +/** | |
23 | + * class for creating elements used in containers like sections, footers and headers. | |
24 | + * @version 1.2 | |
25 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
26 | + * @copyright 2010-2012 Steffen Zeidler | |
27 | + * @package PHPRtfLite | |
28 | + * @subpackage PHPRtfLite_Element | |
29 | + */ | |
30 | +class PHPRtfLite_Element | |
31 | +{ | |
32 | + | |
33 | + /** | |
34 | + * @var string | |
35 | + */ | |
36 | + protected $_text = ''; | |
37 | + /** | |
38 | + * @var boolean | |
39 | + */ | |
40 | + protected $_isRtfCode = false; | |
41 | + /** | |
42 | + * @var boolean | |
43 | + */ | |
44 | + protected $_convertTagsToRtf = false; | |
45 | + /** | |
46 | + * @var PHPRtfLite_Font | |
47 | + */ | |
48 | + protected $_font; | |
49 | + /** | |
50 | + * @var PHPRtfLite_ParFormat | |
51 | + */ | |
52 | + protected $_parFormat; | |
53 | + | |
54 | + | |
55 | + /** | |
56 | + * constructor | |
57 | + * | |
58 | + * @param PHPRtfLite $rtf | |
59 | + * @param string $text | |
60 | + * @param PHPRtfLite_Font $font | |
61 | + * @param PHPRtfLite_ParFormat $parFormat | |
62 | + */ | |
63 | + public function __construct(PHPRtfLite $rtf, | |
64 | + $text, | |
65 | + PHPRtfLite_Font $font = null, | |
66 | + PHPRtfLite_ParFormat $parFormat = null) | |
67 | + { | |
68 | + if ($font) { | |
69 | + $rtf->registerFont($font); | |
70 | + } | |
71 | + if ($parFormat) { | |
72 | + $rtf->registerParFormat($parFormat); | |
73 | + } | |
74 | + | |
75 | + $this->_rtf = $rtf; | |
76 | + $this->_text = $text; | |
77 | + $this->_font = $font; | |
78 | + $this->_parFormat = $parFormat; | |
79 | + } | |
80 | + | |
81 | + | |
82 | + /** | |
83 | + * checks, if element is an empty paragraph | |
84 | + * | |
85 | + * @return boolean | |
86 | + */ | |
87 | + public function isEmptyParagraph() | |
88 | + { | |
89 | + return ($this->_parFormat && $this->_text == '\\par' && $this->_isRtfCode); | |
90 | + } | |
91 | + | |
92 | + | |
93 | + /** | |
94 | + * sets flag, that text tags shall be converted into rtf code | |
95 | + */ | |
96 | + public function setConvertTagsToRtf() | |
97 | + { | |
98 | + $this->_convertTagsToRtf = true; | |
99 | + } | |
100 | + | |
101 | + | |
102 | + /** | |
103 | + * sets rtf code | |
104 | + */ | |
105 | + public function setIsRtfCode() | |
106 | + { | |
107 | + $this->_isRtfCode = true; | |
108 | + } | |
109 | + | |
110 | + | |
111 | + /** | |
112 | + * returns true, if text is rtf code | |
113 | + * | |
114 | + * @return boolean | |
115 | + */ | |
116 | + public function isRtfCode() | |
117 | + { | |
118 | + return $this->_isRtfCode; | |
119 | + } | |
120 | + | |
121 | + | |
122 | + /** | |
123 | + * gets font | |
124 | + * | |
125 | + * @return PHPRtfLite_Font | |
126 | + */ | |
127 | + public function getFont() | |
128 | + { | |
129 | + return $this->_font; | |
130 | + } | |
131 | + | |
132 | + | |
133 | + /** | |
134 | + * gets par format | |
135 | + * | |
136 | + * @return PHPRtfLite_ParFormat | |
137 | + */ | |
138 | + public function getParFormat() | |
139 | + { | |
140 | + return $this->_parFormat; | |
141 | + } | |
142 | + | |
143 | + | |
144 | + /** | |
145 | + * converts text tags into rtf code | |
146 | + * | |
147 | + * @param string $text | |
148 | + * @param string $charset | |
149 | + * @return string | |
150 | + */ | |
151 | + public static function convertTagsToRtf($text, $charset) | |
152 | + { | |
153 | + $search = array( | |
154 | + // bold | |
155 | + '|<STRONG\s*>(.*?)</STRONG\s*>|smi', | |
156 | + '|<B\s*>(.*?)</B\s*>|smi', | |
157 | + // italic | |
158 | + '|<EM\s*>(.*?)</EM\s*>|smi', | |
159 | + '|<I\s*>(.*?)</I\s*>|smi', | |
160 | + // underline | |
161 | + '|<U\s*>(.*?)</U\s*>|smi', | |
162 | + // break | |
163 | + '|<BR\s*(/)?\s*>|smi', | |
164 | + '|<LINE\s*(/)?\s*>|smi', | |
165 | + // horizontal rule | |
166 | + '|<HR\s*(/)?\s*>|smi', | |
167 | + '|<CHDATE\s*(/)?\s*>|smi', | |
168 | + '|<CHDPL\s*(/)?\s*>|smi', | |
169 | + '|<CHDPA\s*(/)?\s*>|smi', | |
170 | + '|<CHTIME\s*(/)?\s*>|smi', | |
171 | + '|<CHPGN\s*(/)?\s*>|smi', | |
172 | + // tab | |
173 | + '|<TAB\s*(/)?\s*>|smi', | |
174 | + // bullet | |
175 | + '|<BULLET\s*(/)?\s*>|smi', | |
176 | + '|<PAGENUM\s*(/)?\s*>|smi', | |
177 | + '|<PAGETOTAL\s*(/)?\s*>|smi', | |
178 | + '|<SECTNUM\s*(/)?\s*>|smi', | |
179 | + '|<SUP\s*>(.*?)</SUP\s*>|smi', | |
180 | + '|<SUB\s*>(.*?)</SUB\s*>|smi', | |
181 | +// '|<PAGE\s*(/)?\s*>|smi', | |
182 | +// '|<SECT\s*(/)?\s*>|smi' | |
183 | + ); | |
184 | + | |
185 | + $replace = array( | |
186 | + // bold | |
187 | + '\b \1\b0 ', | |
188 | + '\b \1\b0 ', | |
189 | + // italic | |
190 | + '\i \1\i0 ', | |
191 | + '\i \1\i0 ', | |
192 | + // underline | |
193 | + '\ul \1\ul0 ', | |
194 | + // break | |
195 | + '\line ', | |
196 | + '\line ', | |
197 | + // horizontal rule | |
198 | + '{\pard \brdrb \brdrs \brdrw10 \brsp20 \par}', | |
199 | + '\chdate ', | |
200 | + '\chdpl ', | |
201 | + '\chdpa ', | |
202 | + '\chtime ', | |
203 | + '\chpgn ', | |
204 | + // tab | |
205 | + '\tab ', | |
206 | + // bullet | |
207 | + '\bullet ', | |
208 | + '\chpgn ', | |
209 | + '{\field {\*\fldinst {NUMPAGES }}}', | |
210 | + '\sectnum ', | |
211 | + '{\super \1\super0}', | |
212 | + '{\sub \1\sub0}', | |
213 | +// '\page ', | |
214 | +// '\sect ' | |
215 | + ); | |
216 | + | |
217 | + $text = preg_replace($search, $replace, $text); | |
218 | + $text = html_entity_decode($text, ENT_COMPAT, $charset); | |
219 | + | |
220 | + return $text; | |
221 | + } | |
222 | + | |
223 | + | |
224 | + /** | |
225 | + * gets opening token | |
226 | + * | |
227 | + * @return string | |
228 | + */ | |
229 | + protected function getOpeningToken() | |
230 | + { | |
231 | + return '{'; | |
232 | + } | |
233 | + | |
234 | + | |
235 | + /** | |
236 | + * gets closing token | |
237 | + * | |
238 | + * @return string | |
239 | + */ | |
240 | + protected function getClosingToken() | |
241 | + { | |
242 | + return '}'; | |
243 | + } | |
244 | + | |
245 | + | |
246 | + /** | |
247 | + * renders the element | |
248 | + */ | |
249 | + public function render() | |
250 | + { | |
251 | + $stream = $this->_rtf->getWriter(); | |
252 | + $text = $this->_text; | |
253 | + | |
254 | + if (!$this->_isRtfCode) { | |
255 | + $charset = $this->_rtf->getCharset(); | |
256 | + $text = PHPRtfLite::quoteRtfCode($text); | |
257 | + if ($this->_convertTagsToRtf) { | |
258 | + $text = self::convertTagsToRtf($text, $charset); | |
259 | + } | |
260 | + $text = PHPRtfLite_Utf8::getUnicodeEntities($text, $charset); | |
261 | + } | |
262 | + | |
263 | + $stream->write($this->getOpeningToken()); | |
264 | + | |
265 | + if ($this->_font) { | |
266 | + $stream->write($this->_font->getContent()); | |
267 | + } | |
268 | + if (!$this->isEmptyParagraph() || $this->_isRtfCode) { | |
269 | + $stream->write($text); | |
270 | + } | |
271 | + | |
272 | + $stream->write($this->getClosingToken() . "\r\n"); | |
273 | + } | |
274 | + | |
275 | +} | |
0 | 276 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Element/Hyperlink.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
5 | + | |
6 | + This file is part of PHPRtfLite. | |
7 | + | |
8 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU Lesser General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + PHPRtfLite is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU Lesser General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU Lesser General Public License | |
19 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
20 | +*/ | |
21 | + | |
22 | +/** | |
23 | + * class for creating elements used in containers like sections, footers and headers. | |
24 | + * @version 1.2 | |
25 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
26 | + * @copyright 2010-2012 Steffen Zeidler | |
27 | + * @package PHPRtfLite | |
28 | + * @subpackage PHPRtfLite_Element | |
29 | + */ | |
30 | +class PHPRtfLite_Element_Hyperlink extends PHPRtfLite_Element | |
31 | +{ | |
32 | + | |
33 | + /** | |
34 | + * @var string | |
35 | + */ | |
36 | + protected $_hyperlink = ''; | |
37 | + | |
38 | + | |
39 | + /** | |
40 | + * sets hyperling | |
41 | + * | |
42 | + * @param string $hyperlink | |
43 | + */ | |
44 | + public function setHyperlink($hyperlink) | |
45 | + { | |
46 | + $this->_hyperlink = $hyperlink; | |
47 | + } | |
48 | + | |
49 | + | |
50 | + /** | |
51 | + * gets opening token | |
52 | + * | |
53 | + * @return string | |
54 | + */ | |
55 | + protected function getOpeningToken() | |
56 | + { | |
57 | + $hyperlink = PHPRtfLite::quoteRtfCode($this->_hyperlink); | |
58 | + return '{\field {\*\fldinst {HYPERLINK "' . $hyperlink . '"}}{\\fldrslt {'; | |
59 | + } | |
60 | + | |
61 | + | |
62 | + /** | |
63 | + * gets closing token | |
64 | + * | |
65 | + * @return string | |
66 | + */ | |
67 | + protected function getClosingToken() | |
68 | + { | |
69 | + return '}}}'; | |
70 | + } | |
71 | + | |
72 | +} | |
0 | 73 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Element/Plain.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
5 | + | |
6 | + This file is part of PHPRtfLite. | |
7 | + | |
8 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU Lesser General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + PHPRtfLite is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU Lesser General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU Lesser General Public License | |
19 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
20 | +*/ | |
21 | + | |
22 | +/** | |
23 | + * class for creating elements with plain rtf code. | |
24 | + * @version 1.2 | |
25 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
26 | + * @copyright 2010-2012 Steffen Zeidler | |
27 | + * @package PHPRtfLite | |
28 | + * @subpackage PHPRtfLite_Element | |
29 | + */ | |
30 | + | |
31 | +class PHPRtfLite_Element_Plain extends PHPRtfLite_Element | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * constructor | |
36 | + * | |
37 | + * @param PHPRtfLite $rtf | |
38 | + * @param string $text | |
39 | + * @param PHPRtfLite_Font $font | |
40 | + * @param PHPRtfLite_ParFormat $parFormat | |
41 | + */ | |
42 | + public function __construct( | |
43 | + PHPRtfLite $rtf, | |
44 | + $text, | |
45 | + PHPRtfLite_Font $font = null, | |
46 | + PHPRtfLite_ParFormat $parFormat = null) | |
47 | + { | |
48 | + parent::__construct($rtf, $text, $font, $parFormat); | |
49 | + $this->setIsRtfCode(); | |
50 | + } | |
51 | + | |
52 | + | |
53 | + /** | |
54 | + * gets opening token | |
55 | + * | |
56 | + * @return string | |
57 | + */ | |
58 | + protected function getOpeningToken() | |
59 | + { | |
60 | + return ''; | |
61 | + } | |
62 | + | |
63 | + | |
64 | + /** | |
65 | + * gets closing token | |
66 | + * | |
67 | + * @return string | |
68 | + */ | |
69 | + protected function getClosingToken() | |
70 | + { | |
71 | + return ''; | |
72 | + } | |
73 | + | |
74 | +} | |
0 | 75 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Endnote.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +/* | |
4 | + PHPRtfLite | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * class for creating endnotes in rtf documents. | |
25 | + * @version 1.2 | |
26 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
27 | + * @copyright 2010-2012 Steffen Zeidler | |
28 | + * @package PHPRtfLite_Endnote | |
29 | + */ | |
30 | + | |
31 | +class PHPRtfLite_Endnote extends PHPRtfLite_Footnote | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * gets type as rtf code | |
36 | + * | |
37 | + * @return string | |
38 | + */ | |
39 | + protected function getTypeAsRtfCode() | |
40 | + { | |
41 | + return '\footnote\ftnalt'; | |
42 | + } | |
43 | + | |
44 | +} | |
0 | 45 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Exception.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
5 | + | |
6 | + This file is part of PHPRtfLite. | |
7 | + | |
8 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU Lesser General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + PHPRtfLite is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU Lesser General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU Lesser General Public License | |
19 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
20 | +*/ | |
21 | + | |
22 | +/** | |
23 | + * Class for exceptions within the PHPRtfLite package. | |
24 | + * @version 1.2 | |
25 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
26 | + * @copyright 2010-2012 Steffen Zeidler | |
27 | + * @package PHPRtfLite | |
28 | + */ | |
29 | +class PHPRtfLite_Exception extends Exception | |
30 | +{} | |
0 | 31 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Font.php
0 โ 100644
1 | +<?php | |
2 | +/* | |
3 | + PHPRtfLite | |
4 | + Copyright 2007-2008 Denis Slaveckij <sinedas@gmail.com> | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * Class for fonts in rtf documents. | |
25 | + * @version 1.2 | |
26 | + * @author Denis Slaveckij <sinedas@gmail.com> | |
27 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
28 | + * @copyright 2007-2008 Denis Slaveckij, 2010-2012 Steffen Zeidler | |
29 | + * @package PHPRtfLite | |
30 | + */ | |
31 | +class PHPRtfLite_Font | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * constants for types of animated text | |
36 | + */ | |
37 | + const ANIMATE_LAS_VEGAS_LIGHTS = 1; | |
38 | + const ANIMATE_BLINKING_BACKGROUND = 2; | |
39 | + const ANIMATE_SPARKLE_TEXT = 3; | |
40 | + const ANIMATE_MARCHING_BLACK_ANTS = 4; | |
41 | + const ANIMATE_MARCHING_RED_ANTS = 5; | |
42 | + const ANIMATE_SHIMMER = 6; | |
43 | + | |
44 | + /** | |
45 | + * @var PHPRtfLite_DocHead_ColorTable | |
46 | + */ | |
47 | + protected $_colorTable; | |
48 | + | |
49 | + /** | |
50 | + * @var PHPRtfLite_DocHead_FontTable | |
51 | + */ | |
52 | + protected $_fontTable; | |
53 | + | |
54 | + /** | |
55 | + * font size | |
56 | + * @var integer | |
57 | + */ | |
58 | + protected $_size; | |
59 | + | |
60 | + /** | |
61 | + * font family | |
62 | + * @var string | |
63 | + */ | |
64 | + protected $_fontFamily; | |
65 | + | |
66 | + /** | |
67 | + * font color | |
68 | + * @var string | |
69 | + */ | |
70 | + protected $_color; | |
71 | + | |
72 | + /** | |
73 | + * background color | |
74 | + * @var string | |
75 | + */ | |
76 | + protected $_backgroundColor; | |
77 | + | |
78 | + /** | |
79 | + * true, if font is bold | |
80 | + * @var boolean | |
81 | + */ | |
82 | + protected $_isBold; | |
83 | + | |
84 | + /** | |
85 | + * true, if font is italic | |
86 | + * @var boolean | |
87 | + */ | |
88 | + protected $_isItalic; | |
89 | + | |
90 | + /** | |
91 | + * true, if font is underlined | |
92 | + * @var boolean | |
93 | + */ | |
94 | + protected $_isUnderlined; | |
95 | + | |
96 | + /** | |
97 | + * true, if font is striked | |
98 | + * @var boolean | |
99 | + */ | |
100 | + protected $_isStriked; | |
101 | + | |
102 | + /** | |
103 | + * true, if font is double striked | |
104 | + * @var boolean | |
105 | + */ | |
106 | + protected $_isDoubleStriked; | |
107 | + | |
108 | + /** | |
109 | + * text animation | |
110 | + * @var string | |
111 | + */ | |
112 | + protected $_animation; | |
113 | + | |
114 | + | |
115 | + /** | |
116 | + * constructor | |
117 | + * | |
118 | + * @param integer $size font size | |
119 | + * @param string $fontFamily font family (etc. "Times new Roman", "Arial" and other) | |
120 | + * @param string $color font color | |
121 | + * @param string $backgroundColor background color of font | |
122 | + */ | |
123 | + public function __construct($size = 10, $fontFamily = null, $color = null, $backgroundColor = null) | |
124 | + { | |
125 | + $this->_size = $size; | |
126 | + $this->_fontFamily = $fontFamily; | |
127 | + $this->_color = $color; | |
128 | + $this->_backgroundColor = $backgroundColor; | |
129 | + } | |
130 | + | |
131 | + | |
132 | + /** | |
133 | + * sets rtf color table | |
134 | + * | |
135 | + * @param PHPRtfLite_DocHead_ColorTable $colorTable | |
136 | + */ | |
137 | + public function setColorTable(PHPRtfLite_DocHead_ColorTable $colorTable) | |
138 | + { | |
139 | + if (!empty($this->_color)) { | |
140 | + $colorTable->add($this->_color); | |
141 | + } | |
142 | + if (!empty($this->_backgroundColor)) { | |
143 | + $colorTable->add($this->_backgroundColor); | |
144 | + } | |
145 | + $this->_colorTable = $colorTable; | |
146 | + } | |
147 | + | |
148 | + | |
149 | + /** | |
150 | + * sets rtf font table | |
151 | + * | |
152 | + * @param PHPRtfLite_DocHead_FontTable $fontTable | |
153 | + */ | |
154 | + public function setFontTable(PHPRtfLite_DocHead_FontTable $fontTable) | |
155 | + { | |
156 | + if (!empty($this->_fontFamily)) { | |
157 | + $fontTable->add($this->_fontFamily); | |
158 | + } | |
159 | + $this->_fontTable = $fontTable; | |
160 | + } | |
161 | + | |
162 | + | |
163 | + /** | |
164 | + * gets font family | |
165 | + * | |
166 | + * @return string | |
167 | + */ | |
168 | + public function getFontFamily() | |
169 | + { | |
170 | + return $this->_fontFamily; | |
171 | + } | |
172 | + | |
173 | + | |
174 | + /** | |
175 | + * gets font size | |
176 | + * | |
177 | + * @return integer | |
178 | + */ | |
179 | + public function getSize() | |
180 | + { | |
181 | + return $this->_size; | |
182 | + } | |
183 | + | |
184 | + | |
185 | + /** | |
186 | + * gets font color | |
187 | + * | |
188 | + * @return string | |
189 | + */ | |
190 | + public function getColor() | |
191 | + { | |
192 | + return $this->_color; | |
193 | + } | |
194 | + | |
195 | + | |
196 | + /** | |
197 | + * gets background color | |
198 | + * | |
199 | + * @return string | |
200 | + */ | |
201 | + public function getBackgroundColor() | |
202 | + { | |
203 | + return $this->_backgroundColor; | |
204 | + } | |
205 | + | |
206 | + | |
207 | + /** | |
208 | + * sets text bold | |
209 | + * | |
210 | + * @param boolean $bold | |
211 | + */ | |
212 | + public function setBold($bold = true) | |
213 | + { | |
214 | + $this->_isBold = $bold; | |
215 | + } | |
216 | + | |
217 | + | |
218 | + /** | |
219 | + * returns true, if text is styled bold | |
220 | + * | |
221 | + * @return boolean | |
222 | + */ | |
223 | + public function isBold() | |
224 | + { | |
225 | + return $this->_isBold; | |
226 | + } | |
227 | + | |
228 | + | |
229 | + /** | |
230 | + * sets text italic | |
231 | + * | |
232 | + * @param boolean $italic | |
233 | + */ | |
234 | + public function setItalic($italic = true) | |
235 | + { | |
236 | + $this->_isItalic = $italic; | |
237 | + } | |
238 | + | |
239 | + | |
240 | + /** | |
241 | + * returns true, if text is styled italic | |
242 | + * | |
243 | + * @return boolean | |
244 | + */ | |
245 | + public function isItalic() | |
246 | + { | |
247 | + return $this->_isItalic; | |
248 | + } | |
249 | + | |
250 | + | |
251 | + /** | |
252 | + * sets text underline | |
253 | + * | |
254 | + * @param boolean $underlined | |
255 | + */ | |
256 | + public function setUnderline($underlined = true) | |
257 | + { | |
258 | + $this->_isUnderlined = $underlined; | |
259 | + } | |
260 | + | |
261 | + | |
262 | + /** | |
263 | + * returns true, if text is styled underlined | |
264 | + * | |
265 | + * @return boolean | |
266 | + */ | |
267 | + public function isUnderlined() | |
268 | + { | |
269 | + return $this->_isUnderlined; | |
270 | + } | |
271 | + | |
272 | + | |
273 | + /** | |
274 | + * sets striked text | |
275 | + * | |
276 | + * @param boolean $strike | |
277 | + */ | |
278 | + public function setStriked($striked = true) | |
279 | + { | |
280 | + $this->_isStriked = $striked; | |
281 | + | |
282 | + if ($striked) { | |
283 | + $this->_isDoubleStriked = false; | |
284 | + } | |
285 | + } | |
286 | + | |
287 | + | |
288 | + /** | |
289 | + * returns true, if text is striked | |
290 | + * | |
291 | + * @return boolean | |
292 | + */ | |
293 | + public function isStriked() | |
294 | + { | |
295 | + return $this->_isStriked; | |
296 | + } | |
297 | + | |
298 | + | |
299 | + /** | |
300 | + * sets double striked text | |
301 | + * | |
302 | + * @param boolean $strike | |
303 | + */ | |
304 | + public function setDoubleStriked($striked = true) | |
305 | + { | |
306 | + $this->_isDoubleStriked = $striked; | |
307 | + | |
308 | + if ($striked) { | |
309 | + $this->_isStriked = false; | |
310 | + } | |
311 | + } | |
312 | + | |
313 | + | |
314 | + /** | |
315 | + * returns true, if text is striked double | |
316 | + * | |
317 | + * @return boolean | |
318 | + */ | |
319 | + public function isDoubleStriked() | |
320 | + { | |
321 | + return $this->_isDoubleStriked; | |
322 | + } | |
323 | + | |
324 | + | |
325 | + /** | |
326 | + * sets animation for text | |
327 | + * | |
328 | + * @param integer $animation animation<br> | |
329 | + * Represented by class constants ANIMATE_*<br> | |
330 | + * Possible values:<br> | |
331 | + * ANIMATE_LAS_VEGAS_LIGHTS => 1 - las vegas lights | |
332 | + * ANIMATE_BLINKING_BACKGROUND => 2 - blinking brackground | |
333 | + * ANIMATE_SPARKLE_TEXT => 3 - sparkle text | |
334 | + * ANIMATE_MARCHING_BLACK_ANTS => 4 - marching black ants | |
335 | + * ANIMATE_MARCHING_RED_ANTS => 5 - marching red ants | |
336 | + * ANIMATE_SHIMMER => 6 - shimmer | |
337 | + */ | |
338 | + public function setAnimation($animation) | |
339 | + { | |
340 | + $this->_animation = $animation; | |
341 | + } | |
342 | + | |
343 | + | |
344 | + /** | |
345 | + * gets rtf code of font | |
346 | + * | |
347 | + * @return string rtf code | |
348 | + */ | |
349 | + public function getContent() | |
350 | + { | |
351 | + $content = ''; | |
352 | + | |
353 | + if ($this->_size > 0) { | |
354 | + $content .= '\fs' . ($this->_size * 2) . ' '; | |
355 | + } | |
356 | + | |
357 | + if ($this->_fontFamily && $this->_fontTable) { | |
358 | + $fontIndex = $this->_fontTable->getFontIndex($this->_fontFamily); | |
359 | + if ($fontIndex !== false) { | |
360 | + $content .= '\f' . $fontIndex . ' '; | |
361 | + } | |
362 | + } | |
363 | + | |
364 | + if ($this->_color && $this->_colorTable) { | |
365 | + $colorIndex = $this->_colorTable->getColorIndex($this->_color); | |
366 | + if ($colorIndex !== false) { | |
367 | + $content .= '\cf' . $colorIndex . ' '; | |
368 | + } | |
369 | + } | |
370 | + | |
371 | + if ($this->_backgroundColor && $this->_colorTable) { | |
372 | + $colorIndex = $this->_colorTable->getColorIndex($this->_backgroundColor); | |
373 | + if ($colorIndex !== false) { | |
374 | + $content .= '\chcbpat' . $colorIndex . ' '; | |
375 | + } | |
376 | + } | |
377 | + | |
378 | + if ($this->_isBold) { | |
379 | + $content .= '\b '; | |
380 | + } | |
381 | + if ($this->_isItalic) { | |
382 | + $content .= '\i '; | |
383 | + } | |
384 | + if ($this->_isUnderlined) { | |
385 | + $content .= '\ul '; | |
386 | + } | |
387 | + if ($this->_animation) { | |
388 | + $content .= '\animtext' . $this->_animation; | |
389 | + } | |
390 | + if ($this->_isStriked) { | |
391 | + $content .= '\strike ' . $this->_animation; | |
392 | + } | |
393 | + elseif ($this->_isDoubleStriked) { | |
394 | + $content .= '\striked1 ' . $this->_animation; | |
395 | + } | |
396 | + | |
397 | + return $content; | |
398 | + } | |
399 | + | |
400 | + | |
401 | + /** | |
402 | + * closes font content | |
403 | + * | |
404 | + * @return string | |
405 | + */ | |
406 | + public function getClosingContent() | |
407 | + { | |
408 | + $content = ''; | |
409 | + if ($this->_color) { | |
410 | + $content .= '\cf0 '; | |
411 | + } | |
412 | + if ($this->_backgroundColor) { | |
413 | + $content .= '\chcbpat0 '; | |
414 | + } | |
415 | + if ($this->_isBold) { | |
416 | + $content .= '\b0 '; | |
417 | + } | |
418 | + if ($this->_isItalic) { | |
419 | + $content .= '\i0 '; | |
420 | + } | |
421 | + if ($this->_isUnderlined) { | |
422 | + $content .= '\ul0 '; | |
423 | + } | |
424 | + return $content; | |
425 | + } | |
426 | + | |
427 | +} | |
0 | 428 | \ No newline at end of file | ... | ... |
export/PHPRtfLite-1.3.1/lib/PHPRtfLite/Footnote.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +/* | |
4 | + PHPRtfLite | |
5 | + Copyright 2010-2012 Steffen Zeidler <sigma_z@sigma-scripts.de> | |
6 | + | |
7 | + This file is part of PHPRtfLite. | |
8 | + | |
9 | + PHPRtfLite is free software: you can redistribute it and/or modify | |
10 | + it under the terms of the GNU Lesser General Public License as published by | |
11 | + the Free Software Foundation, either version 3 of the License, or | |
12 | + (at your option) any later version. | |
13 | + | |
14 | + PHPRtfLite is distributed in the hope that it will be useful, | |
15 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + GNU Lesser General Public License for more details. | |
18 | + | |
19 | + You should have received a copy of the GNU Lesser General Public License | |
20 | + along with PHPRtfLite. If not, see <http://www.gnu.org/licenses/>. | |
21 | +*/ | |
22 | + | |
23 | +/** | |
24 | + * class for creating footnotes in rtf documents. | |
25 | + * @version 1.2 | |
26 | + * @author Steffen Zeidler <sigma_z@sigma-scripts.de> | |
27 | + * @copyright 2010-2012 Steffen Zeidler | |
28 | + * @package PHPRtfLite_Footnote | |
29 | + */ | |
30 | + | |
31 | +class PHPRtfLite_Footnote | |
32 | +{ | |
33 | + | |
34 | + /** | |
35 | + * constants for numbering type | |
36 | + * 0 => Arabic numbering (1, 2, 3, ...) | |
37 | + * 1 => Alphabetic lowercase (a, b, c, ...) | |
38 | + * 2 => Alphabetic uppercase (A, B, C, ...) | |
39 | + * 3 => Roman lowercase (i, ii, iii, ...) | |
40 | + * 4 => Roman uppercase (I, II, III, ...) | |
41 | + * 5 => Chicago Manual of Style (*, [dagger], [daggerdbl], ยง) | |
42 | + * 6 => Footnote Korean numbering 1 (*chosung). | |
43 | + * 7 => Footnote Korean numbering 2 (*ganada). | |
44 | + * 8 => Footnote Circle numbering (*circlenum). | |
45 | + * 9 => Footnote kanji numbering without the digit character (*dbnum1). | |
46 | + * 10 => Footnote kanji numbering with the digit character (*dbnum2). | |
47 | + * 11 => Footnote kanji numbering 3 (*dbnum3). | |
48 | + * 12 => Footnote kanji numbering 4 (*dbnum4). | |
49 | + * 13 => Footnote double-byte numbering (*dbchar). | |
50 | + * 14 => Footnote Chinese numbering 1 (*gb1). | |
51 | + * 15 => Footnote Chinese numbering 2 (*gb2). | |
52 | + * 16 => Footnote Chinese numbering 3 (*gb3). | |
53 | + * 17 => Footnote Chinese numbering 4 (*gb4). | |
54 | + * 18 => Footnote numberingโChinese Zodiac numbering 1 (* zodiac1). | |
55 | + * 19 => Footnote numberingโChinese Zodiac numbering 2 (* zodiac2). | |
56 | + * 20 => Footnote numberingโChinese Zodiac numbering 3 (* zodiac3). | |
57 | + */ | |
58 | + const NUMTYPE_ARABIC_NUMBERS = 0; | |
59 | + const NUMTYPE_ALPHABETH_LC = 1; | |
60 | + const NUMTYPE_ALPHABETH_UC = 2; | |
61 | + const NUMTYPE_ROMAN_LC = 3; | |
62 | + const NUMTYPE_ROMAN_UC = 4; | |
63 | + const NUMTYPE_CHICAGO = 5; | |
64 | + const NUMTYPE_KOREAN_1 = 6; | |
65 | + const NUMTYPE_KOREAN_2 = 7; | |
66 | + const NUMTYPE_CIRCLE = 8; | |
67 | + const NUMTYPE_KANJI_1 = 9; | |
68 | + const NUMTYPE_KANJI_2 = 10; | |
69 | + const NUMTYPE_KANJI_3 = 11; | |
70 | + const NUMTYPE_KANJI_4 = 12; | |
71 | + const NUMTYPE_DOUBLE_BYTE = 13; | |
72 | + const NUMTYPE_CHINESE_1 = 14; | |
73 | + const NUMTYPE_CHINESE_2 = 15; | |
74 | + const NUMTYPE_CHINESE_3 = 16; | |
75 | + const NUMTYPE_CHINESE_4 = 17; | |
76 | + const NUMTYPE_CHINESE_ZODIAC_1 = 18; | |
77 | + const NUMTYPE_CHINESE_ZODIAC_2 = 19; | |
78 | + const NUMTYPE_CHINESE_ZODIAC_3 = 20; | |
79 | + | |
80 | + const TYPE_SUPER = 'super'; | |
81 | + const TYPE_SUB = 'sub'; | |
82 | + const TYPE_NORMAL = 'normal'; | |
83 | + | |
84 | + /** | |
85 | + * footnote/endnote text | |
86 | + * @var string | |
87 | + */ | |
88 | + protected $_text; | |
89 | + | |
90 | + /** | |
91 | + * font | |
92 | + * @var PHPRtfLite_Font | |
93 | + */ | |
94 | + protected $_font; | |
95 | + | |
96 | + /** | |
97 | + * paragraph format | |
98 | + * @var PHPRtfLite_ParFormat | |
99 | + */ | |
100 | + protected $_parFormat; | |
101 | + | |
102 | + /** | |
103 | + * rtf document | |
104 | + * @var PHPRtfLite | |
105 | + */ | |
106 | + protected $_rtf; | |
107 | + | |
108 | + /** | |
109 | + * type setting type (superscript/subscript/normal) | |
110 | + * @var string | |
111 | + */ | |
112 | + protected $_typeSettingType = self::TYPE_SUPER; | |
113 | + | |
114 | + /** | |
115 | + * default font | |
116 | + * @var PHPRtfLite_Font | |
117 | + */ | |
118 | + protected static $_defaultFont; | |
119 | + | |
120 | + | |
121 | + /** | |
122 | + * construtor | |
123 | + * | |
124 | + * @param PHPRtfLite $rtf | |
125 | + * @param string $text | |
126 | + * @param PHPRtfLite_Font $font if font is not set, use defaultFont | |
127 | + * @param PHPRtfLite_ParFormat $parFormat | |
128 | + */ | |
129 | + public function __construct(PHPRtfLite $rtf, | |
130 | + $text, | |
131 | + PHPRtfLite_Font $font = null, | |
132 | + PHPRtfLite_ParFormat $parFormat = null) | |
133 | + { | |
134 | + $this->_rtf = $rtf; | |
135 | + $this->_text = $text; | |
136 | + | |
137 | + if (!$font && self::$_defaultFont) { | |
138 | + $font = self::$_defaultFont; | |
139 | + } | |
140 | + | |
141 | + if ($font) { | |
142 | + $rtf->registerFont($font); | |
143 | + } | |
144 | + | |
145 | + if ($parFormat) { | |
146 | + $rtf->registerParFormat($parFormat); | |
147 | + } | |
148 | + | |
149 | + $this->_font = $font; | |
150 | + $this->_parFormat = $parFormat; | |
151 | + } | |
152 | + | |
153 | + | |
154 | + /** | |
155 | + * sets default font for notes | |
156 | + * | |
157 | + * @param PHPRtfLite_Font $font | |
158 | + */ | |
159 | + public static function setDefaultFont(PHPRtfLite_Font $font) | |
160 | + { | |
161 | + self::$_defaultFont = $font; | |
162 | + } | |
163 | + | |
164 | + | |
165 | + /** | |
166 | + * gets default font | |
167 | + * | |
168 | + * @return PHPRtfLite_Font | |
169 | + */ | |
170 | + public static function getDefaultFont() | |
171 | + { | |
172 | + return self::$_defaultFont; | |
173 | + } | |
174 | + | |
175 | + | |
176 | + /** | |
177 | + * sets font | |
178 | + * | |
179 | + * @param PHPRtfLite_Font $font | |
180 | + */ | |
181 | + public function setFont(PHPRtfLite_Font $font) | |
182 | + { | |
183 | + $this->_rtf->registerFont($font); | |
184 | + $this->_font = $font; | |
185 | + } | |
186 | + | |
187 | + | |
188 | + /** | |
189 | + * gets font | |
190 | + * | |
191 | + * @return PHPRtfLite_Font | |
192 | + */ | |
193 | + public function getFont() | |
194 | + { | |
195 | + return $this->_font; | |
196 | + } | |
197 | + | |
198 | + | |
199 | + /** | |
200 | + * sets paragraph format | |
201 | + * | |
202 | + * @param PHPRtfLite_ParFormat $parFormat | |
203 | + */ | |
204 | + public function setParFormat(PHPRtfLite_ParFormat $parFormat) | |
205 | + { | |
206 | + $this->_rtf->registerParFormat($parFormat); | |
207 | + $this->_parFormat = $parFormat; | |
208 | + } | |
209 | + | |
210 | + | |
211 | + /** | |
212 | + * gets paragraph format | |
213 | + * | |
214 | + * @return PHPRtfLite_ParFormat | |
215 | + */ | |
216 | + public function getParFormat() | |
217 | + { | |
218 | + return $this->_parFormat; | |
219 | + } | |
220 | + | |
221 | + | |
222 | + public function setTypeSettingType($type) | |
223 | + { | |
224 | + $this->_typeSettingType = $type; | |
225 | + } | |
226 | + | |
227 | + | |
228 | + /** | |
229 | + * gets type as rtf code | |
230 | + * | |
231 | + * @return string | |
232 | + */ | |
233 | + protected function getTypeAsRtfCode() | |
234 | + { | |
235 | + return '\footnote'; | |
236 | + } | |
237 | + | |
238 | + | |
239 | + /** | |
240 | + * renders footnote/endnote | |
241 | + */ | |
242 | + public function render() | |
243 | + { | |
244 | + $stream = $this->_rtf->getWriter(); | |
245 | + | |
246 | + $typeSetting = $this->_typeSettingType != self::TYPE_NORMAL | |
247 | + ? '\\' . $this->_typeSettingType | |
248 | + : ''; | |
249 | + | |
250 | + $stream->write( | |
251 | + '{' . $typeSetting . '\chftn}' | |
252 | + . '{' . $this->getTypeAsRtfCode() | |
253 | + . '\pard\plain\lin283\fi-283 ' | |
254 | + ); | |
255 | + | |
256 | + if ($this->_parFormat) { | |
257 | + $stream->write($this->_parFormat->getContent()); | |
258 | + } | |
259 | + if ($this->_font) { | |
260 | + $stream->write($this->_font->getContent()); | |
261 | + } | |
262 | + | |
263 | + $stream->write('{\up6\chftn}' . "\r\n" | |
264 | + . PHPRtfLite::quoteRtfCode($this->_text) | |
265 | + . '} '); | |
266 | + } | |
267 | + | |
268 | +} | |
0 | 269 | \ No newline at end of file | ... | ... |