From f82f872885bad371192da236d69ee1db07dfc141 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 16 Jun 2009 08:47:07 +0000 Subject: [PATCH] Ajout librairie HTML2PDF version 3.22a --- includes/html2pdf/_LGPL.txt | 165 + includes/html2pdf/_balises_html.xls | Bin 0 -> 35840 bytes includes/html2pdf/_fpdf/FAQ.htm | 339 ++ .../html2pdf/_fpdf/doc/acceptpagebreak.htm | 63 + includes/html2pdf/_fpdf/doc/addfont.htm | 55 + includes/html2pdf/_fpdf/doc/addlink.htm | 26 + includes/html2pdf/_fpdf/doc/addpage.htm | 56 + includes/html2pdf/_fpdf/doc/aliasnbpages.htm | 45 + includes/html2pdf/_fpdf/doc/cell.htm | 104 + includes/html2pdf/_fpdf/doc/close.htm | 21 + includes/html2pdf/_fpdf/doc/error.htm | 25 + includes/html2pdf/_fpdf/doc/footer.htm | 35 + includes/html2pdf/_fpdf/doc/fpdf.htm | 63 + .../html2pdf/_fpdf/doc/getstringwidth.htm | 23 + includes/html2pdf/_fpdf/doc/getx.htm | 20 + includes/html2pdf/_fpdf/doc/gety.htm | 20 + includes/html2pdf/_fpdf/doc/header.htm | 37 + includes/html2pdf/_fpdf/doc/image.htm | 86 + includes/html2pdf/_fpdf/doc/index.htm | 57 + includes/html2pdf/_fpdf/doc/line.htm | 38 + includes/html2pdf/_fpdf/doc/link.htm | 46 + includes/html2pdf/_fpdf/doc/ln.htm | 28 + includes/html2pdf/_fpdf/doc/multicell.htm | 76 + includes/html2pdf/_fpdf/doc/output.htm | 42 + includes/html2pdf/_fpdf/doc/pageno.htm | 18 + includes/html2pdf/_fpdf/doc/rect.htm | 48 + includes/html2pdf/_fpdf/doc/setauthor.htm | 33 + .../html2pdf/_fpdf/doc/setautopagebreak.htm | 33 + .../html2pdf/_fpdf/doc/setcompression.htm | 31 + includes/html2pdf/_fpdf/doc/setcreator.htm | 34 + .../html2pdf/_fpdf/doc/setdisplaymode.htm | 47 + includes/html2pdf/_fpdf/doc/setdrawcolor.htm | 41 + includes/html2pdf/_fpdf/doc/setfillcolor.htm | 40 + includes/html2pdf/_fpdf/doc/setfont.htm | 92 + includes/html2pdf/_fpdf/doc/setfontsize.htm | 25 + includes/html2pdf/_fpdf/doc/setkeywords.htm | 33 + includes/html2pdf/_fpdf/doc/setleftmargin.htm | 30 + includes/html2pdf/_fpdf/doc/setlinewidth.htm | 29 + includes/html2pdf/_fpdf/doc/setlink.htm | 34 + includes/html2pdf/_fpdf/doc/setmargins.htm | 37 + .../html2pdf/_fpdf/doc/setrightmargin.htm | 28 + includes/html2pdf/_fpdf/doc/setsubject.htm | 33 + includes/html2pdf/_fpdf/doc/settextcolor.htm | 40 + includes/html2pdf/_fpdf/doc/settitle.htm | 33 + includes/html2pdf/_fpdf/doc/settopmargin.htm | 28 + includes/html2pdf/_fpdf/doc/setx.htm | 29 + includes/html2pdf/_fpdf/doc/setxy.htm | 31 + includes/html2pdf/_fpdf/doc/sety.htm | 29 + includes/html2pdf/_fpdf/doc/text.htm | 39 + includes/html2pdf/_fpdf/doc/write.htm | 51 + includes/html2pdf/_fpdf/font/courier.php | 7 + includes/html2pdf/_fpdf/font/helvetica.php | 15 + includes/html2pdf/_fpdf/font/helveticab.php | 15 + includes/html2pdf/_fpdf/font/helveticabi.php | 15 + includes/html2pdf/_fpdf/font/helveticai.php | 15 + .../html2pdf/_fpdf/font/makefont/cp1250.map | 251 + .../html2pdf/_fpdf/font/makefont/cp1251.map | 255 + .../html2pdf/_fpdf/font/makefont/cp1252.map | 251 + .../html2pdf/_fpdf/font/makefont/cp1253.map | 239 + .../html2pdf/_fpdf/font/makefont/cp1254.map | 249 + .../html2pdf/_fpdf/font/makefont/cp1255.map | 233 + .../html2pdf/_fpdf/font/makefont/cp1257.map | 244 + .../html2pdf/_fpdf/font/makefont/cp1258.map | 247 + .../html2pdf/_fpdf/font/makefont/cp874.map | 225 + .../_fpdf/font/makefont/iso-8859-1.map | 256 + .../_fpdf/font/makefont/iso-8859-11.map | 248 + .../_fpdf/font/makefont/iso-8859-15.map | 256 + .../_fpdf/font/makefont/iso-8859-16.map | 256 + .../_fpdf/font/makefont/iso-8859-2.map | 256 + .../_fpdf/font/makefont/iso-8859-4.map | 256 + .../_fpdf/font/makefont/iso-8859-5.map | 256 + .../_fpdf/font/makefont/iso-8859-7.map | 250 + .../_fpdf/font/makefont/iso-8859-9.map | 256 + .../html2pdf/_fpdf/font/makefont/koi8-r.map | 256 + .../html2pdf/_fpdf/font/makefont/koi8-u.map | 256 + .../html2pdf/_fpdf/font/makefont/makefont.php | 419 ++ includes/html2pdf/_fpdf/font/symbol.php | 15 + includes/html2pdf/_fpdf/font/times.php | 15 + includes/html2pdf/_fpdf/font/timesb.php | 15 + includes/html2pdf/_fpdf/font/timesbi.php | 15 + includes/html2pdf/_fpdf/font/timesi.php | 15 + includes/html2pdf/_fpdf/font/zapfdingbats.php | 15 + includes/html2pdf/_fpdf/fpdf.css | 21 + includes/html2pdf/_fpdf/fpdf.php | 1734 ++++++ includes/html2pdf/_fpdf/histo.htm | 128 + includes/html2pdf/_fpdf/install.txt | 26 + includes/html2pdf/_fpdf/license.txt | 6 + includes/html2pdf/_fpdf/tutorial/20k_c1.txt | 10 + includes/html2pdf/_fpdf/tutorial/20k_c2.txt | 23 + includes/html2pdf/_fpdf/tutorial/calligra.afm | 275 + includes/html2pdf/_fpdf/tutorial/calligra.php | 24 + includes/html2pdf/_fpdf/tutorial/calligra.ttf | Bin 0 -> 40120 bytes .../html2pdf/_fpdf/tutorial/countries.txt | 15 + includes/html2pdf/_fpdf/tutorial/index.htm | 21 + includes/html2pdf/_fpdf/tutorial/logo.png | Bin 0 -> 2373 bytes includes/html2pdf/_fpdf/tutorial/logo_pb.png | Bin 0 -> 2656 bytes includes/html2pdf/_fpdf/tutorial/makefont.php | 6 + includes/html2pdf/_fpdf/tutorial/tuto1.htm | 77 + includes/html2pdf/_fpdf/tutorial/tuto1.php | 9 + includes/html2pdf/_fpdf/tutorial/tuto2.htm | 80 + includes/html2pdf/_fpdf/tutorial/tuto2.php | 41 + includes/html2pdf/_fpdf/tutorial/tuto3.htm | 116 + includes/html2pdf/_fpdf/tutorial/tuto3.php | 83 + includes/html2pdf/_fpdf/tutorial/tuto4.htm | 136 + includes/html2pdf/_fpdf/tutorial/tuto4.php | 113 + includes/html2pdf/_fpdf/tutorial/tuto5.htm | 133 + includes/html2pdf/_fpdf/tutorial/tuto5.php | 101 + includes/html2pdf/_fpdf/tutorial/tuto6.htm | 163 + includes/html2pdf/_fpdf/tutorial/tuto6.php | 122 + includes/html2pdf/_fpdf/tutorial/tuto7.htm | 303 ++ includes/html2pdf/_fpdf/tutorial/tuto7.php | 11 + includes/html2pdf/_lisez_moi.txt | 181 + .../html2pdf/_mypdf/00_fpdf_codebar.class.php | 238 + .../_mypdf/01_fpdf_bookmark.class.php | 167 + .../_mypdf/02_fpdf_formulaire.class.php | 228 + .../_mypdf/99_fpdf_protection.class.php | 229 + includes/html2pdf/_mypdf/mypdf.class.php | 485 ++ includes/html2pdf/_read_me.txt | 79 + includes/html2pdf/html2pdf.class.php | 4644 +++++++++++++++++ includes/html2pdf/langues/ca.txt | 19 + includes/html2pdf/langues/de.txt | 19 + includes/html2pdf/langues/en.txt | 19 + includes/html2pdf/langues/es.txt | 19 + includes/html2pdf/langues/fr.txt | 19 + includes/html2pdf/langues/it.txt | 19 + includes/html2pdf/langues/nl.txt | 19 + includes/html2pdf/langues/pt.txt | 19 + includes/html2pdf/langues/tr.txt | 19 + includes/html2pdf/parsingHTML.class.php | 421 ++ includes/html2pdf/styleHTML.class.php | 1440 +++++ 130 files changed, 20048 insertions(+) create mode 100644 includes/html2pdf/_LGPL.txt create mode 100644 includes/html2pdf/_balises_html.xls create mode 100644 includes/html2pdf/_fpdf/FAQ.htm create mode 100644 includes/html2pdf/_fpdf/doc/acceptpagebreak.htm create mode 100644 includes/html2pdf/_fpdf/doc/addfont.htm create mode 100644 includes/html2pdf/_fpdf/doc/addlink.htm create mode 100644 includes/html2pdf/_fpdf/doc/addpage.htm create mode 100644 includes/html2pdf/_fpdf/doc/aliasnbpages.htm create mode 100644 includes/html2pdf/_fpdf/doc/cell.htm create mode 100644 includes/html2pdf/_fpdf/doc/close.htm create mode 100644 includes/html2pdf/_fpdf/doc/error.htm create mode 100644 includes/html2pdf/_fpdf/doc/footer.htm create mode 100644 includes/html2pdf/_fpdf/doc/fpdf.htm create mode 100644 includes/html2pdf/_fpdf/doc/getstringwidth.htm create mode 100644 includes/html2pdf/_fpdf/doc/getx.htm create mode 100644 includes/html2pdf/_fpdf/doc/gety.htm create mode 100644 includes/html2pdf/_fpdf/doc/header.htm create mode 100644 includes/html2pdf/_fpdf/doc/image.htm create mode 100644 includes/html2pdf/_fpdf/doc/index.htm create mode 100644 includes/html2pdf/_fpdf/doc/line.htm create mode 100644 includes/html2pdf/_fpdf/doc/link.htm create mode 100644 includes/html2pdf/_fpdf/doc/ln.htm create mode 100644 includes/html2pdf/_fpdf/doc/multicell.htm create mode 100644 includes/html2pdf/_fpdf/doc/output.htm create mode 100644 includes/html2pdf/_fpdf/doc/pageno.htm create mode 100644 includes/html2pdf/_fpdf/doc/rect.htm create mode 100644 includes/html2pdf/_fpdf/doc/setauthor.htm create mode 100644 includes/html2pdf/_fpdf/doc/setautopagebreak.htm create mode 100644 includes/html2pdf/_fpdf/doc/setcompression.htm create mode 100644 includes/html2pdf/_fpdf/doc/setcreator.htm create mode 100644 includes/html2pdf/_fpdf/doc/setdisplaymode.htm create mode 100644 includes/html2pdf/_fpdf/doc/setdrawcolor.htm create mode 100644 includes/html2pdf/_fpdf/doc/setfillcolor.htm create mode 100644 includes/html2pdf/_fpdf/doc/setfont.htm create mode 100644 includes/html2pdf/_fpdf/doc/setfontsize.htm create mode 100644 includes/html2pdf/_fpdf/doc/setkeywords.htm create mode 100644 includes/html2pdf/_fpdf/doc/setleftmargin.htm create mode 100644 includes/html2pdf/_fpdf/doc/setlinewidth.htm create mode 100644 includes/html2pdf/_fpdf/doc/setlink.htm create mode 100644 includes/html2pdf/_fpdf/doc/setmargins.htm create mode 100644 includes/html2pdf/_fpdf/doc/setrightmargin.htm create mode 100644 includes/html2pdf/_fpdf/doc/setsubject.htm create mode 100644 includes/html2pdf/_fpdf/doc/settextcolor.htm create mode 100644 includes/html2pdf/_fpdf/doc/settitle.htm create mode 100644 includes/html2pdf/_fpdf/doc/settopmargin.htm create mode 100644 includes/html2pdf/_fpdf/doc/setx.htm create mode 100644 includes/html2pdf/_fpdf/doc/setxy.htm create mode 100644 includes/html2pdf/_fpdf/doc/sety.htm create mode 100644 includes/html2pdf/_fpdf/doc/text.htm create mode 100644 includes/html2pdf/_fpdf/doc/write.htm create mode 100644 includes/html2pdf/_fpdf/font/courier.php create mode 100644 includes/html2pdf/_fpdf/font/helvetica.php create mode 100644 includes/html2pdf/_fpdf/font/helveticab.php create mode 100644 includes/html2pdf/_fpdf/font/helveticabi.php create mode 100644 includes/html2pdf/_fpdf/font/helveticai.php create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1250.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1251.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1252.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1253.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1254.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1255.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1257.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp1258.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/cp874.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-1.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-11.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-15.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-16.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-2.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-4.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-5.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-7.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/iso-8859-9.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/koi8-r.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/koi8-u.map create mode 100644 includes/html2pdf/_fpdf/font/makefont/makefont.php create mode 100644 includes/html2pdf/_fpdf/font/symbol.php create mode 100644 includes/html2pdf/_fpdf/font/times.php create mode 100644 includes/html2pdf/_fpdf/font/timesb.php create mode 100644 includes/html2pdf/_fpdf/font/timesbi.php create mode 100644 includes/html2pdf/_fpdf/font/timesi.php create mode 100644 includes/html2pdf/_fpdf/font/zapfdingbats.php create mode 100644 includes/html2pdf/_fpdf/fpdf.css create mode 100644 includes/html2pdf/_fpdf/fpdf.php create mode 100644 includes/html2pdf/_fpdf/histo.htm create mode 100644 includes/html2pdf/_fpdf/install.txt create mode 100644 includes/html2pdf/_fpdf/license.txt create mode 100644 includes/html2pdf/_fpdf/tutorial/20k_c1.txt create mode 100644 includes/html2pdf/_fpdf/tutorial/20k_c2.txt create mode 100644 includes/html2pdf/_fpdf/tutorial/calligra.afm create mode 100644 includes/html2pdf/_fpdf/tutorial/calligra.php create mode 100644 includes/html2pdf/_fpdf/tutorial/calligra.ttf create mode 100644 includes/html2pdf/_fpdf/tutorial/countries.txt create mode 100644 includes/html2pdf/_fpdf/tutorial/index.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/logo.png create mode 100644 includes/html2pdf/_fpdf/tutorial/logo_pb.png create mode 100644 includes/html2pdf/_fpdf/tutorial/makefont.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto1.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto1.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto2.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto2.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto3.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto3.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto4.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto4.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto5.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto5.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto6.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto6.php create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto7.htm create mode 100644 includes/html2pdf/_fpdf/tutorial/tuto7.php create mode 100644 includes/html2pdf/_lisez_moi.txt create mode 100644 includes/html2pdf/_mypdf/00_fpdf_codebar.class.php create mode 100644 includes/html2pdf/_mypdf/01_fpdf_bookmark.class.php create mode 100644 includes/html2pdf/_mypdf/02_fpdf_formulaire.class.php create mode 100644 includes/html2pdf/_mypdf/99_fpdf_protection.class.php create mode 100644 includes/html2pdf/_mypdf/mypdf.class.php create mode 100644 includes/html2pdf/_read_me.txt create mode 100644 includes/html2pdf/html2pdf.class.php create mode 100644 includes/html2pdf/langues/ca.txt create mode 100644 includes/html2pdf/langues/de.txt create mode 100644 includes/html2pdf/langues/en.txt create mode 100644 includes/html2pdf/langues/es.txt create mode 100644 includes/html2pdf/langues/fr.txt create mode 100644 includes/html2pdf/langues/it.txt create mode 100644 includes/html2pdf/langues/nl.txt create mode 100644 includes/html2pdf/langues/pt.txt create mode 100644 includes/html2pdf/langues/tr.txt create mode 100644 includes/html2pdf/parsingHTML.class.php create mode 100644 includes/html2pdf/styleHTML.class.php diff --git a/includes/html2pdf/_LGPL.txt b/includes/html2pdf/_LGPL.txt new file mode 100644 index 000000000..e8bec28df --- /dev/null +++ b/includes/html2pdf/_LGPL.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/includes/html2pdf/_balises_html.xls b/includes/html2pdf/_balises_html.xls new file mode 100644 index 0000000000000000000000000000000000000000..ec70bbff992485e3e48ea117cf1b29312f8688b2 GIT binary patch literal 35840 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 b&c)_il!04!R$iezSR(q0%g;rhVgCOIjMcZw literal 0 HcmV?d00001 diff --git a/includes/html2pdf/_fpdf/FAQ.htm b/includes/html2pdf/_fpdf/FAQ.htm new file mode 100644 index 000000000..ab38c1fac --- /dev/null +++ b/includes/html2pdf/_fpdf/FAQ.htm @@ -0,0 +1,339 @@ + + + + +FAQ + + + + +

FAQ

+
+ +
    +
  • +

    1. What's exactly the license of FPDF? Are there any usage restrictions?

    +FPDF is released under a permissive license: there is no usage restriction. You may embed it +freely in your application (commercial or not), with or without modifications. +
  • + +
  • +

    2. When I try to create a PDF, a lot of weird characters show on the screen. Why?

    +These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of +IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly +without launching Acrobat. This happens frequently during the development stage: on the least +script error, an HTML page is sent, and after correction, the PDF arrives. +
    +To solve the problem, simply quit and restart IE. You can also go to another URL and come +back. +
    +To avoid this kind of inconvenience during the development, you can generate the PDF directly +to a file and open it through the explorer. +
  • + +
  • +

    3. I try to generate a PDF and IE displays a blank page. What happens?

    +First of all, check that you send nothing to the browser after the PDF (not even a space or a +carriage return). You can put an exit statement just after the call to the Output() method to +be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE +used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems +in a reliable manner, two main techniques exist: +
    +
    +- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go +to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next +time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck +the option "Always ask before opening this type of file" and choose Open. From now on, PDF files +will open automatically in an external Acrobat window. +
    +The drawback of the method is that you need to alter the client configuration, which you can do +in an intranet environment but not for the Internet. +
    +
    +- Use a redirection technique. It consists in generating the PDF in a temporary file on the server +and redirect the client to it. For example, at the end of the script, you can put the following: +
    +
    //Determine a temporary file name in the current directory
    +$file = basename(tempnam('.', 'tmp'));
    +rename($file, $file.'.pdf');
    +$file .= '.pdf';
    +//Save PDF to file
    +$pdf->Output($file, 'F');
    +//Redirect
    +header('Location: '.$file);
    +
    +This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do +some cleaning in order to delete the temporary files. For example: +
    +
    function CleanFiles($dir)
    +{
    +    //Delete temporary files
    +    $t = time();
    +    $h = opendir($dir);
    +    while($file=readdir($h))
    +    {
    +        if(substr($file,0,3)=='tmp' and substr($file,-4)=='.pdf')
    +        {
    +            $path = $dir.'/'.$file;
    +            if($t-filemtime($path)>3600)
    +                @unlink($path);
    +        }
    +    }
    +    closedir($h);
    +}
    +
    +This function deletes all files of the form tmp*.pdf older than an hour in the specified +directory. You may call it where you want, for example in the script which generates the PDF. +
  • + +
  • +

    4. I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.

    +You have to enclose your string with double quotes, not single ones. +
  • + +
  • +

    5. I try to display a variable in the Header method but nothing prints.

    +You have to use the global keyword to access global variables, for example: +
    +
    function Header()
    +{
    +    global $title;
    +
    +    $this->SetFont('Arial', 'B', 15);
    +    $this->Cell(0, 10, $title, 1, 1, 'C');
    +}
    +
    +$title = 'My title';
    +
    +Alternatively, you can use an object property: +
    +
    function Header()
    +{
    +    $this->SetFont('Arial', 'B', 15);
    +    $this->Cell(0, 10, $this->title, 1, 1, 'C');
    +}
    +
    +$pdf->title = 'My title';
    +
    +
  • + +
  • +

    6. I defined the Header and Footer methods in my PDF class but nothing appears.

    +You have to create an object from the PDF class, not FPDF: +
    +
    $pdf = new PDF();
    +
    +
  • + +
  • +

    7. Accented characters are replaced by some strange characters like é.

    +Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252. +It is possible to perform a conversion to ISO-8859-1 with utf8_decode(): +
    +
    $str = utf8_decode($str);
    +
    +But some characters such as Euro won't be translated correctly. If the iconv extension is available, the +right way to do it is the following: +
    +
    $str = iconv('UTF-8', 'windows-1252', $str);
    +
    +
  • + +
  • +

    8. I try to display the Euro symbol but it doesn't work.

    +The standard fonts have the Euro character at position 128. You can define a constant like this +for convenience: +
    +
    define('EURO', chr(128));
    +
    +
  • + +
  • +

    9. I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file

    +You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. +You may have this other message just before:
    +
    +Warning: Cannot modify header information - headers already sent by (output started at script.php:X)
    +
    +It means that script.php outputs something at line X. Go to this line and fix it. +In case the warning doesn't show, add this at the very beginning of your script: +
    +
    ob_end_clean();
    +
    +If you still don't see it, disable zlib.output_compression in your php.ini. +
  • + +
  • +

    10. I draw a frame with very precise dimensions, but when printed I notice some differences.

    +To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box. +
  • + +
  • +

    11. I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?

    +Printers have physical margins (different depending on the models); it is therefore impossible to remove +them and print on the whole surface of the paper. +
  • + +
  • +

    12. How can I put a background in my PDF?

    +For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect(). +
  • + +
  • +

    13. How can I set a specific header or footer on the first page?

    +Simply test the page number: +
    +
    function Header()
    +{
    +    if($this->PageNo()==1)
    +    {
    +        //First page
    +        ...
    +    }
    +    else
    +    {
    +        //Other pages
    +        ...
    +    }
    +}
    +
    +
  • + +
  • +

    14. I'd like to use extensions provided by different scripts. How can I combine them?

    +Use an inheritance chain. If you have two classes, say A in a.php: +
    +
    require('fpdf.php');
    +
    +class A extends FPDF
    +{
    +...
    +}
    +
    +and B in b.php: +
    +
    require('fpdf.php');
    +
    +class B extends FPDF
    +{
    +...
    +}
    +
    +then make B extend A: +
    +
    require('a.php');
    +
    +class B extends A
    +{
    +...
    +}
    +
    +and make your own class extend B: +
    +
    require('b.php');
    +
    +class PDF extends B
    +{
    +...
    +}
    +
    +$pdf = new PDF();
    +
    +
  • + +
  • +

    15. How can I send the PDF by email?

    +As any other file, but an easy way is to use PHPMailer and +its in-memory attachment: +
    +
    $mail = new PHPMailer();
    +...
    +$doc = $pdf->Output('', 'S');
    +$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
    +$mail->Send();
    +
    +
  • + +
  • +

    16. What's the limit of the file sizes I can generate with FPDF?

    +There is no particular limit. There are some constraints, however: +
    +
    +- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents, +especially with images, this limit may be reached (the file being built into memory). The +parameter is configured in the php.ini file. +
    +
    +- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily +reached. It is configured in php.ini and may be altered dynamically with set_time_limit(). +
    +
    +- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and +reach the limit, it will be lost. It is therefore advised for very big documents to +generate them in a file, and to send some data to the browser from time to time (with a call +to flush() to force the output). When the document is finished, you can send a redirection to +it or create a link. +
    +Remark: even if the browser times out, the script may continue to run on the server. +
  • + +
  • +

    17. Can I modify a PDF with FPDF?

    +It is possible to import pages from an existing PDF document thanks to the FPDI extension:
    +
    +http://www.setasign.de/products/pdf-php-solutions/fpdi/
    +
    +You can then add some content to them. +
  • + +
  • +

    18. I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?

    +No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from +a PDF. It is provided with the Xpdf package:
    +
    +http://www.foolabs.com/xpdf/ +
  • + +
  • +

    19. Can I convert an HTML page to PDF with FPDF?

    +Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:
    +
    +http://www.htmldoc.org +
  • + +
  • +

    20. Can I concatenate PDF files with FPDF?

    +Not directly, but it is possible to use FPDI +to perform this task. Some free command-line tools also exist:
    +
    +mbtPdfAsm
    +pdftk +
  • +
+ + diff --git a/includes/html2pdf/_fpdf/doc/acceptpagebreak.htm b/includes/html2pdf/_fpdf/doc/acceptpagebreak.htm new file mode 100644 index 000000000..ea067b5b6 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/acceptpagebreak.htm @@ -0,0 +1,63 @@ + + + + +AcceptPageBreak + + + +

AcceptPageBreak

+boolean AcceptPageBreak() +

Description

+Whenever a page break condition is met, the method is called, and the break is issued or not +depending on the returned value. The default implementation returns a value according to the +mode selected by SetAutoPageBreak(). +
+This method is called automatically and should not be called directly by the application. +

Example

+The method is overriden in an inherited class in order to obtain a 3 column layout: +
+
class PDF extends FPDF
+{
+var $col=0;
+
+function SetCol($col)
+{
+    //Move position to a column
+    $this->col=$col;
+    $x=10+$col*65;
+    $this->SetLeftMargin($x);
+    $this->SetX($x);
+}
+
+function AcceptPageBreak()
+{
+    if($this->col<2)
+    {
+        //Go to next column
+        $this->SetCol($this->col+1);
+        $this->SetY(10);
+        return false;
+    }
+    else
+    {
+        //Go back to first column and issue page break
+        $this->SetCol(0);
+        return true;
+    }
+}
+}
+
+$pdf=new PDF();
+$pdf->AddPage();
+$pdf->SetFont('Arial','',12);
+for($i=1;$i<=300;$i++)
+    $pdf->Cell(0,5,"Line $i",0,1);
+$pdf->Output();
+
+

See also

+SetAutoPageBreak(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/addfont.htm b/includes/html2pdf/_fpdf/doc/addfont.htm new file mode 100644 index 000000000..15c156f5c --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/addfont.htm @@ -0,0 +1,55 @@ + + + + +AddFont + + + +

AddFont

+AddFont(string family [, string style [, string file]]) +

Description

+Imports a TrueType or Type1 font and makes it available. It is necessary to generate a font +definition file first with the makefont.php utility. +
+The definition file (and the font file itself when embedding) must be present in the font directory. +If it is not found, the error "Could not include font definition file" is generated. +

Parameters

+
+
family
+
+Font family. The name can be chosen arbitrarily. If it is a standard family name, it will +override the corresponding font. +
+
style
+
+Font style. Possible values are (case insensitive): +
    +
  • empty string: regular
  • +
  • B: bold
  • +
  • I: italic
  • +
  • BI or IB: bold italic
  • +
+The default value is regular. +
+
file
+
+The font definition file. +
+By default, the name is built from the family and style, in lower case with no space. +
+
+

Example

+
+
$pdf->AddFont('Comic','I');
+
+is equivalent to: +
+
$pdf->AddFont('Comic','I','comici.php');
+
+

See also

+SetFont(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/addlink.htm b/includes/html2pdf/_fpdf/doc/addlink.htm new file mode 100644 index 000000000..5681d588d --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/addlink.htm @@ -0,0 +1,26 @@ + + + + +AddLink + + + +

AddLink

+int AddLink() +

Description

+Creates a new internal link and returns its identifier. An internal link is a clickable area +which directs to another place within the document. +
+The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is +defined with SetLink(). +

See also

+Cell(), +Write(), +Image(), +Link(), +SetLink(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/addpage.htm b/includes/html2pdf/_fpdf/doc/addpage.htm new file mode 100644 index 000000000..f88d8ac70 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/addpage.htm @@ -0,0 +1,56 @@ + + + + +AddPage + + + +

AddPage

+AddPage([string orientation ,[ mixed format]]) +

Description

+Adds a new page to the document. If a page is already present, the Footer() method is called +first to output the footer. Then the page is added, the current position set to the top-left +corner according to the left and top margins, and Header() is called to display the header. +
+The font which was set before calling is automatically restored. There is no need to call +SetFont() again if you want to continue with the same font. The same is true for colors and +line width. +
+The origin of the coordinate system is at the top-left corner and increasing ordinates go +downwards. +

Parameters

+
+
orientation
+
+Page orientation. Possible values are (case insensitive): +
    +
  • P or Portrait
  • +
  • L or Landscape
  • +
+The default value is the one passed to the constructor. +
+
format
+
+Page format. It can be either one of the following values (case insensitive): +
    +
  • A3
  • +
  • A4
  • +
  • A5
  • +
  • Letter
  • +
  • Legal
  • +
+or an array containing the width and the height (expressed in user unit).
+
+The default value is the one passed to the constructor. +
+
+

See also

+FPDF(), +Header(), +Footer(), +SetMargins(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/aliasnbpages.htm b/includes/html2pdf/_fpdf/doc/aliasnbpages.htm new file mode 100644 index 000000000..2acfff1c8 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/aliasnbpages.htm @@ -0,0 +1,45 @@ + + + + +AliasNbPages + + + +

AliasNbPages

+AliasNbPages([string alias]) +

Description

+Defines an alias for the total number of pages. It will be substituted as the document is +closed. +

Parameters

+
+
alias
+
+The alias. Default value: {nb}. +
+
+

Example

+
+
class PDF extends FPDF
+{
+function Footer()
+{
+    //Go to 1.5 cm from bottom
+    $this->SetY(-15);
+    //Select Arial italic 8
+    $this->SetFont('Arial','I',8);
+    //Print current and total page numbers
+    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
+}
+}
+
+$pdf=new PDF();
+$pdf->AliasNbPages();
+
+

See also

+PageNo(), +Footer(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/cell.htm b/includes/html2pdf/_fpdf/doc/cell.htm new file mode 100644 index 000000000..2182cf7bd --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/cell.htm @@ -0,0 +1,104 @@ + + + + +Cell + + + +

Cell

+Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) +

Description

+Prints a cell (rectangular area) with optional borders, background color and character string. +The upper-left corner of the cell corresponds to the current position. The text can be aligned +or centered. After the call, the current position moves to the right or to the next line. It is +possible to put a link on the text. +
+If automatic page breaking is enabled and the cell goes beyond the limit, a page break is +done before outputting. +

Parameters

+
+
w
+
+Cell width. If 0, the cell extends up to the right margin. +
+
h
+
+Cell height. +Default value: 0. +
+
txt
+
+String to print. +Default value: empty string. +
+
border
+
+Indicates if borders must be drawn around the cell. The value can be either a number: +
    +
  • 0: no border
  • +
  • 1: frame
  • +
+or a string containing some or all of the following characters (in any order): +
    +
  • L: left
  • +
  • T: top
  • +
  • R: right
  • +
  • B: bottom
  • +
+Default value: 0. +
+
ln
+
+Indicates where the current position should go after the call. Possible values are: +
    +
  • 0: to the right
  • +
  • 1: to the beginning of the next line
  • +
  • 2: below
  • +
+Putting 1 is equivalent to putting 0 and calling Ln() just after. +Default value: 0. +
+
align
+
+Allows to center or align the text. Possible values are: +
    +
  • L or empty string: left align (default value)
  • +
  • C: center
  • +
  • R: right align
  • +
+
+
fill
+
+Indicates if the cell background must be painted (true) or transparent (false). +Default value: false. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

Example

+
+
//Set font
+$pdf->SetFont('Arial','B',16);
+//Move to 8 cm to the right
+$pdf->Cell(80);
+//Centered text in a framed 20*10 mm cell and line break
+$pdf->Cell(20,10,'Title',1,1,'C');
+
+

See also

+SetFont(), +SetDrawColor(), +SetFillColor(), +SetTextColor(), +SetLineWidth(), +AddLink(), +Ln(), +MultiCell(), +Write(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/close.htm b/includes/html2pdf/_fpdf/doc/close.htm new file mode 100644 index 000000000..6d8c19243 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/close.htm @@ -0,0 +1,21 @@ + + + + +Close + + + +

Close

+Close() +

Description

+Terminates the PDF document. It is not necessary to call this method explicitly because Output() +does it automatically. +
+If the document contains no page, AddPage() is called to prevent from getting an invalid document. +

See also

+Output(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/error.htm b/includes/html2pdf/_fpdf/doc/error.htm new file mode 100644 index 000000000..49b6083cd --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/error.htm @@ -0,0 +1,25 @@ + + + + +Error + + + +

Error

+Error(string msg) +

Description

+This method is automatically called in case of fatal error; it simply outputs the message +and halts the execution. An inherited class may override it to customize the error handling +but should always halt the script, or the resulting document would probably be invalid. +

Parameters

+
+
msg
+
+The error message. +
+
+
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/footer.htm b/includes/html2pdf/_fpdf/doc/footer.htm new file mode 100644 index 000000000..0ba9d320b --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/footer.htm @@ -0,0 +1,35 @@ + + + + +Footer + + + +

Footer

+Footer() +

Description

+This method is used to render the page footer. It is automatically called by AddPage() and +Close() and should not be called directly by the application. The implementation in FPDF is +empty, so you have to subclass it and override the method if you want a specific processing. +

Example

+
+
class PDF extends FPDF
+{
+function Footer()
+{
+    //Go to 1.5 cm from bottom
+    $this->SetY(-15);
+    //Select Arial italic 8
+    $this->SetFont('Arial','I',8);
+    //Print centered page number
+    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
+}
+}
+
+

See also

+Header(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/fpdf.htm b/includes/html2pdf/_fpdf/doc/fpdf.htm new file mode 100644 index 000000000..078e7dbc8 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/fpdf.htm @@ -0,0 +1,63 @@ + + + + +FPDF + + + +

FPDF

+FPDF([string orientation [, string unit [, mixed format]]]) +

Description

+This is the class constructor. It allows to set up the page format, the orientation and the +unit of measure used in all methods (except for font sizes). +

Parameters

+
+
orientation
+
+Default page orientation. Possible values are (case insensitive): +
    +
  • P or Portrait
  • +
  • L or Landscape
  • +
+Default value is P. +
+
unit
+
+User unit. Possible values are: +
    +
  • pt: point
  • +
  • mm: millimeter
  • +
  • cm: centimeter
  • +
  • in: inch
  • +
+A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This +is a very common unit in typography; font sizes are expressed in that unit. +
+
+Default value is mm. +
+
format
+
+The format used for pages. It can be either one of the following values (case insensitive): +
    +
  • A3
  • +
  • A4
  • +
  • A5
  • +
  • Letter
  • +
  • Legal
  • +
+or an array containing the width and the height (expressed in the unit given by unit).
+
+Default value is A4. +
+
+

Example

+Example with a custom 100x150 mm page format: +
+
$pdf = new FPDF('P', 'mm', array(100,150));
+
+
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/getstringwidth.htm b/includes/html2pdf/_fpdf/doc/getstringwidth.htm new file mode 100644 index 000000000..7cb1119bd --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/getstringwidth.htm @@ -0,0 +1,23 @@ + + + + +GetStringWidth + + + +

GetStringWidth

+float GetStringWidth(string s) +

Description

+Returns the length of a string in user unit. A font must be selected. +

Parameters

+
+
s
+
+The string whose length is to be computed. +
+
+
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/getx.htm b/includes/html2pdf/_fpdf/doc/getx.htm new file mode 100644 index 000000000..1d1310ca9 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/getx.htm @@ -0,0 +1,20 @@ + + + + +GetX + + + +

GetX

+float GetX() +

Description

+Returns the abscissa of the current position. +

See also

+SetX(), +GetY(), +SetY(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/gety.htm b/includes/html2pdf/_fpdf/doc/gety.htm new file mode 100644 index 000000000..e8ce6cf05 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/gety.htm @@ -0,0 +1,20 @@ + + + + +GetY + + + +

GetY

+float GetY() +

Description

+Returns the ordinate of the current position. +

See also

+SetY(), +GetX(), +SetX(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/header.htm b/includes/html2pdf/_fpdf/doc/header.htm new file mode 100644 index 000000000..f320e13b8 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/header.htm @@ -0,0 +1,37 @@ + + + + +Header + + + +

Header

+Header() +

Description

+This method is used to render the page header. It is automatically called by AddPage() and +should not be called directly by the application. The implementation in FPDF is empty, so +you have to subclass it and override the method if you want a specific processing. +

Example

+
+
class PDF extends FPDF
+{
+function Header()
+{
+    //Select Arial bold 15
+    $this->SetFont('Arial','B',15);
+    //Move to the right
+    $this->Cell(80);
+    //Framed title
+    $this->Cell(30,10,'Title',1,0,'C');
+    //Line break
+    $this->Ln(20);
+}
+}
+
+

See also

+Footer(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/image.htm b/includes/html2pdf/_fpdf/doc/image.htm new file mode 100644 index 000000000..3375dade7 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/image.htm @@ -0,0 +1,86 @@ + + + + +Image + + + +

Image

+Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) +

Description

+Puts an image. The size it will take on the page can be specified in different ways: +
    +
  • explicit width and height (expressed in user unit)
  • +
  • one explicit dimension, the other being calculated automatically in order to keep the original proportions
  • +
  • no explicit dimension, in which case the image is put at 72 dpi
  • +
+Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF. +
+
+For JPEGs, all flavors are allowed: +
    +
  • gray scales
  • +
  • true colors (24 bits)
  • +
  • CMYK (32 bits)
  • +
+For PNGs, are allowed: +
    +
  • gray scales on at most 8 bits (256 levels)
  • +
  • indexed colors
  • +
  • true colors (24 bits)
  • +
+but are not supported: +
    +
  • Interlacing
  • +
  • Alpha channel
  • +
+For GIFs: in case of an animated GIF, only the first frame is used.
+
+If a transparent color is defined, it is taken into account.
+
+The format can be specified explicitly or inferred from the file extension.
+It is possible to put a link on the image.
+
+Remark: if an image is used several times, only one copy is embedded in the file. +

Parameters

+
+
file
+
+Path or URL of the image. +
+
x
+
+Abscissa of the upper-left corner. If not specified or equal to null, the current abscissa +is used. +
+
y
+
+Ordinate of the upper-left corner. If not specified or equal to null, the current ordinate +is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled) +and, after the call, the current ordinate is moved to the bottom of the image. +
+
w
+
+Width of the image in the page. If not specified or equal to zero, it is automatically calculated. +
+
h
+
+Height of the image in the page. If not specified or equal to zero, it is automatically calculated. +
+
type
+
+Image format. Possible values are (case insensitive): JPG, JPEG, PNG and GIF. +If not specified, the type is inferred from the file extension. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

See also

+AddLink(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/index.htm b/includes/html2pdf/_fpdf/doc/index.htm new file mode 100644 index 000000000..93d3e13d0 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/index.htm @@ -0,0 +1,57 @@ + + + + +FPDF 1.6 Reference Manual + + + +

FPDF 1.6 Reference Manual

+AcceptPageBreak - accept or not automatic page break
+AddFont - add a new font
+AddLink - create an internal link
+AddPage - add a new page
+AliasNbPages - define an alias for number of pages
+Cell - print a cell
+Close - terminate the document
+Error - fatal error
+Footer - page footer
+FPDF - constructor
+GetStringWidth - compute string length
+GetX - get current x position
+GetY - get current y position
+Header - page header
+Image - output an image
+Line - draw a line
+Link - put a link
+Ln - line break
+MultiCell - print text with line breaks
+Output - save or send the document
+PageNo - page number
+Rect - draw a rectangle
+SetAuthor - set the document author
+SetAutoPageBreak - set the automatic page breaking mode
+SetCompression - turn compression on or off
+SetCreator - set document creator
+SetDisplayMode - set display mode
+SetDrawColor - set drawing color
+SetFillColor - set filling color
+SetFont - set font
+SetFontSize - set font size
+SetKeywords - associate keywords with document
+SetLeftMargin - set left margin
+SetLineWidth - set line width
+SetLink - set internal link destination
+SetMargins - set margins
+SetRightMargin - set right margin
+SetSubject - set document subject
+SetTextColor - set text color
+SetTitle - set document title
+SetTopMargin - set top margin
+SetX - set current x position
+SetXY - set current x and y positions
+SetY - set current y position
+Text - print a string
+Write - print flowing text
+ + diff --git a/includes/html2pdf/_fpdf/doc/line.htm b/includes/html2pdf/_fpdf/doc/line.htm new file mode 100644 index 000000000..a9c5194c8 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/line.htm @@ -0,0 +1,38 @@ + + + + +Line + + + +

Line

+Line(float x1, float y1, float x2, float y2) +

Description

+Draws a line between two points. +

Parameters

+
+
x1
+
+Abscissa of first point. +
+
y1
+
+Ordinate of first point. +
+
x2
+
+Abscissa of second point. +
+
y2
+
+Ordinate of second point. +
+
+

See also

+SetLineWidth(), +SetDrawColor(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/link.htm b/includes/html2pdf/_fpdf/doc/link.htm new file mode 100644 index 000000000..d6c728c75 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/link.htm @@ -0,0 +1,46 @@ + + + + +Link + + + +

Link

+Link(float x, float y, float w, float h, mixed link) +

Description

+Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(), +Write() or Image(), but this method can be useful for instance to define a clickable area inside +an image. +

Parameters

+
+
x
+
+Abscissa of the upper-left corner of the rectangle. +
+
y
+
+Ordinate of the upper-left corner of the rectangle. +
+
w
+
+Width of the rectangle. +
+
h
+
+Height of the rectangle. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

See also

+AddLink(), +Cell(), +Write(), +Image(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/ln.htm b/includes/html2pdf/_fpdf/doc/ln.htm new file mode 100644 index 000000000..0b91b001f --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/ln.htm @@ -0,0 +1,28 @@ + + + + +Ln + + + +

Ln

+Ln([float h]) +

Description

+Performs a line break. The current abscissa goes back to the left margin and the ordinate +increases by the amount passed in parameter. +

Parameters

+
+
h
+
+The height of the break. +
+By default, the value equals the height of the last printed cell. +
+
+

See also

+Cell(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/multicell.htm b/includes/html2pdf/_fpdf/doc/multicell.htm new file mode 100644 index 000000000..c41bbd703 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/multicell.htm @@ -0,0 +1,76 @@ + + + + +MultiCell + + + +

MultiCell

+MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]]) +

Description

+This method allows printing text with line breaks. They can be automatic (as soon as the +text reaches the right border of the cell) or explicit (via the \n character). As many cells +as necessary are output, one below the other. +
+Text can be aligned, centered or justified. The cell block can be framed and the background +painted. +

Parameters

+
+
w
+
+Width of cells. If 0, they extend up to the right margin of the page. +
+
h
+
+Height of cells. +
+
txt
+
+String to print. +
+
border
+
+Indicates if borders must be drawn around the cell block. The value can be either a number: +
    +
  • 0: no border
  • +
  • 1: frame
  • +
+or a string containing some or all of the following characters (in any order): +
    +
  • L: left
  • +
  • T: top
  • +
  • R: right
  • +
  • B: bottom
  • +
+Default value: 0. +
+
align
+
+Sets the text alignment. Possible values are: +
    +
  • L: left alignment
  • +
  • C: center
  • +
  • R: right alignment
  • +
  • J: justification (default value)
  • +
+
+
fill
+
+Indicates if the cell background must be painted (true) or transparent (false). +Default value: false. +
+
+

See also

+SetFont(), +SetDrawColor(), +SetFillColor(), +SetTextColor(), +SetLineWidth(), +Cell(), +Write(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/output.htm b/includes/html2pdf/_fpdf/doc/output.htm new file mode 100644 index 000000000..b62291c05 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/output.htm @@ -0,0 +1,42 @@ + + + + +Output + + + +

Output

+string Output([string name, string dest]) +

Description

+Send the document to a given destination: browser, file or string. In the case of browser, the +plug-in may be used (if present) or a download ("Save as" dialog box) may be forced. +
+The method first calls Close() if necessary to terminate the document. +

Parameters

+
+
name
+
+The name of the file. If not specified, the document will be sent to the browser +(destination I) with the name doc.pdf. +
+
dest
+
+Destination where to send the document. It can take one of the following values: +
    +
  • I: send the file inline to the browser. The plug-in is used if available. +The name given by name is used when one selects the "Save as" option on the +link generating the PDF.
  • +
  • D: send to the browser and force a file download with the name given by +name.
  • +
  • F: save to a local file with the name given by name (may include a path).
  • +
  • S: return the document as a string. name is ignored.
  • +
+
+
+

See also

+Close(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/pageno.htm b/includes/html2pdf/_fpdf/doc/pageno.htm new file mode 100644 index 000000000..84e0f224b --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/pageno.htm @@ -0,0 +1,18 @@ + + + + +PageNo + + + +

PageNo

+int PageNo() +

Description

+Returns the current page number. +

See also

+AliasNbPages(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/rect.htm b/includes/html2pdf/_fpdf/doc/rect.htm new file mode 100644 index 000000000..fa71375b1 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/rect.htm @@ -0,0 +1,48 @@ + + + + +Rect + + + +

Rect

+Rect(float x, float y, float w, float h [, string style]) +

Description

+Outputs a rectangle. It can be drawn (border only), filled (with no border) or both. +

Parameters

+
+
x
+
+Abscissa of upper-left corner. +
+
y
+
+Ordinate of upper-left corner. +
+
w
+
+Width. +
+
h
+
+Height. +
+
style
+
+Style of rendering. Possible values are: +
    +
  • D or empty string: draw. This is the default value.
  • +
  • F: fill
  • +
  • DF or FD: draw and fill
  • +
+
+
+

See also

+SetLineWidth(), +SetDrawColor(), +SetFillColor(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setauthor.htm b/includes/html2pdf/_fpdf/doc/setauthor.htm new file mode 100644 index 000000000..60d3b7c7e --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setauthor.htm @@ -0,0 +1,33 @@ + + + + +SetAuthor + + + +

SetAuthor

+SetAuthor(string author [, boolean isUTF8]) +

Description

+Defines the author of the document. +

Parameters

+
+
author
+
+The name of the author. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetCreator(), +SetKeywords(), +SetSubject(), +SetTitle(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setautopagebreak.htm b/includes/html2pdf/_fpdf/doc/setautopagebreak.htm new file mode 100644 index 000000000..71dec89f4 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setautopagebreak.htm @@ -0,0 +1,33 @@ + + + + +SetAutoPageBreak + + + +

SetAutoPageBreak

+SetAutoPageBreak(boolean auto [, float margin]) +

Description

+Enables or disables the automatic page breaking mode. When enabling, the second parameter is +the distance from the bottom of the page that defines the triggering limit. By default, the +mode is on and the margin is 2 cm. +

Parameters

+
+
auto
+
+Boolean indicating if mode should be on or off. +
+
margin
+
+Distance from the bottom of the page. +
+
+

See also

+Cell(), +MultiCell(), +AcceptPageBreak(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setcompression.htm b/includes/html2pdf/_fpdf/doc/setcompression.htm new file mode 100644 index 000000000..3f81ab088 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setcompression.htm @@ -0,0 +1,31 @@ + + + + +SetCompression + + + +

SetCompression

+SetCompression(boolean compress) +

Description

+Activates or deactivates page compression. When activated, the internal representation of +each page is compressed, which leads to a compression ratio of about 2 for the resulting +document. +
+Compression is on by default. +
+
+Note: the Zlib extension is required for this feature. If not present, compression +will be turned off. +

Parameters

+
+
compress
+
+Boolean indicating if compression must be enabled. +
+
+
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setcreator.htm b/includes/html2pdf/_fpdf/doc/setcreator.htm new file mode 100644 index 000000000..2c0db3c13 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setcreator.htm @@ -0,0 +1,34 @@ + + + + +SetCreator + + + +

SetCreator

+SetCreator(string creator [, boolean isUTF8]) +

Description

+Defines the creator of the document. This is typically the name of the application that +generates the PDF. +

Parameters

+
+
creator
+
+The name of the creator. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetKeywords(), +SetSubject(), +SetTitle(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setdisplaymode.htm b/includes/html2pdf/_fpdf/doc/setdisplaymode.htm new file mode 100644 index 000000000..081e7d6df --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setdisplaymode.htm @@ -0,0 +1,47 @@ + + + + +SetDisplayMode + + + +

SetDisplayMode

+SetDisplayMode(mixed zoom [, string layout]) +

Description

+Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be +displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a +specific zooming factor or use viewer default (configured in the Preferences menu of Acrobat). +The page layout can be specified too: single at once, continuous display, two columns or viewer +default. +
+By default, documents use the full width mode with continuous display. +

Parameters

+
+
zoom
+
+The zoom to use. It can be one of the following string values: +
    +
  • fullpage: displays the entire page on screen
  • +
  • fullwidth: uses maximum width of window
  • +
  • real: uses real size (equivalent to 100% zoom)
  • +
  • default: uses viewer default mode
  • +
+or a number indicating the zooming factor to use. +
+
layout
+
+The page layout. Possible values are: +
    +
  • single: displays one page at once
  • +
  • continuous: displays pages continuously
  • +
  • two: displays two pages on two columns
  • +
  • default: uses viewer default mode
  • +
+Default value is continuous. +
+
+
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setdrawcolor.htm b/includes/html2pdf/_fpdf/doc/setdrawcolor.htm new file mode 100644 index 000000000..6be79c56b --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setdrawcolor.htm @@ -0,0 +1,41 @@ + + + + +SetDrawColor + + + +

SetDrawColor

+SetDrawColor(int r [, int g, int b]) +

Description

+Defines the color used for all drawing operations (lines, rectangles and cell borders). It +can be expressed in RGB components or gray scale. The method can be called before the first +page is created and the value is retained from page to page. +

Parameters

+
+
r
+
+If g et b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
+
g
+
+Green component (between 0 and 255). +
+
b
+
+Blue component (between 0 and 255). +
+
+

See also

+SetFillColor(), +SetTextColor(), +Line(), +Rect(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setfillcolor.htm b/includes/html2pdf/_fpdf/doc/setfillcolor.htm new file mode 100644 index 000000000..64f66d3d3 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setfillcolor.htm @@ -0,0 +1,40 @@ + + + + +SetFillColor + + + +

SetFillColor

+SetFillColor(int r [, int g, int b]) +

Description

+Defines the color used for all filling operations (filled rectangles and cell backgrounds). +It can be expressed in RGB components or gray scale. The method can be called before the first +page is created and the value is retained from page to page. +

Parameters

+
+
r
+
+If g and b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
+
g
+
+Green component (between 0 and 255). +
+
b
+
+Blue component (between 0 and 255). +
+
+

See also

+SetDrawColor(), +SetTextColor(), +Rect(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setfont.htm b/includes/html2pdf/_fpdf/doc/setfont.htm new file mode 100644 index 000000000..5a13f51e4 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setfont.htm @@ -0,0 +1,92 @@ + + + + +SetFont + + + +

SetFont

+SetFont(string family [, string style [, float size]]) +

Description

+Sets the font used to print character strings. It is mandatory to call this method +at least once before printing text or the resulting document would not be valid. +
+The font can be either a standard one or a font added via the AddFont() method. Standard fonts +use Windows encoding cp1252 (Western Europe). +
+The method can be called before the first page is created and the font is retained from page +to page. +
+If you just wish to change the current font size, it is simpler to call SetFontSize(). +
+
+Note: the font metric files must be accessible. They are searched successively in: +
    +
  • The directory defined by the FPDF_FONTPATH constant (if this constant is defined)
  • +
  • The font directory located in the directory containing fpdf.php (if it exists)
  • +
  • The directories accessible through include()
  • +
+Example defining FPDF_FONTPATH (note the mandatory trailing slash): +
+
define('FPDF_FONTPATH','/home/www/font/');
+require('fpdf.php');
+
+If the file corresponding to the requested font is not found, the error "Could not include +font metric file" is issued. +

Parameters

+
+
family
+
+Family font. It can be either a name defined by AddFont() or one of the standard families (case +insensitive): +
    +
  • Courier (fixed-width)
  • +
  • Helvetica or Arial (synonymous; sans serif)
  • +
  • Times (serif)
  • +
  • Symbol (symbolic)
  • +
  • ZapfDingbats (symbolic)
  • +
+It is also possible to pass an empty string. In that case, the current family is retained. +
+
style
+
+Font style. Possible values are (case insensitive): +
    +
  • empty string: regular
  • +
  • B: bold
  • +
  • I: italic
  • +
  • U: underline
  • +
+or any combination. The default value is regular. +Bold and italic styles do not apply to Symbol and ZapfDingbats. +
+
size
+
+Font size in points. +
+The default value is the current size. If no size has been specified since the beginning of +the document, the value taken is 12. +
+
+

Example

+
+
//Times regular 12
+$pdf->SetFont('Times');
+//Arial bold 14
+$pdf->SetFont('Arial','B',14);
+//Removes bold
+$pdf->SetFont('');
+//Times bold, italic and underlined 14
+$pdf->SetFont('Times','BIU');
+
+

See also

+AddFont(), +SetFontSize(), +Cell(), +MultiCell(), +Write(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setfontsize.htm b/includes/html2pdf/_fpdf/doc/setfontsize.htm new file mode 100644 index 000000000..20b35cdf1 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setfontsize.htm @@ -0,0 +1,25 @@ + + + + +SetFontSize + + + +

SetFontSize

+SetFontSize(float size) +

Description

+Defines the size of the current font. +

Parameters

+
+
size
+
+The size (in points). +
+
+

See also

+SetFont(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setkeywords.htm b/includes/html2pdf/_fpdf/doc/setkeywords.htm new file mode 100644 index 000000000..8b8897e76 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setkeywords.htm @@ -0,0 +1,33 @@ + + + + +SetKeywords + + + +

SetKeywords

+SetKeywords(string keywords [, boolean isUTF8]) +

Description

+Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. +

Parameters

+
+
keywords
+
+The list of keywords. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetCreator(), +SetSubject(), +SetTitle(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setleftmargin.htm b/includes/html2pdf/_fpdf/doc/setleftmargin.htm new file mode 100644 index 000000000..dde7a7cf7 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setleftmargin.htm @@ -0,0 +1,30 @@ + + + + +SetLeftMargin + + + +

SetLeftMargin

+SetLeftMargin(float margin) +

Description

+Defines the left margin. The method can be called before creating the first page. +
+If the current abscissa gets out of page, it is brought back to the margin. +

Parameters

+
+
margin
+
+The margin. +
+
+

See also

+SetTopMargin(), +SetRightMargin(), +SetAutoPageBreak(), +SetMargins(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setlinewidth.htm b/includes/html2pdf/_fpdf/doc/setlinewidth.htm new file mode 100644 index 000000000..11e417c0f --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setlinewidth.htm @@ -0,0 +1,29 @@ + + + + +SetLineWidth + + + +

SetLineWidth

+SetLineWidth(float width) +

Description

+Defines the line width. By default, the value equals 0.2 mm. The method can be called before +the first page is created and the value is retained from page to page. +

Parameters

+
+
width
+
+The width. +
+
+

See also

+Line(), +Rect(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setlink.htm b/includes/html2pdf/_fpdf/doc/setlink.htm new file mode 100644 index 000000000..b524525f1 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setlink.htm @@ -0,0 +1,34 @@ + + + + +SetLink + + + +

SetLink

+SetLink(int link [, float y [, int page]]) +

Description

+Defines the page and position a link points to. +

Parameters

+
+
link
+
+The link identifier returned by AddLink(). +
+
y
+
+Ordinate of target position; -1 indicates the current position. +The default value is 0 (top of page). +
+
page
+
+Number of target page; -1 indicates the current page. This is the default value. +
+
+

See also

+AddLink(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setmargins.htm b/includes/html2pdf/_fpdf/doc/setmargins.htm new file mode 100644 index 000000000..7cc8c6d19 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setmargins.htm @@ -0,0 +1,37 @@ + + + + +SetMargins + + + +

SetMargins

+SetMargins(float left, float top [, float right]) +

Description

+Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change +them. +

Parameters

+
+
left
+
+Left margin. +
+
top
+
+Top margin. +
+
right
+
+Right margin. Default value is the left one. +
+
+

See also

+SetLeftMargin(), +SetTopMargin(), +SetRightMargin(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setrightmargin.htm b/includes/html2pdf/_fpdf/doc/setrightmargin.htm new file mode 100644 index 000000000..791564761 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setrightmargin.htm @@ -0,0 +1,28 @@ + + + + +SetRightMargin + + + +

SetRightMargin

+SetRightMargin(float margin) +

Description

+Defines the right margin. The method can be called before creating the first page. +

Parameters

+
+
margin
+
+The margin. +
+
+

See also

+SetLeftMargin(), +SetTopMargin(), +SetAutoPageBreak(), +SetMargins(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setsubject.htm b/includes/html2pdf/_fpdf/doc/setsubject.htm new file mode 100644 index 000000000..e8c628ca1 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setsubject.htm @@ -0,0 +1,33 @@ + + + + +SetSubject + + + +

SetSubject

+SetSubject(string subject [, boolean isUTF8]) +

Description

+Defines the subject of the document. +

Parameters

+
+
subject
+
+The subject. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetCreator(), +SetKeywords(), +SetTitle(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/settextcolor.htm b/includes/html2pdf/_fpdf/doc/settextcolor.htm new file mode 100644 index 000000000..cb12fecc4 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/settextcolor.htm @@ -0,0 +1,40 @@ + + + + +SetTextColor + + + +

SetTextColor

+SetTextColor(int r [, int g, int b]) +

Description

+Defines the color used for text. It can be expressed in RGB components or gray scale. The +method can be called before the first page is created and the value is retained from page to +page. +

Parameters

+
+
r
+
+If g et b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
+
g
+
+Green component (between 0 and 255). +
+
b
+
+Blue component (between 0 and 255). +
+
+

See also

+SetDrawColor(), +SetFillColor(), +Text(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/settitle.htm b/includes/html2pdf/_fpdf/doc/settitle.htm new file mode 100644 index 000000000..3bc0fe8d1 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/settitle.htm @@ -0,0 +1,33 @@ + + + + +SetTitle + + + +

SetTitle

+SetTitle(string title [, boolean isUTF8]) +

Description

+Defines the title of the document. +

Parameters

+
+
title
+
+The title. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetCreator(), +SetKeywords(), +SetSubject(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/settopmargin.htm b/includes/html2pdf/_fpdf/doc/settopmargin.htm new file mode 100644 index 000000000..65a4b7d44 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/settopmargin.htm @@ -0,0 +1,28 @@ + + + + +SetTopMargin + + + +

SetTopMargin

+SetTopMargin(float margin) +

Description

+Defines the top margin. The method can be called before creating the first page. +

Parameters

+
+
margin
+
+The margin. +
+
+

See also

+SetLeftMargin(), +SetRightMargin(), +SetAutoPageBreak(), +SetMargins(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setx.htm b/includes/html2pdf/_fpdf/doc/setx.htm new file mode 100644 index 000000000..7c92465c5 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setx.htm @@ -0,0 +1,29 @@ + + + + +SetX + + + +

SetX

+SetX(float x) +

Description

+Defines the abscissa of the current position. If the passed value is negative, it is relative +to the right of the page. +

Parameters

+
+
x
+
+The value of the abscissa. +
+
+

See also

+GetX(), +GetY(), +SetY(), +SetXY(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/setxy.htm b/includes/html2pdf/_fpdf/doc/setxy.htm new file mode 100644 index 000000000..c0602e5fa --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/setxy.htm @@ -0,0 +1,31 @@ + + + + +SetXY + + + +

SetXY

+SetXY(float x, float y) +

Description

+Defines the abscissa and ordinate of the current position. If the passed values are negative, +they are relative respectively to the right and bottom of the page. +

Parameters

+
+
x
+
+The value of the abscissa. +
+
y
+
+The value of the ordinate. +
+
+

See also

+SetX(), +SetY(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/sety.htm b/includes/html2pdf/_fpdf/doc/sety.htm new file mode 100644 index 000000000..e9afe1166 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/sety.htm @@ -0,0 +1,29 @@ + + + + +SetY + + + +

SetY

+SetY(float y) +

Description

+Moves the current abscissa back to the left margin and sets the ordinate. If the passed value +is negative, it is relative to the bottom of the page. +

Parameters

+
+
y
+
+The value of the ordinate. +
+
+

See also

+GetX(), +GetY(), +SetX(), +SetXY(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/text.htm b/includes/html2pdf/_fpdf/doc/text.htm new file mode 100644 index 000000000..ccd86eb9d --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/text.htm @@ -0,0 +1,39 @@ + + + + +Text + + + +

Text

+Text(float x, float y, string txt) +

Description

+Prints a character string. The origin is on the left of the first character, on the baseline. +This method allows to place a string precisely on the page, but it is usually easier to use +Cell(), MultiCell() or Write() which are the standard methods to print text. +

Parameters

+
+
x
+
+Abscissa of the origin. +
+
y
+
+Ordinate of the origin. +
+
txt
+
+String to print. +
+
+

See also

+SetFont(), +SetTextColor(), +Cell(), +MultiCell(), +Write(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/doc/write.htm b/includes/html2pdf/_fpdf/doc/write.htm new file mode 100644 index 000000000..dd14799a5 --- /dev/null +++ b/includes/html2pdf/_fpdf/doc/write.htm @@ -0,0 +1,51 @@ + + + + +Write + + + +

Write

+Write(float h, string txt [, mixed link]) +

Description

+This method prints text from the current position. When the right margin is reached (or the \n +character is met) a line break occurs and text continues from the left margin. Upon method exit, +the current position is left just at the end of the text. +
+It is possible to put a link on the text. +

Parameters

+
+
h
+
+Line height. +
+
txt
+
+String to print. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

Example

+
+
//Begin with regular font
+$pdf->SetFont('Arial','',14);
+$pdf->Write(5,'Visit ');
+//Then put a blue underlined link
+$pdf->SetTextColor(0,0,255);
+$pdf->SetFont('','U');
+$pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');
+
+

See also

+SetFont(), +SetTextColor(), +AddLink(), +MultiCell(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/includes/html2pdf/_fpdf/font/courier.php b/includes/html2pdf/_fpdf/font/courier.php new file mode 100644 index 000000000..913f9a453 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/courier.php @@ -0,0 +1,7 @@ + diff --git a/includes/html2pdf/_fpdf/font/helvetica.php b/includes/html2pdf/_fpdf/font/helvetica.php new file mode 100644 index 000000000..ca94cdf21 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/helvetica.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/includes/html2pdf/_fpdf/font/helveticab.php b/includes/html2pdf/_fpdf/font/helveticab.php new file mode 100644 index 000000000..276cfa8cb --- /dev/null +++ b/includes/html2pdf/_fpdf/font/helveticab.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/includes/html2pdf/_fpdf/font/helveticabi.php b/includes/html2pdf/_fpdf/font/helveticabi.php new file mode 100644 index 000000000..8d2177432 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/helveticabi.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/includes/html2pdf/_fpdf/font/helveticai.php b/includes/html2pdf/_fpdf/font/helveticai.php new file mode 100644 index 000000000..88bf4371b --- /dev/null +++ b/includes/html2pdf/_fpdf/font/helveticai.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1250.map b/includes/html2pdf/_fpdf/font/makefont/cp1250.map new file mode 100644 index 000000000..ec110af06 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1250.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+015A Sacute +!8D U+0164 Tcaron +!8E U+017D Zcaron +!8F U+0179 Zacute +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+015B sacute +!9D U+0165 tcaron +!9E U+017E zcaron +!9F U+017A zacute +!A0 U+00A0 space +!A1 U+02C7 caron +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+0104 Aogonek +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+015E Scedilla +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+0105 aogonek +!BA U+015F scedilla +!BB U+00BB guillemotright +!BC U+013D Lcaron +!BD U+02DD hungarumlaut +!BE U+013E lcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1251.map b/includes/html2pdf/_fpdf/font/makefont/cp1251.map new file mode 100644 index 000000000..de6a198d9 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1251.map @@ -0,0 +1,255 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0402 afii10051 +!81 U+0403 afii10052 +!82 U+201A quotesinglbase +!83 U+0453 afii10100 +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+20AC Euro +!89 U+2030 perthousand +!8A U+0409 afii10058 +!8B U+2039 guilsinglleft +!8C U+040A afii10059 +!8D U+040C afii10061 +!8E U+040B afii10060 +!8F U+040F afii10145 +!90 U+0452 afii10099 +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0459 afii10106 +!9B U+203A guilsinglright +!9C U+045A afii10107 +!9D U+045C afii10109 +!9E U+045B afii10108 +!9F U+045F afii10193 +!A0 U+00A0 space +!A1 U+040E afii10062 +!A2 U+045E afii10110 +!A3 U+0408 afii10057 +!A4 U+00A4 currency +!A5 U+0490 afii10050 +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+0401 afii10023 +!A9 U+00A9 copyright +!AA U+0404 afii10053 +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+0407 afii10056 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+0406 afii10055 +!B3 U+0456 afii10103 +!B4 U+0491 afii10098 +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0451 afii10071 +!B9 U+2116 afii61352 +!BA U+0454 afii10101 +!BB U+00BB guillemotright +!BC U+0458 afii10105 +!BD U+0405 afii10054 +!BE U+0455 afii10102 +!BF U+0457 afii10104 +!C0 U+0410 afii10017 +!C1 U+0411 afii10018 +!C2 U+0412 afii10019 +!C3 U+0413 afii10020 +!C4 U+0414 afii10021 +!C5 U+0415 afii10022 +!C6 U+0416 afii10024 +!C7 U+0417 afii10025 +!C8 U+0418 afii10026 +!C9 U+0419 afii10027 +!CA U+041A afii10028 +!CB U+041B afii10029 +!CC U+041C afii10030 +!CD U+041D afii10031 +!CE U+041E afii10032 +!CF U+041F afii10033 +!D0 U+0420 afii10034 +!D1 U+0421 afii10035 +!D2 U+0422 afii10036 +!D3 U+0423 afii10037 +!D4 U+0424 afii10038 +!D5 U+0425 afii10039 +!D6 U+0426 afii10040 +!D7 U+0427 afii10041 +!D8 U+0428 afii10042 +!D9 U+0429 afii10043 +!DA U+042A afii10044 +!DB U+042B afii10045 +!DC U+042C afii10046 +!DD U+042D afii10047 +!DE U+042E afii10048 +!DF U+042F afii10049 +!E0 U+0430 afii10065 +!E1 U+0431 afii10066 +!E2 U+0432 afii10067 +!E3 U+0433 afii10068 +!E4 U+0434 afii10069 +!E5 U+0435 afii10070 +!E6 U+0436 afii10072 +!E7 U+0437 afii10073 +!E8 U+0438 afii10074 +!E9 U+0439 afii10075 +!EA U+043A afii10076 +!EB U+043B afii10077 +!EC U+043C afii10078 +!ED U+043D afii10079 +!EE U+043E afii10080 +!EF U+043F afii10081 +!F0 U+0440 afii10082 +!F1 U+0441 afii10083 +!F2 U+0442 afii10084 +!F3 U+0443 afii10085 +!F4 U+0444 afii10086 +!F5 U+0445 afii10087 +!F6 U+0446 afii10088 +!F7 U+0447 afii10089 +!F8 U+0448 afii10090 +!F9 U+0449 afii10091 +!FA U+044A afii10092 +!FB U+044B afii10093 +!FC U+044C afii10094 +!FD U+044D afii10095 +!FE U+044E afii10096 +!FF U+044F afii10097 diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1252.map b/includes/html2pdf/_fpdf/font/makefont/cp1252.map new file mode 100644 index 000000000..dd490e596 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1252.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!8E U+017D Zcaron +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9E U+017E zcaron +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1253.map b/includes/html2pdf/_fpdf/font/makefont/cp1253.map new file mode 100644 index 000000000..4bd826fb2 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1253.map @@ -0,0 +1,239 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+0385 dieresistonos +!A2 U+0386 Alphatonos +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1254.map b/includes/html2pdf/_fpdf/font/makefont/cp1254.map new file mode 100644 index 000000000..829473b28 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1254.map @@ -0,0 +1,249 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1255.map b/includes/html2pdf/_fpdf/font/makefont/cp1255.map new file mode 100644 index 000000000..079e10c61 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1255.map @@ -0,0 +1,233 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AA afii57636 +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00D7 multiply +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD sfthyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 middot +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00F7 divide +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+05B0 afii57799 +!C1 U+05B1 afii57801 +!C2 U+05B2 afii57800 +!C3 U+05B3 afii57802 +!C4 U+05B4 afii57793 +!C5 U+05B5 afii57794 +!C6 U+05B6 afii57795 +!C7 U+05B7 afii57798 +!C8 U+05B8 afii57797 +!C9 U+05B9 afii57806 +!CB U+05BB afii57796 +!CC U+05BC afii57807 +!CD U+05BD afii57839 +!CE U+05BE afii57645 +!CF U+05BF afii57841 +!D0 U+05C0 afii57842 +!D1 U+05C1 afii57804 +!D2 U+05C2 afii57803 +!D3 U+05C3 afii57658 +!D4 U+05F0 afii57716 +!D5 U+05F1 afii57717 +!D6 U+05F2 afii57718 +!D7 U+05F3 gereshhebrew +!D8 U+05F4 gershayimhebrew +!E0 U+05D0 afii57664 +!E1 U+05D1 afii57665 +!E2 U+05D2 afii57666 +!E3 U+05D3 afii57667 +!E4 U+05D4 afii57668 +!E5 U+05D5 afii57669 +!E6 U+05D6 afii57670 +!E7 U+05D7 afii57671 +!E8 U+05D8 afii57672 +!E9 U+05D9 afii57673 +!EA U+05DA afii57674 +!EB U+05DB afii57675 +!EC U+05DC afii57676 +!ED U+05DD afii57677 +!EE U+05DE afii57678 +!EF U+05DF afii57679 +!F0 U+05E0 afii57680 +!F1 U+05E1 afii57681 +!F2 U+05E2 afii57682 +!F3 U+05E3 afii57683 +!F4 U+05E4 afii57684 +!F5 U+05E5 afii57685 +!F6 U+05E6 afii57686 +!F7 U+05E7 afii57687 +!F8 U+05E8 afii57688 +!F9 U+05E9 afii57689 +!FA U+05EA afii57690 +!FD U+200E afii299 +!FE U+200F afii300 diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1257.map b/includes/html2pdf/_fpdf/font/makefont/cp1257.map new file mode 100644 index 000000000..2f2ecfa21 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1257.map @@ -0,0 +1,244 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8D U+00A8 dieresis +!8E U+02C7 caron +!8F U+00B8 cedilla +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!9D U+00AF macron +!9E U+02DB ogonek +!A0 U+00A0 space +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00D8 Oslash +!A9 U+00A9 copyright +!AA U+0156 Rcommaaccent +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00C6 AE +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00F8 oslash +!B9 U+00B9 onesuperior +!BA U+0157 rcommaaccent +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00E6 ae +!C0 U+0104 Aogonek +!C1 U+012E Iogonek +!C2 U+0100 Amacron +!C3 U+0106 Cacute +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+0118 Eogonek +!C7 U+0112 Emacron +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0179 Zacute +!CB U+0116 Edotaccent +!CC U+0122 Gcommaaccent +!CD U+0136 Kcommaaccent +!CE U+012A Imacron +!CF U+013B Lcommaaccent +!D0 U+0160 Scaron +!D1 U+0143 Nacute +!D2 U+0145 Ncommaaccent +!D3 U+00D3 Oacute +!D4 U+014C Omacron +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0172 Uogonek +!D9 U+0141 Lslash +!DA U+015A Sacute +!DB U+016A Umacron +!DC U+00DC Udieresis +!DD U+017B Zdotaccent +!DE U+017D Zcaron +!DF U+00DF germandbls +!E0 U+0105 aogonek +!E1 U+012F iogonek +!E2 U+0101 amacron +!E3 U+0107 cacute +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+0119 eogonek +!E7 U+0113 emacron +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+017A zacute +!EB U+0117 edotaccent +!EC U+0123 gcommaaccent +!ED U+0137 kcommaaccent +!EE U+012B imacron +!EF U+013C lcommaaccent +!F0 U+0161 scaron +!F1 U+0144 nacute +!F2 U+0146 ncommaaccent +!F3 U+00F3 oacute +!F4 U+014D omacron +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0173 uogonek +!F9 U+0142 lslash +!FA U+015B sacute +!FB U+016B umacron +!FC U+00FC udieresis +!FD U+017C zdotaccent +!FE U+017E zcaron +!FF U+02D9 dotaccent diff --git a/includes/html2pdf/_fpdf/font/makefont/cp1258.map b/includes/html2pdf/_fpdf/font/makefont/cp1258.map new file mode 100644 index 000000000..fed915f71 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp1258.map @@ -0,0 +1,247 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+0300 gravecomb +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+00D1 Ntilde +!D2 U+0309 hookabovecomb +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+01A0 Ohorn +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+01AF Uhorn +!DE U+0303 tildecomb +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+0301 acutecomb +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+00F1 ntilde +!F2 U+0323 dotbelowcomb +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+01A1 ohorn +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+01B0 uhorn +!FE U+20AB dong +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/cp874.map b/includes/html2pdf/_fpdf/font/makefont/cp874.map new file mode 100644 index 000000000..1006e6b17 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/cp874.map @@ -0,0 +1,225 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!85 U+2026 ellipsis +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-1.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-1.map new file mode 100644 index 000000000..61740a38f --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-1.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-11.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-11.map new file mode 100644 index 000000000..916881206 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-11.map @@ -0,0 +1,248 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-15.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-15.map new file mode 100644 index 000000000..6c2b57127 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-15.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AC Euro +!A5 U+00A5 yen +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+017D Zcaron +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-16.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-16.map new file mode 100644 index 000000000..202c8fe59 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-16.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0105 aogonek +!A3 U+0141 Lslash +!A4 U+20AC Euro +!A5 U+201E quotedblbase +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+0218 Scommaaccent +!AB U+00AB guillemotleft +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017A zacute +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+010C Ccaron +!B3 U+0142 lslash +!B4 U+017D Zcaron +!B5 U+201D quotedblright +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+010D ccaron +!BA U+0219 scommaaccent +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+017C zdotaccent +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0106 Cacute +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+015A Sacute +!D8 U+0170 Uhungarumlaut +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0118 Eogonek +!DE U+021A Tcommaaccent +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+0107 cacute +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+015B sacute +!F8 U+0171 uhungarumlaut +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0119 eogonek +!FE U+021B tcommaaccent +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-2.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-2.map new file mode 100644 index 000000000..65ae09f95 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-2.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+013D Lcaron +!A6 U+015A Sacute +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+015E Scedilla +!AB U+0164 Tcaron +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+013E lcaron +!B6 U+015B sacute +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+015F scedilla +!BB U+0165 tcaron +!BC U+017A zacute +!BD U+02DD hungarumlaut +!BE U+017E zcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-4.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-4.map new file mode 100644 index 000000000..a7d87bf3e --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-4.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0138 kgreenlandic +!A3 U+0156 Rcommaaccent +!A4 U+00A4 currency +!A5 U+0128 Itilde +!A6 U+013B Lcommaaccent +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+0112 Emacron +!AB U+0122 Gcommaaccent +!AC U+0166 Tbar +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0157 rcommaaccent +!B4 U+00B4 acute +!B5 U+0129 itilde +!B6 U+013C lcommaaccent +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+0113 emacron +!BB U+0123 gcommaaccent +!BC U+0167 tbar +!BD U+014A Eng +!BE U+017E zcaron +!BF U+014B eng +!C0 U+0100 Amacron +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+012E Iogonek +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+0116 Edotaccent +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+012A Imacron +!D0 U+0110 Dcroat +!D1 U+0145 Ncommaaccent +!D2 U+014C Omacron +!D3 U+0136 Kcommaaccent +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+0172 Uogonek +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0168 Utilde +!DE U+016A Umacron +!DF U+00DF germandbls +!E0 U+0101 amacron +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+012F iogonek +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+0117 edotaccent +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+012B imacron +!F0 U+0111 dcroat +!F1 U+0146 ncommaaccent +!F2 U+014D omacron +!F3 U+0137 kcommaaccent +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+0173 uogonek +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0169 utilde +!FE U+016B umacron +!FF U+02D9 dotaccent diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-5.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-5.map new file mode 100644 index 000000000..f9cd4edcf --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-5.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0401 afii10023 +!A2 U+0402 afii10051 +!A3 U+0403 afii10052 +!A4 U+0404 afii10053 +!A5 U+0405 afii10054 +!A6 U+0406 afii10055 +!A7 U+0407 afii10056 +!A8 U+0408 afii10057 +!A9 U+0409 afii10058 +!AA U+040A afii10059 +!AB U+040B afii10060 +!AC U+040C afii10061 +!AD U+00AD hyphen +!AE U+040E afii10062 +!AF U+040F afii10145 +!B0 U+0410 afii10017 +!B1 U+0411 afii10018 +!B2 U+0412 afii10019 +!B3 U+0413 afii10020 +!B4 U+0414 afii10021 +!B5 U+0415 afii10022 +!B6 U+0416 afii10024 +!B7 U+0417 afii10025 +!B8 U+0418 afii10026 +!B9 U+0419 afii10027 +!BA U+041A afii10028 +!BB U+041B afii10029 +!BC U+041C afii10030 +!BD U+041D afii10031 +!BE U+041E afii10032 +!BF U+041F afii10033 +!C0 U+0420 afii10034 +!C1 U+0421 afii10035 +!C2 U+0422 afii10036 +!C3 U+0423 afii10037 +!C4 U+0424 afii10038 +!C5 U+0425 afii10039 +!C6 U+0426 afii10040 +!C7 U+0427 afii10041 +!C8 U+0428 afii10042 +!C9 U+0429 afii10043 +!CA U+042A afii10044 +!CB U+042B afii10045 +!CC U+042C afii10046 +!CD U+042D afii10047 +!CE U+042E afii10048 +!CF U+042F afii10049 +!D0 U+0430 afii10065 +!D1 U+0431 afii10066 +!D2 U+0432 afii10067 +!D3 U+0433 afii10068 +!D4 U+0434 afii10069 +!D5 U+0435 afii10070 +!D6 U+0436 afii10072 +!D7 U+0437 afii10073 +!D8 U+0438 afii10074 +!D9 U+0439 afii10075 +!DA U+043A afii10076 +!DB U+043B afii10077 +!DC U+043C afii10078 +!DD U+043D afii10079 +!DE U+043E afii10080 +!DF U+043F afii10081 +!E0 U+0440 afii10082 +!E1 U+0441 afii10083 +!E2 U+0442 afii10084 +!E3 U+0443 afii10085 +!E4 U+0444 afii10086 +!E5 U+0445 afii10087 +!E6 U+0446 afii10088 +!E7 U+0447 afii10089 +!E8 U+0448 afii10090 +!E9 U+0449 afii10091 +!EA U+044A afii10092 +!EB U+044B afii10093 +!EC U+044C afii10094 +!ED U+044D afii10095 +!EE U+044E afii10096 +!EF U+044F afii10097 +!F0 U+2116 afii61352 +!F1 U+0451 afii10071 +!F2 U+0452 afii10099 +!F3 U+0453 afii10100 +!F4 U+0454 afii10101 +!F5 U+0455 afii10102 +!F6 U+0456 afii10103 +!F7 U+0457 afii10104 +!F8 U+0458 afii10105 +!F9 U+0459 afii10106 +!FA U+045A afii10107 +!FB U+045B afii10108 +!FC U+045C afii10109 +!FD U+00A7 section +!FE U+045E afii10110 +!FF U+045F afii10193 diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-7.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-7.map new file mode 100644 index 000000000..e163796b1 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-7.map @@ -0,0 +1,250 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+2018 quoteleft +!A2 U+2019 quoteright +!A3 U+00A3 sterling +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+0385 dieresistonos +!B6 U+0386 Alphatonos +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/includes/html2pdf/_fpdf/font/makefont/iso-8859-9.map b/includes/html2pdf/_fpdf/font/makefont/iso-8859-9.map new file mode 100644 index 000000000..48c123ae6 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/iso-8859-9.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/includes/html2pdf/_fpdf/font/makefont/koi8-r.map b/includes/html2pdf/_fpdf/font/makefont/koi8-r.map new file mode 100644 index 000000000..6ad5d05d0 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/koi8-r.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2219 periodcentered +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+2553 SF520000 +!A5 U+2554 SF390000 +!A6 U+2555 SF220000 +!A7 U+2556 SF210000 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+255C SF270000 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+2562 SF200000 +!B5 U+2563 SF230000 +!B6 U+2564 SF470000 +!B7 U+2565 SF480000 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+256B SF530000 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/includes/html2pdf/_fpdf/font/makefont/koi8-u.map b/includes/html2pdf/_fpdf/font/makefont/koi8-u.map new file mode 100644 index 000000000..40a7e4fd7 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/koi8-u.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2022 bullet +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+0454 afii10101 +!A5 U+2554 SF390000 +!A6 U+0456 afii10103 +!A7 U+0457 afii10104 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+0491 afii10098 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+0404 afii10053 +!B5 U+2563 SF230000 +!B6 U+0406 afii10055 +!B7 U+0407 afii10056 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+0490 afii10050 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/includes/html2pdf/_fpdf/font/makefont/makefont.php b/includes/html2pdf/_fpdf/font/makefont/makefont.php new file mode 100644 index 000000000..13039326d --- /dev/null +++ b/includes/html2pdf/_fpdf/font/makefont/makefont.php @@ -0,0 +1,419 @@ +Error: encoding not found: '.$enc); + $cc2gn=array(); + foreach($a as $l) + { + if($l[0]=='!') + { + $e=preg_split('/[ \\t]+/',rtrim($l)); + $cc=hexdec(substr($e[0],1)); + $gn=$e[2]; + $cc2gn[$cc]=$gn; + } + } + for($i=0;$i<=255;$i++) + { + if(!isset($cc2gn[$i])) + $cc2gn[$i]='.notdef'; + } + return $cc2gn; +} + +function ReadAFM($file, &$map) +{ + //Read a font metric file + $a=file($file); + if(empty($a)) + die('File not found'); + $widths=array(); + $fm=array(); + $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent', + 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut', + 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent', + 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent', + 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent', + 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat', + 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb', + 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong'); + foreach($a as $l) + { + $e=explode(' ',rtrim($l)); + if(count($e)<2) + continue; + $code=$e[0]; + $param=$e[1]; + if($code=='C') + { + //Character metrics + $cc=(int)$e[1]; + $w=$e[4]; + $gn=$e[7]; + if(substr($gn,-4)=='20AC') + $gn='Euro'; + if(isset($fix[$gn])) + { + //Fix incorrect glyph name + foreach($map as $c=>$n) + { + if($n==$fix[$gn]) + $map[$c]=$gn; + } + } + if(empty($map)) + { + //Symbolic font: use built-in encoding + $widths[$cc]=$w; + } + else + { + $widths[$gn]=$w; + if($gn=='X') + $fm['CapXHeight']=$e[13]; + } + if($gn=='.notdef') + $fm['MissingWidth']=$w; + } + elseif($code=='FontName') + $fm['FontName']=$param; + elseif($code=='Weight') + $fm['Weight']=$param; + elseif($code=='ItalicAngle') + $fm['ItalicAngle']=(double)$param; + elseif($code=='Ascender') + $fm['Ascender']=(int)$param; + elseif($code=='Descender') + $fm['Descender']=(int)$param; + elseif($code=='UnderlineThickness') + $fm['UnderlineThickness']=(int)$param; + elseif($code=='UnderlinePosition') + $fm['UnderlinePosition']=(int)$param; + elseif($code=='IsFixedPitch') + $fm['IsFixedPitch']=($param=='true'); + elseif($code=='FontBBox') + $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); + elseif($code=='CapHeight') + $fm['CapHeight']=(int)$param; + elseif($code=='StdVW') + $fm['StdVW']=(int)$param; + } + if(!isset($fm['FontName'])) + die('FontName not found'); + if(!empty($map)) + { + if(!isset($widths['.notdef'])) + $widths['.notdef']=600; + if(!isset($widths['Delta']) && isset($widths['increment'])) + $widths['Delta']=$widths['increment']; + //Order widths according to map + for($i=0;$i<=255;$i++) + { + if(!isset($widths[$map[$i]])) + { + echo 'Warning: character '.$map[$i].' is missing
'; + $widths[$i]=$widths['.notdef']; + } + else + $widths[$i]=$widths[$map[$i]]; + } + } + $fm['Widths']=$widths; + return $fm; +} + +function MakeFontDescriptor($fm, $symbolic) +{ + //Ascent + $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); + $fd="array('Ascent'=>".$asc; + //Descent + $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); + $fd.=",'Descent'=>".$desc; + //CapHeight + if(isset($fm['CapHeight'])) + $ch=$fm['CapHeight']; + elseif(isset($fm['CapXHeight'])) + $ch=$fm['CapXHeight']; + else + $ch=$asc; + $fd.=",'CapHeight'=>".$ch; + //Flags + $flags=0; + if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch']) + $flags+=1<<0; + if($symbolic) + $flags+=1<<2; + if(!$symbolic) + $flags+=1<<5; + if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0) + $flags+=1<<6; + $fd.=",'Flags'=>".$flags; + //FontBBox + if(isset($fm['FontBBox'])) + $fbb=$fm['FontBBox']; + else + $fbb=array(0,$desc-100,1000,$asc+100); + $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; + //ItalicAngle + $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); + $fd.=",'ItalicAngle'=>".$ia; + //StemV + if(isset($fm['StdVW'])) + $stemv=$fm['StdVW']; + elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight'])) + $stemv=120; + else + $stemv=70; + $fd.=",'StemV'=>".$stemv; + //MissingWidth + if(isset($fm['MissingWidth'])) + $fd.=",'MissingWidth'=>".$fm['MissingWidth']; + $fd.=')'; + return $fd; +} + +function MakeWidthArray($fm) +{ + //Make character width array + $s="array(\n\t"; + $cw=$fm['Widths']; + for($i=0;$i<=255;$i++) + { + if(chr($i)=="'") + $s.="'\\''"; + elseif(chr($i)=="\\") + $s.="'\\\\'"; + elseif($i>=32 && $i<=126) + $s.="'".chr($i)."'"; + else + $s.="chr($i)"; + $s.='=>'.$fm['Widths'][$i]; + if($i<255) + $s.=','; + if(($i+1)%22==0) + $s.="\n\t"; + } + $s.=')'; + return $s; +} + +function MakeFontEncoding($map) +{ + //Build differences from reference encoding + $ref=ReadMap('cp1252'); + $s=''; + $last=0; + for($i=32;$i<=255;$i++) + { + if($map[$i]!=$ref[$i]) + { + if($i!=$last+1) + $s.=$i.' '; + $last=$i; + $s.='/'.$map[$i].' '; + } + } + return rtrim($s); +} + +function SaveToFile($file, $s, $mode) +{ + $f=fopen($file,'w'.$mode); + if(!$f) + die('Can\'t write to file '.$file); + fwrite($f,$s,strlen($s)); + fclose($f); +} + +function ReadShort($f) +{ + $a=unpack('n1n',fread($f,2)); + return $a['n']; +} + +function ReadLong($f) +{ + $a=unpack('N1N',fread($f,4)); + return $a['N']; +} + +function CheckTTF($file) +{ + //Check if font license allows embedding + $f=fopen($file,'rb'); + if(!$f) + die('Error: Can\'t open '.$file); + //Extract number of tables + fseek($f,4,SEEK_CUR); + $nb=ReadShort($f); + fseek($f,6,SEEK_CUR); + //Seek OS/2 table + $found=false; + for($i=0;$i<$nb;$i++) + { + if(fread($f,4)=='OS/2') + { + $found=true; + break; + } + fseek($f,12,SEEK_CUR); + } + if(!$found) + { + fclose($f); + return; + } + fseek($f,4,SEEK_CUR); + $offset=ReadLong($f); + fseek($f,$offset,SEEK_SET); + //Extract fsType flags + fseek($f,8,SEEK_CUR); + $fsType=ReadShort($f); + $rl=($fsType & 0x02)!=0; + $pp=($fsType & 0x04)!=0; + $e=($fsType & 0x08)!=0; + fclose($f); + if($rl && !$pp && !$e) + echo 'Warning: font license does not allow embedding'; +} + +/******************************************************************************* +* fontfile: path to TTF file (or empty string if not to be embedded0) +* afmfile: path to AFM file +* enc: font encoding (or empty string for symbolic fonts) +* patch: optional patch for encoding +* type: font type if fontfile is empty +*******************************************************************************/ +function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType') +{ + //Generate a font definition file + if(get_magic_quotes_runtime()) + @set_magic_quotes_runtime(0); + ini_set('auto_detect_line_endings','1'); + if($enc) + { + $map=ReadMap($enc); + foreach($patch as $cc=>$gn) + $map[$cc]=$gn; + } + else + $map=array(); + if(!file_exists($afmfile)) + die('Error: AFM file not found: '.$afmfile); + $fm=ReadAFM($afmfile,$map); + if($enc) + $diff=MakeFontEncoding($map); + else + $diff=''; + $fd=MakeFontDescriptor($fm,empty($map)); + //Find font type + if($fontfile) + { + $ext=strtolower(substr($fontfile,-3)); + if($ext=='ttf') + $type='TrueType'; + elseif($ext=='pfb') + $type='Type1'; + else + die('Error: unrecognized font file extension: '.$ext); + } + else + { + if($type!='TrueType' && $type!='Type1') + die('Error: incorrect font type: '.$type); + } + //Start generation + $s='Error: font file not found: '.$fontfile); + if($type=='TrueType') + CheckTTF($fontfile); + $f=fopen($fontfile,'rb'); + if(!$f) + die('Error: Can\'t open '.$fontfile); + $file=fread($f,filesize($fontfile)); + fclose($f); + if($type=='Type1') + { + //Find first two sections and discard third one + $header=(ord($file[0])==128); + if($header) + { + //Strip first binary header + $file=substr($file,6); + } + $pos=strpos($file,'eexec'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size1=$pos+6; + if($header && ord($file[$size1])==128) + { + //Strip second binary header + $file=substr($file,0,$size1).substr($file,$size1+6); + } + $pos=strpos($file,'00000000'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size2=$pos-$size1; + $file=substr($file,0,$size1+$size2); + } + if(function_exists('gzcompress')) + { + $cmp=$basename.'.z'; + SaveToFile($cmp,gzcompress($file),'b'); + $s.='$file=\''.$cmp."';\n"; + echo 'Font file compressed ('.$cmp.')
'; + } + else + { + $s.='$file=\''.basename($fontfile)."';\n"; + echo 'Notice: font file could not be compressed (zlib extension not available)
'; + } + if($type=='Type1') + { + $s.='$size1='.$size1.";\n"; + $s.='$size2='.$size2.";\n"; + } + else + $s.='$originalsize='.filesize($fontfile).";\n"; + } + else + { + //Not embedded font + $s.='$file='."'';\n"; + } + $s.="?>\n"; + SaveToFile($basename.'.php',$s,'t'); + echo 'Font definition file generated ('.$basename.'.php'.')
'; +} +?> diff --git a/includes/html2pdf/_fpdf/font/symbol.php b/includes/html2pdf/_fpdf/font/symbol.php new file mode 100644 index 000000000..43b50e451 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/symbol.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, + ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, + 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, + 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, + 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, + chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, + chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, + chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, + chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); +?> diff --git a/includes/html2pdf/_fpdf/font/times.php b/includes/html2pdf/_fpdf/font/times.php new file mode 100644 index 000000000..837c706e0 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/times.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, + 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, + 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); +?> diff --git a/includes/html2pdf/_fpdf/font/timesb.php b/includes/html2pdf/_fpdf/font/timesb.php new file mode 100644 index 000000000..09cff86ac --- /dev/null +++ b/includes/html2pdf/_fpdf/font/timesb.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, + 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, + 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/includes/html2pdf/_fpdf/font/timesbi.php b/includes/html2pdf/_fpdf/font/timesbi.php new file mode 100644 index 000000000..b4e38d763 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/timesbi.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, + 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, + 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/includes/html2pdf/_fpdf/font/timesi.php b/includes/html2pdf/_fpdf/font/timesi.php new file mode 100644 index 000000000..0ba2b7773 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/timesi.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, + 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, + 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/includes/html2pdf/_fpdf/font/zapfdingbats.php b/includes/html2pdf/_fpdf/font/zapfdingbats.php new file mode 100644 index 000000000..1f926a8c3 --- /dev/null +++ b/includes/html2pdf/_fpdf/font/zapfdingbats.php @@ -0,0 +1,15 @@ +0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, + chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, + ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, + 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, + 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, + 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, + chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, + chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, + chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, + chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, + chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); +?> diff --git a/includes/html2pdf/_fpdf/fpdf.css b/includes/html2pdf/_fpdf/fpdf.css new file mode 100644 index 000000000..5db33774e --- /dev/null +++ b/includes/html2pdf/_fpdf/fpdf.css @@ -0,0 +1,21 @@ +body {font-family:"Times New Roman",serif} +h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em} +h2 {font:bold 100% Arial,sans-serif; color:#900000; margin-top:1.5em} +dl.param dt {text-decoration:underline} +dl.param dd {margin-top:1em; margin-bottom:1em} +dl.param ul {margin-top:1em; margin-bottom:1em} +tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%} +div.source {margin-top:1.4em; margin-bottom:1.3em} +div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000} +div.doc-source {margin-top:1.4em; margin-bottom:1.3em} +div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.doc-source code {display:block; background-color:#E0E0E0; padding:4px} +.kw {color:#000080; font-weight:bold} +.str {color:#CC0000} +.cmt {color:#008000} +p.demo {text-align:center; margin-top:-0.9em} +a.demo {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF} +a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF} diff --git a/includes/html2pdf/_fpdf/fpdf.php b/includes/html2pdf/_fpdf/fpdf.php new file mode 100644 index 000000000..daa0c19fd --- /dev/null +++ b/includes/html2pdf/_fpdf/fpdf.php @@ -0,0 +1,1734 @@ +_dochecks(); + //Initialization of properties + $this->page=0; + $this->n=2; + $this->buffer=''; + $this->pages=array(); + $this->PageSizes=array(); + $this->state=0; + $this->fonts=array(); + $this->FontFiles=array(); + $this->diffs=array(); + $this->images=array(); + $this->links=array(); + $this->InHeader=false; + $this->InFooter=false; + $this->lasth=0; + $this->FontFamily=''; + $this->FontStyle=''; + $this->FontSizePt=12; + $this->underline=false; + $this->DrawColor='0 G'; + $this->FillColor='0 g'; + $this->TextColor='0 g'; + $this->ColorFlag=false; + $this->ws=0; + //Standard fonts + $this->CoreFonts=array('courier'=>'Courier', 'courierB'=>'Courier-Bold', 'courierI'=>'Courier-Oblique', 'courierBI'=>'Courier-BoldOblique', + 'helvetica'=>'Helvetica', 'helveticaB'=>'Helvetica-Bold', 'helveticaI'=>'Helvetica-Oblique', 'helveticaBI'=>'Helvetica-BoldOblique', + 'times'=>'Times-Roman', 'timesB'=>'Times-Bold', 'timesI'=>'Times-Italic', 'timesBI'=>'Times-BoldItalic', + 'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats'); + //Scale factor + if($unit=='pt') + $this->k=1; + elseif($unit=='mm') + $this->k=72/25.4; + elseif($unit=='cm') + $this->k=72/2.54; + elseif($unit=='in') + $this->k=72; + else + $this->Error('Incorrect unit: '.$unit); + //Page format + $this->PageFormats=array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), + 'letter'=>array(612,792), 'legal'=>array(612,1008)); + if(is_string($format)) + $format=$this->_getpageformat($format); + $this->DefPageFormat=$format; + $this->CurPageFormat=$format; + //Page orientation + $orientation=strtolower($orientation); + if($orientation=='p' || $orientation=='portrait') + { + $this->DefOrientation='P'; + $this->w=$this->DefPageFormat[0]; + $this->h=$this->DefPageFormat[1]; + } + elseif($orientation=='l' || $orientation=='landscape') + { + $this->DefOrientation='L'; + $this->w=$this->DefPageFormat[1]; + $this->h=$this->DefPageFormat[0]; + } + else + $this->Error('Incorrect orientation: '.$orientation); + $this->CurOrientation=$this->DefOrientation; + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + //Page margins (1 cm) + $margin=28.35/$this->k; + $this->SetMargins($margin,$margin); + //Interior cell margin (1 mm) + $this->cMargin=$margin/10; + //Line width (0.2 mm) + $this->LineWidth=.567/$this->k; + //Automatic page break + $this->SetAutoPageBreak(true,2*$margin); + //Full width display mode + $this->SetDisplayMode('fullwidth'); + //Enable compression + $this->SetCompression(true); + //Set default PDF version number + $this->PDFVersion='1.3'; +} + +function SetMargins($left, $top, $right=null) +{ + //Set left, top and right margins + $this->lMargin=$left; + $this->tMargin=$top; + if($right===null) + $right=$left; + $this->rMargin=$right; +} + +function SetLeftMargin($margin) +{ + //Set left margin + $this->lMargin=$margin; + if($this->page>0 && $this->x<$margin) + $this->x=$margin; +} + +function SetTopMargin($margin) +{ + //Set top margin + $this->tMargin=$margin; +} + +function SetRightMargin($margin) +{ + //Set right margin + $this->rMargin=$margin; +} + +function SetAutoPageBreak($auto, $margin=0) +{ + //Set auto page break mode and triggering margin + $this->AutoPageBreak=$auto; + $this->bMargin=$margin; + $this->PageBreakTrigger=$this->h-$margin; +} + +function SetDisplayMode($zoom, $layout='continuous') +{ + //Set display mode in viewer + if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) + $this->ZoomMode=$zoom; + else + $this->Error('Incorrect zoom display mode: '.$zoom); + if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') + $this->LayoutMode=$layout; + else + $this->Error('Incorrect layout display mode: '.$layout); +} + +function SetCompression($compress) +{ + //Set page compression + if(function_exists('gzcompress')) + $this->compress=$compress; + else + $this->compress=false; +} + +function SetTitle($title, $isUTF8=false) +{ + //Title of document + if($isUTF8) + $title=$this->_UTF8toUTF16($title); + $this->title=$title; +} + +function SetSubject($subject, $isUTF8=false) +{ + //Subject of document + if($isUTF8) + $subject=$this->_UTF8toUTF16($subject); + $this->subject=$subject; +} + +function SetAuthor($author, $isUTF8=false) +{ + //Author of document + if($isUTF8) + $author=$this->_UTF8toUTF16($author); + $this->author=$author; +} + +function SetKeywords($keywords, $isUTF8=false) +{ + //Keywords of document + if($isUTF8) + $keywords=$this->_UTF8toUTF16($keywords); + $this->keywords=$keywords; +} + +function SetCreator($creator, $isUTF8=false) +{ + //Creator of document + if($isUTF8) + $creator=$this->_UTF8toUTF16($creator); + $this->creator=$creator; +} + +function AliasNbPages($alias='{nb}') +{ + //Define an alias for total number of pages + $this->AliasNbPages=$alias; +} + +function Error($msg) +{ + //Fatal error + die('FPDF error: '.$msg); +} + +function Open() +{ + //Begin document + $this->state=1; +} + +function Close() +{ + //Terminate document + if($this->state==3) + return; + if($this->page==0) + $this->AddPage(); + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + //Close document + $this->_enddoc(); +} + +function AddPage($orientation='', $format='') +{ + //Start a new page + if($this->state==0) + $this->Open(); + $family=$this->FontFamily; + $style=$this->FontStyle.($this->underline ? 'U' : ''); + $size=$this->FontSizePt; + $lw=$this->LineWidth; + $dc=$this->DrawColor; + $fc=$this->FillColor; + $tc=$this->TextColor; + $cf=$this->ColorFlag; + if($this->page>0) + { + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + } + //Start new page + $this->_beginpage($orientation,$format); + //Set line cap style to square + $this->_out('2 J'); + //Set line width + $this->LineWidth=$lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + //Set font + if($family) + $this->SetFont($family,$style,$size); + //Set colors + $this->DrawColor=$dc; + if($dc!='0 G') + $this->_out($dc); + $this->FillColor=$fc; + if($fc!='0 g') + $this->_out($fc); + $this->TextColor=$tc; + $this->ColorFlag=$cf; + //Page header + $this->InHeader=true; + $this->Header(); + $this->InHeader=false; + //Restore line width + if($this->LineWidth!=$lw) + { + $this->LineWidth=$lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + } + //Restore font + if($family) + $this->SetFont($family,$style,$size); + //Restore colors + if($this->DrawColor!=$dc) + { + $this->DrawColor=$dc; + $this->_out($dc); + } + if($this->FillColor!=$fc) + { + $this->FillColor=$fc; + $this->_out($fc); + } + $this->TextColor=$tc; + $this->ColorFlag=$cf; +} + +function Header() +{ + //To be implemented in your own inherited class +} + +function Footer() +{ + //To be implemented in your own inherited class +} + +function PageNo() +{ + //Get current page number + return $this->page; +} + +function SetDrawColor($r, $g=null, $b=null) +{ + //Set color for all stroking operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->DrawColor=sprintf('%.3F G',$r/255); + else + $this->DrawColor=sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); + if($this->page>0) + $this->_out($this->DrawColor); +} + +function SetFillColor($r, $g=null, $b=null) +{ + //Set color for all filling operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->FillColor=sprintf('%.3F g',$r/255); + else + $this->FillColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag=($this->FillColor!=$this->TextColor); + if($this->page>0) + $this->_out($this->FillColor); +} + +function SetTextColor($r, $g=null, $b=null) +{ + //Set color for text + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->TextColor=sprintf('%.3F g',$r/255); + else + $this->TextColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag=($this->FillColor!=$this->TextColor); +} + +function GetStringWidth($s) +{ + //Get width of a string in the current font + $s=(string)$s; + $cw=&$this->CurrentFont['cw']; + $w=0; + $l=strlen($s); + for($i=0;$i<$l;$i++) + $w+=$cw[$s[$i]]; + return $w*$this->FontSize/1000; +} + +function SetLineWidth($width) +{ + //Set line width + $this->LineWidth=$width; + if($this->page>0) + $this->_out(sprintf('%.2F w',$width*$this->k)); +} + +function Line($x1, $y1, $x2, $y2) +{ + //Draw a line + $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); +} + +function Rect($x, $y, $w, $h, $style='') +{ + //Draw a rectangle + if($style=='F') + $op='f'; + elseif($style=='FD' || $style=='DF') + $op='B'; + else + $op='S'; + $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); +} + +function AddFont($family, $style='', $file='') +{ + //Add a TrueType or Type1 font + $family=strtolower($family); + if($file=='') + $file=str_replace(' ','',$family).strtolower($style).'.php'; + if($family=='arial') + $family='helvetica'; + $style=strtoupper($style); + if($style=='IB') + $style='BI'; + $fontkey=$family.$style; + if(isset($this->fonts[$fontkey])) + return; + include($this->_getfontpath().$file); + if(!isset($name)) + $this->Error('Could not include font definition file'); + $i=count($this->fonts)+1; + $this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file); + if($diff) + { + //Search existing encodings + $d=0; + $nb=count($this->diffs); + for($i=1;$i<=$nb;$i++) + { + if($this->diffs[$i]==$diff) + { + $d=$i; + break; + } + } + if($d==0) + { + $d=$nb+1; + $this->diffs[$d]=$diff; + } + $this->fonts[$fontkey]['diff']=$d; + } + if($file) + { + if($type=='TrueType') + $this->FontFiles[$file]=array('length1'=>$originalsize); + else + $this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2); + } +} + +function SetFont($family, $style='', $size=0) +{ + //Select a font; size given in points + global $fpdf_charwidths; + + $family=strtolower($family); + if($family=='') + $family=$this->FontFamily; + if($family=='arial') + $family='helvetica'; + elseif($family=='symbol' || $family=='zapfdingbats') + $style=''; + $style=strtoupper($style); + if(strpos($style,'U')!==false) + { + $this->underline=true; + $style=str_replace('U','',$style); + } + else + $this->underline=false; + if($style=='IB') + $style='BI'; + if($size==0) + $size=$this->FontSizePt; + //Test if font is already selected + if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) + return; + //Test if used for the first time + $fontkey=$family.$style; + if(!isset($this->fonts[$fontkey])) + { + //Check if one of the standard fonts + if(isset($this->CoreFonts[$fontkey])) + { + if(!isset($fpdf_charwidths[$fontkey])) + { + //Load metric file + $file=$family; + if($family=='times' || $family=='helvetica') + $file.=strtolower($style); + include($this->_getfontpath().$file.'.php'); + if(!isset($fpdf_charwidths[$fontkey])) + $this->Error('Could not include font metric file'); + } + $i=count($this->fonts)+1; + $name=$this->CoreFonts[$fontkey]; + $cw=$fpdf_charwidths[$fontkey]; + $this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw); + } + else + $this->Error('Undefined font: '.$family.' '.$style); + } + //Select it + $this->FontFamily=$family; + $this->FontStyle=$style; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + $this->CurrentFont=&$this->fonts[$fontkey]; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function SetFontSize($size) +{ + //Set font size in points + if($this->FontSizePt==$size) + return; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function AddLink() +{ + //Create a new internal link + $n=count($this->links)+1; + $this->links[$n]=array(0, 0); + return $n; +} + +function SetLink($link, $y=0, $page=-1) +{ + //Set destination of internal link + if($y==-1) + $y=$this->y; + if($page==-1) + $page=$this->page; + $this->links[$link]=array($page, $y); +} + +function Link($x, $y, $w, $h, $link) +{ + //Put a link on the page + $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); +} + +function Text($x, $y, $txt) +{ + //Output a string + $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); + if ($txt!='') + { + if($this->underline) $s.=' '.$this->_dounderline($x,$y,$txt); + } + if($this->ColorFlag) + $s='q '.$this->TextColor.' '.$s.' Q'; + $this->_out($s); +} + +function AcceptPageBreak() +{ + //Accept automatic page break or not + return $this->AutoPageBreak; +} + +function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') +{ + //Output a cell + $k=$this->k; + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x=$this->x; + $ws=$this->ws; + if($ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x; + if($ws>0) + { + $this->ws=$ws; + $this->_out(sprintf('%.3F Tw',$ws*$k)); + } + } + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $s=''; + if($fill || $border==1) + { + if($fill) + $op=($border==1) ? 'B' : 'f'; + else + $op='S'; + $s=sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); + } + if(is_string($border)) + { + $x=$this->x; + $y=$this->y; + if(strpos($border,'L')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); + if(strpos($border,'T')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); + if(strpos($border,'R')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + if(strpos($border,'B')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + } + if($txt!=='') + { + if($align=='R') + $dx=$w-$this->cMargin-$this->GetStringWidth($txt); + elseif($align=='C') + $dx=($w-$this->GetStringWidth($txt))/2; + else + $dx=$this->cMargin; + if($this->ColorFlag) + $s.='q '.$this->TextColor.' '; + $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); + $s.=sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); + if($this->underline) + $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + if($this->ColorFlag) + $s.=' Q'; + if($link) + $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); + } + if($s) + $this->_out($s); + $this->lasth=$h; + if($ln>0) + { + //Go to next line + $this->y+=$h; + if($ln==1) + $this->x=$this->lMargin; + } + else + $this->x+=$w; +} + +function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) +{ + //Output text with automatic or explicit line breaks + $cw=&$this->CurrentFont['cw']; + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + if($nb>0 && $s[$nb-1]=="\n") + $nb--; + $b=0; + if($border) + { + if($border==1) + { + $border='LTRB'; + $b='LRT'; + $b2='LR'; + } + else + { + $b2=''; + if(strpos($border,'L')!==false) + $b2.='L'; + if(strpos($border,'R')!==false) + $b2.='R'; + $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2; + } + } + $sep=-1; + $i=0; + $j=0; + $l=0; + $ns=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s[$i]; + if($c=="\n") + { + //Explicit line break + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $i++; + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border && $nl==2) + $b=$b2; + continue; + } + if($c==' ') + { + $sep=$i; + $ls=$l; + $ns++; + } + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($i==$j) + $i++; + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + } + else + { + if($align=='J') + { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); + } + $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border && $nl==2) + $b=$b2; + } + else + $i++; + } + //Last chunk + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + if($border && strpos($border,'B')!==false) + $b.='B'; + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $this->x=$this->lMargin; +} + +function Write($h, $txt, $link='') +{ + //Output text in flowing mode + $cw=&$this->CurrentFont['cw']; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + $sep=-1; + $i=0; + $j=0; + $l=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s[$i]; + if($c=="\n") + { + //Explicit line break + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + $i++; + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + continue; + } + if($c==' ') + $sep=$i; + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($this->x>$this->lMargin) + { + //Move to next line + $this->x=$this->lMargin; + $this->y+=$h; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $i++; + $nl++; + continue; + } + if($i==$j) + $i++; + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + } + else + { + $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + } + else + $i++; + } + //Last chunk + if($i!=$j) + $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); +} + +function Ln($h=null) +{ + //Line feed; default value is last cell height + $this->x=$this->lMargin; + if($h===null) + $this->y+=$this->lasth; + else + $this->y+=$h; +} + +function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') +{ + //Put an image on the page + if(!isset($this->images[$file])) + { + //First use of this image, get info + if($type=='') + { + $pos=strrpos($file,'.'); + if(!$pos) + $this->Error('Image file has no extension and no type was specified: '.$file); + $type=substr($file,$pos+1); + } + $type=strtolower($type); + if($type=='jpeg') + $type='jpg'; + $mtd='_parse'.$type; + if(!method_exists($this,$mtd)) + $this->Error('Unsupported image type: '.$type); + $info=$this->$mtd($file); + $info['i']=count($this->images)+1; + $this->images[$file]=$info; + } + else + $info=$this->images[$file]; + //Automatic width and height calculation if needed + if($w==0 && $h==0) + { + //Put image at 72 dpi + $w=$info['w']/$this->k; + $h=$info['h']/$this->k; + } + elseif($w==0) + $w=$h*$info['w']/$info['h']; + elseif($h==0) + $h=$w*$info['h']/$info['w']; + //Flowing mode + if($y===null) + { + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x2=$this->x; + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x2; + } + $y=$this->y; + $this->y+=$h; + } + if($x===null) + $x=$this->x; + $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); + if($link) + $this->Link($x,$y,$w,$h,$link); +} + +function GetX() +{ + //Get x position + return $this->x; +} + +function SetX($x) +{ + //Set x position + if($x>=0) + $this->x=$x; + else + $this->x=$this->w+$x; +} + +function GetY() +{ + //Get y position + return $this->y; +} + +function SetY($y) +{ + //Set y position and reset x + $this->x=$this->lMargin; + if($y>=0) + $this->y=$y; + else + $this->y=$this->h+$y; +} + +function SetXY($x, $y) +{ + //Set x and y positions + $this->SetY($y); + $this->SetX($x); +} + +function Output($name='', $dest='') +{ + //Output PDF to some destination + if($this->state<3) + $this->Close(); + $dest=strtoupper($dest); + if($dest=='') + { + if($name=='') + { + $name='doc.pdf'; + $dest='I'; + } + else + $dest='F'; + } + switch($dest) + { + case 'I': + //Send to standard output + if(ob_get_length()) + $this->Error('Some data has already been output, can\'t send PDF file'); + if(php_sapi_name()!='cli') + { + //We send to a browser + header('Content-Type: application/pdf'); + if(headers_sent()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Length: '.strlen($this->buffer)); + header('Content-Disposition: inline; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + ini_set('zlib.output_compression','0'); + } + echo $this->buffer; + break; + case 'D': + //Download file + if(ob_get_length()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Type: application/x-download'); + if(headers_sent()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Length: '.strlen($this->buffer)); + header('Content-Disposition: attachment; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + ini_set('zlib.output_compression','0'); + echo $this->buffer; + break; + case 'F': + //Save to local file + $f=fopen($name,'wb'); + if(!$f) + $this->Error('Unable to create output file: '.$name); + fwrite($f,$this->buffer,strlen($this->buffer)); + fclose($f); + break; + case 'S': + //Return as a string + return $this->buffer; + default: + $this->Error('Incorrect output destination: '.$dest); + } + return ''; +} + +/******************************************************************************* +* * +* Protected methods * +* * +*******************************************************************************/ +function _dochecks() +{ + //Check availability of %F + if(sprintf('%.1F',1.0)!='1.0') + $this->Error('This version of PHP is not supported'); + //Check mbstring overloading + if(ini_get('mbstring.func_overload') & 2) + $this->Error('mbstring overloading must be disabled'); + //Disable runtime magic quotes + if(get_magic_quotes_runtime()) + @set_magic_quotes_runtime(0); +} + +function _getpageformat($format) +{ + $format=strtolower($format); + if(!isset($this->PageFormats[$format])) + $this->Error('Unknown page format: '.$format); + $a=$this->PageFormats[$format]; + return array($a[0]/$this->k, $a[1]/$this->k); +} + +function _getfontpath() +{ + if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font')) + define('FPDF_FONTPATH',dirname(__FILE__).'/font/'); + return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : ''; +} + +function _beginpage($orientation, $format) +{ + $this->page++; + $this->pages[$this->page]=''; + $this->state=2; + $this->x=$this->lMargin; + $this->y=$this->tMargin; + $this->FontFamily=''; + //Check page size + if($orientation=='') + $orientation=$this->DefOrientation; + else + $orientation=strtoupper($orientation[0]); + if($format=='') + $format=$this->DefPageFormat; + else + { + if(is_string($format)) + $format=$this->_getpageformat($format); + } + if($orientation!=$this->CurOrientation || $format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1]) + { + //New size + if($orientation=='P') + { + $this->w=$format[0]; + $this->h=$format[1]; + } + else + { + $this->w=$format[1]; + $this->h=$format[0]; + } + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + $this->PageBreakTrigger=$this->h-$this->bMargin; + $this->CurOrientation=$orientation; + $this->CurPageFormat=$format; + } + if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1]) + $this->PageSizes[$this->page]=array($this->wPt, $this->hPt); +} + +function _endpage() +{ + $this->state=1; +} + +function _escape($s) +{ + //Escape special characters in strings + $s=str_replace('\\','\\\\',$s); + $s=str_replace('(','\\(',$s); + $s=str_replace(')','\\)',$s); + $s=str_replace("\r",'\\r',$s); + return $s; +} + +function _textstring($s) +{ + //Format a text string + return '('.$this->_escape($s).')'; +} + +function _UTF8toUTF16($s) +{ + //Convert UTF-8 to UTF-16BE with BOM + $res="\xFE\xFF"; + $nb=strlen($s); + $i=0; + while($i<$nb) + { + $c1=ord($s[$i++]); + if($c1>=224) + { + //3-byte character + $c2=ord($s[$i++]); + $c3=ord($s[$i++]); + $res.=chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); + $res.=chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); + } + elseif($c1>=192) + { + //2-byte character + $c2=ord($s[$i++]); + $res.=chr(($c1 & 0x1C)>>2); + $res.=chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); + } + else + { + //Single-byte character + $res.="\0".chr($c1); + } + } + return $res; +} + +function _dounderline($x, $y, $txt) +{ + //Underline text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); + return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); +} + +function _parsejpg($file) +{ + //Extract info from a JPEG file + $a=GetImageSize($file); + if(!$a) + $this->Error('Missing or incorrect image file: '.$file); + if($a[2]!=2) + $this->Error('Not a JPEG file: '.$file); + if(!isset($a['channels']) || $a['channels']==3) + $colspace='DeviceRGB'; + elseif($a['channels']==4) + $colspace='DeviceCMYK'; + else + $colspace='DeviceGray'; + $bpc=isset($a['bits']) ? $a['bits'] : 8; + //Read whole file + $f=fopen($file,'rb'); + $data=''; + while(!feof($f)) + $data.=fread($f,8192); + fclose($f); + return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); +} + +function _parsepng($file) +{ + //Extract info from a PNG file + $f=fopen($file,'rb'); + if(!$f) + $this->Error('Can\'t open image file: '.$file); + //Check signature + if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) + $this->Error('Not a PNG file: '.$file); + //Read header chunk + $this->_readstream($f,4); + if($this->_readstream($f,4)!='IHDR') + $this->Error('Incorrect PNG file: '.$file); + $w=$this->_readint($f); + $h=$this->_readint($f); + $bpc=ord($this->_readstream($f,1)); + if($bpc>8) + $this->Error('16-bit depth not supported: '.$file); + $ct=ord($this->_readstream($f,1)); + if($ct==0) + $colspace='DeviceGray'; + elseif($ct==2) + $colspace='DeviceRGB'; + elseif($ct==3) + $colspace='Indexed'; + else + $this->Error('Alpha channel not supported: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown compression method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown filter method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Interlacing not supported: '.$file); + $this->_readstream($f,4); + $parms='/DecodeParms <>'; + //Scan chunks looking for palette, transparency and image data + $pal=''; + $trns=''; + $data=''; + do + { + $n=$this->_readint($f); + $type=$this->_readstream($f,4); + if($type=='PLTE') + { + //Read palette + $pal=$this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='tRNS') + { + //Read transparency info + $t=$this->_readstream($f,$n); + if($ct==0) + $trns=array(ord(substr($t,1,1))); + elseif($ct==2) + $trns=array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); + else + { + $pos=strpos($t,chr(0)); + if($pos!==false) + $trns=array($pos); + } + $this->_readstream($f,4); + } + elseif($type=='IDAT') + { + //Read image data block + $data.=$this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='IEND') + break; + else + $this->_readstream($f,$n+4); + } + while($n); + if($colspace=='Indexed' && empty($pal)) + $this->Error('Missing palette in '.$file); + fclose($f); + return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data); +} + +function _readstream($f, $n) +{ + //Read n bytes from stream + $res=''; + while($n>0 && !feof($f)) + { + $s=fread($f,$n); + if($s===false) + $this->Error('Error while reading stream'); + $n-=strlen($s); + $res.=$s; + } + if($n>0) + $this->Error('Unexpected end of stream'); + return $res; +} + +function _readint($f) +{ + //Read a 4-byte integer from stream + $a=unpack('Ni',$this->_readstream($f,4)); + return $a['i']; +} + +function _parsegif($file) +{ + //Extract info from a GIF file (via PNG conversion) + if(!function_exists('imagepng')) + $this->Error('GD extension is required for GIF support'); + if(!function_exists('imagecreatefromgif')) + $this->Error('GD has no GIF read support'); + $im=imagecreatefromgif($file); + if(!$im) + $this->Error('Missing or incorrect image file: '.$file); + imageinterlace($im,0); + $tmp=tempnam('.','gif'); + if(!$tmp) + $this->Error('Unable to create a temporary file'); + if(!imagepng($im,$tmp)) + $this->Error('Error while saving to temporary file'); + imagedestroy($im); + $info=$this->_parsepng($tmp); + unlink($tmp); + return $info; +} + +function _newobj() +{ + //Begin a new object + $this->n++; + $this->offsets[$this->n]=strlen($this->buffer); + $this->_out($this->n.' 0 obj'); +} + +function _putstream($s) +{ + $this->_out('stream'); + $this->_out($s); + $this->_out('endstream'); +} + +function _out($s) +{ + //Add a line to the document + if($this->state==2) + $this->pages[$this->page].=$s."\n"; + else + $this->buffer.=$s."\n"; +} + +function _putpages() +{ + $nb=$this->page; + if(!empty($this->AliasNbPages)) + { + //Replace number of pages + for($n=1;$n<=$nb;$n++) + $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); + } + if($this->DefOrientation=='P') + { + $wPt=$this->DefPageFormat[0]*$this->k; + $hPt=$this->DefPageFormat[1]*$this->k; + } + else + { + $wPt=$this->DefPageFormat[1]*$this->k; + $hPt=$this->DefPageFormat[0]*$this->k; + } + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + for($n=1;$n<=$nb;$n++) + { + //Page + $this->_newobj(); + $this->_out('<_out('/Parent 1 0 R'); + if(isset($this->PageSizes[$n])) + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); + $this->_out('/Resources 2 0 R'); + if(isset($this->PageLinks[$n])) + { + //Links + $annots='/Annots ['; + foreach($this->PageLinks[$n] as $pl) + { + $rect=sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); + $annots.='<_textstring($pl[4]).'>>>>'; + else + { + $l=$this->links[$pl[4]]; + $h=isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; + $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); + } + } + $this->_out($annots.']'); + } + $this->_out('/Contents '.($this->n+1).' 0 R>>'); + $this->_out('endobj'); + //Page content + $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; + $this->_newobj(); + $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); + $this->_putstream($p); + $this->_out('endobj'); + } + //Pages root + $this->offsets[1]=strlen($this->buffer); + $this->_out('1 0 obj'); + $this->_out('<_out($kids.']'); + $this->_out('/Count '.$nb); + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putfonts() +{ + $nf=$this->n; + foreach($this->diffs as $diff) + { + //Encodings + $this->_newobj(); + $this->_out('<>'); + $this->_out('endobj'); + } + foreach($this->FontFiles as $file=>$info) + { + //Font file embedding + $this->_newobj(); + $this->FontFiles[$file]['n']=$this->n; + $font=''; + $f=fopen($this->_getfontpath().$file,'rb',1); + if(!$f) + $this->Error('Font file not found'); + while(!feof($f)) + $font.=fread($f,8192); + fclose($f); + $compressed=(substr($file,-2)=='.z'); + if(!$compressed && isset($info['length2'])) + { + $header=(ord($font[0])==128); + if($header) + { + //Strip first binary header + $font=substr($font,6); + } + if($header && ord($font[$info['length1']])==128) + { + //Strip second binary header + $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6); + } + } + $this->_out('<_out('/Filter /FlateDecode'); + $this->_out('/Length1 '.$info['length1']); + if(isset($info['length2'])) + $this->_out('/Length2 '.$info['length2'].' /Length3 0'); + $this->_out('>>'); + $this->_putstream($font); + $this->_out('endobj'); + } + foreach($this->fonts as $k=>$font) + { + //Font objects + $this->fonts[$k]['n']=$this->n+1; + $type=$font['type']; + $name=$font['name']; + if($type=='core') + { + //Standard font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /Type1'); + if($name!='Symbol' && $name!='ZapfDingbats') + $this->_out('/Encoding /WinAnsiEncoding'); + $this->_out('>>'); + $this->_out('endobj'); + } + elseif($type=='Type1' || $type=='TrueType') + { + //Additional Type1 or TrueType font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /'.$type); + $this->_out('/FirstChar 32 /LastChar 255'); + $this->_out('/Widths '.($this->n+1).' 0 R'); + $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); + if($font['enc']) + { + if(isset($font['diff'])) + $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); + else + $this->_out('/Encoding /WinAnsiEncoding'); + } + $this->_out('>>'); + $this->_out('endobj'); + //Widths + $this->_newobj(); + $cw=&$font['cw']; + $s='['; + for($i=32;$i<=255;$i++) + $s.=$cw[chr($i)].' '; + $this->_out($s.']'); + $this->_out('endobj'); + //Descriptor + $this->_newobj(); + $s='<$v) + $s.=' /'.$k.' '.$v; + $file=$font['file']; + if($file) + $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; + $this->_out($s.'>>'); + $this->_out('endobj'); + } + else + { + //Allow for additional types + $mtd='_put'.strtolower($type); + if(!method_exists($this,$mtd)) + $this->Error('Unsupported font type: '.$type); + $this->$mtd($font); + } + } +} + +function _putimages() +{ + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->images); + while(list($file,$info)=each($this->images)) + { + $this->_newobj(); + $this->images[$file]['n']=$this->n; + $this->_out('<_out('/Subtype /Image'); + $this->_out('/Width '.$info['w']); + $this->_out('/Height '.$info['h']); + if($info['cs']=='Indexed') + $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); + else + { + $this->_out('/ColorSpace /'.$info['cs']); + if($info['cs']=='DeviceCMYK') + $this->_out('/Decode [1 0 1 0 1 0 1 0]'); + } + $this->_out('/BitsPerComponent '.$info['bpc']); + if(isset($info['f'])) + $this->_out('/Filter /'.$info['f']); + if(isset($info['parms'])) + $this->_out($info['parms']); + if(isset($info['trns']) && is_array($info['trns'])) + { + $trns=''; + for($i=0;$i_out('/Mask ['.$trns.']'); + } + $this->_out('/Length '.strlen($info['data']).'>>'); + $this->_putstream($info['data']); + unset($this->images[$file]['data']); + $this->_out('endobj'); + //Palette + if($info['cs']=='Indexed') + { + $this->_newobj(); + $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal']; + $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); + $this->_putstream($pal); + $this->_out('endobj'); + } + } +} + +function _putxobjectdict() +{ + foreach($this->images as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); +} + +function _putresourcedict() +{ + $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); + $this->_out('/Font <<'); + foreach($this->fonts as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + $this->_out('/XObject <<'); + $this->_putxobjectdict(); + $this->_out('>>'); +} + +function _putresources() +{ + $this->_putfonts(); + $this->_putimages(); + //Resource dictionary + $this->offsets[2]=strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<<'); + $this->_putresourcedict(); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putinfo() +{ + $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); + if(!empty($this->title)) + $this->_out('/Title '.$this->_textstring($this->title)); + if(!empty($this->subject)) + $this->_out('/Subject '.$this->_textstring($this->subject)); + if(!empty($this->author)) + $this->_out('/Author '.$this->_textstring($this->author)); + if(!empty($this->keywords)) + $this->_out('/Keywords '.$this->_textstring($this->keywords)); + if(!empty($this->creator)) + $this->_out('/Creator '.$this->_textstring($this->creator)); + $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); +} + +function _putcatalog() +{ + $this->_out('/Type /Catalog'); + $this->_out('/Pages 1 0 R'); + if($this->ZoomMode=='fullpage') + $this->_out('/OpenAction [3 0 R /Fit]'); + elseif($this->ZoomMode=='fullwidth') + $this->_out('/OpenAction [3 0 R /FitH null]'); + elseif($this->ZoomMode=='real') + $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); + elseif(!is_string($this->ZoomMode)) + $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']'); + if($this->LayoutMode=='single') + $this->_out('/PageLayout /SinglePage'); + elseif($this->LayoutMode=='continuous') + $this->_out('/PageLayout /OneColumn'); + elseif($this->LayoutMode=='two') + $this->_out('/PageLayout /TwoColumnLeft'); +} + +function _putheader() +{ + $this->_out('%PDF-'.$this->PDFVersion); +} + +function _puttrailer() +{ + $this->_out('/Size '.($this->n+1)); + $this->_out('/Root '.$this->n.' 0 R'); + $this->_out('/Info '.($this->n-1).' 0 R'); +} + +function _enddoc() +{ + $this->_putheader(); + $this->_putpages(); + $this->_putresources(); + //Info + $this->_newobj(); + $this->_out('<<'); + $this->_putinfo(); + $this->_out('>>'); + $this->_out('endobj'); + //Catalog + $this->_newobj(); + $this->_out('<<'); + $this->_putcatalog(); + $this->_out('>>'); + $this->_out('endobj'); + //Cross-ref + $o=strlen($this->buffer); + $this->_out('xref'); + $this->_out('0 '.($this->n+1)); + $this->_out('0000000000 65535 f '); + for($i=1;$i<=$this->n;$i++) + $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); + //Trailer + $this->_out('trailer'); + $this->_out('<<'); + $this->_puttrailer(); + $this->_out('>>'); + $this->_out('startxref'); + $this->_out($o); + $this->_out('%%EOF'); + $this->state=3; +} +//End of class +} + +//Handle special IE contype request +if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') +{ + header('Content-Type: application/pdf'); + exit; +} + +?> diff --git a/includes/html2pdf/_fpdf/histo.htm b/includes/html2pdf/_fpdf/histo.htm new file mode 100644 index 000000000..4bc340543 --- /dev/null +++ b/includes/html2pdf/_fpdf/histo.htm @@ -0,0 +1,128 @@ + + + + +History + + + + +

History

+
+
v1.6 (2008-06-08)
+
+- GIF image support.
+- Images can now trigger page breaks.
+- Possibility to have different page formats in a single document.
+- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.
+- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.
+- An automatic page break in Header() doesn't cause an infinite loop any more.
+- Removed some warning messages appearing with recent PHP versions.
+- Added HTTP headers to reduce problems with IE.
+
+
v1.53 (2004-12-31)
+
+- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.
+- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.
+- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.
+- The file name sent to the browser could not contain a space character.
+- The Cell() method could not print the number 0 (you had to pass the string '0').
+
+
v1.52 (2003-12-30)
+
+- Image() now displays the image at 72 dpi if no dimension is given.
+- Output() takes a string as second parameter to indicate destination.
+- Open() is now called automatically by AddPage().
+- Inserting remote JPEG images doesn't generate an error any longer.
+- Decimal separator is forced to dot in the constructor.
+- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).
+- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.
+- No more error message about already sent headers when outputting the PDF to the standard output from the command line.
+- The underlining was going too far for text containing characters \, ( or ).
+- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.
+
+
v1.51 (2002-08-03)
+
+- Type1 font support.
+- Added Baltic encoding.
+- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :
  * The line thickness was too large when printed under Windows 98 SE and ME.
  * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.
+- It is no longer necessary to set the decimal separator as dot to produce valid documents.
+- The clickable area in a cell was always on the left independently from the text alignment.
+- JPEG images in CMYK mode appeared in inverted colors.
+- Transparent PNG images in grayscale or true color mode were incorrectly handled.
+- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.
+
+
v1.5 (2002-05-28)
+
+- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).
+- Added Write() method.
+- Added underlined style.
+- Internal and external link support (AddLink(), SetLink(), Link()).
+- Added right margin management and methods SetRightMargin(), SetTopMargin().
+- Modification of SetDisplayMode() to select page layout.
+- The border parameter of MultiCell() now lets choose borders to draw as Cell().
+- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.
+
+
v1.41 (2002-03-13)
+
+- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).
+
+
v1.4 (2002-03-02)
+
+- PHP3 is no longer supported.
+- Page compression (SetCompression()).
+- Choice of page format and possibility to change orientation inside document.
+- Added AcceptPageBreak() method.
+- Ability to print the total number of pages (AliasNbPages()).
+- Choice of cell borders to draw.
+- New mode for Cell(): the current position can now move under the cell.
+- Ability to include an image by specifying height only (width is calculated automatically).
+- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.
+
+
v1.31 (2002-01-12)
+
+- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.
+- Removed Expires HTTP header (gives trouble in some situations).
+- Added Content-disposition HTTP header (seems to help in some situations).
+
+
v1.3 (2001-12-03)
+
+- Line break and text justification support (MultiCell()).
+- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.
+- A cell whose width is declared null extends up to the right margin of the page.
+- Line width is now retained from page to page and defaults to 0.2 mm.
+- Added SetXY() method.
+- Fixed a passing by reference done in a deprecated manner for PHP4.
+
+
v1.2 (2001-11-11)
+
+- Added font metric files and GetStringWidth() method.
+- Centering and right-aligning text in cells.
+- Display mode control (SetDisplayMode()).
+- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).
+- Possibility to force PDF download by browser.
+- Added SetX() and GetX() methods.
+- During automatic page break, current abscissa is now retained.
+
+
v1.11 (2001-10-20)
+
+- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.
+- Image insertion now works correctly even with magic_quotes_runtime option set to on.
+
+
v1.1 (2001-10-07)
+
+- JPEG and PNG image support.
+
+
v1.01 (2001-10-03)
+
+- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.
+
+
v1.0 (2001-09-17)
+
+- First version.
+
+
+ + diff --git a/includes/html2pdf/_fpdf/install.txt b/includes/html2pdf/_fpdf/install.txt new file mode 100644 index 000000000..8ee326b05 --- /dev/null +++ b/includes/html2pdf/_fpdf/install.txt @@ -0,0 +1,26 @@ +The FPDF library is made up of the following elements: + +- the main file, fpdf.php, which contains the class +- the font metric files (located in the font directory of this archive) + +The metric files are necessary as soon as you want to output some text in a document. +They can be accessed from three different locations: + +- the directory defined by the FPDF_FONTPATH constant (if this constant is defined) +- the font directory located in the directory containing fpdf.php (as it is the case in this archive) +- the directories accessible through include() + +Here is an example defining FPDF_FONTPATH (note the mandatory final slash): + +define('FPDF_FONTPATH','/home/www/font/'); +require('fpdf.php'); + +If the files are not accessible, the SetFont() method will produce the following error: + +FPDF error: Could not include font metric file + + +Remarks: + +- Only the files corresponding to the fonts actually used are necessary +- The tutorials provided in this package are ready to be executed diff --git a/includes/html2pdf/_fpdf/license.txt b/includes/html2pdf/_fpdf/license.txt new file mode 100644 index 000000000..fd811c6f5 --- /dev/null +++ b/includes/html2pdf/_fpdf/license.txt @@ -0,0 +1,6 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software to use, copy, modify, distribute, sublicense, and/or sell +copies of the software, and to permit persons to whom the software is furnished +to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. \ No newline at end of file diff --git a/includes/html2pdf/_fpdf/tutorial/20k_c1.txt b/includes/html2pdf/_fpdf/tutorial/20k_c1.txt new file mode 100644 index 000000000..0b09f265f --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/20k_c1.txt @@ -0,0 +1,10 @@ +The year 1866 was marked by a bizarre development, an unexplained and downright inexplicable phenomenon that surely no one has forgotten. Without getting into those rumors that upset civilians in the seaports and deranged the public mind even far inland, it must be said that professional seamen were especially alarmed. Traders, shipowners, captains of vessels, skippers, and master mariners from Europe and America, naval officers from every country, and at their heels the various national governments on these two continents, were all extremely disturbed by the business. +In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale. +The relevant data on this apparition, as recorded in various logbooks, agreed pretty closely as to the structure of the object or creature in question, its unprecedented speed of movement, its startling locomotive power, and the unique vitality with which it seemed to be gifted. If it was a cetacean, it exceeded in bulk any whale previously classified by science. No naturalist, neither Cuvier nor Lacépède, neither Professor Dumeril nor Professor de Quatrefages, would have accepted the existence of such a monster sight unseen -- specifically, unseen by their own scientific eyes. +Striking an average of observations taken at different times -- rejecting those timid estimates that gave the object a length of 200 feet, and ignoring those exaggerated views that saw it as a mile wide and three long--you could still assert that this phenomenal creature greatly exceeded the dimensions of anything then known to ichthyologists, if it existed at all. +Now then, it did exist, this was an undeniable fact; and since the human mind dotes on objects of wonder, you can understand the worldwide excitement caused by this unearthly apparition. As for relegating it to the realm of fiction, that charge had to be dropped. +In essence, on July 20, 1866, the steamer Governor Higginson, from the Calcutta & Burnach Steam Navigation Co., encountered this moving mass five miles off the eastern shores of Australia. Captain Baker at first thought he was in the presence of an unknown reef; he was even about to fix its exact position when two waterspouts shot out of this inexplicable object and sprang hissing into the air some 150 feet. So, unless this reef was subject to the intermittent eruptions of a geyser, the Governor Higginson had fair and honest dealings with some aquatic mammal, until then unknown, that could spurt from its blowholes waterspouts mixed with air and steam. +Similar events were likewise observed in Pacific seas, on July 23 of the same year, by the Christopher Columbus from the West India & Pacific Steam Navigation Co. Consequently, this extraordinary cetacean could transfer itself from one locality to another with startling swiftness, since within an interval of just three days, the Governor Higginson and the Christopher Columbus had observed it at two positions on the charts separated by a distance of more than 700 nautical leagues. +Fifteen days later and 2,000 leagues farther, the Helvetia from the Compagnie Nationale and the Shannon from the Royal Mail line, running on opposite tacks in that part of the Atlantic lying between the United States and Europe, respectively signaled each other that the monster had been sighted in latitude 42 degrees 15' north and longitude 60 degrees 35' west of the meridian of Greenwich. From their simultaneous observations, they were able to estimate the mammal's minimum length at more than 350 English feet; this was because both the Shannon and the Helvetia were of smaller dimensions, although each measured 100 meters stem to stern. Now then, the biggest whales, those rorqual whales that frequent the waterways of the Aleutian Islands, have never exceeded a length of 56 meters--if they reach even that. +One after another, reports arrived that would profoundly affect public opinion: new observations taken by the transatlantic liner Pereire, the Inman line's Etna running afoul of the monster, an official report drawn up by officers on the French frigate Normandy, dead-earnest reckonings obtained by the general staff of Commodore Fitz-James aboard the Lord Clyde. In lighthearted countries, people joked about this phenomenon, but such serious, practical countries as England, America, and Germany were deeply concerned. +In every big city the monster was the latest rage; they sang about it in the coffee houses, they ridiculed it in the newspapers, they dramatized it in the theaters. The tabloids found it a fine opportunity for hatching all sorts of hoaxes. In those newspapers short of copy, you saw the reappearance of every gigantic imaginary creature, from "Moby Dick," that dreadful white whale from the High Arctic regions, to the stupendous kraken whose tentacles could entwine a 500-ton craft and drag it into the ocean depths. They even reprinted reports from ancient times: the views of Aristotle and Pliny accepting the existence of such monsters, then the Norwegian stories of Bishop Pontoppidan, the narratives of Paul Egede, and finally the reports of Captain Harrington -- whose good faith is above suspicion--in which he claims he saw, while aboard the Castilian in 1857, one of those enormous serpents that, until then, had frequented only the seas of France's old extremist newspaper, The Constitutionalist. diff --git a/includes/html2pdf/_fpdf/tutorial/20k_c2.txt b/includes/html2pdf/_fpdf/tutorial/20k_c2.txt new file mode 100644 index 000000000..096dbd193 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/20k_c2.txt @@ -0,0 +1,23 @@ +During the period in which these developments were occurring, I had returned from a scientific undertaking organized to explore the Nebraska badlands in the United States. In my capacity as Assistant Professor at the Paris Museum of Natural History, I had been attached to this expedition by the French government. After spending six months in Nebraska, I arrived in New York laden with valuable collections near the end of March. My departure for France was set for early May. In the meantime, then, I was busy classifying my mineralogical, botanical, and zoological treasures when that incident took place with the Scotia. +I was perfectly abreast of this question, which was the big news of the day, and how could I not have been? I had read and reread every American and European newspaper without being any farther along. This mystery puzzled me. Finding it impossible to form any views, I drifted from one extreme to the other. Something was out there, that much was certain, and any doubting Thomas was invited to place his finger on the Scotia's wound. +When I arrived in New York, the question was at the boiling point. The hypothesis of a drifting islet or an elusive reef, put forward by people not quite in their right minds, was completely eliminated. And indeed, unless this reef had an engine in its belly, how could it move about with such prodigious speed? +Also discredited was the idea of a floating hull or some other enormous wreckage, and again because of this speed of movement. +So only two possible solutions to the question were left, creating two very distinct groups of supporters: on one side, those favoring a monster of colossal strength; on the other, those favoring an "underwater boat" of tremendous motor power. +Now then, although the latter hypothesis was completely admissible, it couldn't stand up to inquiries conducted in both the New World and the Old. That a private individual had such a mechanism at his disposal was less than probable. Where and when had he built it, and how could he have built it in secret? +Only some government could own such an engine of destruction, and in these disaster-filled times, when men tax their ingenuity to build increasingly powerful aggressive weapons, it was possible that, unknown to the rest of the world, some nation could have been testing such a fearsome machine. The Chassepot rifle led to the torpedo, and the torpedo has led to this underwater battering ram, which in turn will lead to the world putting its foot down. At least I hope it will. +But this hypothesis of a war machine collapsed in the face of formal denials from the various governments. Since the public interest was at stake and transoceanic travel was suffering, the sincerity of these governments could not be doubted. Besides, how could the assembly of this underwater boat have escaped public notice? Keeping a secret under such circumstances would be difficult enough for an individual, and certainly impossible for a nation whose every move is under constant surveillance by rival powers. +So, after inquiries conducted in England, France, Russia, Prussia, Spain, Italy, America, and even Turkey, the hypothesis of an underwater Monitor was ultimately rejected. +After I arrived in New York, several people did me the honor of consulting me on the phenomenon in question. In France I had published a two-volume work, in quarto, entitled The Mysteries of the Great Ocean Depths. Well received in scholarly circles, this book had established me as a specialist in this pretty obscure field of natural history. My views were in demand. As long as I could deny the reality of the business, I confined myself to a flat "no comment." But soon, pinned to the wall, I had to explain myself straight out. And in this vein, "the honorable Pierre Aronnax, Professor at the Paris Museum," was summoned by The New York Herald to formulate his views no matter what. +I complied. Since I could no longer hold my tongue, I let it wag. I discussed the question in its every aspect, both political and scientific, and this is an excerpt from the well-padded article I published in the issue of April 30. + +"Therefore," I wrote, "after examining these different hypotheses one by one, we are forced, every other supposition having been refuted, to accept the existence of an extremely powerful marine animal. +"The deepest parts of the ocean are totally unknown to us. No soundings have been able to reach them. What goes on in those distant depths? What creatures inhabit, or could inhabit, those regions twelve or fifteen miles beneath the surface of the water? What is the constitution of these animals? It's almost beyond conjecture. +"However, the solution to this problem submitted to me can take the form of a choice between two alternatives. +"Either we know every variety of creature populating our planet, or we do not. +"If we do not know every one of them, if nature still keeps ichthyological secrets from us, nothing is more admissible than to accept the existence of fish or cetaceans of new species or even new genera, animals with a basically 'cast-iron' constitution that inhabit strata beyond the reach of our soundings, and which some development or other, an urge or a whim if you prefer, can bring to the upper level of the ocean for long intervals. +"If, on the other hand, we do know every living species, we must look for the animal in question among those marine creatures already cataloged, and in this event I would be inclined to accept the existence of a giant narwhale. +"The common narwhale, or sea unicorn, often reaches a length of sixty feet. Increase its dimensions fivefold or even tenfold, then give this cetacean a strength in proportion to its size while enlarging its offensive weapons, and you have the animal we're looking for. It would have the proportions determined by the officers of the Shannon, the instrument needed to perforate the Scotia, and the power to pierce a steamer's hull. +"In essence, the narwhale is armed with a sort of ivory sword, or lance, as certain naturalists have expressed it. It's a king-sized tooth as hard as steel. Some of these teeth have been found buried in the bodies of baleen whales, which the narwhale attacks with invariable success. Others have been wrenched, not without difficulty, from the undersides of vessels that narwhales have pierced clean through, as a gimlet pierces a wine barrel. The museum at the Faculty of Medicine in Paris owns one of these tusks with a length of 2.25 meters and a width at its base of forty-eight centimeters! +"All right then! Imagine this weapon to be ten times stronger and the animal ten times more powerful, launch it at a speed of twenty miles per hour, multiply its mass times its velocity, and you get just the collision we need to cause the specified catastrophe. +"So, until information becomes more abundant, I plump for a sea unicorn of colossal dimensions, no longer armed with a mere lance but with an actual spur, like ironclad frigates or those warships called 'rams,' whose mass and motor power it would possess simultaneously. +"This inexplicable phenomenon is thus explained away--unless it's something else entirely, which, despite everything that has been sighted, studied, explored and experienced, is still possible!" diff --git a/includes/html2pdf/_fpdf/tutorial/calligra.afm b/includes/html2pdf/_fpdf/tutorial/calligra.afm new file mode 100644 index 000000000..806685eae --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/calligra.afm @@ -0,0 +1,275 @@ +StartFontMetrics 4.1 +FontName Calligrapher-Regular +FullName Calligrapher Regular +Notice Generated by Fontographer 3.5 +EncodingScheme FontSpecific +FamilyName Calligrapher +Weight Regular +Version (Altsys Fontographer 3.5 5/26/92) +Characters 215 +ItalicAngle 0.0 +Ascender 899 +Descender -234 +UnderlineThickness 20 +UnderlinePosition -200 +IsFixedPitch false +FontBBox -50 -234 1328 899 +StartCharMetrics 256 +C 0 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 1 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 2 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 3 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 4 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 5 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 6 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 7 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 8 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 9 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 10 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 11 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 12 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 13 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 14 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 15 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 16 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 17 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 18 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 19 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 20 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 21 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 22 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 23 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 24 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 25 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 26 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 27 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 28 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 29 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 30 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 31 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 32 ; WX 282 ; N space ; B 67 -16 251 718 ; +C 33 ; WX 324 ; N exclam ; B 67 -16 251 718 ; +C 34 ; WX 405 ; N quotedbl ; B 60 460 353 718 ; +C 35 ; WX 584 ; N numbersign ; B 35 0 549 701 ; +C 36 ; WX 632 ; N dollar ; B 32 -126 595 814 ; +C 37 ; WX 980 ; N percent ; B 35 -16 945 703 ; +C 38 ; WX 776 ; N ampersand ; B 41 -17 811 670 ; +C 39 ; WX 259 ; N quotesingle ; B 72 460 206 718 ; +C 40 ; WX 299 ; N parenleft ; B 57 -119 299 785 ; +C 41 ; WX 299 ; N parenright ; B 0 -119 242 785 ; +C 42 ; WX 377 ; N asterisk ; B 35 407 342 714 ; +C 43 ; WX 600 ; N plus ; B 47 0 553 506 ; +C 44 ; WX 259 ; N comma ; B 35 -67 224 162 ; +C 45 ; WX 432 ; N hyphen ; B 28 249 404 377 ; +C 46 ; WX 254 ; N period ; B 43 -16 227 162 ; +C 47 ; WX 597 ; N slash ; B 7 -14 591 714 ; +C 48 ; WX 529 ; N zero ; B 21 -18 508 583 ; +C 49 ; WX 298 ; N one ; B 8 -15 233 582 ; +C 50 ; WX 451 ; N two ; B 17 -8 430 588 ; +C 51 ; WX 359 ; N three ; B 11 -54 337 582 ; +C 52 ; WX 525 ; N four ; B 18 -20 519 602 ; +C 53 ; WX 423 ; N five ; B 10 -55 420 582 ; +C 54 ; WX 464 ; N six ; B 23 -14 447 589 ; +C 55 ; WX 417 ; N seven ; B 8 -18 415 589 ; +C 56 ; WX 457 ; N eight ; B 19 -16 432 583 ; +C 57 ; WX 479 ; N nine ; B 26 -16 450 588 ; +C 58 ; WX 275 ; N colon ; B 59 -16 242 491 ; +C 59 ; WX 282 ; N semicolon ; B 54 -67 245 491 ; +C 60 ; WX 600 ; N less ; B 47 -8 553 514 ; +C 61 ; WX 600 ; N equal ; B 47 98 553 408 ; +C 62 ; WX 600 ; N greater ; B 47 -8 553 514 ; +C 63 ; WX 501 ; N question ; B 21 -16 473 721 ; +C 64 ; WX 800 ; N at ; B 29 -12 771 730 ; +C 65 ; WX 743 ; N A ; B -23 -14 754 723 ; +C 66 ; WX 636 ; N B ; B -42 -7 608 706 ; +C 67 ; WX 598 ; N C ; B 27 -12 572 712 ; +C 68 ; WX 712 ; N D ; B -42 -11 684 705 ; +C 69 ; WX 608 ; N E ; B -21 0 608 708 ; +C 70 ; WX 562 ; N F ; B -21 -18 584 716 ; +C 71 ; WX 680 ; N G ; B 29 -8 668 714 ; +C 72 ; WX 756 ; N H ; B 70 -17 777 728 ; +C 73 ; WX 308 ; N I ; B 14 -15 238 718 ; +C 74 ; WX 314 ; N J ; B 7 -223 244 727 ; +C 75 ; WX 676 ; N K ; B 14 -16 683 725 ; +C 76 ; WX 552 ; N L ; B 14 -8 580 713 ; +C 77 ; WX 1041 ; N M ; B 42 -17 1017 739 ; +C 78 ; WX 817 ; N N ; B -42 -17 747 736 ; +C 79 ; WX 729 ; N O ; B 32 -16 698 709 ; +C 80 ; WX 569 ; N P ; B -35 -15 570 716 ; +C 81 ; WX 698 ; N Q ; B 27 -201 1328 715 ; +C 82 ; WX 674 ; N R ; B -35 -20 696 712 ; +C 83 ; WX 618 ; N S ; B 31 -16 589 709 ; +C 84 ; WX 673 ; N T ; B -21 -20 702 714 ; +C 85 ; WX 805 ; N U ; B 0 -19 804 722 ; +C 86 ; WX 753 ; N V ; B -28 -20 788 729 ; +C 87 ; WX 1238 ; N W ; B -28 -17 1273 736 ; +C 88 ; WX 716 ; N X ; B 7 -38 709 731 ; +C 89 ; WX 754 ; N Y ; B -35 -17 789 747 ; +C 90 ; WX 599 ; N Z ; B 30 -5 584 748 ; +C 91 ; WX 315 ; N bracketleft ; B 93 -124 322 718 ; +C 92 ; WX 463 ; N backslash ; B -21 -18 484 736 ; +C 93 ; WX 315 ; N bracketright ; B -7 -124 222 718 ; +C 94 ; WX 600 ; N asciicircum ; B 63 266 537 658 ; +C 95 ; WX 547 ; N underscore ; B -7 -198 554 -163 ; +C 96 ; WX 278 ; N grave ; B -1 541 214 693 ; +C 97 ; WX 581 ; N a ; B 21 -16 581 494 ; +C 98 ; WX 564 ; N b ; B -24 -17 543 793 ; +C 99 ; WX 440 ; N c ; B 21 -17 422 490 ; +C 100 ; WX 571 ; N d ; B 0 -15 550 659 ; +C 101 ; WX 450 ; N e ; B 28 -23 428 493 ; +C 102 ; WX 347 ; N f ; B -35 -14 474 785 ; +C 103 ; WX 628 ; N g ; B 19 -219 612 496 ; +C 104 ; WX 611 ; N h ; B -29 -18 569 785 ; +C 105 ; WX 283 ; N i ; B -14 -15 241 679 ; +C 106 ; WX 283 ; N j ; B -14 -234 241 679 ; +C 107 ; WX 560 ; N k ; B -24 -15 582 789 ; +C 108 ; WX 252 ; N l ; B -28 -15 210 789 ; +C 109 ; WX 976 ; N m ; B -21 -16 927 494 ; +C 110 ; WX 595 ; N n ; B -28 -15 574 493 ; +C 111 ; WX 508 ; N o ; B 27 -17 485 490 ; +C 112 ; WX 549 ; N p ; B -28 -216 526 496 ; +C 113 ; WX 540 ; N q ; B 28 -219 491 493 ; +C 114 ; WX 395 ; N r ; B -21 -19 430 492 ; +C 115 ; WX 441 ; N s ; B 34 -15 413 493 ; +C 116 ; WX 307 ; N t ; B -21 -16 378 621 ; +C 117 ; WX 614 ; N u ; B -14 -18 558 501 ; +C 118 ; WX 556 ; N v ; B -28 -20 569 483 ; +C 119 ; WX 915 ; N w ; B -28 -17 928 495 ; +C 120 ; WX 559 ; N x ; B 14 -17 546 500 ; +C 121 ; WX 597 ; N y ; B -21 -227 541 500 ; +C 122 ; WX 452 ; N z ; B 28 -5 442 515 ; +C 123 ; WX 315 ; N braceleft ; B 6 -118 309 718 ; +C 124 ; WX 222 ; N bar ; B 63 -18 159 730 ; +C 125 ; WX 315 ; N braceright ; B 6 -118 309 718 ; +C 126 ; WX 600 ; N asciitilde ; B 69 166 531 340 ; +C 127 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 128 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 129 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 130 ; WX 0 ; N quotesinglbase ; B -23 -14 754 877 ; +C 131 ; WX 0 ; N florin ; B 0 -19 804 854 ; +C 132 ; WX 0 ; N quotedblbase ; B -23 -14 754 877 ; +C 133 ; WX 780 ; N ellipsis ; B 43 -16 747 162 ; +C 134 ; WX 0 ; N dagger ; B 27 -122 437 592 ; +C 135 ; WX 0 ; N daggerdbl ; B 43 278 227 456 ; +C 136 ; WX 278 ; N circumflex ; B -14 557 292 677 ; +C 137 ; WX 0 ; N perthousand ; B -23 -14 754 877 ; +C 138 ; WX 0 ; N Scaron ; B 0 0 0 100 ; +C 139 ; WX 0 ; N guilsinglleft ; B 43 278 227 456 ; +C 140 ; WX 1064 ; N OE ; B 32 -16 1055 709 ; +C 141 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 142 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 143 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 144 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 145 ; WX 259 ; N quoteleft ; B 35 489 224 717 ; +C 146 ; WX 259 ; N quoteright ; B 35 489 224 717 ; +C 147 ; WX 470 ; N quotedblleft ; B 35 489 443 717 ; +C 148 ; WX 470 ; N quotedblright ; B 35 487 443 717 ; +C 149 ; WX 500 ; N bullet ; B 70 179 430 539 ; +C 150 ; WX 300 ; N endash ; B 0 245 300 350 ; +C 151 ; WX 600 ; N emdash ; B 0 245 600 350 ; +C 152 ; WX 278 ; N tilde ; B -44 563 326 689 ; +C 153 ; WX 990 ; N trademark ; B 62 306 928 718 ; +C 154 ; WX 0 ; N scaron ; B 0 0 0 100 ; +C 155 ; WX 0 ; N guilsinglright ; B 43 278 227 456 ; +C 156 ; WX 790 ; N oe ; B 27 -23 764 493 ; +C 157 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 158 ; WX 800 ; N .notdef ; B 50 0 750 800 ; +C 159 ; WX 754 ; N Ydieresis ; B -35 -17 789 882 ; +C 160 ; WX 282 ; N nbspace ; B -23 -14 754 893 ; +C 161 ; WX 324 ; N exclamdown ; B 69 -203 253 531 ; +C 162 ; WX 450 ; N cent ; B 27 -122 437 592 ; +C 163 ; WX 640 ; N sterling ; B 0 -9 619 716 ; +C 164 ; WX 518 ; N currency ; B 3 72 515 586 ; +C 165 ; WX 603 ; N yen ; B -28 -65 631 747 ; +C 166 ; WX 0 ; N brokenbar ; B 0 0 0 100 ; +C 167 ; WX 519 ; N section ; B -50 -216 524 762 ; +C 168 ; WX 254 ; N dieresis ; B -20 554 308 682 ; +C 169 ; WX 800 ; N copyright ; B 29 -12 771 730 ; +C 170 ; WX 349 ; N ordfeminine ; B 13 385 349 717 ; +C 171 ; WX 0 ; N guillemotleft ; B 43 -16 747 162 ; +C 172 ; WX 0 ; N logicalnot ; B 30 0 730 700 ; +C 173 ; WX 432 ; N hyphen ; B 28 249 404 377 ; +C 174 ; WX 800 ; N registered ; B 29 -12 771 730 ; +C 175 ; WX 278 ; N macron ; B -47 584 325 665 ; +C 176 ; WX 0 ; N degree ; B 27 -122 437 592 ; +C 177 ; WX 0 ; N plusminus ; B 29 -8 668 877 ; +C 178 ; WX 0 ; N twosuperior ; B 0 0 0 100 ; +C 179 ; WX 0 ; N threesuperior ; B 0 0 0 100 ; +C 180 ; WX 278 ; N acute ; B 49 536 279 693 ; +C 181 ; WX 614 ; N mu ; B -14 -231 558 501 ; +C 182 ; WX 0 ; N paragraph ; B -35 -15 668 785 ; +C 183 ; WX 254 ; N periodcentered ; B 43 278 227 456 ; +C 184 ; WX 278 ; N cedilla ; B -8 -216 231 6 ; +C 185 ; WX 0 ; N onesuperior ; B 0 0 0 100 ; +C 186 ; WX 305 ; N ordmasculine ; B 16 373 291 702 ; +C 187 ; WX 0 ; N guillemotright ; B 43 -16 747 162 ; +C 188 ; WX 0 ; N onequarter ; B 0 0 0 100 ; +C 189 ; WX 0 ; N onehalf ; B 0 0 0 100 ; +C 190 ; WX 0 ; N threequarters ; B 0 0 0 100 ; +C 191 ; WX 501 ; N questiondown ; B 15 -196 467 541 ; +C 192 ; WX 743 ; N Agrave ; B -23 -14 754 893 ; +C 193 ; WX 743 ; N Aacute ; B -23 -14 754 893 ; +C 194 ; WX 743 ; N Acircumflex ; B -23 -14 754 877 ; +C 195 ; WX 743 ; N Atilde ; B -23 -14 754 889 ; +C 196 ; WX 743 ; N Adieresis ; B -23 -14 754 882 ; +C 197 ; WX 743 ; N Aring ; B -23 -14 754 899 ; +C 198 ; WX 1060 ; N AE ; B -29 -14 1053 708 ; +C 199 ; WX 598 ; N Ccedilla ; B 27 -183 572 712 ; +C 200 ; WX 608 ; N Egrave ; B -21 0 608 893 ; +C 201 ; WX 608 ; N Eacute ; B -21 0 608 893 ; +C 202 ; WX 608 ; N Ecircumflex ; B -21 0 608 877 ; +C 203 ; WX 608 ; N Edieresis ; B -21 0 608 882 ; +C 204 ; WX 308 ; N Igrave ; B 14 -15 264 893 ; +C 205 ; WX 308 ; N Iacute ; B 14 -15 274 893 ; +C 206 ; WX 308 ; N Icircumflex ; B 1 -15 307 877 ; +C 207 ; WX 308 ; N Idieresis ; B -15 -15 313 882 ; +C 208 ; WX 0 ; N Eth ; B 0 0 0 100 ; +C 209 ; WX 817 ; N Ntilde ; B -42 -17 747 889 ; +C 210 ; WX 729 ; N Ograve ; B 32 -16 698 893 ; +C 211 ; WX 729 ; N Oacute ; B 32 -16 698 893 ; +C 212 ; WX 729 ; N Ocircumflex ; B 32 -16 698 877 ; +C 213 ; WX 729 ; N Otilde ; B 32 -16 698 889 ; +C 214 ; WX 729 ; N Odieresis ; B 32 -16 698 882 ; +C 215 ; WX 0 ; N multiply ; B 0 0 0 100 ; +C 216 ; WX 729 ; N Oslash ; B 14 -24 724 709 ; +C 217 ; WX 805 ; N Ugrave ; B 0 -19 804 893 ; +C 218 ; WX 805 ; N Uacute ; B 0 -19 804 893 ; +C 219 ; WX 805 ; N Ucircumflex ; B 0 -19 804 877 ; +C 220 ; WX 805 ; N Udieresis ; B 0 -19 804 882 ; +C 221 ; WX 0 ; N _235 ; B 0 0 0 100 ; +C 222 ; WX 0 ; N Thorn ; B 0 0 0 100 ; +C 223 ; WX 688 ; N germandbls ; B -35 -15 668 785 ; +C 224 ; WX 581 ; N agrave ; B 21 -16 581 693 ; +C 225 ; WX 581 ; N aacute ; B 21 -16 581 693 ; +C 226 ; WX 581 ; N acircumflex ; B 21 -16 581 677 ; +C 227 ; WX 581 ; N atilde ; B 21 -16 581 689 ; +C 228 ; WX 581 ; N adieresis ; B 21 -16 581 682 ; +C 229 ; WX 581 ; N aring ; B 21 -16 581 734 ; +C 230 ; WX 792 ; N ae ; B 21 -23 773 494 ; +C 231 ; WX 440 ; N ccedilla ; B 21 -183 422 490 ; +C 232 ; WX 450 ; N egrave ; B 28 -23 428 693 ; +C 233 ; WX 450 ; N eacute ; B 28 -23 428 693 ; +C 234 ; WX 450 ; N ecircumflex ; B 28 -23 432 677 ; +C 235 ; WX 450 ; N edieresis ; B 28 -23 428 682 ; +C 236 ; WX 283 ; N igrave ; B -14 -15 244 693 ; +C 237 ; WX 283 ; N iacute ; B -14 -15 269 693 ; +C 238 ; WX 283 ; N icircumflex ; B -14 -15 297 677 ; +C 239 ; WX 283 ; N idieresis ; B -25 -15 303 682 ; +C 240 ; WX 0 ; N Yacute ; B 0 0 0 100 ; +C 241 ; WX 595 ; N ntilde ; B -28 -15 574 689 ; +C 242 ; WX 508 ; N ograve ; B 27 -17 485 693 ; +C 243 ; WX 508 ; N oacute ; B 27 -17 485 693 ; +C 244 ; WX 508 ; N ocircumflex ; B 27 -17 485 677 ; +C 245 ; WX 508 ; N otilde ; B 27 -17 485 689 ; +C 246 ; WX 508 ; N odieresis ; B 27 -17 485 682 ; +C 247 ; WX 0 ; N divide ; B 35 0 760 727 ; +C 248 ; WX 508 ; N oslash ; B -8 -54 496 589 ; +C 249 ; WX 614 ; N ugrave ; B -14 -18 558 693 ; +C 250 ; WX 614 ; N uacute ; B -14 -18 558 693 ; +C 251 ; WX 614 ; N ucircumflex ; B -14 -18 558 677 ; +C 252 ; WX 614 ; N udieresis ; B -14 -18 558 682 ; +C 253 ; WX 0 ; N yacute ; B 0 0 0 100 ; +C 254 ; WX 0 ; N thorn ; B 0 0 0 100 ; +C 255 ; WX 597 ; N ydieresis ; B -21 -227 541 682 ; +EndCharMetrics +EndFontMetrics diff --git a/includes/html2pdf/_fpdf/tutorial/calligra.php b/includes/html2pdf/_fpdf/tutorial/calligra.php new file mode 100644 index 000000000..1af82ac82 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/calligra.php @@ -0,0 +1,24 @@ +899,'Descent'=>-234,'CapHeight'=>731,'Flags'=>32,'FontBBox'=>'[-50 -234 1328 899]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>800); +$up=-200; +$ut=20; +$cw=array( + chr(0)=>800,chr(1)=>800,chr(2)=>800,chr(3)=>800,chr(4)=>800,chr(5)=>800,chr(6)=>800,chr(7)=>800,chr(8)=>800,chr(9)=>800,chr(10)=>800,chr(11)=>800,chr(12)=>800,chr(13)=>800,chr(14)=>800,chr(15)=>800,chr(16)=>800,chr(17)=>800,chr(18)=>800,chr(19)=>800,chr(20)=>800,chr(21)=>800, + chr(22)=>800,chr(23)=>800,chr(24)=>800,chr(25)=>800,chr(26)=>800,chr(27)=>800,chr(28)=>800,chr(29)=>800,chr(30)=>800,chr(31)=>800,' '=>282,'!'=>324,'"'=>405,'#'=>584,'$'=>632,'%'=>980,'&'=>776,'\''=>259,'('=>299,')'=>299,'*'=>377,'+'=>600, + ','=>259,'-'=>432,'.'=>254,'/'=>597,'0'=>529,'1'=>298,'2'=>451,'3'=>359,'4'=>525,'5'=>423,'6'=>464,'7'=>417,'8'=>457,'9'=>479,':'=>275,';'=>282,'<'=>600,'='=>600,'>'=>600,'?'=>501,'@'=>800,'A'=>743, + 'B'=>636,'C'=>598,'D'=>712,'E'=>608,'F'=>562,'G'=>680,'H'=>756,'I'=>308,'J'=>314,'K'=>676,'L'=>552,'M'=>1041,'N'=>817,'O'=>729,'P'=>569,'Q'=>698,'R'=>674,'S'=>618,'T'=>673,'U'=>805,'V'=>753,'W'=>1238, + 'X'=>716,'Y'=>754,'Z'=>599,'['=>315,'\\'=>463,']'=>315,'^'=>600,'_'=>547,'`'=>278,'a'=>581,'b'=>564,'c'=>440,'d'=>571,'e'=>450,'f'=>347,'g'=>628,'h'=>611,'i'=>283,'j'=>283,'k'=>560,'l'=>252,'m'=>976, + 'n'=>595,'o'=>508,'p'=>549,'q'=>540,'r'=>395,'s'=>441,'t'=>307,'u'=>614,'v'=>556,'w'=>915,'x'=>559,'y'=>597,'z'=>452,'{'=>315,'|'=>222,'}'=>315,'~'=>600,chr(127)=>800,chr(128)=>800,chr(129)=>800,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>780,chr(134)=>0,chr(135)=>0,chr(136)=>278,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>1064,chr(141)=>800,chr(142)=>800,chr(143)=>800,chr(144)=>800,chr(145)=>259,chr(146)=>259,chr(147)=>470,chr(148)=>470,chr(149)=>500,chr(150)=>300,chr(151)=>600,chr(152)=>278,chr(153)=>990, + chr(154)=>0,chr(155)=>0,chr(156)=>790,chr(157)=>800,chr(158)=>800,chr(159)=>754,chr(160)=>282,chr(161)=>324,chr(162)=>450,chr(163)=>640,chr(164)=>518,chr(165)=>603,chr(166)=>0,chr(167)=>519,chr(168)=>254,chr(169)=>800,chr(170)=>349,chr(171)=>0,chr(172)=>0,chr(173)=>432,chr(174)=>800,chr(175)=>278, + chr(176)=>0,chr(177)=>0,chr(178)=>0,chr(179)=>0,chr(180)=>278,chr(181)=>614,chr(182)=>0,chr(183)=>254,chr(184)=>278,chr(185)=>0,chr(186)=>305,chr(187)=>0,chr(188)=>0,chr(189)=>0,chr(190)=>0,chr(191)=>501,chr(192)=>743,chr(193)=>743,chr(194)=>743,chr(195)=>743,chr(196)=>743,chr(197)=>743, + chr(198)=>1060,chr(199)=>598,chr(200)=>608,chr(201)=>608,chr(202)=>608,chr(203)=>608,chr(204)=>308,chr(205)=>308,chr(206)=>308,chr(207)=>308,chr(208)=>0,chr(209)=>817,chr(210)=>729,chr(211)=>729,chr(212)=>729,chr(213)=>729,chr(214)=>729,chr(215)=>0,chr(216)=>729,chr(217)=>805,chr(218)=>805,chr(219)=>805, + chr(220)=>805,chr(221)=>0,chr(222)=>0,chr(223)=>688,chr(224)=>581,chr(225)=>581,chr(226)=>581,chr(227)=>581,chr(228)=>581,chr(229)=>581,chr(230)=>792,chr(231)=>440,chr(232)=>450,chr(233)=>450,chr(234)=>450,chr(235)=>450,chr(236)=>283,chr(237)=>283,chr(238)=>283,chr(239)=>283,chr(240)=>800,chr(241)=>595, + chr(242)=>508,chr(243)=>508,chr(244)=>508,chr(245)=>508,chr(246)=>508,chr(247)=>0,chr(248)=>508,chr(249)=>614,chr(250)=>614,chr(251)=>614,chr(252)=>614,chr(253)=>0,chr(254)=>0,chr(255)=>597); +$enc='cp1252'; +$diff=''; +$file='calligra.z'; +$originalsize=40120; +?> diff --git a/includes/html2pdf/_fpdf/tutorial/calligra.ttf b/includes/html2pdf/_fpdf/tutorial/calligra.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9713c468ca29f5bfcecb65d96e52711aaa5f50e7 GIT binary patch literal 40120 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 EJEXL@qyPW_ literal 0 HcmV?d00001 diff --git a/includes/html2pdf/_fpdf/tutorial/countries.txt b/includes/html2pdf/_fpdf/tutorial/countries.txt new file mode 100644 index 000000000..aa8886cc3 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/countries.txt @@ -0,0 +1,15 @@ +Austria;Vienna;83859;8075 +Belgium;Brussels;30518;10192 +Denmark;Copenhagen;43094;5295 +Finland;Helsinki;304529;5147 +France;Paris;543965;58728 +Germany;Berlin;357022;82057 +Greece;Athens;131625;10511 +Ireland;Dublin;70723;3694 +Italy;Roma;301316;57563 +Luxembourg;Luxembourg;2586;424 +Netherlands;Amsterdam;41526;15654 +Portugal;Lisbon;91906;9957 +Spain;Madrid;504790;39348 +Sweden;Stockholm;410934;8839 +United Kingdom;London;243820;58862 diff --git a/includes/html2pdf/_fpdf/tutorial/index.htm b/includes/html2pdf/_fpdf/tutorial/index.htm new file mode 100644 index 000000000..0861878d9 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/index.htm @@ -0,0 +1,21 @@ + + + + +Tutorials + + + +

Tutorials

+

The different examples rapidly show how to use FPDF. You will find all main features explained.

+ + + diff --git a/includes/html2pdf/_fpdf/tutorial/logo.png b/includes/html2pdf/_fpdf/tutorial/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..284a0071c850b5a2f1ba86f16775c5c0da9fe082 GIT binary patch literal 2373 zcmV-L3A*-)P) zS%_F?mvV!)Wp=3lzjR1ZZHtquk)+#ujl{EuRFL;#2d9Y_EG2qsBHK~#90?U`$Hsz?xqBTOMI!)?Y&BDz(mToO~E7{;QGM&SSd ztL>QqykIFJODXr%nV!DR2p=YRXz_s#4F?{<&J9~1a7 zn?218?_>JcqaP`+aa*(ZO?=H5#F`cxrfJ&VZe0=s#ewTQ z#-W5zN>8`-ykIvOaV#JAO+$23$oAJS+(=Bb+`K>RiJ7y=q{|%xovz&L^sA1V2IFNS zNv7xTN|M0iZeBiY-DhkZor1En>&F);^@Kq{@iN(h6sp2oNTa|0nr|LO6->hnUFeL| z{j3|@q^ni31Z}rVfUMw&xeC0mx9OuRzn~goy+$Z0G--&o0+P^D3TV~@Q)2Jl$_GnT zL`>7_TGO;M)CC5i7Oaq_9jRwAa7SX>yN?I`*8(MqqVG`%F|dM_b{a^sN}dUQ;-Qd8 zz28UTUwuNc3z7hlCQV1Ar5)%dg!K0#Rmz%))IRD++C{NY-1UVhy%CZ{X_?yI$FD~M zYTFh#Q6#fhUnfurKumxv>w;v)bn_OP_IiGqyV;FY=2(Fws{W1yAY>_>gSJ-r_QGw` z|5%(;X65Vq2;@W^XL2tjs8MWPl2q>E%1v$4{yN!#EED3bHzUwO>p`MQ1L+FI+7Sp^ z#1=^DR<^&7VIwfMp6A(%d!X}>u1OQxr>-L{;qta1$)0rPa2m&{g-2~EH#Es<=nWah z*)Ofd$RHzK0Y~31I}$9~p(>O{RycA)7S;+xUOJUjJiflZ&N(&s>+7e`yrNWN#^0R| z5@Z_65h|pU@t(2ejUsZ~=sVEsD<=R_q|Z4aS0ER+<^Zz&x6@jB*S&HCs?I>A0m1@Q z@(>UQDnKshhtJQK1BnFa;DWdz{1CWZdzGZGmm#ECY##1{41z&aKBFZtBnV?dD+mc2 z0_0+076g7+daf+ekh~#^ztC!TJtaBSS&c$jXbGZZ-baKZgb5^XLot9v)Yy>5vlFcc z2|xH>y&q;QU0*jPr&6xNeT_;5l4Vjg0uZABniBdtlt^gnxz;&pH}86Drl;%cBIT7P z*AO-?Kx7V}kTxA?A|fhr_;~?Z*+FRbWdZ?7#*}Z;o1k_8ks)=&;G9sbKs6&AKp_qR zV)UsK&A~R%Imz6ur|(Wt*;X=2UG6Fn5g^)tS_u-ah&0lffy@DfC5VV_5qDdyxgu6a zQlkV6eLLSzb=x29P@Kus5m$gj!;`ikt?Waj603>3f>RP)3XtqUFr|pTy7e?_+1uqH z*mKQos$2f_n)75J38G~Oih7VB5#e#QVh=FbP8CRSk_0lR*NcKuW}c%~uxCL)<81<0 zwFJ#O&}0mH{hUuZC5XIyDv;p7;Kd7>pKPJqwz=&vz_D&|o)#TQ>eOC4P~TAro}gHH zrRS`ULnp`=t_fR%s1_vD_U#*-rvhn{OMSOnsL8eGq!&9*?kqM3Un%%?YgEagDMweN zego9B9(4j))(Qr2DA4E-mlwrxv)LSPMFTHVIDuS)E<+NE`teJ*0>xp)t?S*AljlxB z#2LxG&fP@KcnTzbHZ)Q(LE;iHFmU2vyjkBA(I#!%h_eU{&vGY%>7GbZUGFE8mS7~) z2Oz;o5*C`Cc{4{N;ilJl?gR!Jg_}1;V6TQL&YHc9Q6XfhXV`v0MA}x8_s*K!Gr-2T;ry zCQbK3BZ}3MW(dfJfL0tc-CBtg%g)D~{wAoB^|fy&B-93w6|;yIg~20@!4wk0@Id!! zN{)3AP+;L!gLMn`^F04hd6jebaOCQmJU@t}HJJ4vW?6`lTqtvj!f~8D!)i$}6;K-D z{ho@WmG@`9y*sb21>Ez*}pidXeo` z)YyHzknceb%x18OwvvQHtpjN&2oS!gFsbDM4XogKW{`5S7w=@T3~Hr&A)T)8gp?a$ zh};mCNG)=QCXxi#vr4x*zrifr%ZNlk9#n|X_C!jzmg@xs->K4!V!6BEHriuKVY+Ko zNIJ)EeCDJDny7$uv4#RId#0QLYOhJuQs;qv*W<8R#d?fF@r_WHhe)-ZNHegDt<#dv zE4G&)7KqGQWcD;G3>`WpgbzK*T3Kv-bhyy7uoWm1x4+O;gWGE@ag9(Pwytbi3lQT* z;(LJ+I_f3^ecuZ2AQ9AqeO#*0RqiHr#N7&;gYS-dB$iRc!-H*yI#ze^Tx@g(LG7V* zsrIAqW_i^e&L_MIh+cJn&Z|m-jLIm>stSf`1IcrBBKoKmW+gIhK0! zLk{FFP)jL-V-O-8=c(YZqM>dU_723~U6uXWS^SvulqLP8HNN0@~J(ZS{^iQ%D$a}ghP-vv}RRgkVd0{VOXhDs?}%MpYGfRIQC zv6z5iLMS8z0)o#6JRab30hpb0lvJxo zTuoxA2H>PhNvbgo0Z3e>0ct|ZC8TUZE+h${A#f6?H9$qGDI`YXN{t#JRWee+)8GnH zEhjNCsT67mHHlN?QWAqnrGP|vgq%qrbV3Gc07Xt6k&u{3gHb*3Nt8<{*d)p(6f8o{ zAmo+=LL(4JL#W7qOHi~jQY9w;1ye{SA*YiBP5`QeoK#aK1SG~Mfs#4QE1>0x1k6A}WP*EhzX12m?(?Ra`z9ja$bb$@~UVd)4 z8UOR+#jtZ*c7;QG5RKln-l(~)<%085T?0ko0rQHG0Bh7ClFg`BVCRFY&0I4KzxPa= zyH;VnQ29p%(e=jewq9l8pWc(F2ZwJBmXLeO$vBJ3o|VQ-r%4m9`xEvnS7qGTU7BIJ zg}z8&|NQdAF|&IA89|Bgl$TSG(RruiCV$zO=jX95dAA0xO#3o(Q_jeZ`k7n5Tz&8P zpGOayj%|79lT?RU^*9c0bGl>6F*VOW;x%+-f#3&zt*KL?)jRXMwwnWJ-J z_gY0KZ8jCgnm`-51Rh%ox%~?Q zpzH?=nzW=3U4*HNZm5bH#;v_~H9zaSkfx~e?e0roIQzo}=r^l#JxLy}*GFT?gy!Ly zmoIqxdb6FEDDAGl>DW0HTbCF$;y&20CVu*6+SsWC^FJzG?my-H7~e?Guvvg+PCQ^7 zeIj~SwjnAiws1H;Ye(ao#1yN6U%zI=#6VW-Cr2I|-u1tWb~n#{H#U`X>tmXecSG}e zC@Lm8(#*d~axRlR#|PXaIy;BvpPW83*L?q4pS853hP@MO)CH2uarx;pvK4Q6vn!^D zFK;o~mW8Z-bLMT+nYgo0yK47w?9<@I_j2k2Y}F3>yG?EuX+5s#^B8D%@J(n4+xU+g zuk)7CG1d5o{E?KK--F(SDSHn*UeXW$c=ze{FM5$}j7*LT$v8awu(^(oj@|~l%H!of z%I?a|-Isk%r*r?@{9BUsx`rS5%_r}3dM-huB}c$O#iqS?ex93` z8j-c^qodb}%gJFDNxML?MZ@q8Y;cs=li6F_7I$a!-F4ow{?08(4Yu0XCc988Ki%!D zOMhr+=*8}`^A}H-TCbDs?QnUz%y!8~NRsBgR2a}v8vrMU2YHb4;_HLoI1hqrr)h6R zuWl+YYJ3!r3e@+jgbbAAAF#GPVUt6QQDGMrDe9< zhY2mjxm17nokzD__92%Od%oJUYIT3RzNO1#R^Yr(Z|8;-pr14SQJ1ho1y$Q4=qvut zyzyk;KD+xr-FA9@`vJ~AC13k%zI^dtumBnAeU+IpFUccAe7$7VgI#5bJG%E5<#Ddh zW!pYr)_TQ#Iv(hkn!b+feM&=~@1!ja*MZhXB@uFv)&y4trI2 ziRlqPy))4by|>HfZe1)~oq{$5yXv-=N*jWPHz$wAJEa=bGdHAGbJ9m?%ahmk`?oPt zKMWdv`USh}4?n2u_|LTi#v6U)U(0?8aj+QU9T^MVD$c6;_%S1)VP<=~SF+30WUIWc zPE}Af?~;3gcu!1*~CUfL}=@kK2E<<|s}5_qSKqW;R1D0<%)oo?v*+KKrX-G!cNslA(3eqsJk11|S-s!* zw5j0U9p(6|@HE#0v&pEa%96z&w?zh;Uhw*RT~^1^?|FCKi!b`!H9GV)xqh9+OcTip z-O!iG+p=1#jENQ6`42-67Ms4vzhzv7KdHAhdp64;_vVt{TLMz{X8$a#8LWG1^6SC2 znxiN429AxNJQ@ASqu1Z@rM~~f%fkH|E|eK8Q=1^MUyTy%vdhLgM=~=*@}5MDO+{3% zx_xHgWcrAor(a2%{_HQcKim|kYi)Mx4kN>Do}3=|NFJdhWCz_|Rcq6P+;UpFN4VDZ z^THOyXQ{Vr!}FR)rMXaSOKgho(I_-$7Bs%R=|vc1uqJV%UH65Zuj{U?+*q&EFznnU z^IWzm_*Cf5goM+$$NO3PhO>sYSeG?S~s%X!jTauyEqHoQI3d`)5-&_fIy6=7fIR;(zY5A_` z<-#SxU9yE<-huZFgv(28;^Utfbl!@Xv(QV(lLVjD#0-DeX~nS@Dy_;_|9+1lL8}9= IayK9PFK}2WsQ>@~ literal 0 HcmV?d00001 diff --git a/includes/html2pdf/_fpdf/tutorial/makefont.php b/includes/html2pdf/_fpdf/tutorial/makefont.php new file mode 100644 index 000000000..3773429bd --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/makefont.php @@ -0,0 +1,6 @@ + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto1.htm b/includes/html2pdf/_fpdf/tutorial/tuto1.htm new file mode 100644 index 000000000..7f1779f89 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto1.htm @@ -0,0 +1,77 @@ + + + + +Minimal example + + + +

Minimal example

+Let's start with the classic example: +
+
<?php
+require('fpdf.php');
+
+$pdf=new FPDF();
+$pdf->AddPage();
+$pdf->SetFont('Arial','B',16);
+$pdf->Cell(40,10,'Hello World!');
+$pdf->Output();
+?>
+
+

[Demo]

+After including the library file, we create an FPDF object. +The FPDF() constructor is used here with the default values: pages are in A4 portrait and +the unit of measure is millimeter. It could have been specified explicitly with: +
+
$pdf=new FPDF('P','mm','A4');
+
+
+It is possible to use landscape (L), other page formats (such as Letter and +Legal) and units of measure (pt, cm, in). +
+
+There is no page for the moment, so we have to add one with AddPage(). The origin +is at the upper-left corner and the current position is by default placed at 1 cm from the +borders; the margins can be changed with SetMargins(). +
+
+Before we can print text, it is mandatory to select a font with SetFont(), otherwise the +document would be invalid. We choose Arial bold 16: +
+
$pdf->SetFont('Arial','B',16);
+
+
+We could have specified italics with I, underlined with U or a regular font with an empty string +(or any combination). Note that the font size is given in points, not millimeters (or another +user unit); it is the only exception. The other standard fonts are Times, Courier, Symbol and +ZapfDingbats. +
+
+We can now print a cell with Cell(). A cell is a rectangular area, possibly framed, +which contains a line of text. It is output at the current position. We specify its dimensions, +its text (centered or aligned), if borders should be drawn, and where the current position +moves after it (to the right, below or to the beginning of the next line). To add a frame, we would do this: +
+
$pdf->Cell(40,10,'Hello World !',1);
+
+
+To add a new cell next to it with centered text and go to the next line, we would do: +
+
$pdf->Cell(60,10,'Powered by FPDF.',0,1,'C');
+
+
+Remark: the line break can also be done with Ln(). This method additionnaly allows to specify +the height of the break. +
+
+Finally, the document is closed and sent to the browser with Output(). We could have saved +it to a file by passing the desired file name. +
+
+Caution: in case when the PDF is sent to the browser, nothing else must be output by the +script, neither before nor after (no HTML, not even a space or a carriage return). If you send something +before, you will get the error message: "Some data has already been output, can't send PDF file". If you +send something after, the document might not display. + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto1.php b/includes/html2pdf/_fpdf/tutorial/tuto1.php new file mode 100644 index 000000000..39db1fdc7 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto1.php @@ -0,0 +1,9 @@ +AddPage(); +$pdf->SetFont('Arial','B',16); +$pdf->Cell(40,10,'Hello World!'); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_fpdf/tutorial/tuto2.htm b/includes/html2pdf/_fpdf/tutorial/tuto2.htm new file mode 100644 index 000000000..6cff8f4d7 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto2.htm @@ -0,0 +1,80 @@ + + + + +Header, footer, page break and image + + + +

Header, footer, page break and image

+Here is a two page example with header, footer and logo: +
+
<?php
+require('fpdf.php');
+
+class PDF extends FPDF
+{
+//Page header
+function Header()
+{
+    //Logo
+    $this->Image('logo_pb.png',10,8,33);
+    //Arial bold 15
+    $this->SetFont('Arial','B',15);
+    //Move to the right
+    $this->Cell(80);
+    //Title
+    $this->Cell(30,10,'Title',1,0,'C');
+    //Line break
+    $this->Ln(20);
+}
+
+//Page footer
+function Footer()
+{
+    //Position at 1.5 cm from bottom
+    $this->SetY(-15);
+    //Arial italic 8
+    $this->SetFont('Arial','I',8);
+    //Page number
+    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
+}
+}
+
+//Instanciation of inherited class
+$pdf=new PDF();
+$pdf->AliasNbPages();
+$pdf->AddPage();
+$pdf->SetFont('Times','',12);
+for($i=1;$i<=40;$i++)
+    $pdf->Cell(0,10,'Printing line number '.$i,0,1);
+$pdf->Output();
+?>
+
+

[Demo]

+This example makes use of the Header() and Footer() methods to process page headers and +footers. They are called automatically. They already exist in the FPDF class but do nothing, +therefore we have to extend the class and override them. +
+
+The logo is printed with the Image() method by specifying its upper-left corner and +its width. The height is calculated automatically to respect the image proportions. +
+
+To print the page number, a null value is passed as the cell width. It means that the cell +should extend up to the right margin of the page; it is handy to center text. The current page +number is returned by the PageNo() method; as for the total number of pages, it is obtained +by means of the special value {nb} which will be substituted on document closure +(provided you first called AliasNbPages()). +
+Note the use of the SetY() method which allows to set position at an absolute location in +the page, starting from the top or the bottom. +
+
+Another interesting feature is used here: the automatic page breaking. As soon as a cell would +cross a limit in the page (at 2 centimeters from the bottom by default), a break is performed +and the font restored. Although the header and footer select their own font (Arial), the body +continues with Times. This mechanism of automatic restoration also applies to colors and line +width. The limit which triggers page breaks can be set with SetAutoPageBreak(). + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto2.php b/includes/html2pdf/_fpdf/tutorial/tuto2.php new file mode 100644 index 000000000..f40071337 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto2.php @@ -0,0 +1,41 @@ +Image('logo_pb.png',10,8,33); + //Arial bold 15 + $this->SetFont('Arial','B',15); + //Move to the right + $this->Cell(80); + //Title + $this->Cell(30,10,'Title',1,0,'C'); + //Line break + $this->Ln(20); +} + +//Page footer +function Footer() +{ + //Position at 1.5 cm from bottom + $this->SetY(-15); + //Arial italic 8 + $this->SetFont('Arial','I',8); + //Page number + $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); +} +} + +//Instanciation of inherited class +$pdf=new PDF(); +$pdf->AliasNbPages(); +$pdf->AddPage(); +$pdf->SetFont('Times','',12); +for($i=1;$i<=40;$i++) + $pdf->Cell(0,10,'Printing line number '.$i,0,1); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_fpdf/tutorial/tuto3.htm b/includes/html2pdf/_fpdf/tutorial/tuto3.htm new file mode 100644 index 000000000..b85cad93a --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto3.htm @@ -0,0 +1,116 @@ + + + + +Line breaks and colors + + + +

Line breaks and colors

+Let's continue with an example which prints justified paragraphs. It also illustrates the use +of colors. +
+
<?php
+require('fpdf.php');
+
+class PDF extends FPDF
+{
+function Header()
+{
+    global $title;
+
+    //Arial bold 15
+    $this->SetFont('Arial','B',15);
+    //Calculate width of title and position
+    $w=$this->GetStringWidth($title)+6;
+    $this->SetX((210-$w)/2);
+    //Colors of frame, background and text
+    $this->SetDrawColor(0,80,180);
+    $this->SetFillColor(230,230,0);
+    $this->SetTextColor(220,50,50);
+    //Thickness of frame (1 mm)
+    $this->SetLineWidth(1);
+    //Title
+    $this->Cell($w,9,$title,1,1,'C',true);
+    //Line break
+    $this->Ln(10);
+}
+
+function Footer()
+{
+    //Position at 1.5 cm from bottom
+    $this->SetY(-15);
+    //Arial italic 8
+    $this->SetFont('Arial','I',8);
+    //Text color in gray
+    $this->SetTextColor(128);
+    //Page number
+    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
+}
+
+function ChapterTitle($num,$label)
+{
+    //Arial 12
+    $this->SetFont('Arial','',12);
+    //Background color
+    $this->SetFillColor(200,220,255);
+    //Title
+    $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true);
+    //Line break
+    $this->Ln(4);
+}
+
+function ChapterBody($file)
+{
+    //Read text file
+    $f=fopen($file,'r');
+    $txt=fread($f,filesize($file));
+    fclose($f);
+    //Times 12
+    $this->SetFont('Times','',12);
+    //Output justified text
+    $this->MultiCell(0,5,$txt);
+    //Line break
+    $this->Ln();
+    //Mention in italics
+    $this->SetFont('','I');
+    $this->Cell(0,5,'(end of excerpt)');
+}
+
+function PrintChapter($num,$title,$file)
+{
+    $this->AddPage();
+    $this->ChapterTitle($num,$title);
+    $this->ChapterBody($file);
+}
+}
+
+$pdf=new PDF();
+$title='20000 Leagues Under the Seas';
+$pdf->SetTitle($title);
+$pdf->SetAuthor('Jules Verne');
+$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
+$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
+$pdf->Output();
+?>
+
+

[Demo]

+The GetStringWidth() method allows to determine the length of a string in the current font, +which is used here to calculate the position and the width of the frame surrounding the title. +Then colors are set (via SetDrawColor(), SetFillColor() and SetTextColor()) and the +thickness of the line is set to 1 mm (against 0.2 by default) with SetLineWidth(). Finally, +we output the cell (the last parameter to true indicates that the background must +be filled). +
+
+The method used to print the paragraphs is MultiCell(). Each time a line reaches the +right extremity of the cell or a carriage return character is met, a line break is issued +and a new cell automatically created under the current one. Text is justified by default. +
+
+Two document properties are defined: the title (SetTitle()) and the author (SetAuthor()). +Properties can be viewed by two means. First is to open the document directly with Acrobat Reader, +go to the File menu and choose the Document Properties option. The second, also available from +the plug-in, is to right-click and select Document Properties. + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto3.php b/includes/html2pdf/_fpdf/tutorial/tuto3.php new file mode 100644 index 000000000..f84589a90 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto3.php @@ -0,0 +1,83 @@ +SetFont('Arial','B',15); + //Calculate width of title and position + $w=$this->GetStringWidth($title)+6; + $this->SetX((210-$w)/2); + //Colors of frame, background and text + $this->SetDrawColor(0,80,180); + $this->SetFillColor(230,230,0); + $this->SetTextColor(220,50,50); + //Thickness of frame (1 mm) + $this->SetLineWidth(1); + //Title + $this->Cell($w,9,$title,1,1,'C',true); + //Line break + $this->Ln(10); +} + +function Footer() +{ + //Position at 1.5 cm from bottom + $this->SetY(-15); + //Arial italic 8 + $this->SetFont('Arial','I',8); + //Text color in gray + $this->SetTextColor(128); + //Page number + $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); +} + +function ChapterTitle($num,$label) +{ + //Arial 12 + $this->SetFont('Arial','',12); + //Background color + $this->SetFillColor(200,220,255); + //Title + $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); + //Line break + $this->Ln(4); +} + +function ChapterBody($file) +{ + //Read text file + $f=fopen($file,'r'); + $txt=fread($f,filesize($file)); + fclose($f); + //Times 12 + $this->SetFont('Times','',12); + //Output justified text + $this->MultiCell(0,5,$txt); + //Line break + $this->Ln(); + //Mention in italics + $this->SetFont('','I'); + $this->Cell(0,5,'(end of excerpt)'); +} + +function PrintChapter($num,$title,$file) +{ + $this->AddPage(); + $this->ChapterTitle($num,$title); + $this->ChapterBody($file); +} +} + +$pdf=new PDF(); +$title='20000 Leagues Under the Seas'; +$pdf->SetTitle($title); +$pdf->SetAuthor('Jules Verne'); +$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); +$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_fpdf/tutorial/tuto4.htm b/includes/html2pdf/_fpdf/tutorial/tuto4.htm new file mode 100644 index 000000000..f39b5b246 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto4.htm @@ -0,0 +1,136 @@ + + + + +Multi-columns + + + +

Multi-columns

+This example is a variant of the previous one showing how to lay the text across multiple +columns. +
+
<?php
+require('fpdf.php');
+
+class PDF extends FPDF
+{
+//Current column
+var $col=0;
+//Ordinate of column start
+var $y0;
+
+function Header()
+{
+    //Page header
+    global $title;
+
+    $this->SetFont('Arial','B',15);
+    $w=$this->GetStringWidth($title)+6;
+    $this->SetX((210-$w)/2);
+    $this->SetDrawColor(0,80,180);
+    $this->SetFillColor(230,230,0);
+    $this->SetTextColor(220,50,50);
+    $this->SetLineWidth(1);
+    $this->Cell($w,9,$title,1,1,'C',true);
+    $this->Ln(10);
+    //Save ordinate
+    $this->y0=$this->GetY();
+}
+
+function Footer()
+{
+    //Page footer
+    $this->SetY(-15);
+    $this->SetFont('Arial','I',8);
+    $this->SetTextColor(128);
+    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
+}
+
+function SetCol($col)
+{
+    //Set position at a given column
+    $this->col=$col;
+    $x=10+$col*65;
+    $this->SetLeftMargin($x);
+    $this->SetX($x);
+}
+
+function AcceptPageBreak()
+{
+    //Method accepting or not automatic page break
+    if($this->col<2)
+    {
+        //Go to next column
+        $this->SetCol($this->col+1);
+        //Set ordinate to top
+        $this->SetY($this->y0);
+        //Keep on page
+        return false;
+    }
+    else
+    {
+        //Go back to first column
+        $this->SetCol(0);
+        //Page break
+        return true;
+    }
+}
+
+function ChapterTitle($num,$label)
+{
+    //Title
+    $this->SetFont('Arial','',12);
+    $this->SetFillColor(200,220,255);
+    $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true);
+    $this->Ln(4);
+    //Save ordinate
+    $this->y0=$this->GetY();
+}
+
+function ChapterBody($file)
+{
+    //Read text file
+    $f=fopen($file,'r');
+    $txt=fread($f,filesize($file));
+    fclose($f);
+    //Font
+    $this->SetFont('Times','',12);
+    //Output text in a 6 cm width column
+    $this->MultiCell(60,5,$txt);
+    $this->Ln();
+    //Mention
+    $this->SetFont('','I');
+    $this->Cell(0,5,'(end of excerpt)');
+    //Go back to first column
+    $this->SetCol(0);
+}
+
+function PrintChapter($num,$title,$file)
+{
+    //Add chapter
+    $this->AddPage();
+    $this->ChapterTitle($num,$title);
+    $this->ChapterBody($file);
+}
+}
+
+$pdf=new PDF();
+$title='20000 Leagues Under the Seas';
+$pdf->SetTitle($title);
+$pdf->SetAuthor('Jules Verne');
+$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
+$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
+$pdf->Output();
+?>
+
+

[Demo]

+The key method used is AcceptPageBreak(). It allows to accept or not an automatic page +break. By refusing it and altering the margin and current position, the desired column layout +is achieved. +
+For the rest, not many changes; two properties have been added to the class to save the current +column number and the position where columns begin, and the MultiCell() call specifies a +6 centimeter width. + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto4.php b/includes/html2pdf/_fpdf/tutorial/tuto4.php new file mode 100644 index 000000000..d54bc8a02 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto4.php @@ -0,0 +1,113 @@ +SetFont('Arial','B',15); + $w=$this->GetStringWidth($title)+6; + $this->SetX((210-$w)/2); + $this->SetDrawColor(0,80,180); + $this->SetFillColor(230,230,0); + $this->SetTextColor(220,50,50); + $this->SetLineWidth(1); + $this->Cell($w,9,$title,1,1,'C',true); + $this->Ln(10); + //Save ordinate + $this->y0=$this->GetY(); +} + +function Footer() +{ + //Page footer + $this->SetY(-15); + $this->SetFont('Arial','I',8); + $this->SetTextColor(128); + $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); +} + +function SetCol($col) +{ + //Set position at a given column + $this->col=$col; + $x=10+$col*65; + $this->SetLeftMargin($x); + $this->SetX($x); +} + +function AcceptPageBreak() +{ + //Method accepting or not automatic page break + if($this->col<2) + { + //Go to next column + $this->SetCol($this->col+1); + //Set ordinate to top + $this->SetY($this->y0); + //Keep on page + return false; + } + else + { + //Go back to first column + $this->SetCol(0); + //Page break + return true; + } +} + +function ChapterTitle($num,$label) +{ + //Title + $this->SetFont('Arial','',12); + $this->SetFillColor(200,220,255); + $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); + $this->Ln(4); + //Save ordinate + $this->y0=$this->GetY(); +} + +function ChapterBody($file) +{ + //Read text file + $f=fopen($file,'r'); + $txt=fread($f,filesize($file)); + fclose($f); + //Font + $this->SetFont('Times','',12); + //Output text in a 6 cm width column + $this->MultiCell(60,5,$txt); + $this->Ln(); + //Mention + $this->SetFont('','I'); + $this->Cell(0,5,'(end of excerpt)'); + //Go back to first column + $this->SetCol(0); +} + +function PrintChapter($num,$title,$file) +{ + //Add chapter + $this->AddPage(); + $this->ChapterTitle($num,$title); + $this->ChapterBody($file); +} +} + +$pdf=new PDF(); +$title='20000 Leagues Under the Seas'; +$pdf->SetTitle($title); +$pdf->SetAuthor('Jules Verne'); +$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); +$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_fpdf/tutorial/tuto5.htm b/includes/html2pdf/_fpdf/tutorial/tuto5.htm new file mode 100644 index 000000000..f22b17563 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto5.htm @@ -0,0 +1,133 @@ + + + + +Tables + + + +

Tables

+This tutorial shows how to make tables easily. +
+
<?php
+require('fpdf.php');
+
+class PDF extends FPDF
+{
+//Load data
+function LoadData($file)
+{
+    //Read file lines
+    $lines=file($file);
+    $data=array();
+    foreach($lines as $line)
+        $data[]=explode(';',chop($line));
+    return $data;
+}
+
+//Simple table
+function BasicTable($header,$data)
+{
+    //Header
+    foreach($header as $col)
+        $this->Cell(40,7,$col,1);
+    $this->Ln();
+    //Data
+    foreach($data as $row)
+    {
+        foreach($row as $col)
+            $this->Cell(40,6,$col,1);
+        $this->Ln();
+    }
+}
+
+//Better table
+function ImprovedTable($header,$data)
+{
+    //Column widths
+    $w=array(40,35,40,45);
+    //Header
+    for($i=0;$i<count($header);$i++)
+        $this->Cell($w[$i],7,$header[$i],1,0,'C');
+    $this->Ln();
+    //Data
+    foreach($data as $row)
+    {
+        $this->Cell($w[0],6,$row[0],'LR');
+        $this->Cell($w[1],6,$row[1],'LR');
+        $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');
+        $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');
+        $this->Ln();
+    }
+    //Closure line
+    $this->Cell(array_sum($w),0,'','T');
+}
+
+//Colored table
+function FancyTable($header,$data)
+{
+    //Colors, line width and bold font
+    $this->SetFillColor(255,0,0);
+    $this->SetTextColor(255);
+    $this->SetDrawColor(128,0,0);
+    $this->SetLineWidth(.3);
+    $this->SetFont('','B');
+    //Header
+    $w=array(40,35,40,45);
+    for($i=0;$i<count($header);$i++)
+        $this->Cell($w[$i],7,$header[$i],1,0,'C',true);
+    $this->Ln();
+    //Color and font restoration
+    $this->SetFillColor(224,235,255);
+    $this->SetTextColor(0);
+    $this->SetFont('');
+    //Data
+    $fill=false;
+    foreach($data as $row)
+    {
+        $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
+        $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
+        $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
+        $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
+        $this->Ln();
+        $fill=!$fill;
+    }
+    $this->Cell(array_sum($w),0,'','T');
+}
+}
+
+$pdf=new PDF();
+//Column titles
+$header=array('Country','Capital','Area (sq km)','Pop. (thousands)');
+//Data loading
+$data=$pdf->LoadData('countries.txt');
+$pdf->SetFont('Arial','',14);
+$pdf->AddPage();
+$pdf->BasicTable($header,$data);
+$pdf->AddPage();
+$pdf->ImprovedTable($header,$data);
+$pdf->AddPage();
+$pdf->FancyTable($header,$data);
+$pdf->Output();
+?>
+
+

[Demo]

+A table being just a collection of cells, it is natural to build one from them. The first +example is achieved in the most basic way possible: simple framed cells, all of the same size +and left aligned. The result is rudimentary but very quick to obtain. +
+
+The second table brings some improvements: each column has its own width, titles are centered +and figures right aligned. Moreover, horizontal lines have been removed. This is done by means +of the border parameter of the Cell() method, which specifies which sides of the +cell must be drawn. Here we want the left (L) and right (R) ones. It remains +the problem of the horizontal line to finish the table. There are two possibilities: either +check for the last line in the loop, in which case we use LRB for the border +parameter; or, as done here, add the line once the loop is over. +
+
+The third table is similar to the second one but uses colors. Fill, text and line colors are +simply specified. Alternate coloring for rows is obtained by using alternatively transparent +and filled cells. + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto5.php b/includes/html2pdf/_fpdf/tutorial/tuto5.php new file mode 100644 index 000000000..eb1377235 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto5.php @@ -0,0 +1,101 @@ +Cell(40,7,$col,1); + $this->Ln(); + //Data + foreach($data as $row) + { + foreach($row as $col) + $this->Cell(40,6,$col,1); + $this->Ln(); + } +} + +//Better table +function ImprovedTable($header,$data) +{ + //Column widths + $w=array(40,35,40,45); + //Header + for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C'); + $this->Ln(); + //Data + foreach($data as $row) + { + $this->Cell($w[0],6,$row[0],'LR'); + $this->Cell($w[1],6,$row[1],'LR'); + $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R'); + $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R'); + $this->Ln(); + } + //Closure line + $this->Cell(array_sum($w),0,'','T'); +} + +//Colored table +function FancyTable($header,$data) +{ + //Colors, line width and bold font + $this->SetFillColor(255,0,0); + $this->SetTextColor(255); + $this->SetDrawColor(128,0,0); + $this->SetLineWidth(.3); + $this->SetFont('','B'); + //Header + $w=array(40,35,40,45); + for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C',true); + $this->Ln(); + //Color and font restoration + $this->SetFillColor(224,235,255); + $this->SetTextColor(0); + $this->SetFont(''); + //Data + $fill=false; + foreach($data as $row) + { + $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill); + $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill); + $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill); + $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill); + $this->Ln(); + $fill=!$fill; + } + $this->Cell(array_sum($w),0,'','T'); +} +} + +$pdf=new PDF(); +//Column titles +$header=array('Country','Capital','Area (sq km)','Pop. (thousands)'); +//Data loading +$data=$pdf->LoadData('countries.txt'); +$pdf->SetFont('Arial','',14); +$pdf->AddPage(); +$pdf->BasicTable($header,$data); +$pdf->AddPage(); +$pdf->ImprovedTable($header,$data); +$pdf->AddPage(); +$pdf->FancyTable($header,$data); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_fpdf/tutorial/tuto6.htm b/includes/html2pdf/_fpdf/tutorial/tuto6.htm new file mode 100644 index 000000000..d943b04ee --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto6.htm @@ -0,0 +1,163 @@ + + + + +Links and flowing text + + + +

Links and flowing text

+This tutorial explains how to insert links (internal and external) and shows a new text writing +mode. It also contains a basic HTML parser. +
+
<?php
+require('fpdf.php');
+
+class PDF extends FPDF
+{
+var $B;
+var $I;
+var $U;
+var $HREF;
+
+function PDF($orientation='P',$unit='mm',$format='A4')
+{
+    //Call parent constructor
+    $this->FPDF($orientation,$unit,$format);
+    //Initialization
+    $this->B=0;
+    $this->I=0;
+    $this->U=0;
+    $this->HREF='';
+}
+
+function WriteHTML($html)
+{
+    //HTML parser
+    $html=str_replace("\n",' ',$html);
+    $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
+    foreach($a as $i=>$e)
+    {
+        if($i%2==0)
+        {
+            //Text
+            if($this->HREF)
+                $this->PutLink($this->HREF,$e);
+            else
+                $this->Write(5,$e);
+        }
+        else
+        {
+            //Tag
+            if($e{0}=='/')
+                $this->CloseTag(strtoupper(substr($e,1)));
+            else
+            {
+                //Extract attributes
+                $a2=explode(' ',$e);
+                $tag=strtoupper(array_shift($a2));
+                $attr=array();
+                foreach($a2 as $v)
+                {
+                    if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3))
+                        $attr[strtoupper($a3[1])]=$a3[2];
+                }
+                $this->OpenTag($tag,$attr);
+            }
+        }
+    }
+}
+
+function OpenTag($tag,$attr)
+{
+    //Opening tag
+    if($tag=='B' or $tag=='I' or $tag=='U')
+        $this->SetStyle($tag,true);
+    if($tag=='A')
+        $this->HREF=$attr['HREF'];
+    if($tag=='BR')
+        $this->Ln(5);
+}
+
+function CloseTag($tag)
+{
+    //Closing tag
+    if($tag=='B' or $tag=='I' or $tag=='U')
+        $this->SetStyle($tag,false);
+    if($tag=='A')
+        $this->HREF='';
+}
+
+function SetStyle($tag,$enable)
+{
+    //Modify style and select corresponding font
+    $this->$tag+=($enable ? 1 : -1);
+    $style='';
+    foreach(array('B','I','U') as $s)
+        if($this->$s>0)
+            $style.=$s;
+    $this->SetFont('',$style);
+}
+
+function PutLink($URL,$txt)
+{
+    //Put a hyperlink
+    $this->SetTextColor(0,0,255);
+    $this->SetStyle('U',true);
+    $this->Write(5,$txt,$URL);
+    $this->SetStyle('U',false);
+    $this->SetTextColor(0);
+}
+}
+
+$html='You can now easily print text mixing different styles: <b>bold</b>, <i>italic</i>,
+<u>underlined</u>, or <b><i><u>all at once</u></i></b>!<br><br>You can also insert links on
+text, such as <a href="http://www.fpdf.org">www.fpdf.org</a>, or on an image: click on the logo.';
+
+$pdf=new PDF();
+//First page
+$pdf->AddPage();
+$pdf->SetFont('Arial','',20);
+$pdf->Write(5,'To find out what\'s new in this tutorial, click ');
+$pdf->SetFont('','U');
+$link=$pdf->AddLink();
+$pdf->Write(5,'here',$link);
+$pdf->SetFont('');
+//Second page
+$pdf->AddPage();
+$pdf->SetLink($link);
+$pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org');
+$pdf->SetLeftMargin(45);
+$pdf->SetFontSize(14);
+$pdf->WriteHTML($html);
+$pdf->Output();
+?>
+
+

[Demo]

+The new method to print text is Write(). It is very close to MultiCell(); the differences are: +
    +
  • The end of line is at the right margin and the next line begins at the left one
  • +
  • The current position moves at the end of the text
  • +
+So it allows to write a chunk of text, alter the font style, then continue from the exact +place we left it. On the other hand, you cannot justify it. +
+
+The method is used on the first page to put a link pointing to the second one. The beginning of +the sentence is written in regular style, then we switch to underline and finish it. The link +is created with AddLink(), which returns a link identifier. The identifier is +passed as third parameter of Write(). Once the second page is created, we use SetLink() to +make the link point to the beginning of the current page. +
+
+Then we put an image with a link on it. An external link points to an URL (HTTP, mailto...). +The URL is simply passed as last parameter of Image(). +
+
+Finally, the left margin is moved after the image with SetLeftMargin() and some text in +HTML format is output. A very simple HTML parser is used for this, based on regular expressions. +Recognized tags are <b>, <i>, <u>, <a> and <br>; the others are +ignored. The parser also makes use of the Write() method. An external link is put the same way as +an internal one (third parameter of Write()). Note that Cell() also allows to put links. + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto6.php b/includes/html2pdf/_fpdf/tutorial/tuto6.php new file mode 100644 index 000000000..bf021ba65 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto6.php @@ -0,0 +1,122 @@ +FPDF($orientation,$unit,$format); + //Initialization + $this->B=0; + $this->I=0; + $this->U=0; + $this->HREF=''; +} + +function WriteHTML($html) +{ + //HTML parser + $html=str_replace("\n",' ',$html); + $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE); + foreach($a as $i=>$e) + { + if($i%2==0) + { + //Text + if($this->HREF) + $this->PutLink($this->HREF,$e); + else + $this->Write(5,$e); + } + else + { + //Tag + if($e{0}=='/') + $this->CloseTag(strtoupper(substr($e,1))); + else + { + //Extract attributes + $a2=explode(' ',$e); + $tag=strtoupper(array_shift($a2)); + $attr=array(); + foreach($a2 as $v) + { + if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3)) + $attr[strtoupper($a3[1])]=$a3[2]; + } + $this->OpenTag($tag,$attr); + } + } + } +} + +function OpenTag($tag,$attr) +{ + //Opening tag + if($tag=='B' or $tag=='I' or $tag=='U') + $this->SetStyle($tag,true); + if($tag=='A') + $this->HREF=$attr['HREF']; + if($tag=='BR') + $this->Ln(5); +} + +function CloseTag($tag) +{ + //Closing tag + if($tag=='B' or $tag=='I' or $tag=='U') + $this->SetStyle($tag,false); + if($tag=='A') + $this->HREF=''; +} + +function SetStyle($tag,$enable) +{ + //Modify style and select corresponding font + $this->$tag+=($enable ? 1 : -1); + $style=''; + foreach(array('B','I','U') as $s) + if($this->$s>0) + $style.=$s; + $this->SetFont('',$style); +} + +function PutLink($URL,$txt) +{ + //Put a hyperlink + $this->SetTextColor(0,0,255); + $this->SetStyle('U',true); + $this->Write(5,$txt,$URL); + $this->SetStyle('U',false); + $this->SetTextColor(0); +} +} + +$html='You can now easily print text mixing different styles: bold, italic, +underlined, or all at once!

You can also insert links on +text, such as www.fpdf.org, or on an image: click on the logo.'; + +$pdf=new PDF(); +//First page +$pdf->AddPage(); +$pdf->SetFont('Arial','',20); +$pdf->Write(5,'To find out what\'s new in this tutorial, click '); +$pdf->SetFont('','U'); +$link=$pdf->AddLink(); +$pdf->Write(5,'here',$link); +$pdf->SetFont(''); +//Second page +$pdf->AddPage(); +$pdf->SetLink($link); +$pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org'); +$pdf->SetLeftMargin(45); +$pdf->SetFontSize(14); +$pdf->WriteHTML($html); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_fpdf/tutorial/tuto7.htm b/includes/html2pdf/_fpdf/tutorial/tuto7.htm new file mode 100644 index 000000000..0212fb905 --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto7.htm @@ -0,0 +1,303 @@ + + + + +Adding new fonts and encoding support + + + + +

Adding new fonts and encoding support

+This tutorial explains how to use TrueType or Type1 fonts so that you are not limited to the standard +fonts any more. The other interest is that you can choose the font encoding, which allows you to +use other languages than the Western ones (the standard fonts having too few available characters). +
+
+There are two ways to use a new font: embedding it in the PDF or not. When a font is not +embedded, it is searched in the system. The advantage is that the PDF file is lighter; on the other +hand, if it is not available, a substitution font is used. So it is preferable to ensure that the +needed font is installed on the client systems. If the file is to be viewed by a large audience, +it is recommended to embed. +
+
+Adding a new font requires three steps for TrueTypes: +
    +
  • Generation of the metric file (.afm)
  • +
  • Generation of the font definition file (.php)
  • +
  • Declaration of the font in the script
  • +
+For Type1, the first one is theoretically not necessary because the AFM file is usually shipped +with the font. In case you have only a metric file in PFM format, use the convertor available +here. +

Generation of the metric file

+The first step for a TrueType consists in generating the AFM file. A utility exists to do this +task: ttf2pt1. The Windows binary +is available here. The command line to use is +the following: +
+
+ttf2pt1 -a font.ttf font +
+
+For example, for Comic Sans MS Regular: +
+
+ttf2pt1 -a c:\windows\fonts\comic.ttf comic +
+
+Two files are created; the one we are interested in is comic.afm. +

Generation of the font definition file

+The second step consists in generating a PHP file containing all the information needed by FPDF; +in addition, the font file is compressed. To do this, a helper script is provided in the font/makefont/ +directory of the package: makefont.php. It contains the following function: +
+
+MakeFont(string fontfile, string afmfile [, string enc [, array patch [, string type]]]) +
+
fontfile
+
+

Path to the .ttf or .pfb file.

+
+
afmfile
+
+

Path to the .afm file.

+
+
enc
+
+

Name of the encoding to use. Default value: cp1252.

+
+
patch
+
+

Optional modification of the encoding. Empty by default.

+
+
type
+
+

Type of the font (TrueType or Type1). Default value: TrueType.

+
+
+The first parameter is the name of the font file. The extension must be either .ttf or .pfb and +determines the font type. If you own a Type1 font in ASCII format (.pfa), you can convert it to +binary format with t1utils. +
+If you don't want to embed the font, pass an empty string. In this case, type is given by the +type parameter. +
+Note: in the case of a font with the same name as a standard one, for instance arial.ttf, it is +recommended to embed. If you don't, some versions of Acrobat will use their own fonts. +
+
+The AFM file is the one previously generated. +
+
+The encoding defines the association between a code (from 0 to 255) and a character. The first +128 are fixed and correspond to ASCII; the following are variable. The encodings are stored in +.map files. Those available are: +
    +
  • cp1250 (Central Europe)
  • +
  • cp1251 (Cyrillic)
  • +
  • cp1252 (Western Europe)
  • +
  • cp1253 (Greek)
  • +
  • cp1254 (Turkish)
  • +
  • cp1255 (Hebrew)
  • +
  • cp1257 (Baltic)
  • +
  • cp1258 (Vietnamese)
  • +
  • cp874 (Thai)
  • +
  • ISO-8859-1 (Western Europe)
  • +
  • ISO-8859-2 (Central Europe)
  • +
  • ISO-8859-4 (Baltic)
  • +
  • ISO-8859-5 (Cyrillic)
  • +
  • ISO-8859-7 (Greek)
  • +
  • ISO-8859-9 (Turkish)
  • +
  • ISO-8859-11 (Thai)
  • +
  • ISO-8859-15 (Western Europe)
  • +
  • ISO-8859-16 (Central Europe)
  • +
  • KOI8-R (Russian)
  • +
  • KOI8-U (Ukrainian)
  • +
+Of course, the font must contain the characters corresponding to the chosen encoding. +
+In the particular case of a symbolic font (that is to say which does not contain letters, such +as Symbol or ZapfDingbats), pass an empty string. +
+The encodings which begin with cp are those used by Windows; Linux systems usually use ISO. +
+Remark: the standard fonts use cp1252. +
+
+The fourth parameter gives the possibility to alter the encoding. Sometimes you may want to add +some characters. For instance, ISO-8859-1 does not contain the euro symbol. To add it at position +164, pass array(164=>'Euro'). +
+
+The last parameter is used to give the type of the font in case it is not embedded (that is to +say the first parameter is empty). +
+
+After you have called the function (create a new file for this and include makefont.php, or +simply add the call directly inside), a .php file is created, with the same name as the .afm one. +You may rename it if you wish. If the case of embedding, the font file is compressed and gives a +second file with .z as extension (except if the compression function is not available, it +requires zlib). You may rename it too, but in this case you have to alter the variable $file +in the .php file accordingly. +
+
+Example: +
+
MakeFont('c:\\windows\\fonts\\comic.ttf','comic.afm','cp1252');
+
+
+which gives the files comic.php and comic.z. +
+
+Then you have to copy the generated file(s) to the font directory. If the font file +could not be compressed, copy the .ttf or .pfb instead of the .z. +
+
+Remark: for TTF fonts, you can generate the files online here +instead of doing it manually. +

Declaration of the font in the script

+The last step is the most simple. You just need to call the AddFont() method. For instance: +
+
$pdf->AddFont('Comic','','comic.php');
+
+
+or simply: +
+
$pdf->AddFont('Comic');
+
+
+And the font is now available (in regular and underlined styles), usable like the others. If we +had worked with Comic Sans MS Bold (comicbd.ttf), we would have put: +
+
$pdf->AddFont('Comic','B','comicbd.php');
+
+
+

Example

+Let's now see a small complete example. The font used is Calligrapher, available at +www.abstractfonts.com (a site +offering numerous free TrueType fonts). The first step is the generation of the AFM file: +
+
+ttf2pt1 -a calligra.ttf calligra +
+
+which gives calligra.afm (and calligra.t1a that we can delete). Then we generate the definition +file: +
+
<?php
+require('font/makefont/makefont.php');
+
+MakeFont('calligra.ttf','calligra.afm');
+?>
+
+The function call gives the following report: +
+
+Warning: character Euro is missing
+Warning: character Zcaron is missing
+Warning: character zcaron is missing
+Warning: character eth is missing
+Font file compressed (calligra.z)
+Font definition file generated (calligra.php)
+
+The euro character is not present in the font (it is too old). Three other characters are missing +too, but we are not interested in them anyway. +
+We can now copy the two files to the font directory and write the script: +
+
<?php
+require('fpdf.php');
+
+$pdf=new FPDF();
+$pdf->AddFont('Calligrapher','','calligra.php');
+$pdf->AddPage();
+$pdf->SetFont('Calligrapher','',35);
+$pdf->Cell(0,10,'Enjoy new fonts with FPDF!');
+$pdf->Output();
+?>
+
+

[Demo]

+

About the euro symbol

+The euro character is not present in all encodings, and is not always placed at the same position: + + + + + + + + + + + + + + + + + + + + + + +
EncodingPosition
cp1250128
cp1251136
cp1252128
cp1253128
cp1254128
cp1255128
cp1257128
cp1258128
cp874128
ISO-8859-1absent
ISO-8859-2absent
ISO-8859-4absent
ISO-8859-5absent
ISO-8859-7absent
ISO-8859-9absent
ISO-8859-11absent
ISO-8859-15164
ISO-8859-16164
KOI8-Rabsent
KOI8-Uabsent
+ISO-8859-1 is widespread but does not include the euro sign. If you need it, the simplest thing +to do is using cp1252 or ISO-8859-15 instead, which are nearly identical but contain the precious +symbol. +
+As for ISO-8859-2, it is possible to use ISO-8859-16 instead, but it contains many differences. +It is therefore simpler to patch the encoding to add the symbol to it, as explained above. The +same is true for the other encodings. +

Font synthesis under Windows

+When a TrueType font is not available in a given style, Windows is able to synthesize it from the +regular version. For instance, there is no Comic Sans MS Italic, but it can be built from Comic +Sans MS Regular. This feature can be used in a PDF file, but unfortunately requires that the +regular font be present in the system (you must not embed it). Here is how to do it: +
    +
  • Generate the definition file for the regular font without embedding (you may rename it to +reflect the desired style)
  • +
  • Open it and append to the variable $name a comma followed by the desired style +(Italic, Bold or BoldItalic)
  • +
+For instance, for the file comici.php: +
+
+$name='ComicSansMS,Italic'; +
+
+It can then be used normally: +
+
$pdf->AddFont('Comic','I','comici.php');
+
+
+

Reducing the size of TrueType fonts

+Font files are often quite voluminous (more than 100, even 200KB); this is due to the fact that +they contain the characters corresponding to many encodings. zlib compression reduces them but +they remain fairly big. A technique exists to reduce them further. It consists in converting the +font to the Type1 format with ttf2pt1 by specifying the encoding you are interested in; all other +characters will be discarded. +
+For instance, the arial.ttf font shipped with Windows 98 is 267KB (it contains 1296 characters). +After compression it gives 147. Let's convert it to Type1 by keeping only cp1250 characters: +
+
+ttf2pt1 -b -L cp1250.map c:\windows\fonts\arial.ttf arial +
+
+The .map files are located in the font/makefont/ directory of the package. The command produces +arial.pfb and arial.afm. The arial.pfb file is only 35KB, and 30KB after compression. +
+
+It is possible to go even further. If you are interested only by a subset of the encoding (you +probably don't need all 217 characters), you can open the .map file and remove the lines you are +not interested in. This will reduce the file size accordingly. + + diff --git a/includes/html2pdf/_fpdf/tutorial/tuto7.php b/includes/html2pdf/_fpdf/tutorial/tuto7.php new file mode 100644 index 000000000..0d309d0db --- /dev/null +++ b/includes/html2pdf/_fpdf/tutorial/tuto7.php @@ -0,0 +1,11 @@ +AddFont('Calligrapher','','calligra.php'); +$pdf->AddPage(); +$pdf->SetFont('Calligrapher','',35); +$pdf->Cell(0,10,'Enjoy new fonts with FPDF!'); +$pdf->Output(); +?> diff --git a/includes/html2pdf/_lisez_moi.txt b/includes/html2pdf/_lisez_moi.txt new file mode 100644 index 000000000..fbb7b5e09 --- /dev/null +++ b/includes/html2pdf/_lisez_moi.txt @@ -0,0 +1,181 @@ +******************************************************* +** Ce programme est distribué sous la licence LGPL, ** +** reportez-vous au fichier _LGPL.txt ou à ** +** http://www.gnu.org/licenses/lgpl.html ** +** pour en savoir plus. ** +** ** +** Copyright 2000-2009 par Laurent Minguet ** +******************************************************* +******************************** +* HTML2PDF v3.22a - 15/06/2009 * +******************************** + +Utilisation : +------------ + - regardez les exemples fournis pour voir le fonctionnement. + + - les formulaires ne marchent QUE avec ADOBE READER 8 et ADOBE READER 9.0 + + - il est TRES IMPORTANT de fournir du HTML 4.01 valide au convertisseur, + mais seulement ce que contient le + + - pour les borders : il est conseillé qu'ils soient au format "solid 1mm #000000" + + - pour les paddings : ils ne sont applicables qu'aux balises table, th, td, div, li + + - la liste des balises HTML reconnues se trouve dans le fichier "_balises_html.xls" + + - la possibilité de protégé vos PDF est présente, CF Exemple 7. Elle utilise le script + fpdf_protection de Klemen Vodopivec. + + - Certaines balises spécifiques ont été introduites : + * (CF Exemple 7) : + permet de définir l'orientation, les marges left, right, top et bottom, l'image + et la couleur de fond d'une page, sa taille et position, le footer. + Il est egalement possible de garder les header et footer des pages précédentes, + grace à l'attribue pageset="old" (CF Exemple 3) + + * (CF Exemple 3) + + * (CF Exemple 3) + + * : + permet de forcer l'affichage d'une partie sur une même page. + Si cette partie ne rentre pas dans le reste de la page, un saut de page est + effectué avant. + + * (CF Exemples 0 et 9) : + permet d'inserer des barcodes dans les pdfs, CF Exemples 0 et 9 + Les types de codebar possible sont : EAN13, UPC_A, CODE39. Ceci utilise les + scripts de The-eh et Olivier + + * (CF Exemples 7 et About) : + permet d'inserer des bookmark dans les pdfs, CF Exemple 7 et About. + Il est egalement possible de créer un index automatiquement en fin de + document, CF exemple About. + Ceci utilise les scripts d'Olivier et de Min's + +Modification : +------------- + 3.22a: redistribution de HTML2PDF sous la licence LGPL !!! (au lieu de GPL) + 3.22 : correction sur le background-color + refonte totale de la gestion de text-align. les valeurs center et right marchent maintenant meme en cas de contenu riche + 3.21 : ajout de la propriété css FLOAT pour la balise IMG + correction sur la gestion des TFOOT + correction sur le positionnement des images + 3.20 : ajout de la gestion des margins pour la balise DIV + ajout de la gestion de la propriete css LINE-HEIGHT + correction sur l'interpretation de la valeur de certains styles CSS (background-image, background-position, ...) + correction sur la reconnaissance des balises thead et tfoot + correction sur la balise select + correction sur les fichiers de langue (merci à Sinan) + 3.19 : optimisation du parseur HTML - merci à Jezelinside + ajout de la balise TFOOT + amélioration de la gestion des tableaux : les contenus des balises THEAD et TFOOT sont maintenant répétés sur chaque page. + ajout de la balise spécifique BOOKMARK afin de créer des "marques-page" + possibilité de rajouter un index automatique en fin de fichier + ajout de la langue turque TR (merci à Hidayet) + amélioration de la méthode Output. Elle est maintenant également utilisable comme celle de FPDF + 3.18 : correction sur les sauts de page automatique pour les balises TABLE, UL, OL + correction sur l'interpretation des styles pour la balise HR + correction sur l'interpretation du style border-collapse pour la balise TABLE + prise en compte de margin:auto pour les tables et les divs + les commentaires dans les CSS sont acceptés + 3.17 : ajout de la gestion des balises INPUT (text, radio, checkbox, button, hidden, ...), SELECT, OPTION, TEXTAREA (cf exemple 14) + ajout de la possibilité de mettre des scripts dans le pdf, via $html2pdf->pdf->IncludeJS(...); (cf exemples JS) + correction sur le saut de page automatique pour les images + correction sur les sauts de lignes automatiques pour certaines balises (UL, P, ...) + ajout de la langue NL (merci à Roland) + 3.16 : ajout de la gestion de list-style: none (cf exemple 13) + correction dans la gestion des fontes ajoutées à fpdf (via la méthode AddFont) + nombreuses corrections sur le calcul des largeurs des éléments table, div, hr, td, th + ajout de l'exemple about.php + (pour info, les PDF générés à partir des exemples sont maintenant dans le répertoire /exemples/pdf/, et sont supprimables) + 3.15 : correction sur l'identification des styles en cas de valeurs multiples dans la propriete class + prise en compte de border-radius pour la limite des backgrounds (color et image) + ajout des proprietes CSS border-top-*, border-right-*, border-bottom-*, border-left-* + ajout de la propriété CSS list-style-image (cf exemple 12) + pour la balise table, ajout de l'interprétation de align="center" et align="right" (cf exemple 1) + correction dans le positionnement des images + correction de quelques bugs + ajout d'une fonction d'analyse des ressources HTML2PDFgetTimerDebug (cf début du fichier html2pdf.class.php) + 3.14 : ajout d'une langue (pt : Brazilian Portuguese language) et amelioration de la methode vueHTML (merci à Rodrigo) + correction du positionnement du contenu des DIVs. gestion des proprietes valign et align + ajout de la propriete CSS border-collapse (cf exemple 0) + ajout de la propriete CSS border-radius (cf exemple 1) + correction de quelques bugs + 3.13 : reecriture de la balise hr, avec prise en compte des styles (cf exemple 0) + ajout de la propriete backcolor pour la balise page (cf exemple 9) + ajout des proprietes backleft et backright pour la balise page afin de pouvoir changer les marges des pages (cf exemple 8) + nombreuses corrections sur les balises et les styles + 3.12 : ajout des balises ol, ul, li (cf exemple 12) + correction sur le calcul de la taille des td en cas de colspan et rowspan + ajout de la méthode setTestTdInOnePage afin de pouvoir desactiver le test sur la taille des TD (cf exemple 11) + correction de quelques bugs + 3.11 : ajout des balises div, p, pre, s + gestion des styles CSS position (relative, absolute), left, top, right, bottom (cf exemple 10) + meilleur gestion des border : border-style, border-color, border-width (cf exemple 10) + possibilité d'indiquer les marges par défault, via le constructeur (cf exemple 2) + 3.10a: correction pour compatibilité php4 / php5 + 3.10 : ajout des liens internes (cf exemple 7) + gestion complete des background : image, repeat, position, color (cf exemple 1) + gestion de underline, overline, linethrough (cf exemple 2) + correction de quelques bugs + 3.09 : mise à jour vers fpdf version 1.6, ajout de barcode, correction de l'affichage de certains caractères spéciaux + correction du calcul de la hauteur de ligne de la balise br + detection en cas de contenu trop grand dans un TD + amélioration de la balise page (ajout de l'attribue pageset, avec les valeurs new et old) + ajout de FPDF_PROTECTION, accesible via $pdf->pdf->SetProtection(...) + 3.08 : version opérationnelle de page_header, ajout de page_footer, correction des borders des tableaux + 3.07 : correction de l'interpretation de cellspacing, amélioration de la balise page_header + 3.06 : première gestion de la balise page_header, correction des dimensions des tableaux + 3.05 : ajout de la propriété vertical-align, ajout de la gestion des fichiers de langue + 3.04 : correction du saut de page automatique pour les tableaux. Ajout de propriétés à la balise PAGE + 3.03 : correction de bugs au niveau de la gestion des images PHP par FPDF, meilleure gestion des erreurs + 3.02 : ajout de la gestion des noms des couleurs, correction de la gestion des images générées par php, correction de quelques bugs + 3.01 : correction de quelques bugs, ajout d'une protection pour les balises non existantes + 3.00 : refont totale du calcul des tableaux. Prise en compte des colspan et rowspan + 2.85 : ajout de la propriété cellspacing, nouvelle gestion des padding des tableaux (identique à l'html) + 2.80 : ajout des types de border dotted et dasheds + 2.75 : ajout des top, left, right, bottom pour padding et border + 2.70 : correction de la balise HR, ajout de la propriété padding pour les table, th, td + correction des dimensions, les unités px, mm, in, pt sont enfin réellement reproduites, correction de font-size, border, ... + ajout d'une propriété à la balise page : footer + correction dans l'affichage et le calcul des tables + 2.55 : vérification de la validité du code (ouverture / fermeture) - ajout des unités mm, in, pt + 2.50 : correction de nobreak, des marges, ajout de nombreuses balises + 2.40 : refonte totale de l'identification des styles CSS. Les héritages marchent. + 2.39 : corrections diverses, ajout de certaines propriétés (bgcolor, ...) + 2.38 : meilleur identification des propriétés border et color + 2.37 : nombreuses corrections : balise A, couleur de fond, retour à la ligne, gestion des images dans un texte, ... + 2.36 : ajout des balises STRONG, EM + 2.35 : amélioration de la gestion des feuilles de style + 2.31 : correction de quelques bugs + 2.30 : première version opérationnel des feuilles de style + 2.25 : ajout de la balise LINK pour le type text/css + 2.20 : premier jet de la gestion des feuilles de style, ajout de la balise STYLE + 2.15 : n'interprète plus l'HTML en commentaire + 2.10 : ajout des balises H1 -> H6 + 2.01 : correction de quelques bugs + 2.00 : première version diffusée + +Aide et Support : +---------------- + pour toutes questions et rapport de bug, merci d'utiliser exclusivement le lien de support ci-dessous. + Je ne répondrais à aucune question en dehors, afin que tout le monde puisse profiter des réponses. + +Informations : +------------- + Programmation en PHP4 + + Programmeur : Spipu + email : webmaster@spipu.net + site : http://html2pdf.fr/ + wiki : http://html2pdf.fr/wiki.php + support : http://html2pdf.fr/forum.php + +Remerciement : +------------- + * Olivier PLATHEY pour sa librairie Fpdf (http://www.fpdf.org/) + * yAronet pour l'hebergement du forum de support + * toutes les personnes qui m'ont aidé à développer cet librairie, et à traduire les différents textes diff --git a/includes/html2pdf/_mypdf/00_fpdf_codebar.class.php b/includes/html2pdf/_mypdf/00_fpdf_codebar.class.php new file mode 100644 index 000000000..cb54918b6 --- /dev/null +++ b/includes/html2pdf/_mypdf/00_fpdf_codebar.class.php @@ -0,0 +1,238 @@ +FPDF($sens, $unit, $format); + } + + function BARCODE_EAN13($x,$y,$barcode,$h=10,$w=.35) + { + return $this->Barcode($x,$y,$barcode,$h,$w,13); + } + + function BARCODE_UPC_A($x,$y,$barcode,$h=10,$w=.35) + { + return $this->Barcode($x,$y,$barcode,$h,$w,12); + } + + function GetCheckDigit($barcode) + { + //Compute the check digit + $sum=0; + for($i=1;$i<=11;$i+=2) + $sum+=3*$barcode{$i}; + for($i=0;$i<=10;$i+=2) + $sum+=$barcode{$i}; + $r=$sum%10; + if($r>0) + $r=10-$r; + return $r; + } + + function TestCheckDigit($barcode) + { + //Test validity of check digit + $sum=0; + for($i=1;$i<=11;$i+=2) + $sum+=3*$barcode{$i}; + for($i=0;$i<=10;$i+=2) + $sum+=$barcode{$i}; + return ($sum+$barcode{12})%10==0; + } + + function Barcode($x,$y,$barcode,$h,$w,$len) + { + //Padding + $barcode=str_pad($barcode,$len-1,'0',STR_PAD_LEFT); + if($len==12) + $barcode='0'.$barcode; + //Add or control the check digit + if(strlen($barcode)==12) + $barcode.=$this->GetCheckDigit($barcode); + elseif(!$this->TestCheckDigit($barcode)) + $this->Error('Incorrect check digit'); + //Convert digits to bars + $codes=array( + 'A'=>array( + '0'=>'0001101','1'=>'0011001','2'=>'0010011','3'=>'0111101','4'=>'0100011', + '5'=>'0110001','6'=>'0101111','7'=>'0111011','8'=>'0110111','9'=>'0001011'), + 'B'=>array( + '0'=>'0100111','1'=>'0110011','2'=>'0011011','3'=>'0100001','4'=>'0011101', + '5'=>'0111001','6'=>'0000101','7'=>'0010001','8'=>'0001001','9'=>'0010111'), + 'C'=>array( + '0'=>'1110010','1'=>'1100110','2'=>'1101100','3'=>'1000010','4'=>'1011100', + '5'=>'1001110','6'=>'1010000','7'=>'1000100','8'=>'1001000','9'=>'1110100') + ); + $parities=array( + '0'=>array('A','A','A','A','A','A'), + '1'=>array('A','A','B','A','B','B'), + '2'=>array('A','A','B','B','A','B'), + '3'=>array('A','A','B','B','B','A'), + '4'=>array('A','B','A','A','B','B'), + '5'=>array('A','B','B','A','A','B'), + '6'=>array('A','B','B','B','A','A'), + '7'=>array('A','B','A','B','A','B'), + '8'=>array('A','B','A','B','B','A'), + '9'=>array('A','B','B','A','B','A') + ); + $code='101'; + $p=$parities[$barcode{0}]; + for($i=1;$i<=6;$i++) + $code.=$codes[$p[$i-1]][$barcode{$i}]; + $code.='01010'; + for($i=7;$i<=12;$i++) + $code.=$codes['C'][$barcode{$i}]; + $code.='101'; + //Draw bars + for($i=0;$iRect($x+$i*$w,$y,$w,$h,'F'); + } + + $code_w = strlen($code)*$w; + $code_t = substr($barcode,-$len); + + $code_f = $code_w/strlen($code_t)*$this->k/0.60; + $code_h = $h+$code_f/$this->k; + + //Print text uder barcode + $this->SetFont('Arial','',$code_f); + $this->Text($x,$y+$h+0.90*$code_f/$this->k,$code_t); + + return array($code_w, $code_h); + } + + function BARCODE_CODE39($xpos, $ypos, $code,$height=10, $baseline=0.5 ) + { + + $wide = $baseline; + $narrow = $baseline / 3 ; + $gap = $narrow; + + $barChar['0'] = 'nnnwwnwnn'; + $barChar['1'] = 'wnnwnnnnw'; + $barChar['2'] = 'nnwwnnnnw'; + $barChar['3'] = 'wnwwnnnnn'; + $barChar['4'] = 'nnnwwnnnw'; + $barChar['5'] = 'wnnwwnnnn'; + $barChar['6'] = 'nnwwwnnnn'; + $barChar['7'] = 'nnnwnnwnw'; + $barChar['8'] = 'wnnwnnwnn'; + $barChar['9'] = 'nnwwnnwnn'; + $barChar['A'] = 'wnnnnwnnw'; + $barChar['B'] = 'nnwnnwnnw'; + $barChar['C'] = 'wnwnnwnnn'; + $barChar['D'] = 'nnnnwwnnw'; + $barChar['E'] = 'wnnnwwnnn'; + $barChar['F'] = 'nnwnwwnnn'; + $barChar['G'] = 'nnnnnwwnw'; + $barChar['H'] = 'wnnnnwwnn'; + $barChar['I'] = 'nnwnnwwnn'; + $barChar['J'] = 'nnnnwwwnn'; + $barChar['K'] = 'wnnnnnnww'; + $barChar['L'] = 'nnwnnnnww'; + $barChar['M'] = 'wnwnnnnwn'; + $barChar['N'] = 'nnnnwnnww'; + $barChar['O'] = 'wnnnwnnwn'; + $barChar['P'] = 'nnwnwnnwn'; + $barChar['Q'] = 'nnnnnnwww'; + $barChar['R'] = 'wnnnnnwwn'; + $barChar['S'] = 'nnwnnnwwn'; + $barChar['T'] = 'nnnnwnwwn'; + $barChar['U'] = 'wwnnnnnnw'; + $barChar['V'] = 'nwwnnnnnw'; + $barChar['W'] = 'wwwnnnnnn'; + $barChar['X'] = 'nwnnwnnnw'; + $barChar['Y'] = 'wwnnwnnnn'; + $barChar['Z'] = 'nwwnwnnnn'; + $barChar['-'] = 'nwnnnnwnw'; + $barChar['.'] = 'wwnnnnwnn'; + $barChar[' '] = 'nwwnnnwnn'; + $barChar['*'] = 'nwnnwnwnn'; + $barChar['$'] = 'nwnwnwnnn'; + $barChar['/'] = 'nwnwnnnwn'; + $barChar['+'] = 'nwnnnwnwn'; + $barChar['%'] = 'nnnwnwnwn'; + + $xpos_dep = $xpos; + $code = '*'.strtoupper($code).'*'; + for($i=0; $iError('Invalid character in barcode: '.$char); + } + $seq = $barChar[$char]; + for($bar=0; $bar<9; $bar++){ + if($seq{$bar} == 'n'){ + $lineWidth = $narrow; + }else{ + $lineWidth = $wide; + } + if($bar % 2 == 0){ + $this->Rect($xpos, $ypos, $lineWidth, $height, 'F'); + } + $xpos += $lineWidth; + } + $xpos += $gap; + } + + $code_w = $xpos-$xpos_dep; + $code_t = $code; + + $code_f = $code_w/strlen($code_t)*$this->k/0.60/3; + $code_h = $height+$code_f/$this->k; + + //Print text uder barcode + $this->SetFont('Arial','',$code_f); + $this->Text($xpos_dep,$ypos+$height+0.90*$code_f/$this->k,$code_t); + + return array($code_w, $code_h); + } + } +} +?> \ No newline at end of file diff --git a/includes/html2pdf/_mypdf/01_fpdf_bookmark.class.php b/includes/html2pdf/_mypdf/01_fpdf_bookmark.class.php new file mode 100644 index 000000000..2517787d7 --- /dev/null +++ b/includes/html2pdf/_mypdf/01_fpdf_bookmark.class.php @@ -0,0 +1,167 @@ +FPDF_Codebar($orientation,$unit,$format); + + } + + function Bookmark($txt, $level=0, $y=0) + { + if($y==-1) $y=$this->GetY(); + $this->outlines[]=array('t'=>$txt, 'l'=>$level, 'y'=>($this->h-$y)*$this->k, 'p'=>$this->PageNo()); + } + + function _putbookmarks() + { + $nb=count($this->outlines); + if($nb==0) return; + $lru=array(); + $level=0; + foreach($this->outlines as $i=>$o) + { + if($o['l']>0) + { + $parent=$lru[$o['l']-1]; + //Set parent and last pointers + $this->outlines[$i]['parent']=$parent; + $this->outlines[$parent]['last']=$i; + if($o['l']>$level) + { + //Level increasing: set first pointer + $this->outlines[$parent]['first']=$i; + } + } + else + $this->outlines[$i]['parent']=$nb; + + if($o['l']<=$level and $i>0) + { + //Set prev and next pointers + $prev=$lru[$o['l']]; + $this->outlines[$prev]['next']=$i; + $this->outlines[$i]['prev']=$prev; + } + $lru[$o['l']]=$i; + $level=$o['l']; + } + + //Outline items + $n=$this->n+1; + foreach($this->outlines as $i=>$o) + { + $this->_newobj(); + $this->_out('<_textstring($o['t'])); + $this->_out('/Parent '.($n+$o['parent']).' 0 R'); + if(isset($o['prev'])) + $this->_out('/Prev '.($n+$o['prev']).' 0 R'); + if(isset($o['next'])) + $this->_out('/Next '.($n+$o['next']).' 0 R'); + if(isset($o['first'])) + $this->_out('/First '.($n+$o['first']).' 0 R'); + if(isset($o['last'])) + $this->_out('/Last '.($n+$o['last']).' 0 R'); + $this->_out(sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]',1+2*$o['p'],$o['y'])); + $this->_out('/Count 0>>'); + $this->_out('endobj'); + } + + //Outline root + $this->_newobj(); + $this->OutlineRoot=$this->n; + $this->_out('<_out('/Last '.($n+$lru[0]).' 0 R>>'); + $this->_out('endobj'); + } + + function _putresources() + { + parent::_putresources(); + $this->_putbookmarks(); + } + + function _putcatalog() + { + parent::_putcatalog(); + if(count($this->outlines)>0) + { + $this->_out('/Outlines '.$this->OutlineRoot.' 0 R'); + $this->_out('/PageMode /UseOutlines'); + } + } + + function CreateIndex($titre = 'Index', $size1 = 20, $size2 = 15) + { + $this->Bookmark($titre, 0, -1); + + //Index title + $this->SetFontSize($size1); + $this->Cell(0,5,$titre,0,1,'C'); + $this->SetFontSize($size2); + $this->Ln(10); + + $size=sizeof($this->outlines); + $PageCellSize=$this->GetStringWidth('p. '.$this->outlines[$size-1]['p'])+2; + for ($i=0;$i<$size;$i++) + { + //Offset + $level=$this->outlines[$i]['l']; + if($level>0) $this->Cell($level*8); + + //Caption + $str=$this->outlines[$i]['t']; + $strsize=$this->GetStringWidth($str); + $avail_size=$this->w-$this->lMargin-$this->rMargin-$PageCellSize-($level*8)-4; + while ($strsize>=$avail_size) + { + $str=substr($str,0,-1); + $strsize=$this->GetStringWidth($str); + } + $this->Cell($strsize+2,$this->FontSize+2,$str); + + //Filling dots + $w=$this->w-$this->lMargin-$this->rMargin-$PageCellSize-($level*8)-($strsize+2); + $nb=$w/$this->GetStringWidth('.'); + $dots=str_repeat('.',$nb); + $this->Cell($w,$this->FontSize+2,$dots,0,0,'R'); + + //Page number + $this->Cell($PageCellSize,$this->FontSize+2,'p. '.$this->outlines[$i]['p'],0,1,'R'); + } + } + } +} +?> \ No newline at end of file diff --git a/includes/html2pdf/_mypdf/02_fpdf_formulaire.class.php b/includes/html2pdf/_mypdf/02_fpdf_formulaire.class.php new file mode 100644 index 000000000..4006c54a1 --- /dev/null +++ b/includes/html2pdf/_mypdf/02_fpdf_formulaire.class.php @@ -0,0 +1,228 @@ + + */ + +if (!defined('__CLASS_FPDF_FORMULAIRE__')) +{ + define('__CLASS_FPDF_FORMULAIRE__', true); + + require_once(dirname(__FILE__).'/01_fpdf_bookmark.class.php'); + + class FPDF_Formulaire extends FPDF_BookMark + { + var $javascript = ''; //javascript code + var $n_js; //numéro de l'objet javascript + var $n_cata; //numéro de l'objet catalogue + var $ur; // + + function FPDF_Formulaire($orientation='P',$unit='mm',$format='A4') + { + $this->FPDF_BookMark($orientation,$unit,$format); + $this->PDFVersion='1.6'; + + $this->ur = false; + } + + function _putuserrights() + { + if (!$this->ur) return; + $this->_out('/Perms<<'); + + $this->_out('/UR3<<'); + $this->_out('/Reference[<<'); + $this->_out('/Type /SigRef'); + $this->_out('/TransformMethod /UR3'); + $this->_out('/TransformParams<<'); + $this->_out('/Type /TransformParams'); + $this->_out('/Annots[ /Create /Delete /Modify /Copy /Import /Export ]'); + $this->_out('/Document [ /FullSave ]'); + $this->_out('/Form[ /Add /FillIn /Delete /SubmitStandalone ]'); + $this->_out('/Signature[ /Modify ]'); + $this->_out('/V /2.2'); + $this->_out('>>'); + $this->_out('>>]'); + $this->_out('>>'); + $this->_out('>>'); + } + + function _putresources() + { + + parent::_putresources(); + $this->_putjavascript(); + } + + function _putcatalog() + { + $this->n_cata = $this->n; + + parent::_putcatalog(); + + if (!empty($this->javascript)) $this->_out('/Names <n_js).' 0 R>>'); + $this->_putuserrights(); + } + + /* + * Create a javascript PDF string. + * @access protected + * @author Johannes Güntert, Nicola Asuni + */ + function _putjavascript() + { + if (empty($this->javascript)) return; + + // the following two lines are used to avoid form fields duplication after saving + if ($this->ur) + { + $js1 = "if(!this.getField('pdfoldsaved')) this.addField('pdfoldsaved','text',0, [0, 1, 0, 1]);"; + $js2 = "getField('pdfoldsaved').value = 'saved';"; + } + else + { + $js1 = ''; + $js2 = ''; + } + + $this->_newobj(); + $this->n_js = $this->n; + $this->_out('<<'); + $this->_out('/Names [(EmbeddedJS) '.($this->n + 1).' 0 R ]'); + $this->_out('>>'); + $this->_out('endobj'); + $this->_newobj(); + $this->_out('<<'); + $this->_out('/S /JavaScript'); + $this->_out('/JS '.$this->_textstring($js1."\n".$this->javascript."\n".$js2)); + $this->_out('>>'); + $this->_out('endobj'); + } + + /* + * Convert color to javascript color. + * @param string $color color name or #RRGGBB + * @access protected + * @author Denis Van Nuffelen, Nicola Asuni + */ + function _JScolor($color) + { + static $aColors = array('transparent', 'black', 'white', 'red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'dkGray', 'gray', 'ltGray'); + if (substr($color,0,1) == '#') + { + return sprintf("['RGB',%.3f,%.3f,%.3f]", hexdec(substr($color,1,2))/255, hexdec(substr($color,3,2))/255, hexdec(substr($color,5,2))/255); + } + if (!in_array($color,$aColors)) + { + $this->Error('Invalid color: '.$color); + } + + return 'color.'.$color; + } + + /* + * Adds a javascript form field. + * @param string $type field type + * @param string $name field name + * @param int $x horizontal position + * @param int $y vertical position + * @param int $w width + * @param int $h height + * @param array $prop array of properties. Possible values are (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf):
  • rect: Position and size of field on page.
  • borderStyle: Rectangle border appearance.
  • strokeColor: Color of bounding rectangle.
  • lineWidth: Width of the edge of the surrounding rectangle.
  • rotation: Rotation of field in 90-degree increments.
  • fillColor: Background color of field (gray, transparent, RGB, or CMYK).
  • userName: Short description of field that appears on mouse-over.
  • readonly: Whether the user may change the field contents.
  • doNotScroll: Whether text fields may scroll.
  • display: Whether visible or hidden on screen or in print.
  • textFont: Text font.
  • textColor: Text color.
  • textSize: Text size.
  • richText: Rich text.
  • richValue: Text.
  • comb: Text comb format.
  • multiline: Text multiline.
  • charLimit: Text limit to number of characters.
  • fileSelect: Text file selection format.
  • password: Text password format.
  • alignment: Text layout in text fields.
  • buttonAlignX: X alignment of icon on button face.
  • buttonAlignY: Y alignment of icon on button face.
  • buttonFitBounds: Relative scaling of an icon to fit inside a button face.
  • buttonScaleHow: Relative scaling of an icon to fit inside a button face.
  • buttonScaleWhen: Relative scaling of an icon to fit inside a button face.
  • highlight: Appearance of a button when pushed.
  • style: Glyph style for checkbox and radio buttons.
  • numItems: Number of items in a combo box or list box.
  • editable: Whether the user can type in a combo box.
  • multipleSelection: Whether multiple list box items may be selected.
+ * @access protected + * @author Denis Van Nuffelen, Nicola Asuni + */ + function _addfield($type, $name, $x, $y, $w, $h, $prop, $js_after = '') + { + if (!isset($prop['textSize'])) $prop['textSize'] = $this->FontSizePt; + if (!isset($prop['strokeColor'])) $prop['strokeColor'] = 'ltGray'; + if (isset($prop['value'])) $prop['value'] = str_replace('"', '', $prop['value']); + + $this->SetFillColor(240); + if ($w>0 && $h>0) + { + $d = 1/$this->k; + $r = 0.1; + $this->Rect($x+$d*0.5+$r, $y-$d*0.5+$r, $w-$d-2*$r, $h-$d-2*$r, 'F'); + } + + // javascript inclus + $this->ur = true; + + // the followind avoid fields duplication after saving the document + $this->javascript .= "if(this.getField('pdfoldsaved') && this.getField('pdfoldsaved').value != 'saved') {"; + $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%d,[%.2f,%.2f,%.2f,%.2f]);", $name, $type, $this->PageNo()-1, $x*$this->k, ($this->h-$y)*$this->k+1, ($x+$w)*$this->k, ($this->h-$y-$h)*$this->k+1)."\n"; + $this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n"; + while (list($key, $val) = each($prop)) + { + if (strcmp(substr($key, -5), 'Color') == 0) + $val = $this->_JScolor($val); + else + $val = '"'.$val.'"'; + $this->javascript .= 'f'.$name.'.'.$key.'='.$val.";\n"; + } + + $this->javascript .= '}'; + $this->javascript.= "\n".$js_after; + } + + function IncludeJS($script) + { + $this->javascript .= $script; + } + + function form_InputHidden($name, $value) + { + $prop = array('value' => $value); + $js_after = ''; + $this->_addfield('checkbox', $name, 0, 0, 0.1, 0.1, $prop, $js_after); + } + + function form_InputCheckBox($name, $x, $y, $w, $checked) + { + $prop = array(); + $prop['value'] = ($checked ? 'Yes' : 'Off'); + $js_after = ''; + $this->_addfield('checkbox', $name, $x, $y, $w, $w, $prop, $js_after); + } + + function form_InputRadio($name, $x, $y, $w) + { + $prop = array(); + $js_after = ''; + $this->_addfield('radiobutton', $name, $x, $y, $w, $w, $prop, $js_after); + } + + function form_InputText($name, $x, $y, $w, $h, $prop) + { + $js_after = ''; + $this->_addfield('text', $name, $x, $y, $w, $h, $prop, $js_after); + } + + function form_InputButton($name, $x, $y, $w, $h, $caption, $action, $prop) + { + if (!isset($prop['borderStyle'])) $prop['borderStyle'] = 'beveled'; + if (!isset($prop['fillColor'])) $prop['fillColor'] = 'ltGray'; + if (!isset($prop['strokeColor'])) $prop['strokeColor'] = 'black'; + + $js_after = 'f'.$name.".buttonSetCaption('".addslashes($caption)."');\n"; + $js_after.= 'f'.$name.".setAction('MouseUp','".addslashes($action)."');\n"; + $js_after.= 'f'.$name.".highlight='push';\n"; + $js_after.= 'f'.$name.".print=false;\n"; + $this->_addfield('button', $name, $x, $y, $w, $h, $prop, $js_after); + } + + function form_Select($name, $x, $y, $w, $h, $values, $multiligne, $prop) + { + $type = ($multiligne ? 'listbox' : 'combobox'); + $s = ''; foreach ($values as $value) { $s .= ($s ? ',' : '')."'".addslashes($value)."'"; } + $js_after = 'f'.$name.'.setItems(['.$s."]);\n"; + $this->_addfield($type, $name, $x, $y, $w, $h, $prop, $js_after); + } + } +} +?> \ No newline at end of file diff --git a/includes/html2pdf/_mypdf/99_fpdf_protection.class.php b/includes/html2pdf/_mypdf/99_fpdf_protection.class.php new file mode 100644 index 000000000..7defa24b8 --- /dev/null +++ b/includes/html2pdf/_mypdf/99_fpdf_protection.class.php @@ -0,0 +1,229 @@ +FPDF_Formulaire($orientation,$unit,$format); + + $this->encrypted=false; + $this->last_rc4_key=''; + $this->padding="\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08". + "\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A"; + } + + /** + * Function to set permissions as well as user and owner passwords + * + * - permissions is an array with values taken from the following list: + * copy, print, modify, annot-forms + * If a value is present it means that the permission is granted + * - If a user password is set, user will be prompted before document is opened + * - If an owner password is set, document can be opened in privilege mode with no + * restriction if that password is entered + */ + function SetProtection($permissions=array(),$user_pass='',$owner_pass=null) + { + $options = array('print' => 4, 'modify' => 8, 'copy' => 16, 'annot-forms' => 32 ); + $protection = 192; + foreach($permissions as $permission){ + if (!isset($options[$permission])) + $this->Error('Incorrect permission: '.$permission); + $protection += $options[$permission]; + } + if ($owner_pass === null) + $owner_pass = uniqid(rand()); + $this->encrypted = true; + $this->_generateencryptionkey($user_pass, $owner_pass, $protection); + } + +/**************************************************************************** +* * +* Private methods * +* * +****************************************************************************/ + + function _putstream($s) + { + if ($this->encrypted) { + $s = $this->_RC4($this->_objectkey($this->n), $s); + } + parent::_putstream($s); + } + + function _textstring($s) + { + if ($this->encrypted) { + $s = $this->_RC4($this->_objectkey($this->n), $s); + } + return parent::_textstring($s); + } + + /** + * Compute key depending on object number where the encrypted data is stored + */ + function _objectkey($n) + { + return substr($this->_md5_16($this->encryption_key.pack('VXxx',$n)),0,10); + } + + function _putresources() + { + parent::_putresources(); + if ($this->encrypted) { + $this->_newobj(); + $this->enc_obj_id = $this->n; + $this->_out('<<'); + $this->_putencryption(); + $this->_out('>>'); + $this->_out('endobj'); + } + } + + function _putencryption() + { + $this->_out('/Filter /Standard'); + $this->_out('/V 1'); + $this->_out('/R 2'); + $this->_out('/O ('.$this->_escape($this->Ovalue).')'); + $this->_out('/U ('.$this->_escape($this->Uvalue).')'); + $this->_out('/P '.$this->Pvalue); + } + + function _puttrailer() + { + parent::_puttrailer(); + if ($this->encrypted) { + $this->_out('/Encrypt '.$this->enc_obj_id.' 0 R'); + $this->_out('/ID [()()]'); + } + } + + /** + * RC4 is the standard encryption algorithm used in PDF format + */ + function _RC4($key, $text) + { + if ($this->last_rc4_key != $key) { + $k = str_repeat($key, 256/strlen($key)+1); + $rc4 = range(0,255); + $j = 0; + for ($i=0; $i<256; $i++){ + $t = $rc4[$i]; + $j = ($j + $t + ord($k{$i})) % 256; + $rc4[$i] = $rc4[$j]; + $rc4[$j] = $t; + } + $this->last_rc4_key = $key; + $this->last_rc4_key_c = $rc4; + } else { + $rc4 = $this->last_rc4_key_c; + } + + $len = strlen($text); + $a = 0; + $b = 0; + $out = ''; + for ($i=0; $i<$len; $i++){ + $a = ($a+1)%256; + $t= $rc4[$a]; + $b = ($b+$t)%256; + $rc4[$a] = $rc4[$b]; + $rc4[$b] = $t; + $k = $rc4[($rc4[$a]+$rc4[$b])%256]; + $out.=chr(ord($text{$i}) ^ $k); + } + + return $out; + } + + /** + * Get MD5 as binary string + */ + function _md5_16($string) + { + return pack('H*',md5($string)); + } + + /** + * Compute O value + */ + function _Ovalue($user_pass, $owner_pass) + { + $tmp = $this->_md5_16($owner_pass); + $owner_RC4_key = substr($tmp,0,5); + return $this->_RC4($owner_RC4_key, $user_pass); + } + + /** + * Compute U value + */ + function _Uvalue() + { + return $this->_RC4($this->encryption_key, $this->padding); + } + + /** + * Compute encryption key + */ + function _generateencryptionkey($user_pass, $owner_pass, $protection) + { + // Pad passwords + $user_pass = substr($user_pass.$this->padding,0,32); + $owner_pass = substr($owner_pass.$this->padding,0,32); + // Compute O value + $this->Ovalue = $this->_Ovalue($user_pass,$owner_pass); + // Compute encyption key + $tmp = $this->_md5_16($user_pass.$this->Ovalue.chr($protection)."\xFF\xFF\xFF"); + $this->encryption_key = substr($tmp,0,5); + // Compute U value + $this->Uvalue = $this->_Uvalue(); + // Compute P value + $this->Pvalue = -(($protection^255)+1); + } + } +} +?> \ No newline at end of file diff --git a/includes/html2pdf/_mypdf/mypdf.class.php b/includes/html2pdf/_mypdf/mypdf.class.php new file mode 100644 index 000000000..832046b0b --- /dev/null +++ b/includes/html2pdf/_mypdf/mypdf.class.php @@ -0,0 +1,485 @@ + PDF, utilise fpdf de Olivier PLATHEY + * Distribué sous la licence LGPL. + * + * @author Laurent MINGUET + * @version 3.22a - 15/06/2009 + */ + +if (!defined('__CLASS_MYPDF__')) +{ + define('__CLASS_MYPDF__', true); + + require_once(dirname(__FILE__).'/99_fpdf_protection.class.php'); // classe fpdf_protection + + class MyPDF extends FPDF_Protection + { + var $footer_param = array(); + + var $underline = false; + var $overline = false; + var $linethrough = false; + + function MyPDF($sens = 'P', $unit = 'mm', $format = 'A4') + { + $this->underline = false; + $this->overline = false; + $this->linethrough = false; + + $this->FPDF_Protection($sens, $unit, $format); + $this->AliasNbPages(); + $this->SetMyFooter(); + } + + function SetMyFooter($page = null, $date = null, $heure = null, $form = null) + { + if ($page===null) $page = null; + if ($date===null) $date = null; + if ($heure===null) $heure = null; + if ($form===null) $form = null; + + $this->footer_param = array('page' => $page, 'date' => $date, 'heure' => $heure, 'form' => $form); + } + + function Footer() + { + $txt = ''; + if ($this->footer_param['form']) $txt = (HTML2PDF::textGET('pdf05')); + if ($this->footer_param['date'] && $this->footer_param['heure']) $txt.= ($txt ? ' - ' : '').(HTML2PDF::textGET('pdf03')); + if ($this->footer_param['date'] && !$this->footer_param['heure']) $txt.= ($txt ? ' - ' : '').(HTML2PDF::textGET('pdf01')); + if (!$this->footer_param['date'] && $this->footer_param['heure']) $txt.= ($txt ? ' - ' : '').(HTML2PDF::textGET('pdf02')); + if ($this->footer_param['page']) $txt.= ($txt ? ' - ' : '').(HTML2PDF::textGET('pdf04')); + + $txt = str_replace('[[date_d]]', date('d'), $txt); + $txt = str_replace('[[date_m]]', date('m'), $txt); + $txt = str_replace('[[date_y]]', date('Y'), $txt); + $txt = str_replace('[[date_h]]', date('H'), $txt); + $txt = str_replace('[[date_i]]', date('i'), $txt); + $txt = str_replace('[[date_s]]', date('s'), $txt); + $txt = str_replace('[[current]]', $this->PageNo(), $txt); + $txt = str_replace('[[nb]]', '{nb}', $txt); + + if (strlen($txt)>0) + { + $this->SetY(-11); + $this->setOverline(false); + $this->setLinethrough(false); + $this->SetFont('Arial','I',8); + $this->Cell(0, 10, $txt, 0, 0, 'R'); + } + } + + // redéfinition de la fonction Image de FPDF afin de rajouter la gestion des fichiers PHP + function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') + { + //Put an image on the page + if(!isset($this->images[$file])) + { + //First use of this image, get info + if($type=='') + { + /* MODIFICATION HTML2PDF pour le support des images PHP */ + $type = explode('?', $file); + $type = pathinfo($type[0]); + if (!isset($type['extension']) || !$type['extension']) + $this->Error('Image file has no extension and no type was specified: '.$file); + + $type = $type['extension']; + /* FIN MODIFICATION */ + } + + $type=strtolower($type); + + /* MODIFICATION HTML2PDF pour le support des images PHP */ + if ($type=='php') + { + // identification des infos + $infos=@GetImageSize($file); + if (!$infos) $this->Error('Unsupported image : '.$file); + + // identification du type + $type = explode('/', $infos['mime']); + if ($type[0]!='image') $this->Error('Unsupported image : '.$file); + $type = $type[1]; + } + /* FIN MODIFICATION */ + + if($type=='jpeg') + $type='jpg'; + $mtd='_parse'.$type; + if(!method_exists($this,$mtd)) + $this->Error('Unsupported image type: '.$type); + $info=$this->$mtd($file); + $info['i']=count($this->images)+1; + $this->images[$file]=$info; + } + else + $info=$this->images[$file]; + //Automatic width and height calculation if needed + if($w==0 && $h==0) + { + //Put image at 72 dpi + $w=$info['w']/$this->k; + $h=$info['h']/$this->k; + } + elseif($w==0) + $w=$h*$info['w']/$info['h']; + elseif($h==0) + $h=$w*$info['h']/$info['w']; + //Flowing mode + if($y===null) + { + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x2=$this->x; + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x2; + } + $y=$this->y; + $this->y+=$h; + } + if($x===null) + $x=$this->x; + + $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); + if($link) + $this->Link($x,$y,$w,$h,$link); + } + + // Draw a polygon + // Auteur : Andrew Meier + // Licence : Freeware + function Polygon($points, $style='D') + { + if($style=='F') $op='f'; + elseif($style=='FD' or $style=='DF') $op='b'; + else $op='s'; + + $h = $this->h; + $k = $this->k; + + $points_string = ''; + for($i=0; $i_out($points_string . $op); + } + + function setOverline($value = true) + { + $this->overline = $value; + } + + function setLinethrough($value = true) + { + $this->linethrough = $value; + } + + // redéfinition de la methode Text de FPDF afin de rajouter la gestion des overline et linethrough + function Text($x, $y, $txt) + { + //Output a string + $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); + + /* MODIFICATION HTML2PDF pour le support de underline, overline, linethrough */ + if ($txt!='') + { + if($this->underline) $s.=' '.$this->_dounderline($x,$y,$txt); + if($this->overline) $s.=' '.$this->_dooverline($x,$y,$txt); + if($this->linethrough) $s.=' '.$this->_dolinethrough($x,$y,$txt); + } + /* FIN MODIFICATION */ + + if($this->ColorFlag) + $s='q '.$this->TextColor.' '.$s.' Q'; + $this->_out($s); + } + + // redéfinition de la methode Cell de FPDF afin de rajouter la gestion des overline et linethrough + function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') + { + //Output a cell + $k=$this->k; + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x=$this->x; + $ws=$this->ws; + if($ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x; + if($ws>0) + { + $this->ws=$ws; + $this->_out(sprintf('%.3F Tw',$ws*$k)); + } + } + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $s=''; + if($fill || $border==1) + { + if($fill) + $op=($border==1) ? 'B' : 'f'; + else + $op='S'; + $s=sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); + } + if(is_string($border)) + { + $x=$this->x; + $y=$this->y; + if(strpos($border,'L')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); + if(strpos($border,'T')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); + if(strpos($border,'R')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + if(strpos($border,'B')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + } + if($txt!=='') + { + if($align=='R') + $dx=$w-$this->cMargin-$this->GetStringWidth($txt); + elseif($align=='C') + $dx=($w-$this->GetStringWidth($txt))/2; + else + $dx=$this->cMargin; + if($this->ColorFlag) + $s.='q '.$this->TextColor.' '; + $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); + $s.=sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); + + /* MODIFICATION HTML2PDF pour le support de underline, overline, linethrough */ + if($this->underline) $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + if($this->overline) $s.=' '.$this->_dooverline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + if($this->linethrough) $s.=' '.$this->_dolinethrough($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + /* FIN MODIFICATION */ + + if($this->ColorFlag) + $s.=' Q'; + if($link) + $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); + } + if($s) + $this->_out($s); + $this->lasth=$h; + if($ln>0) + { + //Go to next line + $this->y+=$h; + if($ln==1) + $this->x=$this->lMargin; + } + else + $this->x+=$w; + } + + function _dounderline($x, $y, $txt) + { + //Underline text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + + $p_x = $x*$this->k; + $p_y = ($this->h-($y-$up/1000*$this->FontSize))*$this->k; + $p_w = ($this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '))*$this->k; + $p_h = -$ut/1000*$this->FontSizePt; + + return sprintf('%.2F %.2F %.2F %.2F re f',$p_x,$p_y,$p_w,$p_h); + } + + function _dooverline($x, $y, $txt) + { + //Overline text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + + $p_x = $x*$this->k; + $p_y = ($this->h-($y-(1000+1.5*$up)/1000*$this->FontSize))*$this->k; + $p_w = ($this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '))*$this->k; + $p_h = -$ut/1000*$this->FontSizePt; + + return sprintf('%.2F %.2F %.2F %.2F re f',$p_x,$p_y,$p_w,$p_h); + } + + function _dolinethrough($x, $y, $txt) + { + //Linethrough text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + + $p_x = $x*$this->k; + $p_y = ($this->h-($y-(1000+2.5*$up)/2000*$this->FontSize))*$this->k; + $p_w = ($this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '))*$this->k; + $p_h = -$ut/1000*$this->FontSizePt; + + return sprintf('%.2F %.2F %.2F %.2F re f',$p_x,$p_y,$p_w,$p_h); + } + + function clippingPathOpen($x = null, $y = null, $w = null, $h = null, $coin_TL=null, $coin_TR=null, $coin_BL=null, $coin_BR=null) + { + $path = ''; + if ($x!==null && $y!==null && $w!==null && $h!==null) + { + $x1 = $x*$this->k; + $y1 = ($this->h-$y)*$this->k; + + $x2 = ($x+$w)*$this->k; + $y2 = ($this->h-$y)*$this->k; + + $x3 = ($x+$w)*$this->k; + $y3 = ($this->h-$y-$h)*$this->k; + + $x4 = $x*$this->k; + $y4 = ($this->h-$y-$h)*$this->k; + + if ($coin_TL || $coin_TR || $coin_BL || $coin_BR) + { + if ($coin_TL) { $coin_TL[0] = $coin_TL[0]*$this->k; $coin_TL[1] =-$coin_TL[1]*$this->k; } + if ($coin_TR) { $coin_TR[0] = $coin_TR[0]*$this->k; $coin_TR[1] =-$coin_TR[1]*$this->k; } + if ($coin_BL) { $coin_BL[0] = $coin_BL[0]*$this->k; $coin_BL[1] =-$coin_BL[1]*$this->k; } + if ($coin_BR) { $coin_BR[0] = $coin_BR[0]*$this->k; $coin_BR[1] =-$coin_BR[1]*$this->k; } + + $MyArc = 4/3 * (sqrt(2) - 1); + + if ($coin_TL) + $path.= sprintf('%.2f %.2f m ', $x1+$coin_TL[0], $y1); + else + $path.= sprintf('%.2f %.2f m ', $x1, $y1); + + if ($coin_TR) + { + $xt1 = ($x2-$coin_TR[0])+$coin_TR[0]*$MyArc; + $yt1 = ($y2+$coin_TR[1])-$coin_TR[1]; + $xt2 = ($x2-$coin_TR[0])+$coin_TR[0]; + $yt2 = ($y2+$coin_TR[1])-$coin_TR[1]*$MyArc; + + $path.= sprintf('%.2f %.2f l ', $x2-$coin_TR[0], $y2); + $path.= sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $xt1, $yt1, $xt2, $yt2, $x2, $y2+$coin_TR[1]); + } + else + $path.= sprintf('%.2f %.2f l ', $x2, $y2); + + if ($coin_BR) + { + $xt1 = ($x3-$coin_BR[0])+$coin_BR[0]; + $yt1 = ($y3-$coin_BR[1])+$coin_BR[1]*$MyArc; + $xt2 = ($x3-$coin_BR[0])+$coin_BR[0]*$MyArc; + $yt2 = ($y3-$coin_BR[1])+$coin_BR[1]; + + $path.= sprintf('%.2f %.2f l ', $x3, $y3-$coin_BR[1]); + $path.= sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $xt1, $yt1, $xt2, $yt2, $x3-$coin_BR[0], $y3); + } + else + $path.= sprintf('%.2f %.2f l ', $x3, $y3); + + if ($coin_BL) + { + $xt1 = ($x4+$coin_BL[0])-$coin_BL[0]*$MyArc; + $yt1 = ($y4-$coin_BL[1])+$coin_BL[1]; + $xt2 = ($x4+$coin_BL[0])-$coin_BL[0]; + $yt2 = ($y4-$coin_BL[1])+$coin_BL[1]*$MyArc; + + $path.= sprintf('%.2f %.2f l ', $x4+$coin_BL[0], $y4); + $path.= sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $xt1, $yt1, $xt2, $yt2, $x4, $y4-$coin_BL[1]); + } + else + $path.= sprintf('%.2f %.2f l ', $x4, $y4); + + if ($coin_TL) + { + $xt1 = ($x1+$coin_TL[0])-$coin_TL[0]; + $yt1 = ($y1+$coin_TL[1])-$coin_TL[1]*$MyArc; + $xt2 = ($x1+$coin_TL[0])-$coin_TL[0]*$MyArc; + $yt2 = ($y1+$coin_TL[1])-$coin_TL[1]; + + $path.= sprintf('%.2f %.2f l ', $x1, $y1+$coin_TL[1]); + $path.= sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $xt1, $yt1, $xt2, $yt2, $x1+$coin_TL[0], $y1); + } + } + else + { + $path.= sprintf('%.2f %.2f m ', $x1, $y1); + $path.= sprintf('%.2f %.2f l ', $x2, $y2); + $path.= sprintf('%.2f %.2f l ', $x3, $y3); + $path.= sprintf('%.2f %.2f l ', $x4, $y4); + } + + $path.= ' h W n'; + } + $this->_out('q '.$path.' '); + } + + function clippingPathClose() + { + $this->_out(' Q'); + } + + function drawCourbe($ext1_x, $ext1_y, $ext2_x, $ext2_y, $int1_x, $int1_y, $int2_x, $int2_y, $cen_x, $cen_y) + { + $MyArc = 4/3 * (sqrt(2) - 1); + + $ext1_x = $ext1_x*$this->k; $ext1_y = ($this->h-$ext1_y)*$this->k; + $ext2_x = $ext2_x*$this->k; $ext2_y = ($this->h-$ext2_y)*$this->k; + $int1_x = $int1_x*$this->k; $int1_y = ($this->h-$int1_y)*$this->k; + $int2_x = $int2_x*$this->k; $int2_y = ($this->h-$int2_y)*$this->k; + $cen_x = $cen_x*$this->k; $cen_y = ($this->h-$cen_y) *$this->k; + + $path = ''; + + if ($ext1_x-$cen_x!=0) + { + $xt1 = $cen_x+($ext1_x-$cen_x); + $yt1 = $cen_y+($ext2_y-$cen_y)*$MyArc; + $xt2 = $cen_x+($ext1_x-$cen_x)*$MyArc; + $yt2 = $cen_y+($ext2_y-$cen_y); + } + else + { + $xt1 = $cen_x+($ext2_x-$cen_x)*$MyArc; + $yt1 = $cen_y+($ext1_y-$cen_y); + $xt2 = $cen_x+($ext2_x-$cen_x); + $yt2 = $cen_y+($ext1_y-$cen_y)*$MyArc; + + } + + $path.= sprintf('%.2f %.2f m ', $ext1_x, $ext1_y); + $path.= sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $xt1, $yt1, $xt2, $yt2, $ext2_x, $ext2_y); + + if ($int1_x-$cen_x!=0) + { + $xt1 = $cen_x+($int1_x-$cen_x)*$MyArc; + $yt1 = $cen_y+($int2_y-$cen_y); + $xt2 = $cen_x+($int1_x-$cen_x); + $yt2 = $cen_y+($int2_y-$cen_y)*$MyArc; + } + else + { + $xt1 = $cen_x+($int2_x-$cen_x); + $yt1 = $cen_y+($int1_y-$cen_y)*$MyArc; + $xt2 = $cen_x+($int2_x-$cen_x)*$MyArc; + $yt2 = $cen_y+($int1_y-$cen_y); + + } + + $path.= sprintf('%.2f %.2f l ', $int2_x, $int2_y); + $path.= sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $xt1, $yt1, $xt2, $yt2, $int1_x, $int1_y); + + $this->_out($path . 'f'); + } + } +} +?> \ No newline at end of file diff --git a/includes/html2pdf/_read_me.txt b/includes/html2pdf/_read_me.txt new file mode 100644 index 000000000..a89200403 --- /dev/null +++ b/includes/html2pdf/_read_me.txt @@ -0,0 +1,79 @@ +********************************************************* +** This program is distributed under the LGPL License, ** +** for more information see file _LGPL.txt or ** +** http://www.gnu.org/licenses/lgpl.html ** +** ** +** Copyright 2000-2009 by Laurent Minguet ** +********************************************************* +******************************** +* HTML2PDF v3.22a - 2009-06-15 * +******************************** + +How to use : +------------ + - Look at the examples provided to see how it works. + + - forms work only with ADOBE READER 8 and 9.0 + + - It is very important to provide valid HTML 4.01 to the converter, + but only what is in the + + - for borders: it is advised that they are like "solid 1mm #000000" + + - for padding, they are applicable only on tags table, th, td, div, li + + - the list of recognized HTML tags is in the file "_balises_html.xls" + + - The possibility to protect your PDF is present, CF Example 7. It uses the script + fpdf_protection of Klemen Vodopivec. + + - Some specific tags have been introduced: + * (CF Exemple 7) : + determines the orientation, margins left, right, top and bottom, the background image + and the background color of a page, its size and position, the footer. + It is also possible to keep the header and footer of the previous pages, + through the attribut pageset="old" (see Example 3) + + * (CF Example 3) + + * (CF Example 3) + + * : + used to force the display of a section on the same page. + If this section does not fit into the rest of the page, a page break is done before. + + * (CF Examples 0 et 9) : + can insert barcodes in pdfs, CF Examples 0 and 9 + The possible types od codebar are: EAN13, UPC_A, CODE39. + This uses the scripts of The-eh and Olivier + + * (CF Examples 7 et About) : + can insert bookmark in pdfs, CF Example 7 and About. + It is also possible to automatically create an index at the end of + documentv CF Example About. + This uses the scripts of Olivier and Min's + +change log : +----------- + see the _lisez_moi.txt file, in french sorry ;) + +Help & Support : +--------------- + For questions and bug reports, thank you to use only the support link below. + I will answer to your questions only on it... + +Informations : +------------- + Programming in PHP4 + + Programmer : Spipu + email : webmaster@spipu.net + web site : http://html2pdf.fr/ + wiki : http://html2pdf.fr/wiki.php + support : http://html2pdf.fr/forum.php + +Thanks : +------- + * Olivier PLATHEY for his library Fpdf (http://www.fpdf.org/) + * yAronet for hosting support forum + * everyone who helped me to develop this library and to bring the texts diff --git a/includes/html2pdf/html2pdf.class.php b/includes/html2pdf/html2pdf.class.php new file mode 100644 index 000000000..6566079a2 --- /dev/null +++ b/includes/html2pdf/html2pdf.class.php @@ -0,0 +1,4644 @@ + PDF, utilise fpdf de Olivier PLATHEY + * Distribué sous la licence LGPL. + * + * @author Laurent MINGUET + * @version 3.22a - 15/06/2009 + */ + +if (!defined('__CLASS_HTML2PDF__')) +{ + define('__CLASS_HTML2PDF__', '3.22a'); + + // vous pouvez utiliser cette fonction de debug comme suit + // pour voir le temps et la mémoire utilisés (sous linux) pour la conversion : + // echo HTML2PDFgetTimerDebug(); + // $html2pdf->WriteHTML($content); + // echo HTML2PDFgetTimerDebug(); + function HTML2PDFgetTimerDebug($debug=false) + { + global $TIMER_ACTION_LAST; + list($usec, $sec) = explode(" ", microtime()); + $time = (float)$sec + (float)$usec; + $mem = HTML2PDFgetMem(); + + if (!$TIMER_ACTION_LAST) + { + if ($debug) $ret = null; + else $ret = 'Debug : init'."
\n"; + } + else + { + $aff_time = $time-$TIMER_ACTION_LAST[0]; + $aff_mem = $mem; + if ($debug) $ret = array($aff_time, $aff_mem); + else $ret = 'Timer : '.number_format($aff_time, 3, '.', '').'s - Memory used '.$aff_mem.' Ko'."
\n"; + } + $TIMER_ACTION_LAST = array($time, $mem); + return $ret; + } + function HTML2PDFgetMem() { return function_exists('memory_get_usage') ? floor(memory_get_usage()/1024) : 0; } + + require_once(dirname(__FILE__).'/_mypdf/mypdf.class.php'); // classe mypdf dérivé de fpdf de Olivier PLATHEY + require_once(dirname(__FILE__).'/parsingHTML.class.php'); // classe de parsing HTML + require_once(dirname(__FILE__).'/styleHTML.class.php'); // classe de gestion des styles + + global $HTML2PDF_TABLEAU; $HTML2PDF_TABLEAU = array(); // tableau global necessaire à la gestion des tables imbriquées + + class HTML2PDF + { + var $langue = 'fr'; // langue des messages + var $sens = 'P'; // sens d'affichage Portrait ou Landscape + var $format = 'A4'; // format de la page : A4, A3, ... + var $background = array(); // informations sur le background + var $testTDin1page = true; // activer le test de TD ne devant pas depasser une page + + var $style = null; // objet de style + var $parsing = null; // objet de parsing + var $parse_pos = 0; // position du parsing + var $temp_pos = 0; // position temporaire pour multi tableau + + var $sub_html = null; // sous html + var $sub_part = false; // indicateur de sous html + var $isSubPart = false; // indique que le convertisseur courant est un sous html + + var $pdf = null; // objet PDF + var $maxX = 0; // zone maxi X + var $maxY = 0; // zone maxi Y + + var $FirstPage = true; // premier page + + var $defaultLeft = 0; // marges par default de la page + var $defaultTop = 0; + var $defaultRight = 0; + var $defaultBottom = 0; + + var $margeLeft = 0; //marges réelles de la page + var $margeTop = 0; + var $margeRight = 0; + var $margeBottom = 0; + var $marges = array(); + var $Maxs = array(); + + var $maxH = 0; // plus grande hauteur dans la ligne, pour saut de ligne à corriger + var $inLink = ''; // indique si on est à l'interieur d'un lien + var $lstAncre = array(); // liste des ancres détectées ou créées + var $subHEADER = array(); // tableau des sous commandes pour faire l'HEADER + var $subFOOTER = array(); // tableau des sous commandes pour faire le FOOTER + var $subSTATES = array(); // tableau de sauvegarde de certains paramètres + var $defLIST = array(); // tableau de sauvegarde de l'etat des UL et OL + + var $lstChamps = array(); // liste des champs + var $lstSelect = array(); // options du select en cours + var $previousCall = null; // dernier appel + var $isInTfoot = false; // indique si on est dans un tfoot + var $pageMarges = array(); // marges spécifiques dues aux floats + var $isAfterFloat = false; // indique si on est apres un float + var $forOneLine = false; // indique si on est dans un sous HTML ne servant qu'a calculer la taille de la prochaine ligne + + /** + * Constructeur + * + * @param string sens portrait ou landscape + * @param string format A4, A5, ... + * @param string langue : fr, en, it... + * @param array marges par defaut, dans l'ordre (left, top, right, bottom) + * @param boolean forcer la création de la premiere page, ne pas utiliser, c'est utilisé en interne pour la gestion des tableaux + * @return null + */ + function HTML2PDF($sens = 'P', $format = 'A4', $langue='fr', $marges = array(5, 5, 5, 8), $force_page = false) + { + // sauvegarde des paramètres + $this->sens = $sens; + $this->format = $format; + $this->FirstPage = true; + $this->langue = strtolower($langue); + $this->setTestTdInOnePage(true); + + // chargement du fichier de langue + $this->textLOAD($this->langue); + + // création de l' objet PDF + $this->pdf = new MyPDF($sens, 'mm', $format); + + // initialisation des styles + $this->style = new styleHTML($this->pdf); + $this->style->FontSet(); + $this->defLIST = array(); + + // initialisation du parsing + $this->parsing = new parsingHTML(); + $this->sub_html = null; + $this->sub_part = false; + + // initialisation des marges + $this->setDefaultMargins($marges[0], $marges[1], $marges[2], $marges[3]); + $this->setMargins(); + $this->marges = array(); + + // initialisation des champs de formulaire + $this->lstChamps = array(); + + // premier page forcée + if ($force_page) $this->setNewPage($this->sens); + } + + /** + * activer ou desactiver le test de TD ne devant pas depasser une page + * + * @param boolean nouvel etat + * @return boolean ancien etat + */ + function setTestTdInOnePage($mode = true) + { + $old = $this->testTDin1page; + + $this->testTDin1page = $mode ? true : false; + + return $old; + } + + /** + * définir les marges par défault + * + * @param int en mm, marge left + * @param int en mm, marge top + * @param int en mm, marge right. si null, left=right + * @param int en mm, marge bottom. si null, bottom=8 + * @return null + */ + function setDefaultMargins($left, $top, $right = null, $bottom = null) + { + if ($right===null) $right = $left; + if ($bottom===null) $bottom = 8; + + $this->defaultLeft = $this->style->ConvertToMM($left.'mm'); + $this->defaultTop = $this->style->ConvertToMM($top.'mm'); + $this->defaultRight = $this->style->ConvertToMM($right.'mm'); + $this->defaultBottom = $this->style->ConvertToMM($bottom.'mm'); + } + + /** + * définir les marges réelles, fonctions de la balise page + * + * @return null + */ + function setMargins() + { + $this->margeLeft = $this->defaultLeft + (isset($this->background['left']) ? $this->background['left'] : 0); + $this->margeRight = $this->defaultRight + (isset($this->background['right']) ? $this->background['right'] : 0); + $this->margeTop = $this->defaultTop + (isset($this->background['top']) ? $this->background['top'] : 0); + $this->margeBottom = $this->defaultBottom + (isset($this->background['bottom']) ? $this->background['bottom'] : 0); + + $this->pdf->SetMargins($this->margeLeft, $this->margeTop, $this->margeRight); + $this->pdf->cMargin = 0; + $this->pdf->SetAutoPageBreak(false, $this->margeBottom); + } + + /** + * recuperer les positions x minimales et maximales en fonction d'une hauteur + * + * @param float y + * @return array(float, float) + */ + function getMargins($y) + { + $y = floor($y*100); + $x = array($this->pdf->lMargin, $this->pdf->w-$this->pdf->rMargin); + + foreach($this->pageMarges as $m_y => $m_x) + if ($m_y<=$y) $x = $m_x; + + return $x; + } + + /** + * ajouter une marge suite a un float + * + * @param string left ou right + * @param float x1 + * @param float y1 + * @param float x2 + * @param float y2 + * @return null + */ + function addMargins($float, $x1, $y1, $x2, $y2) + { + $old1 = $this->getMargins($y1); + $old2 = $this->getMargins($y2); + if ($float=='left') $old1[0] = $x2; + if ($float=='right') $old1[1] = $x1; + + $y1 = floor($y1*100); + $y2 = floor($y2*100); + + foreach($this->pageMarges as $m_y => $m_x) + { + if ($m_y<$y1) continue; + if ($m_y>$y2) break; + if ($float=='left' && $this->pageMarges[$m_y][0]<$x2) unset($this->pageMarges[$m_y]); + if ($float=='right' && $this->pageMarges[$m_y][1]>$x1) unset($this->pageMarges[$m_y]); + } + + $this->pageMarges[$y1] = $old1; + $this->pageMarges[$y2] = $old2; + + ksort($this->pageMarges); + + $this->isAfterFloat = true; + } + + /** + * définir des nouvelles marges et sauvegarder les anciennes + * + * @param float marge left + * @param float marge top + * @param float marge right + * @return null + */ + function saveMargin($ml, $mt, $mr) + { + $this->marges[] = array('l' => $this->pdf->lMargin, 't' => $this->pdf->tMargin, 'r' => $this->pdf->rMargin, 'page' => $this->pageMarges); + $this->pdf->SetMargins($ml, $mt, $mr); + + $this->pageMarges = array(); + $this->pageMarges[floor($mt*100)] = array($ml, $this->pdf->w-$mr); + } + + /** + * récuperer les dernières marches sauvées + * + * @return null + */ + function loadMargin() + { + $old = array_pop($this->marges); + if ($old) + { + $ml = $old['l']; + $mt = $old['t']; + $mr = $old['r']; + $mP = $old['page']; + } + else + { + $ml = $this->margeLeft; + $mt = 0; + $mr = $this->margeRight; + $mP = array($mt => array($ml, $this->pdf->w-$mr)); + } + + $this->pdf->SetMargins($ml, $mt, $mr); + $this->pageMarges = $mP; + } + + /** + * permet d'ajouter une fonte. + * + * @param string nom de la fonte + * @param string style de la fonte + * @param string fichier de la fonte + * @return null + */ + function AddFont($family, $style='', $file='') + { + $this->pdf->AddFont($family, $style, $file); + } + + /** + * sauvegarder l'état actuelle des maximums + * + * @return null + */ + function saveMax() + { + $this->Maxs[] = array($this->maxX, $this->maxY, $this->maxH); + } + + /** + * charger le dernier état sauvé des maximums + * + * @return null + */ + function loadMax() + { + $old = array_pop($this->Maxs); + + if ($old) + { + $this->maxX = $old[0]; + $this->maxY = $old[1]; + $this->maxH = $old[2]; + } + else + { + $this->maxX = 0; + $this->maxY = 0; + $this->maxH = 0; + } + } + + /** + * afficher l'header contenu dans page_header + * + * @return null + */ + function SetPageHeader() + { + if (!count($this->subHEADER)) return false; + + $OLD_parse_pos = $this->parse_pos; + $OLD_parse_code = $this->parsing->code; + + $this->parse_pos = 0; + $this->parsing->code = $this->subHEADER; + $this->MakeHTMLcode(); + + $this->parse_pos = $OLD_parse_pos; + $this->parsing->code = $OLD_parse_code; + } + + /** + * afficher le footer contenu dans page_footer + * + * @return null + */ + function SetPageFooter() + { + if (!count($this->subFOOTER)) return false; + + $OLD_parse_pos = $this->parse_pos; + $OLD_parse_code = $this->parsing->code; + + $this->parse_pos = 0; + $this->parsing->code = $this->subFOOTER; + $this->MakeHTMLcode(); + + $this->parse_pos = $OLD_parse_pos; + $this->parsing->code = $OLD_parse_code; + } + + /** + * saut de ligne avec une hauteur spécifique + * + * @param float hauteur de la ligne + * @param integer position reelle courante si saut de ligne pendant l'ecriture d'un texte + * @return null + */ + function setNewLine($h, $curr = null) + { + $this->pdf->Ln($h); + + $this->setNewPositionForNewLine($curr); + } + + /** + * création d'une nouvelle page avec une orientation particuliere + * + * @param string sens P=portrait ou L=landscape + * @param array tableau des propriétés du fond de la page + * @param integer position reelle courante si saut de ligne pendant l'ecriture d'un texte + * @return null + */ + function setNewPage($orientation = '', $background = null, $curr = null) + { +/* + if (!$this->FirstPage) + { + $info = debug_backtrace(); foreach($info as $k => $v) { unset($info[$k]['object']); unset($info[$k]['type']); unset($info[$k]['args']);} + echo '
'.print_r($info, true).'

'; + } +*/ + $this->FirstPage = false; + + $this->sens = $orientation ? $orientation : $this->sens; + $this->background = $background!==null ? $background : $this->background; + $this->maxY = 0; + $this->maxX = 0; + + $this->pdf->lMargin = $this->defaultLeft; + $this->pdf->rMargin = $this->defaultRight; + $this->pdf->tMargin = $this->defaultTop; + $this->pdf->AddPage($this->sens); + + if (!$this->sub_part && !$this->isSubPart) + { + if (is_array($this->background)) + { + if (isset($this->background['color']) && $this->background['color']) + { + $this->pdf->SetFillColor($this->background['color'][0], $this->background['color'][1], $this->background['color'][2]); + $this->pdf->Rect(0, 0, $this->pdf->w, $this->pdf->h, 'F'); + } + + if (isset($this->background['img']) && $this->background['img']) + $this->pdf->Image($this->background['img'], $this->background['posX'], $this->background['posY'], $this->background['width']); + } + + $this->SetPageHeader(); + $this->SetPageFooter(); + } + + $this->SetMargins(); + $this->pdf->y = $this->margeTop; + + $this->setNewPositionForNewLine($curr); + } + + /** + * calcul de la position de debut de la prochaine ligne en fonction de l'alignement voulu + * + * @param integer position reelle courante si saut de ligne pendant l'ecriture d'un texte + * @return null + */ + function setNewPositionForNewLine($curr = null) + { + list($lx, $rx) = $this->getMargins($this->pdf->y); + $this->pdf->x=$lx; + + if ( + $this->style->value['text-align']!='right' && + $this->style->value['text-align']!='center' + ) + return null; + + $sub = null; + $this->CreateSubHTML($sub); + $sub->saveMargin(0, 0, $sub->pdf->w-$rx+$lx); + $sub->forOneLine = true; + $sub->parse_pos = $this->parse_pos; + $sub->parsing->code = $this->parsing->code; + + if ($curr!==null && $sub->parsing->code[$this->parse_pos]['name']=='write') + $sub->parsing->code[$this->parse_pos]['param']['txt'] = substr($sub->parsing->code[$this->parse_pos]['param']['txt'], $curr); + else + $sub->parse_pos++; + + // pour chaque element identifié par le parsing + for($sub->parse_pos; $sub->parse_posparsing->code); $sub->parse_pos++) + { + $todo = $sub->parsing->code[$sub->parse_pos]; + if (!$sub->loadAction($todo)) break; + } + + $w = $sub->maxX; + + unset($sub); + if ($this->style->value['text-align']=='center') + $this->pdf->x+= ($rx-$this->pdf->x-$w)*0.5-0.01; + else + $this->pdf->x = $rx-$w-0.01; + } + + /** + * récupération du PDF + * + * @param string nom du fichier PDF + * @param boolean destination + * @return string contenu éventuel du pdf + * + * + * Destination où envoyer le document. Le paramètre peut prendre les valeurs suivantes : + * true : equivalent à I + * false : equivalent à S + * I : envoyer en inline au navigateur. Le plug-in est utilisé s'il est installé. Le nom indiqué dans name est utilisé lorsque l'on sélectionne "Enregistrer sous" sur le lien générant le PDF. + * D : envoyer au navigateur en forçant le téléchargement, avec le nom indiqué dans name. + * F : sauver dans un fichier local, avec le nom indiqué dans name (peut inclure un répertoire). + * S : renvoyer le document sous forme de chaîne. name est ignoré. + */ + function Output($name = '', $dest = false) + { + // nettoyage + global $HTML2PDF_TABLEAU; $HTML2PDF_TABLEAU = array(); + + // interpretation des paramètres + if ($dest===false) $dest = 'I'; + if ($dest===true) $dest = 'S'; + if ($dest==='') $dest = 'I'; + if ($name=='') $name='document.pdf'; + + // verification de la destination + $dest = strtoupper($dest); + if (!in_array($dest, array('I', 'D', 'F', 'S'))) $dest = 'I'; + + // verification du nom + if (strtolower(substr($name, -4))!='.pdf') + { + echo 'ERROR : The output document name "'.$name.'" is not a PDF name'; + exit; + } + + + return $this->pdf->Output($name, $dest); + } + + /** + * création d'un sous HTML2PDF pour la gestion des tableaux imbriqués + * + * @param HTML2PDF futur sous HTML2PDF passé en référence pour création + * @param integer marge eventuelle de l'objet si simulation d'un TD + * @return null + */ + function CreateSubHTML(&$sub_html, $cellmargin=0) + { + // initialisation du sous objet + $sub_html = new HTML2PDF( + $this->sens, + $this->format, + $this->langue, + array($this->defaultLeft,$this->defaultTop,$this->defaultRight,$this->defaultBottom), + true + ); + $sub_html->isSubPart = true; + $sub_html->setTestTdInOnePage($this->testTDin1page); + + $sub_html->style->css = $this->style->css; + $sub_html->style->css_keys = $this->style->css_keys; + $sub_html->style->table = $this->style->table; + $sub_html->style->value = $this->style->value; + $sub_html->style->value['text-align'] = 'left'; + $sub_html->defLIST = $this->defLIST; + $sub_html->style->onlyLeft = true; + + // initialisation de la largeur + if ($this->style->value['width']) + { + $marge = $cellmargin*2; + $marge+= $this->style->value['padding']['l'] + $this->style->value['padding']['r']; + $marge+= $this->style->value['border']['l']['width'] + $this->style->value['border']['r']['width']; + $marge = $sub_html->pdf->w - $this->style->value['width'] + $marge; + } + else + $marge = $this->margeLeft+$this->margeRight; + + $sub_html->saveMargin(0, 0, $marge); + + // initialisation des fontes + $sub_html->pdf->fonts = &$this->pdf->fonts; + $sub_html->pdf->FontFiles = &$this->pdf->FontFiles; + $sub_html->pdf->diffs = &$this->pdf->diffs; + + // initialisation des positions et autre + $sub_html->maxX = 0; + $sub_html->maxY = 0; + $sub_html->maxH = 0; + $sub_html->pdf->setX(0); + $sub_html->pdf->setY(0); + $sub_html->style->FontSet(); + } + + /** + * destruction d'un sous HTML2PDF pour la gestion des tableaux imbriqués + * + * @return null + */ + function DestroySubHTML() + { + + unset($this->sub_html); + $this->sub_html = null; + } + + /** + * Convertir un nombre arabe en nombre romain + * + * @param integer nombre à convertir + * @return string nombre converti + */ + function listeArab2Rom($nb_ar) + { + $nb_b10 = array('I','X','C','M'); + $nb_b5 = array('V','L','D'); + $nb_ro = ''; + + if ($nb_ar<1) return $nb_ar; + if ($nb_ar>3999) return $nb_ar; + + for($i=3; $i>=0 ; $i--) + { + $chiffre=floor($nb_ar/pow(10,$i)); + if($chiffre>=1) + { + $nb_ar=$nb_ar-$chiffre*pow(10,$i); + if($chiffre<=3) + { + for($j=$chiffre; $j>=1; $j--) + { + $nb_ro=$nb_ro.$nb_b10[$i]; + } + } + else if($chiffre==9) + { + $nb_ro=$nb_ro.$nb_b10[$i].$nb_b10[$i+1]; + } + elseif($chiffre==4) + { + $nb_ro=$nb_ro.$nb_b10[$i].$nb_b5[$i]; + } + else + { + $nb_ro=$nb_ro.$nb_b5[$i]; + for($j=$chiffre-5; $j>=1; $j--) + { + $nb_ro=$nb_ro.$nb_b10[$i]; + } + } + } + } + return $nb_ro; + } + + /** + * Ajouter un LI au niveau actuel + * + * @return null + */ + function listeAddLi() + { + $this->defLIST[count($this->defLIST)-1]['nb']++; + } + + function listeGetWidth() { return '7mm'; } + function listeGetPadding() { return '1mm'; } + + /** + * Recuperer le LI du niveau actuel + * + * @return string chaine à afficher + */ + function listeGetLi() + { + $im = $this->defLIST[count($this->defLIST)-1]['img']; + $st = $this->defLIST[count($this->defLIST)-1]['style']; + $nb = $this->defLIST[count($this->defLIST)-1]['nb']; + $up = (substr($st, 0, 6)=='upper-'); + + if ($im) return array(false, false, $im); + + switch($st) + { + case 'none': + return array('arial', true, ' '); + + case 'upper-alpha': + case 'lower-alpha': + $str = ''; + while($nb>26) + { + $str = chr(96+$nb%26).$str; + $nb = floor($nb/26); + } + $str = chr(96+$nb).$str; + + return array('arial', false, ($up ? strtoupper($str) : $str).'.'); + + case 'upper-roman': + case 'lower-roman': + $str = $this->listeArab2Rom($nb); + + return array('arial', false, ($up ? strtoupper($str) : $str).'.'); + + case 'decimal': + return array('arial', false, $nb.'.'); + + case 'square': + return array('zapfdingbats', true, chr(110)); + + case 'circle': + return array('zapfdingbats', true, chr(109)); + + case 'disc': + default: + return array('zapfdingbats', true, chr(108)); + } + } + + /** + * Ajouter un niveau de liste + * + * @param string type de liste : ul, ol + * @param string style de la liste + * @return null + */ + function listeAddLevel($type = 'ul', $style = '', $img = null) + { + if ($img) + { + if (preg_match('/^url\(([^)]+)\)$/isU', trim($img), $match)) + $img = $match[1]; + else + $img = null; + } + else + $img = null; + + if (!in_array($type, array('ul', 'ol'))) $type = 'ul'; + if (!in_array($style, array('lower-alpha', 'upper-alpha', 'upper-roman', 'lower-roman', 'decimal', 'square', 'circle', 'disc', 'none'))) $style = ''; + + if (!$style) + { + if ($type=='ul') $style = 'disc'; + else $style = 'decimal'; + } + $this->defLIST[count($this->defLIST)] = array('style' => $style, 'nb' => 0, 'img' => $img); + } + + /** + * Supprimer un niveau de liste + * + * @return null + */ + function listeDelLevel() + { + if (count($this->defLIST)) + { + unset($this->defLIST[count($this->defLIST)-1]); + $this->defLIST = array_values($this->defLIST); + } + } + + /** + * traitement d'un code HTML + * + * @param string code HTML à convertir + * @param boolean afficher en pdf (false) ou en html (true) + * @return null + */ + function WriteHTML($html, $vue = false) + { + $html = str_replace('[[page_nb]]', '{nb}', $html); + + $html = str_replace('[[date_y]]', date('Y'), $html); + $html = str_replace('[[date_m]]', date('m'), $html); + $html = str_replace('[[date_d]]', date('d'), $html); + + $html = str_replace('[[date_h]]', date('H'), $html); + $html = str_replace('[[date_i]]', date('i'), $html); + $html = str_replace('[[date_s]]', date('s'), $html); + + // si on veut voir le résultat en HTML => on appelle la fonction + if ($vue) $this->vueHTML($html); + + // sinon, traitement pour conversion en PDF : + // parsing + $this->sub_pdf = false; + $this->style->readStyle($html); + $this->parsing->setHTML($html); + $this->parsing->parse(); + $this->MakeHTMLcode(); + } + + function MakeHTMLcode() + { + // pour chaque element identifié par le parsing + for($this->parse_pos=0; $this->parse_posparsing->code); $this->parse_pos++) + { + // récupération de l'élément + $todo = $this->parsing->code[$this->parse_pos]; + + // si c'est une ouverture de tableau + if (in_array($todo['name'], array('table', 'ul', 'ol')) && !$todo['close']) + { + // on va créer un sous HTML, et on va travailler sur une position temporaire + $tag_open = $todo['name']; + + $this->sub_part = true; + $this->temp_pos = $this->parse_pos; + + // pour tous les éléments jusqu'à la fermeture de la table afin de préparer les dimensions + while(isset($this->parsing->code[$this->temp_pos]) && !($this->parsing->code[$this->temp_pos]['name']==$tag_open && $this->parsing->code[$this->temp_pos]['close'])) + { + $this->loadAction($this->parsing->code[$this->temp_pos]); + $this->temp_pos++; + } + if (isset($this->parsing->code[$this->temp_pos])) $this->loadAction($this->parsing->code[$this->temp_pos]); + $this->sub_part = false; + } + + // chargement de l'action correspondant à l'élément + $this->loadAction($todo); + } + } + + + + /** + * affichage en mode HTML du contenu + * + * @param string contenu + * @return null + */ + function vueHTML($content) + { + $content = preg_replace('/]*)>/isU', '
'.HTML2PDF::textGET('vue01').' : $1
', $content); + $content = preg_replace('/]*)>/isU', '
'.HTML2PDF::textGET('vue02').' : $1
', $content); + $content = preg_replace('/]*)>/isU', '
'.HTML2PDF::textGET('vue03').' : $1
', $content); + $content = preg_replace('/<\/page([^>]*)>/isU', '
', $content); + $content = preg_replace('/]*)>/isU', '
bookmark : $1
', $content); + $content = preg_replace('/<\/bookmark([^>]*)>/isU', '', $content); + + echo ' + + + '.HTML2PDF::textGET('vue04').' HTML + + + +'.$content.' + +'; + exit; + } + + /** + * chargement de l'action correspondante à un element de parsing + * + * @param array élément de parsing + * @return null + */ + function loadAction($row) + { + // nom de l'action + $fnc = ($row['close'] ? 'c_' : 'o_').strtoupper($row['name']); + + // parametres de l'action + $param = $row['param']; + + // si aucune page n'est créé, on la créé + if ($fnc!='o_PAGE' && $this->FirstPage) + { + $this->setNewPage(); + } + + // lancement de l'action + if (is_callable(array(&$this, $fnc))) + { + $res = $this->{$fnc}($param); + $this->previousCall = $fnc; + return $res; + } + else + { + HTML2PDF::makeError(1, __FILE__, __LINE__, strtoupper($row['name'])); + return false; + } + } + + /** + * balise : PAGE + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_PAGE($param) + { + if ($this->forOneLine) return false; + + $newPageSet= (!isset($param['pageset']) || $param['pageset']!='old'); + + $this->maxH = 0; + if ($newPageSet) + { + $this->subHEADER = array(); + $this->subFOOTER = array(); + + // identification de l'orientation demandée + $orientation = ''; + if (isset($param['orientation'])) + { + $param['orientation'] = strtolower($param['orientation']); + if ($param['orientation']=='p') $orientation = 'P'; + if ($param['orientation']=='portrait') $orientation = 'P'; + + if ($param['orientation']=='l') $orientation = 'L'; + if ($param['orientation']=='paysage') $orientation = 'L'; + if ($param['orientation']=='landscape') $orientation = 'L'; + } + + // identification des propriétés du background + $background = array(); + if (isset($param['backimg'])) + { + $background['img'] = isset($param['backimg']) ? $param['backimg'] : ''; // nom de l'image + $background['posX'] = isset($param['backimgx']) ? $param['backimgx'] : 'center'; // position horizontale de l'image + $background['posY'] = isset($param['backimgy']) ? $param['backimgy'] : 'middle'; // position verticale de l'image + $background['width'] = isset($param['backimgw']) ? $param['backimgw'] : '100%'; // taille de l'image (100% = largueur de la feuille) + + // conversion du nom de l'image, en cas de paramètres en _GET + $background['img'] = str_replace('&', '&', $background['img']); + // conversion des positions + if ($background['posX']=='left') $background['posX'] = '0%'; + if ($background['posX']=='center') $background['posX'] = '50%'; + if ($background['posX']=='right') $background['posX'] = '100%'; + if ($background['posY']=='top') $background['posY'] = '0%'; + if ($background['posY']=='middle') $background['posY'] = '50%'; + if ($background['posY']=='bottom') $background['posY'] = '100%'; + + + // si il y a une image de précisé + if ($background['img']) + { + // est-ce que c'est une image ? + $infos=@GetImageSize($background['img']); + if (count($infos)>1) + { + // taille de l'image, en fonction de la taille spécifiée. + $Wi = $this->style->ConvertToMM($background['width'], $this->pdf->w); + $Hi = $Wi*$infos[1]/$infos[0]; + + // récupération des dimensions et positions de l'image + $background['width'] = $Wi; + $background['posX'] = $this->style->ConvertToMM($background['posX'], $this->pdf->w - $Wi); + $background['posY'] = $this->style->ConvertToMM($background['posY'], $this->pdf->h - $Hi); + } + else + $background = array(); + } + else + $background = array(); + } + + // marges TOP et BOTTOM pour le texte. + $background['top'] = isset($param['backtop']) ? $param['backtop'] : '0'; + $background['bottom'] = isset($param['backbottom']) ? $param['backbottom'] : '0'; + $background['left'] = isset($param['backleft']) ? $param['backleft'] : '0'; + $background['right'] = isset($param['backright']) ? $param['backright'] : '0'; + + if (preg_match('/^([0-9]*)$/isU', $background['top'])) $background['top'] .= 'mm'; + if (preg_match('/^([0-9]*)$/isU', $background['bottom'])) $background['bottom'] .= 'mm'; + if (preg_match('/^([0-9]*)$/isU', $background['left'])) $background['left'] .= 'mm'; + if (preg_match('/^([0-9]*)$/isU', $background['right'])) $background['right'] .= 'mm'; + + $background['top'] = $this->style->ConvertToMM($background['top'], $this->pdf->h); + $background['bottom'] = $this->style->ConvertToMM($background['bottom'], $this->pdf->h); + $background['left'] = $this->style->ConvertToMM($background['left'], $this->pdf->w); + $background['right'] = $this->style->ConvertToMM($background['right'], $this->pdf->w); + + $res = false; + $background['color'] = isset($param['backcolor']) ? $this->style->ConvertToRVB($param['backcolor'], $res) : null; + if (!$res) $background['color'] = null; + + $this->style->save(); + $this->style->analyse('PAGE', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // nouvelle page + $this->setNewPage($orientation, $background); + + // footer automatique + if (isset($param['footer'])) + { + $lst = explode(';', $param['footer']); + foreach($lst as $key => $val) $lst[$key] = trim(strtolower($val)); + $page = in_array('page', $lst); + $date = in_array('date', $lst); + $heure = in_array('heure', $lst); + $form = in_array('form', $lst); + } + else + { + $page = null; + $date = null; + $heure = null; + $form = null; + } + $this->pdf->SetMyFooter($page, $date, $heure, $form); + } + else + { + $this->style->save(); + $this->style->analyse('PAGE', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + $this->setNewPage(); + } + + return true; + } + + /** + * balise : PAGE + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_PAGE($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + + function o_PAGE_HEADER($param) + { + if ($this->forOneLine) return false; + + $this->subHEADER = array(); + for($this->parse_pos; $this->parse_posparsing->code); $this->parse_pos++) + { + $todo = $this->parsing->code[$this->parse_pos]; + if ($todo['name']=='page_header') $todo['name']='page_header_sub'; + $this->subHEADER[] = $todo; + if (strtolower($todo['name'])=='page_header_sub' && $todo['close']) break; + } + + $this->SetPageHeader(); + + return true; + } + + function o_PAGE_FOOTER($param) + { + if ($this->forOneLine) return false; + + $this->subFOOTER = array(); + for($this->parse_pos; $this->parse_posparsing->code); $this->parse_pos++) + { + $todo = $this->parsing->code[$this->parse_pos]; + if ($todo['name']=='page_footer') $todo['name']='page_footer_sub'; + $this->subFOOTER[] = $todo; + if (strtolower($todo['name'])=='page_footer_sub' && $todo['close']) break; + } + + $this->SetPageFooter(); + + return true; + } + + function o_PAGE_HEADER_SUB($param) + { + if ($this->forOneLine) return false; + + $this->subSTATES = array(); + $this->subSTATES['x'] = $this->pdf->x; + $this->subSTATES['y'] = $this->pdf->y; + $this->subSTATES['s'] = $this->style->value; + $this->subSTATES['t'] = $this->style->table; + $this->subSTATES['ml'] = $this->pdf->lMargin; + $this->subSTATES['mr'] = $this->pdf->rMargin; + $this->subSTATES['mt'] = $this->pdf->tMargin; + $this->subSTATES['mb'] = $this->pdf->bMargin; + + $this->pdf->x = $this->defaultLeft; + $this->pdf->y = $this->defaultTop; + $this->style->initStyle(); + $this->style->resetStyle(); + $this->style->value['width'] = $this->pdf->w - $this->defaultLeft - $this->defaultRight; + $this->style->table = array(); + $this->pdf->lMargin = $this->defaultLeft; + $this->pdf->rMargin = $this->defaultRight; + $this->pdf->tMargin = $this->defaultTop; + $this->pdf->bMargin = $this->defaultBottom; + $this->pdf->PageBreakTrigger = $this->pdf->h - $this->pdf->bMargin; + + $this->style->save(); + $this->style->analyse('page_header_sub', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + function c_PAGE_HEADER_SUB($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + + $this->pdf->x = $this->subSTATES['x']; + $this->pdf->y = $this->subSTATES['y']; + $this->style->value = $this->subSTATES['s']; + $this->style->table = $this->subSTATES['t']; + $this->pdf->lMargin = $this->subSTATES['ml']; + $this->pdf->rMargin = $this->subSTATES['mr']; + $this->pdf->tMargin = $this->subSTATES['mt']; + $this->pdf->bMargin = $this->subSTATES['mb']; + $this->pdf->PageBreakTrigger = $this->pdf->h - $this->pdf->bMargin; + + $this->style->FontSet(); + + return true; + } + + function o_PAGE_FOOTER_SUB($param) + { + if ($this->forOneLine) return false; + + $this->subSTATES = array(); + $this->subSTATES['x'] = $this->pdf->x; + $this->subSTATES['y'] = $this->pdf->y; + $this->subSTATES['s'] = $this->style->value; + $this->subSTATES['t'] = $this->style->table; + $this->subSTATES['ml'] = $this->pdf->lMargin; + $this->subSTATES['mr'] = $this->pdf->rMargin; + $this->subSTATES['mt'] = $this->pdf->tMargin; + $this->subSTATES['mb'] = $this->pdf->bMargin; + + $this->pdf->x = $this->defaultLeft; + $this->pdf->y = $this->defaultTop; + $this->style->initStyle(); + $this->style->resetStyle(); + $this->style->value['width'] = $this->pdf->w - $this->defaultLeft - $this->defaultRight; + $this->style->table = array(); + $this->pdf->lMargin = $this->defaultLeft; + $this->pdf->rMargin = $this->defaultRight; + $this->pdf->tMargin = $this->defaultTop; + $this->pdf->bMargin = $this->defaultBottom; + $this->pdf->PageBreakTrigger = $this->pdf->h - $this->pdf->bMargin; + + // on en créé un sous HTML que l'on transforme en PDF + // pour récupérer la hauteur + // on extrait tout ce qui est contenu dans le FOOTER + $sub = null; + $res = $this->parsing->getLevel($this->parse_pos); + $this->CreateSubHTML($sub); + $sub->writeHTML($res[1]); + $this->pdf->y = $this->pdf->h - $sub->maxY - $this->defaultBottom - 0.01; + unset($sub); + + $this->style->save(); + $this->style->analyse('page_footer_sub', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + function c_PAGE_FOOTER_SUB($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + + $this->pdf->x = $this->subSTATES['x']; + $this->pdf->y = $this->subSTATES['y']; + $this->style->value = $this->subSTATES['s']; + $this->style->table = $this->subSTATES['t']; + $this->pdf->lMargin = $this->subSTATES['ml']; + $this->pdf->rMargin = $this->subSTATES['mr']; + $this->pdf->tMargin = $this->subSTATES['mt']; + $this->pdf->bMargin = $this->subSTATES['mb']; + $this->pdf->PageBreakTrigger = $this->pdf->h - $this->pdf->bMargin; + + $this->style->FontSet(); + + return true; + } + + /** + * balise : NOBREAK + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_NOBREAK($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + // on extrait tout ce qui est contenu dans le NOBREAK + $res = $this->parsing->getLevel($this->parse_pos); + + // on en créé un sous HTML que l'on transforme en PDF + // pour analyse les dimensions + // et voir si ca rentre + $sub = null; + $this->CreateSubHTML($sub); + $sub->writeHTML($res[1]); + + $y = $this->pdf->getY(); + if ( + $sub->maxY < ($this->pdf->h - $this->pdf->tMargin-$this->pdf->bMargin) && + $y + $sub->maxY>=($this->pdf->h - $this->pdf->bMargin) + ) + $this->setNewPage(); + unset($sub); + + return true; + } + + + /** + * balise : NOBREAK + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_NOBREAK($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + + return true; + } + + /** + * balise : DIV + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_DIV($param, $other = 'div') + { + if ($this->forOneLine) return false; + + $this->style->save(); + $this->style->analyse($other, $param); + $this->style->FontSet(); + + $align_object = null; + if ($this->style->value['margin-auto']) $align_object = 'center'; + + $marge = array(); + $marge['l'] = $this->style->value['border']['l']['width'] + $this->style->value['padding']['l']+0.03; + $marge['r'] = $this->style->value['border']['r']['width'] + $this->style->value['padding']['r']+0.03; + $marge['t'] = $this->style->value['border']['t']['width'] + $this->style->value['padding']['t']+0.03; + $marge['b'] = $this->style->value['border']['b']['width'] + $this->style->value['padding']['b']+0.03; + + // on extrait tout ce qui est contenu dans la DIV + $res = $this->parsing->getLevel($this->parse_pos); + + // on en créé un sous HTML que l'on transforme en PDF + // pour analyse les dimensions + $w = 0; $h = 0; + if (trim($res[1])) + { + $sub = null; + $this->CreateSubHTML($sub); + $sub->writeHTML($res[1]); + $w = $sub->maxX; + $h = $sub->maxY; + unset($sub); + } + + $w+= $marge['l']+$marge['r']; + $h+= $marge['t']+$marge['b']; + + $this->style->value['width'] = max($w, $this->style->value['width']); + $this->style->value['height'] = max($h, $this->style->value['height']); + + if (!$this->style->value['position']) + { + if ( + $this->style->value['width'] < ($this->pdf->w - $this->pdf->lMargin-$this->pdf->rMargin) && + $this->pdf->x + $this->style->value['width']>=($this->pdf->w - $this->pdf->rMargin) + ) + $this->o_BR(array()); + + if ( + $this->style->value['height'] < ($this->pdf->h - $this->pdf->tMargin-$this->pdf->bMargin) && + $this->pdf->y + $this->style->value['height']>=($this->pdf->h - $this->pdf->bMargin) + ) + $this->setNewPage(); + + // en cas d'alignement => correction + $w = $this->style->value['width']; + $old = isset($this->style->table[count($this->style->table)-1]) ? $this->style->table[count($this->style->table)-1] : $this->style->value; + $parent_w = $old['width'] ? $old['width'] : $this->pdf->w - $this->pdf->lMargin - $this->pdf->rMargin; + + if ($parent_w>$w) + { + if ($align_object=='center') $this->pdf->x = $this->pdf->x + ($parent_w-$w)*0.5; + else if ($align_object=='right') $this->pdf->x = $this->pdf->x + $parent_w-$w; + } + + $this->style->setPosition($this->pdf->x, $this->pdf->y); + } + else + { + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->saveMax(); + $this->saveX = 0; + $this->saveY = 0; + $this->saveH = 0; + } + + // initialisation du style des bordures de la premiere partie de tableau + $this->Rectangle( + $this->style->value['x'], + $this->style->value['y'], + $this->style->value['width'], + $this->style->value['height'], + $this->style->value['border'], + $this->style->value['padding'], + 0, + $this->style->value['background'] + ); + + + $marge = array(); + $marge['l'] = $this->style->value['border']['l']['width'] + $this->style->value['padding']['l']+0.03; + $marge['r'] = $this->style->value['border']['r']['width'] + $this->style->value['padding']['r']+0.03; + $marge['t'] = $this->style->value['border']['t']['width'] + $this->style->value['padding']['t']+0.03; + $marge['b'] = $this->style->value['border']['b']['width'] + $this->style->value['padding']['b']+0.03; + + $this->style->value['width'] = $this->style->value['width']-$marge['l']-$marge['r']; + $this->style->value['height'] = $this->style->value['height']-$marge['r']-$marge['b']; + + // limitation des marges aux dimensions de la div + $mL = $this->style->value['x']+$marge['l']; + $mR = $this->pdf->w - $mL - $this->style->value['width']; + $this->saveMargin($mL, 0, $mR); + + // positionnement en fonction + $h_corr = $this->style->value['height']; + $h_reel = $h-$marge['b']-$marge['t']; + switch($this->style->value['vertical-align']) + { + case 'bottom': + $y_corr = $h_corr-$h_reel; + break; + + case 'middle': + $y_corr = ($h_corr-$h_reel)*0.5; + break; + + case 'top': + default: + $y_corr = 0; + break; + } + + $this->pdf->setX($this->style->value['x']+$marge['l']); + $this->pdf->setY($this->style->value['y']+$marge['t']+$y_corr); + + $this->setNewPositionForNewLine(); + + return true; + } + function o_BLOCKQUOTE($param) { return $this->o_DIV($param, 'blockquote'); } + + /** + * balise : DIV + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_DIV($param) + { + if ($this->forOneLine) return false; + + $marge = array(); + $marge['l'] = $this->style->value['border']['l']['width'] + $this->style->value['padding']['l']+0.03; + $marge['r'] = $this->style->value['border']['r']['width'] + $this->style->value['padding']['r']+0.03; + $marge['t'] = $this->style->value['border']['t']['width'] + $this->style->value['padding']['t']+0.03; + $marge['b'] = $this->style->value['border']['b']['width'] + $this->style->value['padding']['b']+0.03; + + $x = $this->style->value['x']; + $y = $this->style->value['y']; + $w = $this->style->value['width']+$marge['l']+$marge['r']; + $h = $this->style->value['height']+$marge['t']+$marge['b']; + + // correction pour les margins + $w+= $this->style->value['margin']['r']; + $h+= $this->style->value['margin']['b']; + + if ($this->style->value['position']!='absolute') + { + // position + $this->pdf->x = $x+$w; + $this->pdf->y = $y; + + // position MAX + $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + $this->maxH = max($this->maxH, $h); + } + else + { + // position + $this->pdf->x = $this->style->value['xc']; + $this->pdf->y = $this->style->value['yc']; + + $this->loadMax(); + } + + $block = ($this->style->value['display']!='inline' && $this->style->value['position']!='absolute'); + + $this->style->load(); + $this->style->FontSet(); + $this->loadMargin(); + + if ($block) $this->o_BR(array()); + + return true; + } + function c_BLOCKQUOTE($param) { return $this->c_DIV($param); } + + /** + * balise : BARCODE + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_BARCODE($param) + { + + $lst_barcode = array( + 'EAN13' => '0.35mm', + 'UPC_A' => '0.35mm', + 'CODE39' => '1.00mm', + ); + if (isset($param['type'])) $param['type'] = strtoupper($param['type']); + + if (!isset($param['type']) || !isset($lst_barcode[$param['type']])) $param['type']=='CODE39'; + if (!isset($param['value'])) $param['value'] = 0; + if (!isset($param['bar_w'])) $param['bar_w'] = $lst_barcode[$param['type']]; + if (!isset($param['bar_h'])) $param['bar_h'] = '10mm'; + + if (!isset($param['style']['color'])) $param['style']['color'] = '#000000'; + $param['style']['background-color'] = $param['style']['color']; + + $this->style->save(); + $this->style->analyse('barcode', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + + $x = $this->pdf->getX(); + $y = $this->pdf->getY(); + $w = $this->style->ConvertToMM($param['bar_w']); + $h = $this->style->ConvertToMM($param['bar_h']); + + $infos = $this->pdf->{'BARCODE_'.$param['type']}($x, $y, $param['value'], $h, $w); + + // position maximale globale + $this->maxX = max($this->maxX, $x+$infos[0]); + $this->maxY = max($this->maxY, $y+$infos[1]); + $this->maxH = max($this->maxH, $infos[1]); + + $this->pdf->setX($x+$infos[0]); + + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : BARCODE + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_BARCODE($param) + { + // completement inutile + + return true; + } + + /** + * balise : BOOKMARK + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_BOOKMARK($param) + { + $titre = isset($param['title']) ? trim($param['title']) : ''; + $level = isset($param['level']) ? floor($param['level']) : 0; + + if ($level<0) $level = 0; + if ($titre) $this->pdf->Bookmark($titre, $level, -1); + + return true; + } + + /** + * balise : BOOKMARK + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_BOOKMARK($param) + { + // completement inutile + + return true; + } + + /** + * balise : WRITE + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_WRITE($param) + { + $fill = ($this->style->value['background']['color']!==null && $this->style->value['background']['image']===null); + + // récupération du texte à écrire, et conversion + $txt = $param['txt']; + $txt = str_replace('€', '€', $txt); + + if ($this->isAfterFloat) + { + $txt = preg_replace('/^([\s]*)([^\s])/isU', '$2', $txt); + $this->isAfterFloat = false; + } + + $txt = html_entity_decode($txt, ENT_QUOTES, 'ISO-8859-15'); +// $txt = utf8_decode(html_entity_decode($txt, ENT_QUOTES, 'UTF-8')); + + $txt = str_replace('[[page_cu]]', $this->pdf->PageNo(), $txt); + + // tailles du texte + $h = 1.08*$this->style->value['font-size']; + $dh = $h*$this->style->value['mini-decal']; + + $w = $this->pdf->GetStringWidth($txt); + // identification de l'alignement + $align = 'L'; + + if ($this->style->value['text-align']=='li_right') + { + $w = $this->style->value['width']; + $align = 'R'; + } + + $curr_max = strlen($txt); // taille maxi du texte + $maxX = 0; // plus grande largeur du texte apres retour à la ligne + $x = $this->pdf->getX(); // position du texte + $y = $this->pdf->getY(); + $w = $this->pdf->GetStringWidth($txt); // largeur du texte + list($left, $right) = $this->getMargins($y); // marges autorisees + $nb = 0; // nbr de lignes découpées + + // tant que ca ne rentre pas sur la ligne et qu'on a du texte => on découpe + while($x+$w>$right && $x<$right && strlen($txt)) + { + // liste des mots + $lst = explode(' ', $txt); + + // trouver une phrase qui rentre dans la largeur, en ajoutant les mots 1 à 1 + $i=0; + $old = ''; + $str = $lst[0]; + while(($x+$this->pdf->GetStringWidth($str))<$right) + { + unset($lst[$i]); + $old = $str; + + $i++; + $str.= ' '.$lst[$i]; + } + $str = $old; + + // si rien de rentre, et que le premier mot ne rentre de toute facon pas dans une ligne, on le force... + if ($i==0 && (($left+$this->pdf->GetStringWidth($lst[0]))>=$right)) + { + $str = $lst[0]; + unset($lst[0]); + } + + // récupération des mots restant, et calcul de la largeur + $txt = implode(' ', $lst); + $w = $this->pdf->GetStringWidth($str); + + // ecriture du bout de phrase extrait et qui rentre + $wc = ($align=='L' ? $w : $this->style->value['width']); + if ($right - $left<$wc) $wc = $right - $left; + if (strlen($str)) $this->pdf->Cell($wc, $h+$dh, $str, 0, 0, $align, $fill, $this->inLink); + $this->maxH = max($this->maxH, $this->style->getLineHeight()); + + // détermination de la largeur max + $maxX = max($maxX, $this->pdf->getX()); + + // nouvelle position et nouvelle largeur pour la boucle + $w = $this->pdf->GetStringWidth($txt); + $y = $this->pdf->getY(); + $x = $this->pdf->getX(); + + // si il reste du text à afficher + if (strlen($txt)) + { + if ($this->forOneLine) + { + $this->maxX = max($this->maxX, $maxX); + return false; + } + + // retour à la ligne + $this->o_BR(array('style' => ''), $curr_max - strlen($txt)); + + $y = $this->pdf->getY(); + $x = $this->pdf->getX(); + + // si la prochaine ligne ne rentre pas dans la page => nouvelle page + if ($y + $h>$this->pdf->h - $this->pdf->bMargin) $this->setNewPage('', null, $curr_max - strlen($txt)); + + // ligne suplémentaire. au bout de 1000 : trop long => erreur + $nb++; + if ($nb>1000) HTML2PDF::makeError(2, __FILE__, __LINE__, array($txt, $right-$left, $this->pdf->GetStringWidth($txt))); + + list($left, $right) = $this->getMargins($y); // marges autorisees + } + } + + // si il reste du text apres découpe, c'est qu'il rentre direct => on l'affiche + if (strlen($txt)) + { + $this->pdf->Cell(($align=='L' ? $w : $this->style->value['width']), $h+$dh, $txt, 0, 0, $align, $fill, $this->inLink); + $this->maxH = max($this->maxH, $this->style->getLineHeight()); + } + + // détermination des positions MAX + $maxX = max($maxX, $this->pdf->getX()); + $maxY = $this->pdf->getY()+$h; + + // position maximale globale + $this->maxX = max($this->maxX, $maxX); + $this->maxY = max($this->maxY, $maxY); + + return true; + } + + /** + * tracer une image + * + * @param string nom du fichier source + * @return null + */ + function Image($src, $sub_li=false) + { + // est-ce que c'est une image ? + $infos=@GetImageSize($src); + + if (count($infos)<2) + { + HTML2PDF::makeError(6, __FILE__, __LINE__, $src); + return false; + } + + // récupération des dimensions dans l'unité du PDF + $wi = $infos[0]/$this->pdf->k; + $hi = $infos[1]/$this->pdf->k; + + // détermination des dimensions d'affichage en fonction du style + if ($this->style->value['width'] && $this->style->value['height']) + { + $w = $this->style->value['width']; + $h = $this->style->value['height']; + } + else if ($this->style->value['width']) + { + $w = $this->style->value['width']; + $h = $hi*$w/$wi; + + } + else if ($this->style->value['height']) + { + $h = $this->style->value['height']; + $w = $wi*$h/$hi; + } + else + { + $w = 72./96.*$wi; + $h = 72./96.*$hi; + } + + // detection du float + $float = $this->style->getFloat(); + if ($float && $this->maxH) $this->o_BR(array()); + + // position d'affichage + $x = $this->pdf->getX(); + $y = $this->pdf->getY(); + + // si l'image ne rentre pas dans la page => nouvelle page + if ($y + $h>$this->pdf->h - $this->pdf->bMargin) + { + $this->setNewPage(); + $x = $this->pdf->getX(); + $y = $this->pdf->getY(); + } + + // correction pour l'affichage d'une puce image + $hT = 0.80*$this->style->value['font-size']; + if ($sub_li && $h<$hT) + { + $y+=($hT-$h); + } + + $yc = $y-$this->style->value['margin']['t']; + + // détermination de la position réelle d'affichage en fonction du text-align du parent + $old = isset($this->style->table[count($this->style->table)-1]) ? $this->style->table[count($this->style->table)-1] : $this->style->value; + + if ( $old['width']) + { + $parent_w = $old['width']; + $parent_x = $x; + } + else + { + $parent_w = $this->pdf->w - $this->pdf->lMargin - $this->pdf->rMargin; + $parent_x = $this->pdf->lMargin; + } + + if ($float) + { + list($lx, $rx) = $this->getMargins($yc); + $parent_x = $lx; + $parent_w = $rx-$lx; + } + + if ($parent_w>$w && $float!='left') + { + if ($float=='right' || $this->style->value['text-align']=='li_right') $x = $parent_x + $parent_w - $w-$this->style->value['margin']['r']-$this->style->value['margin']['l']; + +// if ($float=='right' || $this->style->value['text-align']=='right') $x = $parent_x + $parent_w - $w-$this->style->value['margin']['r']-$this->style->value['margin']['l']; +// else if ($this->style->value['text-align']=='center') $x = $parent_x + 0.5*($parent_w - $w); + } + + // affichage de l'image, et positionnement à la suite + if (!$this->sub_part && !$this->isSubPart) $this->pdf->Image($src, $x, $y, $w, $h, '', $this->inLink); + + $x-= $this->style->value['margin']['l']; + $y-= $this->style->value['margin']['t']; + $w+= $this->style->value['margin']['l'] + $this->style->value['margin']['r']; + $h+= $this->style->value['margin']['t'] + $this->style->value['margin']['b']; + + if ($float=='left') + { + $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + + $this->addMargins($float, $x, $y, $x+$w, $y+$h); + + list($lx, $rx) = $this->getMargins($yc); + $this->pdf->x = $lx; + $this->pdf->y = $yc; + } + else if ($float=='right') + { +// $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + + $this->addMargins($float, $x, $y, $x+$w, $y+$h); + + list($lx, $rx) = $this->getMargins($yc); + $this->pdf->x = $lx; + $this->pdf->y = $yc; + } + else + { + $this->pdf->SetX($x+$w); + $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + $this->maxH = max($this->maxH, $h); + } + } + + /** + * Tracer un rectanble + * + * @param float position X + * @param float position Y + * @param float Largeur + * @param float Hauteur + * @param array Tableau de style de définition des borders + * @param float padding - marge intérieur au rectangle => non utile mais on le passe en paramètre + * @param float margin - marge exterieur au rectangle + * @param array Tableau de style de définition du background + * @return null + */ + function Rectangle($x, $y, $w, $h, $border, $padding, $margin, $background) + { + if ($this->sub_part || $this->isSubPart) return false; + if ($h===null) return false; + + $x+= $margin; + $y+= $margin; + $w-= $margin*2; + $h-= $margin*2; + + // récupération des radius + $radius_h = $border['radius'][0]; + $radius_v = $border['radius'][1]; + + // verification des coins en radius + $coin_TL = ($radius_h && $radius_v && $radius_v>$border['t']['width'] && $radius_h>$border['l']['width']) ? array($radius_h, $radius_v) : null; + $coin_TR = ($radius_h && $radius_v && $radius_v>$border['t']['width'] && $radius_h>$border['r']['width']) ? array($radius_h, $radius_v) : null; + $coin_BL = ($radius_h && $radius_v && $radius_v>$border['b']['width'] && $radius_h>$border['l']['width']) ? array($radius_h, $radius_v) : null; + $coin_BR = ($radius_h && $radius_v && $radius_v>$border['b']['width'] && $radius_h>$border['r']['width']) ? array($radius_h, $radius_v) : null; + + + + // traitement de la couleur de fond + $STYLE = ''; + if ($background['color']) + { + $this->pdf->SetFillColor($background['color'][0], $background['color'][1], $background['color'][2]); + $STYLE.= 'F'; + } + + if ($STYLE) + { + $this->pdf->clippingPathOpen($x, $y, $w, $h, $coin_TL,$coin_TR, $coin_BL, $coin_BR); + $this->pdf->Rect($x, $y, $w, $h, $STYLE); + $this->pdf->clippingPathClose(); + } + + // traitement de l'image de fond + if ($background['image']) + { + $i_name = $background['image']; + $i_position = $background['position']!==null ? $background['position'] : array(0, 0); + $i_repeat = $background['repeat']!==null ? $background['repeat'] : array(true, true); + + // taile du fond (il faut retirer les borders + $b_x = $x; + $b_y = $y; + $b_w = $w; + $b_h = $h; + + if ($border['b']['width']) { $b_h-= $border['b']['width']; } + if ($border['l']['width']) { $b_w-= $border['l']['width']; $b_x+= $border['l']['width']; } + if ($border['t']['width']) { $b_h-= $border['t']['width']; $b_y+= $border['t']['width']; } + if ($border['r']['width']) { $b_w-= $border['r']['width']; } + + // est-ce que c'est une image ? + $i_infos=@GetImageSize($i_name); + + if (count($i_infos)<2) + { + HTML2PDF::makeError(6, __FILE__, __LINE__, $i_name); + return false; + } + + // récupération des dimensions dans l'unité du PDF + $i_width = 72./96.*$i_infos[0]/$this->pdf->k; + $i_height = 72./96.*$i_infos[1]/$this->pdf->k; + + if ($i_repeat[0]) $i_position[0] = $b_x; + else if(preg_match('/^([-]?[0-9\.]+)%/isU', $i_position[0], $match)) $i_position[0] = $b_x + $match[1]*($b_w-$i_width)/100; + else $i_position[0] = $b_x+$i_position[0]; + + if ($i_repeat[1]) $i_position[1] = $b_y; + else if(preg_match('/^([-]?[0-9\.]+)%/isU', $i_position[1], $match)) $i_position[1] = $b_y + $match[1]*($b_h-$i_height)/100; + else $i_position[1] = $b_y+$i_position[1]; + + $i_x_min = $b_x; + $i_x_max = $b_x+$b_w; + $i_y_min = $b_y; + $i_y_max = $b_y+$b_h; + + if (!$i_repeat[0] && !$i_repeat[1]) + { + $i_x_min = $i_position[0]; $i_x_max = $i_position[0]+$i_width; + $i_y_min = $i_position[1]; $i_y_max = $i_position[1]+$i_height; + } + else if ($i_repeat[0] && !$i_repeat[1]) + { + $i_y_min = $i_position[1]; $i_y_max = $i_position[1]+$i_height; + } + elseif (!$i_repeat[0] && $i_repeat[1]) + { + $i_x_min = $i_position[0]; $i_x_max = $i_position[0]+$i_width; + } + + if (is_array($coin_TL)) { $coin_TL[0]-= $border['l']['width']; $coin_TL[1]-= $border['t']['width']; } + if (is_array($coin_TR)) { $coin_TR[0]-= $border['r']['width']; $coin_TR[1]-= $border['t']['width']; } + if (is_array($coin_BL)) { $coin_BL[0]-= $border['l']['width']; $coin_BL[1]-= $border['b']['width']; } + if (is_array($coin_BR)) { $coin_BR[0]-= $border['r']['width']; $coin_BR[1]-= $border['b']['width']; } + + $this->pdf->clippingPathOpen($b_x, $b_y, $b_w, $b_h, $coin_TL, $coin_TR, $coin_BL, $coin_BR); + for ($i_y=$i_y_min; $i_y<$i_y_max; $i_y+=$i_height) + { + for ($i_x=$i_x_min; $i_x<$i_x_max; $i_x+=$i_width) + { + $c_x = null; + $c_y = null; + $c_w = $i_width; + $c_h = $i_height; + if ($i_y_max-$i_y<$i_height) + { + $c_x = $i_x; + $c_y = $i_y; + $c_h = $i_y_max-$i_y; + } + if ($i_x_max-$i_x<$i_width) + { + $c_x = $i_x; + $c_y = $i_y; + $c_w = $i_x_max-$i_x; + } + + $this->pdf->Image($i_name, $i_x, $i_y, $i_width, $i_height, '', ''); + } + } + $this->pdf->clippingPathClose(); + } + + $x-= 0.01; + $y-= 0.01; + $w+= 0.02; + $h+= 0.02; + if ($border['b']['width']) $border['b']['width']+= 0.02; + if ($border['l']['width']) $border['l']['width']+= 0.02; + if ($border['t']['width']) $border['t']['width']+= 0.02; + if ($border['r']['width']) $border['r']['width']+= 0.02; + + if ($border['b']['width'] && $border['b']['color'][0]!==null) + { + $pt = array(); + $pt[] = $x+$w; $pt[] = $y+$h; + $pt[] = $x+$w-$border['r']['width']; $pt[] = $y+$h; + $pt[] = $x+$border['l']['width']; $pt[] = $y+$h; + $pt[] = $x; $pt[] = $y+$h; + $pt[] = $x+$border['l']['width']; $pt[] = $y+$h-$border['b']['width']; + $pt[] = $x+$w-$border['r']['width']; $pt[] = $y+$h-$border['b']['width']; + + $bord = 3; + if (is_array($coin_BL)) + { + $bord-=2; + $pt[4] += $radius_h-$border['l']['width']; + $pt[8] += $radius_h-$border['l']['width']; + unset($pt[6]);unset($pt[7]); + } + if (is_array($coin_BR)) + { + $courbe = array(); + $courbe[] = $x+$w; $courbe[] = $y+$h-$radius_v; + $courbe[] = $x+$w-$radius_h; $courbe[] = $y+$h; + $courbe[] = $x+$w-$border['r']['width']; $courbe[] = $y+$h-$radius_v; + $courbe[] = $x+$w-$radius_h; $courbe[] = $y+$h-$border['b']['width']; + $courbe[] = $x+$w-$radius_h; $courbe[] = $y+$h-$radius_v; + $this->Courbe($courbe, $border['b']['color']); + + $bord-=1; + $pt[2] -= $radius_h-$border['r']['width']; + $pt[10]-= $radius_h-$border['r']['width']; + unset($pt[0]);unset($pt[1]); + + } + + $pt = array_values($pt); + $this->Line($pt, $border['b']['color'], $border['b']['type'], $border['b']['width'], $bord); + } + + if ($border['l']['width'] && $border['l']['color'][0]!==null) + { + $pt = array(); + $pt[] = $x; $pt[] = $y+$h; + $pt[] = $x; $pt[] = $y+$h-$border['b']['width']; + $pt[] = $x; $pt[] = $y+$border['t']['width']; + $pt[] = $x; $pt[] = $y; + $pt[] = $x+$border['l']['width']; $pt[] = $y+$border['t']['width']; + $pt[] = $x+$border['l']['width']; $pt[] = $y+$h-$border['b']['width']; + + $bord = 3; + if (is_array($coin_BL)) + { + $courbe = array(); + $courbe[] = $x+$radius_h; $courbe[] = $y+$h; + $courbe[] = $x; $courbe[] = $y+$h-$radius_v; + $courbe[] = $x+$radius_h; $courbe[] = $y+$h-$border['b']['width']; + $courbe[] = $x+$border['l']['width']; $courbe[] = $y+$h-$radius_v; + $courbe[] = $x+$radius_h; $courbe[] = $y+$h-$radius_v; + $this->Courbe($courbe, $border['l']['color']); + + $bord-=1; + $pt[3] -= $radius_v-$border['b']['width']; + $pt[11]-= $radius_v-$border['b']['width']; + unset($pt[0]);unset($pt[1]); + } + if (is_array($coin_TL)) + { + $bord-=2; + $pt[5] += $radius_v-$border['t']['width']; + $pt[9] += $radius_v-$border['t']['width']; + unset($pt[6]);unset($pt[7]); + } + + $pt = array_values($pt); + $this->Line($pt, $border['l']['color'], $border['l']['type'], $border['l']['width'], $bord); + } + + if ($border['t']['width'] && $border['t']['color'][0]!==null) + { + $pt = array(); + $pt[] = $x; $pt[] = $y; + $pt[] = $x+$border['l']['width']; $pt[] = $y; + $pt[] = $x+$w-$border['r']['width']; $pt[] = $y; + $pt[] = $x+$w; $pt[] = $y; + $pt[] = $x+$w-$border['r']['width']; $pt[] = $y+$border['t']['width']; + $pt[] = $x+$border['l']['width']; $pt[] = $y+$border['t']['width']; + + $bord = 3; + if (is_array($coin_TL)) + { + $courbe = array(); + $courbe[] = $x; $courbe[] = $y+$radius_v; + $courbe[] = $x+$radius_h; $courbe[] = $y; + $courbe[] = $x+$border['l']['width']; $courbe[] = $y+$radius_v; + $courbe[] = $x+$radius_h; $courbe[] = $y+$border['t']['width']; + $courbe[] = $x+$radius_h; $courbe[] = $y+$radius_v; + $this->Courbe($courbe, $border['t']['color']); + + $bord-=1; + $pt[2] += $radius_h-$border['l']['width']; + $pt[10]+= $radius_h-$border['l']['width']; + unset($pt[0]);unset($pt[1]); + } + if (is_array($coin_TR)) + { + $bord-=2; + $pt[4] -= $radius_h-$border['r']['width']; + $pt[8] -= $radius_h-$border['r']['width']; + unset($pt[6]);unset($pt[7]); + } + + $pt = array_values($pt); + $this->Line($pt, $border['t']['color'], $border['t']['type'], $border['t']['width'], $bord); + } + + if ($border['r']['width'] && $border['r']['color'][0]!==null) + { + $pt = array(); + $pt[] = $x+$w; $pt[] = $y; + $pt[] = $x+$w; $pt[] = $y+$border['t']['width']; + $pt[] = $x+$w; $pt[] = $y+$h-$border['b']['width']; + $pt[] = $x+$w; $pt[] = $y+$h; + $pt[] = $x+$w-$border['r']['width']; $pt[] = $y+$h-$border['b']['width']; + $pt[] = $x+$w-$border['r']['width']; $pt[] = $y+$border['t']['width']; + + $bord = 3; + if (is_array($coin_TR)) + { + $courbe = array(); + $courbe[] = $x+$w-$radius_h; $courbe[] = $y; + $courbe[] = $x+$w; $courbe[] = $y+$radius_v; + $courbe[] = $x+$w-$radius_h; $courbe[] = $y+$border['t']['width']; + $courbe[] = $x+$w-$border['r']['width']; $courbe[] = $y+$radius_v; + $courbe[] = $x+$w-$radius_h; $courbe[] = $y+$radius_v; + $this->Courbe($courbe, $border['r']['color']); + + $bord-=1; + $pt[3] += $radius_v-$border['t']['width']; + $pt[11]+= $radius_v-$border['t']['width']; + unset($pt[0]);unset($pt[1]); + } + if (is_array($coin_BR)) + { + $bord-=2; + $pt[5] -= $radius_v-$border['b']['width']; + $pt[9] -= $radius_v-$border['b']['width']; + unset($pt[6]);unset($pt[7]); + } + + $pt = array_values($pt); + $this->Line($pt, $border['r']['color'], $border['r']['type'], $border['r']['width'], $bord); + } + + if ($background) $this->pdf->SetFillColor($background['color'][0], $background['color'][1], $background['color'][2]); + } + + function Courbe($pt, $color) + { + $this->pdf->SetFillColor($color[0], $color[1], $color[2]); + + $this->pdf->drawCourbe($pt[0], $pt[1], $pt[2], $pt[3], $pt[4], $pt[5], $pt[6], $pt[7], $pt[8], $pt[9]); + } + + /** + * Tracer une ligne epaisse défini par ses points avec des extreminites en biseau + * + * @param array liste des points definissant le tour de la ligne + * @param float couleur RVB + * @param string type de ligne + * @param float largeur de la ligne + * @return null + */ + function Line($pt, $color, $type, $width, $bord=3) + { + $this->pdf->SetFillColor($color[0], $color[1], $color[2]); + if ($type=='dashed' || $type=='dotted') + { + if ($bord==1) + { + $tmp = array(); $tmp[]=$pt[0]; $tmp[]=$pt[1]; $tmp[]=$pt[2]; $tmp[]=$pt[3]; $tmp[]=$pt[8]; $tmp[]=$pt[9]; + $this->pdf->Polygon($tmp, 'F'); + + $tmp = array(); $tmp[]=$pt[2]; $tmp[]=$pt[3]; $tmp[]=$pt[4]; $tmp[]=$pt[5]; $tmp[]=$pt[6]; $tmp[]=$pt[7]; $tmp[]=$pt[8]; $tmp[]=$pt[9]; + $pt = $tmp; + } + else if ($bord==2) + { + $tmp = array(); $tmp[]=$pt[2]; $tmp[]=$pt[3]; $tmp[]=$pt[4]; $tmp[]=$pt[5]; $tmp[]=$pt[6]; $tmp[]=$pt[7]; + $this->pdf->Polygon($tmp, 'F'); + + $tmp = array(); $tmp[]=$pt[0]; $tmp[]=$pt[1]; $tmp[]=$pt[2]; $tmp[]=$pt[3]; $tmp[]=$pt[6]; $tmp[]=$pt[7]; $tmp[]=$pt[8]; $tmp[]=$pt[9]; + $pt = $tmp; + } + else if ($bord==3) + { + $tmp = array(); $tmp[]=$pt[0]; $tmp[]=$pt[1]; $tmp[]=$pt[2]; $tmp[]=$pt[3]; $tmp[]=$pt[10]; $tmp[]=$pt[11]; + $this->pdf->Polygon($tmp, 'F'); + + $tmp = array(); $tmp[]=$pt[4]; $tmp[]=$pt[5]; $tmp[]=$pt[6]; $tmp[]=$pt[7]; $tmp[]=$pt[8]; $tmp[]=$pt[9]; + $this->pdf->Polygon($tmp, 'F'); + + $tmp = array(); $tmp[]=$pt[2]; $tmp[]=$pt[3]; $tmp[]=$pt[4]; $tmp[]=$pt[5]; $tmp[]=$pt[8]; $tmp[]=$pt[9]; $tmp[]=$pt[10]; $tmp[]=$pt[11]; + $pt = $tmp; + } + + if ($pt[2]==$pt[0]) + { + $l = abs(($pt[3]-$pt[1])*0.5); + $px = 0; + $py = $width; + $x1 = $pt[0]; $y1 = ($pt[3]+$pt[1])*0.5; + $x2 = $pt[6]; $y2 = ($pt[7]+$pt[5])*0.5; + } + else + { + $l = abs(($pt[2]-$pt[0])*0.5); + $px = $width; + $py = 0; + $x1 = ($pt[2]+$pt[0])*0.5; $y1 = $pt[1]; + $x2 = ($pt[6]+$pt[4])*0.5; $y2 = $pt[7]; + } + if ($type=='dashed') + { + $px = $px*3.; + $py = $py*3.; + } + $mode = ($l/($px+$py)<.5); + + for($i=0; $l-($px+$py)*($i-0.5)>0; $i++) + { + if (($i%2)==$mode) + { + $j = $i-0.5; + $lx1 = $px*($j); if ($lx1<-$l) $lx1 =-$l; + $ly1 = $py*($j); if ($ly1<-$l) $ly1 =-$l; + $lx2 = $px*($j+1); if ($lx2>$l) $lx2 = $l; + $ly2 = $py*($j+1); if ($ly2>$l) $ly2 = $l; + + $tmp = array(); + $tmp[] = $x1+$lx1; $tmp[] = $y1+$ly1; + $tmp[] = $x1+$lx2; $tmp[] = $y1+$ly2; + $tmp[] = $x2+$lx2; $tmp[] = $y2+$ly2; + $tmp[] = $x2+$lx1; $tmp[] = $y2+$ly1; + $this->pdf->Polygon($tmp, 'F'); + + if ($j>0) + { + $tmp = array(); + $tmp[] = $x1-$lx1; $tmp[] = $y1-$ly1; + $tmp[] = $x1-$lx2; $tmp[] = $y1-$ly2; + $tmp[] = $x2-$lx2; $tmp[] = $y2-$ly2; + $tmp[] = $x2-$lx1; $tmp[] = $y2-$ly1; + $this->pdf->Polygon($tmp, 'F'); + } + } + } + } + else if ($type=='solid') + { + $this->pdf->Polygon($pt, 'F'); + } + } + + /** + * balise : BR + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @param integer position reelle courante si saut de ligne pendant l'ecriture d'un texte + * @return null + */ + function o_BR($param, $curr = null) + { + if ($this->forOneLine) return false; + + $h = $this->style->getLineHeight(); + $h = max($this->maxH, $h); + $y = $this->pdf->getY(); + + // si la ligne est vide, la position maximale n'a pas été mise à jour => on la met à jour + if ($this->maxH==0) $this->maxY = max($this->maxY, $y+$h); + + // si le saut de ligne rentre => on le prend en compte, sinon nouvelle page + if ($y+$h<$this->pdf->h - $this->pdf->bMargin) $this->setNewLine($h, $curr); + else $this->setNewPage('', null, $curr); + + $this->maxH = 0; + + return true; + } + + /** + * balise : HR + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_HR($param) + { + if ($this->forOneLine) return false; + $old_align = $this->style->value['text-align']; + $this->style->value['text-align'] = 'left'; + + if ($this->maxH) $this->o_BR($param); + + $f_size = $this->style->value['font-size']; + $this->style->value['font-size']=$f_size*0.5; $this->o_BR($param); + $this->style->value['font-size']=0; + + $param['style']['width'] = '100%'; + + $this->style->save(); + $this->style->value['height']=$this->style->ConvertToMM('1mm'); + + $this->style->analyse('hr', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + $h = $this->style->value['height']; + if ($h) $h-= $this->style->value['border']['t']['width']+$this->style->value['border']['b']['width']; + if ($h<=0) $h = $this->style->value['border']['t']['width']+$this->style->value['border']['b']['width']; + + $this->Rectangle($this->pdf->x, $this->pdf->y, $this->style->value['width'], $h, $this->style->value['border'], 0, 0, $this->style->value['background']); + $this->maxH = $h; + + $this->style->load(); + $this->style->FontSet(); + + $this->o_BR($param); + + $this->style->value['font-size']=$f_size*0.5; $this->o_BR($param); + $this->style->value['font-size']=$f_size; + + $this->style->value['text-align'] = $old_align; + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : B + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_B($param, $other = 'b') + { + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->analyse($other, $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + function o_STRONG($param) { return $this->o_B($param, 'strong'); } + + /** + * balise : B + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_B($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + function c_STRONG($param) { return $this->c_B($param); } + + /** + * balise : I + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_I($param, $other = 'i') + { + $this->style->save(); + $this->style->value['font-italic'] = true; + $this->style->analyse($other, $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + function o_ADDRESS($param) { return $this->o_I($param, 'address'); } + function o_CITE($param) { return $this->o_I($param, 'cite'); } + function o_EM($param) { return $this->o_I($param, 'em'); } + function o_SAMP($param) { return $this->o_I($param, 'samp'); } + + /** + * balise : I + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_I($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + function c_ADDRESS($param) { return $this->c_I($param); } + function c_CITE($param) { return $this->c_I($param); } + function c_EM($param) { return $this->c_I($param); } + function c_SAMP($param) { return $this->c_I($param); } + + /** + * balise : S + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_S($param) + { + $this->style->save(); + $this->style->value['font-linethrough'] = true; + $this->style->analyse('s', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : S + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_S($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : U + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_U($param) + { + $this->style->save(); + $this->style->value['font-underline'] = true; + $this->style->analyse('u', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : U + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_U($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : A + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_A($param) + { + $this->inLink = str_replace('&', '&', isset($param['href']) ? $param['href'] : ''); + + if (isset($param['name'])) + { + $nom = $param['name']; + if (!isset($this->lstAncre[$nom])) $this->lstAncre[$nom] = array($this->pdf->AddLink(), false); + + if (!$this->lstAncre[$nom][1]) + { + $this->lstAncre[$nom][1] = true; + $this->pdf->SetLink($this->lstAncre[$nom][0], -1, -1); + } + } + + if (preg_match('/^#([^#]+)$/isU', $this->inLink, $match)) + { + $nom = $match[1]; + if (!isset($this->lstAncre[$nom])) $this->lstAncre[$nom] = array($this->pdf->AddLink(), false); + + $this->inLink = $this->lstAncre[$nom][0]; + } + + $this->style->save(); + $this->style->value['font-underline'] = true; + $this->style->value['color'] = array(20, 20, 250); + $this->style->analyse('a', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : A + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_A($param) + { + $this->inLink = ''; + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : H1 + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_H1($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->value['font-size'] = $this->style->ConvertToMM('28px'); + $this->style->analyse('h1', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : H1 + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_H1($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + $this->o_BR(array()); + + return true; + } + + /** + * balise : H2 + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_H2($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->value['font-size'] = $this->style->ConvertToMM('24px'); + $this->style->analyse('h2', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : H2 + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_H2($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + $this->o_BR(array()); + + return true; + } + + /** + * balise : H3 + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_H3($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->value['font-size'] = $this->style->ConvertToMM('20px'); + $this->style->analyse('h3', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : H3 + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_H3($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + $this->o_BR(array()); + + return true; + } + + /** + * balise : H4 + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_H4($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->value['font-size'] = $this->style->ConvertToMM('16px'); + $this->style->analyse('h4', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : H4 + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_H4($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + $this->o_BR(array()); + + return true; + } + + /** + * balise : H5 + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_H5($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->value['font-size'] = $this->style->ConvertToMM('12px'); + $this->style->analyse('h5', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : H5 + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_H5($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + $this->o_BR(array()); + + return true; + } + + /** + * balise : H6 + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_H6($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->save(); + $this->style->value['font-bold'] = true; + $this->style->value['font-size'] = $this->style->ConvertToMM('9px'); + $this->style->analyse('h6', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->setNewPositionForNewLine(); + + return true; + } + + /** + * balise : H6 + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_H6($param) + { + if ($this->forOneLine) return false; + + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + $this->o_BR(array()); + + return true; + } + + /** + * balise : SPAN + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_SPAN($param, $other = 'span') + { + $this->style->save(); + $this->style->analyse($other, $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + function o_FONT($param) { return $this->o_SPAN($param, 'font'); } + + /** + * balise : SPAN + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_SPAN($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + function c_FONT($param) { return $this->c_SPAN($param); } + + + /** + * balise : P + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_P($param) + { + if ($this->forOneLine) return false; + + if (!in_array($this->previousCall, array('c_P', 'c_UL'))) + { + if ($this->maxH) $this->o_BR(array()); + $this->o_BR(array()); + } + + $this->style->save(); + $this->style->analyse('p', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + if ($this->style->value['text-indent']>0) $this->pdf->x+= $this->style->value['text-indent']; + + return true; + } + + /** + * balise : P + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_P($param) + { + if ($this->forOneLine) return false; + + if ($this->maxH) $this->o_BR(array()); + $this->o_BR(array()); + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : PRE + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_PRE($param, $other = 'pre') + { + if ($other=='pre' && $this->maxH) $this->o_BR(array()); + + $this->style->save(); + $this->style->value['font-family'] = 'courier'; + $this->style->analyse($other, $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + if ($other=='pre') return $this->o_DIV($param, $other); + + return true; + } + function o_CODE($param) { return $this->o_PRE($param, 'code'); } + + /** + * balise : PRE + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_PRE($param, $other = 'pre') + { + if ($other=='pre') + { + if ($this->forOneLine) return false; + + $this->c_DIV($param); + $this->o_BR(array()); + } + $this->style->load(); + $this->style->FontSet(); + + return true; + } + function c_CODE($param) { return $this->c_PRE($param, 'code'); } + + /** + * balise : BIG + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_BIG($param) + { + $this->style->save(); + $this->style->value['mini-decal']-= $this->style->value['mini-size']*0.2; + $this->style->value['mini-size'] *= 1.2; + $this->style->analyse('big', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : BIG + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_BIG($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : SMALL + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_SMALL($param) + { + $this->style->save(); + $this->style->value['mini-decal']+= $this->style->value['mini-size']*0.18; + $this->style->value['mini-size'] *= 0.82; + $this->style->analyse('small', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : SMALL + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_SMALL($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + + /** + * balise : SUP + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_SUP($param) + { + $this->style->save(); + $this->style->value['mini-decal']-= $this->style->value['mini-size']*0.25; + $this->style->value['mini-size'] *= 0.75; + $this->style->analyse('sup', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : SUP + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_SUP($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : SUB + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_SUB($param) + { + $this->style->save(); + $this->style->value['mini-decal']+= $this->style->value['mini-size']*0.25; + $this->style->value['mini-size'] *= 0.75; + $this->style->analyse('sub', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + $this->inSub = 1; + + return true; + } + + /** + * balise : SUB + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_SUB($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : UL + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_UL($param, $other = 'ul') + { + if ($this->forOneLine) return false; + + if (!in_array($this->previousCall, array('c_P', 'c_UL'))) + { + if ($this->maxH) $this->o_BR(array()); + if (!count($this->defLIST)) $this->o_BR(array()); + } + + if (!isset($param['style']['width'])) $param['allwidth'] = true; + $param['cellspacing'] = 0; + + // une liste est traitée comme un tableau + $this->o_TABLE($param, $other); + + // ajouter un niveau de liste + $this->listeAddLevel($other, $this->style->value['list-style-type'], $this->style->value['list-style-image']); + + return true; + } + function o_OL($param) { return $this->o_UL($param, 'ol'); } + + /** + * balise : UL + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_UL($param) + { + if ($this->forOneLine) return false; + + // fin du tableau + $this->c_TABLE($param); + + // enlever un niveau de liste + $this->listeDelLevel(); + + if (!$this->sub_part) + { + if (!count($this->defLIST)) $this->o_BR(array()); + } + + return true; + } + function c_OL($param) { return $this->c_UL($param); } + + /** + * balise : LI + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_LI($param) + { + if ($this->forOneLine) return false; + + // ajouter une puce au niveau actuel + $this->listeAddLi(); + + if (!isset($param['style']['width'])) $param['style']['width'] = '100%'; + + // preparation du style de la puce + $paramPUCE = $param; + + $inf = $this->listeGetLi(); + if ($inf[0]) + { + $paramPUCE['style']['font-family'] = $inf[0]; + $paramPUCE['style']['text-align'] = 'li_right'; + $paramPUCE['style']['vertical-align'] = 'top'; + $paramPUCE['style']['width'] = $this->listeGetWidth(); + $paramPUCE['style']['padding-right'] = $this->listeGetPadding(); + $paramPUCE['txt'] = $inf[2]; + } + else + { + $paramPUCE['style']['text-align'] = 'li_right'; + $paramPUCE['style']['vertical-align'] = 'top'; + $paramPUCE['style']['width'] = $this->listeGetWidth(); + $paramPUCE['style']['padding-right'] = $this->listeGetPadding(); + $paramPUCE['src'] = $inf[2]; + $paramPUCE['sub_li'] = true; + } + + // nouvelle ligne + $this->o_TR($param, 'li'); + + $this->style->save(); + + if ($inf[1]) + { + $this->style->value['mini-decal']+= $this->style->value['mini-size']*0.25; + $this->style->value['mini-size'] *= 0.75; + } + + // si on est dans un sub_html => preparation, sinon affichage classique + if ($this->sub_part) + { + // TD pour la puce + $tmp_pos = $this->temp_pos; + $tmp_lst1 = $this->parsing->code[$tmp_pos+1]; + $tmp_lst2 = $this->parsing->code[$tmp_pos+2]; + $this->parsing->code[$tmp_pos+1] = array(); + $this->parsing->code[$tmp_pos+1]['name'] = (isset($paramPUCE['src'])) ? 'img' : 'write'; + $this->parsing->code[$tmp_pos+1]['param'] = $paramPUCE; unset($this->parsing->code[$tmp_pos+1]['param']['style']['width']); + $this->parsing->code[$tmp_pos+1]['close'] = 0; + $this->parsing->code[$tmp_pos+2] = array(); + $this->parsing->code[$tmp_pos+2]['name'] = 'li'; + $this->parsing->code[$tmp_pos+2]['param'] = $paramPUCE; + $this->parsing->code[$tmp_pos+2]['close'] = 1; + $this->o_TD($paramPUCE, 'li_sub'); + $this->c_TD($param); + $this->temp_pos = $tmp_pos; + $this->parsing->code[$tmp_pos+1] = $tmp_lst1; + $this->parsing->code[$tmp_pos+2] = $tmp_lst2; + } + else + { + // TD pour la puce + $this->o_TD($paramPUCE, 'li_sub'); + unset($paramPUCE['style']['width']); + if (isset($paramPUCE['src'])) $this->o_IMG($paramPUCE); + else $this->o_WRITE($paramPUCE); + $this->c_TD($paramPUCE); + } + $this->style->load(); + + + // td pour le contenu + $this->o_TD($param, 'li'); + + return true; + } + + /** + * balise : LI + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_LI($param) + { + if ($this->forOneLine) return false; + + // fin du contenu + $this->c_TD($param, 'li'); + + // fin de la ligne + $this->c_TR($param, 'li'); + + return true; + } + + /** + * balise : TBODY + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_TBODY($param) + { + if ($this->forOneLine) return false; + + $this->style->save(); + $this->style->analyse('tbody', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : TBODY + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TBODY($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : THEAD + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_THEAD($param) + { + if ($this->forOneLine) return false; + + global $HTML2PDF_TABLEAU; + + $this->style->save(); + $this->style->analyse('thead', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // si on est en mode sub_html : sauvegarde du numéro du TR + if ($this->sub_part) + { + $HTML2PDF_TABLEAU[$param['num']]['thead']['tr'][0] = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']; + $HTML2PDF_TABLEAU[$param['num']]['thead']['code'] = array(); + for($pos=$this->temp_pos; $posparsing->code); $pos++) + { + $todo = $this->parsing->code[$pos]; + if (strtolower($todo['name'])=='thead') $todo['name'] = 'thead_sub'; + $HTML2PDF_TABLEAU[$param['num']]['thead']['code'][] = $todo; + if (strtolower($todo['name'])=='thead_sub' && $todo['close']) break; + } + } + else + { + $res = $this->parsing->getLevel($this->parse_pos); + $this->parse_pos = $res[0]-1; + $HTML2PDF_TABLEAU[$param['num']]['tr_curr']+= count($HTML2PDF_TABLEAU[$param['num']]['thead']['tr']); + } + + return true; + } + + /** + * balise : THEAD + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_THEAD($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + $this->style->FontSet(); + + // si on est en mode sub_html : sauvegarde du numéro du TR + if ($this->sub_part) + { + global $HTML2PDF_TABLEAU; + $min = $HTML2PDF_TABLEAU[$param['num']]['thead']['tr'][0]; + $max = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1; + $HTML2PDF_TABLEAU[$param['num']]['thead']['tr'] = range($min, $max); + } + + return true; + } + + /** + * balise : TFOOT + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_TFOOT($param) + { + if ($this->forOneLine) return false; + + global $HTML2PDF_TABLEAU; + + $this->style->save(); + $this->style->analyse('tfoot', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // si on est en mode sub_html : sauvegarde du numéro du TR + if ($this->sub_part) + { + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr'][0] = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']; + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['code'] = array(); + for($pos=$this->temp_pos; $posparsing->code); $pos++) + { + $todo = $this->parsing->code[$pos]; + if (strtolower($todo['name'])=='tfoot') $todo['name'] = 'tfoot_sub'; + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['code'][] = $todo; + if (strtolower($todo['name'])=='tfoot_sub' && $todo['close']) break; + } + } + else + { + $res = $this->parsing->getLevel($this->parse_pos+1); + $this->parse_pos = $res[0]; + $HTML2PDF_TABLEAU[$param['num']]['tr_curr']+= count($HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr']); + } + + return true; + } + + /** + * balise : TFOOT + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TFOOT($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + $this->style->FontSet(); + + // si on est en mode sub_html : sauvegarde du numéro du TR + if ($this->sub_part) + { + global $HTML2PDF_TABLEAU; + + $min = $HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr'][0]; + $max = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1; + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr'] = range($min, $max); + } + + return true; + } + + /** + * balise : THEAD_SUB + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_THEAD_SUB($param) + { + if ($this->forOneLine) return false; + + $this->style->save(); + $this->style->analyse('thead', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : THEAD_SUB + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_THEAD_SUB($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : TFOOT_SUB + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_TFOOT_SUB($param) + { + if ($this->forOneLine) return false; + + $this->style->save(); + $this->style->analyse('tfoot', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : TFOOT_SUB + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TFOOT_SUB($param) + { + if ($this->forOneLine) return false; + + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : FORM + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_FORM($param) + { + $this->style->save(); + $this->style->analyse('form', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + return true; + } + + /** + * balise : FORM + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_FORM($param) + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : TABLE + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_TABLE($param, $other = 'table') + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + // utilisation du tableau des paramétres des tables + global $HTML2PDF_TABLEAU; + + $align_object = isset($param['align']) ? strtolower($param['align']) : 'left'; + if (isset($param['align'])) unset($param['align']); + if (!in_array($align_object, array('left', 'center', 'right'))) $align_object = 'left'; + + // lecture et initialisation du style + $this->style->save(); + $this->style->analyse($other, $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + if ($this->style->value['margin-auto']) $align_object = 'center'; + + // est-on en collapse + $collapse = false; + if ($other=='table') + $collapse = isset($this->style->value['border']['collapse']) ? $this->style->value['border']['collapse'] : false; + + // si oui il faut adapté les borders + if ($collapse) + { + $param['style']['border'] = 'none'; + $param['cellspacing'] = 0; + $none = $this->style->readBorder('none'); + $this->style->value['border']['t'] = $none; + $this->style->value['border']['r'] = $none; + $this->style->value['border']['b'] = $none; + $this->style->value['border']['l'] = $none; + } + + // si on est en mode sub_html : initialisation des dimensions et autres + if ($this->sub_part) + { + $HTML2PDF_TABLEAU[$param['num']] = array(); + $HTML2PDF_TABLEAU[$param['num']]['cellpadding'] = $this->style->ConvertToMM(isset($param['cellpadding']) ? $param['cellpadding'] : '1px'); // cellpadding du tableau + $HTML2PDF_TABLEAU[$param['num']]['cellspacing'] = $this->style->ConvertToMM(isset($param['cellspacing']) ? $param['cellspacing'] : '2px'); // cellspacing du tableau + $HTML2PDF_TABLEAU[$param['num']]['cases'] = array(); // liste des propriétés des cases + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = 0; // colonne courante + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = 0; // ligne courante + $HTML2PDF_TABLEAU[$param['num']]['curr_x'] = $this->pdf->getX(); // position courante X + $HTML2PDF_TABLEAU[$param['num']]['curr_y'] = $this->pdf->getY(); // position courante Y + $HTML2PDF_TABLEAU[$param['num']]['width'] = 0; // largeur globale + $HTML2PDF_TABLEAU[$param['num']]['height'] = 0; // hauteur globale + $HTML2PDF_TABLEAU[$param['num']]['align'] = $align_object; + $HTML2PDF_TABLEAU[$param['num']]['marge'] = array(); + $HTML2PDF_TABLEAU[$param['num']]['marge']['t'] = $this->style->value['padding']['t']+$this->style->value['border']['t']['width']+$HTML2PDF_TABLEAU[$param['num']]['cellspacing']*0.5; + $HTML2PDF_TABLEAU[$param['num']]['marge']['r'] = $this->style->value['padding']['r']+$this->style->value['border']['r']['width']+$HTML2PDF_TABLEAU[$param['num']]['cellspacing']*0.5; + $HTML2PDF_TABLEAU[$param['num']]['marge']['b'] = $this->style->value['padding']['b']+$this->style->value['border']['b']['width']+$HTML2PDF_TABLEAU[$param['num']]['cellspacing']*0.5; + $HTML2PDF_TABLEAU[$param['num']]['marge']['l'] = $this->style->value['padding']['l']+$this->style->value['border']['l']['width']+$HTML2PDF_TABLEAU[$param['num']]['cellspacing']*0.5; + $HTML2PDF_TABLEAU[$param['num']]['page'] = 0; // nombre de pages + $HTML2PDF_TABLEAU[$param['num']]['new_page'] = true; // nouvelle page pour le TR courant + $HTML2PDF_TABLEAU[$param['num']]['style_value'] = null; // style du tableau + $HTML2PDF_TABLEAU[$param['num']]['thead'] = array(); // infos sur le thead + $HTML2PDF_TABLEAU[$param['num']]['tfoot'] = array(); // infos sur le tfoot + $HTML2PDF_TABLEAU[$param['num']]['thead']['tr'] = array(); // tr du thead + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr'] = array(); // tr du tfoot + $HTML2PDF_TABLEAU[$param['num']]['thead']['height'] = 0; // hauteur du thead + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['height'] = 0; // hauteur du tfoot + $HTML2PDF_TABLEAU[$param['num']]['thead']['code'] = array(); // contenu HTML du thead + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['code'] = array(); // contenu HTML du tfoot + + $this->saveMargin($this->pdf->lMargin, $this->pdf->tMargin, $this->pdf->rMargin); + + // adaptation de la largeur en fonction des marges du tableau + $this->style->value['width']-= $HTML2PDF_TABLEAU[$param['num']]['marge']['l'] + $HTML2PDF_TABLEAU[$param['num']]['marge']['r']; + } + else + { + // on repart à la premiere page du tableau et à la premiere case + $HTML2PDF_TABLEAU[$param['num']]['page'] = 0; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = 0; + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = 0; + $HTML2PDF_TABLEAU[$param['num']]['td_x'] = $HTML2PDF_TABLEAU[$param['num']]['marge']['l']+$HTML2PDF_TABLEAU[$param['num']]['curr_x']; + $HTML2PDF_TABLEAU[$param['num']]['td_y'] = $HTML2PDF_TABLEAU[$param['num']]['marge']['t']+$HTML2PDF_TABLEAU[$param['num']]['curr_y']; + + // initialisation du style des bordures de la premiere partie de tableau + $this->Rectangle( + $HTML2PDF_TABLEAU[$param['num']]['curr_x'], + $HTML2PDF_TABLEAU[$param['num']]['curr_y'], + $HTML2PDF_TABLEAU[$param['num']]['width'], + isset($HTML2PDF_TABLEAU[$param['num']]['height'][0]) ? $HTML2PDF_TABLEAU[$param['num']]['height'][0] : null, + $this->style->value['border'], + $this->style->value['padding'], + 0, + $this->style->value['background'] + ); + + $HTML2PDF_TABLEAU[$param['num']]['style_value'] = $this->style->value; + } + + return true; + } + + /** + * balise : TABLE + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TABLE($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + global $HTML2PDF_TABLEAU; + + // restauration du style + $this->style->load(); + $this->style->FontSet(); + + // si on est en mode sub_html : initialisation des dimensions et autres + if ($this->sub_part) + { + // ajustement de la taille des cases + $this->calculTailleCases($HTML2PDF_TABLEAU[$param['num']]['cases']); + + // calcul de la hauteur du THEAD et du TFOOT + $lst = array('thead', 'tfoot'); + foreach($lst as $mode) + { + $HTML2PDF_TABLEAU[$param['num']][$mode]['height'] = 0; + foreach($HTML2PDF_TABLEAU[$param['num']][$mode]['tr'] as $tr) + { + // hauteur de la ligne tr + $h = 0; + for($i=0; $istyle->table[count($this->style->table)-1]) ? $this->style->table[count($this->style->table)-1] : $this->style->value; + $parent_w = $old['width'] ? $old['width'] : $this->pdf->w - $this->pdf->lMargin - $this->pdf->rMargin; + $x = $HTML2PDF_TABLEAU[$param['num']]['curr_x']; + $w = $HTML2PDF_TABLEAU[$param['num']]['width']; + if ($parent_w>$w) + { + if ($HTML2PDF_TABLEAU[$param['num']]['align']=='center') + $x = $x + ($parent_w-$w)*0.5; + else if ($HTML2PDF_TABLEAU[$param['num']]['align']=='right') + $x = $x + $parent_w-$w; + + $HTML2PDF_TABLEAU[$param['num']]['curr_x'] = $x; + } + + + // calcul des dimensions du tableau - hauteur du tableau sur chaque page + $HTML2PDF_TABLEAU[$param['num']]['height'] = array(); + + $h0 = $HTML2PDF_TABLEAU[$param['num']]['marge']['t'] + $HTML2PDF_TABLEAU[$param['num']]['marge']['b']; // minimum de hauteur à cause des marges + $h0+= $HTML2PDF_TABLEAU[$param['num']]['thead']['height'] + $HTML2PDF_TABLEAU[$param['num']]['tfoot']['height']; // et du tfoot et thead + $max = $this->pdf->h - $this->pdf->bMargin; // max de hauteur par page + $y = $HTML2PDF_TABLEAU[$param['num']]['curr_y']; // position Y actuelle + $height = $h0; + + // on va lire les hauteurs de chaque ligne, une à une, et voir si ca rentre sur la page. + for($k=0; $k la hauteur sur cette page est trouvée, et on passe à la page d'apres + if ($y+$h+$height>$max) + { + if ($height==$h0) $height = null; + $HTML2PDF_TABLEAU[$param['num']]['height'][] = $height; + $height = $h0; + $y = $this->margeTop; + } + $height+= $th; + } + // rajout du reste de tableau (si il existe) à la derniere page + if ($height!=$h0 || $k==0) $HTML2PDF_TABLEAU[$param['num']]['height'][] = $height; + } + else + { + if (count($HTML2PDF_TABLEAU[$param['num']]['tfoot']['code'])) + { + $tmp_tr = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']; + $tmp_td = $HTML2PDF_TABLEAU[$param['num']]['td_curr']; + $OLD_parse_pos = $this->parse_pos; + $OLD_parse_code = $this->parsing->code; + + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = $HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr'][0]; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = 0; + $this->parse_pos = 0; + $this->parsing->code = $HTML2PDF_TABLEAU[$param['num']]['tfoot']['code']; + $this->MakeHTMLcode(); + + $this->parse_pos = $OLD_parse_pos; + $this->parsing->code = $OLD_parse_code; + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = $tmp_tr; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = $tmp_td; + } + + // determination des coordonnées de sortie du tableau + $x = $HTML2PDF_TABLEAU[$param['num']]['curr_x'] + $HTML2PDF_TABLEAU[$param['num']]['width']; + if (count($HTML2PDF_TABLEAU[$param['num']]['height'])>1) + $y = $this->margeTop+$HTML2PDF_TABLEAU[$param['num']]['height'][count($HTML2PDF_TABLEAU[$param['num']]['height'])-1]; + else if (count($HTML2PDF_TABLEAU[$param['num']]['height'])==1) + $y = $HTML2PDF_TABLEAU[$param['num']]['curr_y']+$HTML2PDF_TABLEAU[$param['num']]['height'][count($HTML2PDF_TABLEAU[$param['num']]['height'])-1]; + else + $y = $HTML2PDF_TABLEAU[$param['num']]['curr_y']; + + // restauration des marges + $this->loadMargin(); + + // position de sortie du tableau + $this->pdf->setX($x); + $this->pdf->setY($y); + $this->maxX = max($this->maxX, $x); + $this->maxY = max($this->maxY, $y); + } + + return true; + } + + /** + * balise : TR + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_TR($param, $other = 'tr') + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + global $HTML2PDF_TABLEAU; + + // analyse du style + $this->style->save(); + $this->style->analyse($other, $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // positionnement dans le tableau + $HTML2PDF_TABLEAU[$param['num']]['tr_curr']++; + $HTML2PDF_TABLEAU[$param['num']]['td_curr']= 0; + + // si on est pas dans un sub_html + if (!$this->sub_part) + { + // Y courant apres la ligne + $ty=null; + for($ii=0; $ii nouvelle page + if (!$this->isInTfoot && $HTML2PDF_TABLEAU[$param['num']]['td_y'] + $HTML2PDF_TABLEAU[$param['num']]['marge']['b'] + $ty +$hfoot> $this->pdf->h - $this->pdf->bMargin) + { + if (count($HTML2PDF_TABLEAU[$param['num']]['tfoot']['code'])) + { + $tmp_tr = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']; + $tmp_td = $HTML2PDF_TABLEAU[$param['num']]['td_curr']; + $OLD_parse_pos = $this->parse_pos; + $OLD_parse_code = $this->parsing->code; + + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = $HTML2PDF_TABLEAU[$param['num']]['tfoot']['tr'][0]; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = 0; + $this->parse_pos = 0; + $this->parsing->code = $HTML2PDF_TABLEAU[$param['num']]['tfoot']['code']; + $this->isInTfoot = true; + $this->MakeHTMLcode(); + $this->isInTfoot = false; + + $this->parse_pos = $OLD_parse_pos; + $this->parsing->code = $OLD_parse_code; + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = $tmp_tr; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = $tmp_td; + } + + $HTML2PDF_TABLEAU[$param['num']]['new_page'] = true; + $this->setNewPage(); + + $HTML2PDF_TABLEAU[$param['num']]['page']++; + $HTML2PDF_TABLEAU[$param['num']]['curr_y'] = $this->pdf->getY(); + $HTML2PDF_TABLEAU[$param['num']]['td_y'] = $HTML2PDF_TABLEAU[$param['num']]['curr_y']+$HTML2PDF_TABLEAU[$param['num']]['marge']['t']; + + // si la hauteur de cette partie a bien été calculée, on trace le cadre + if (isset($HTML2PDF_TABLEAU[$param['num']]['height'][$HTML2PDF_TABLEAU[$param['num']]['page']])) + { + $old = $this->style->value; + $this->style->value = $HTML2PDF_TABLEAU[$param['num']]['style_value']; + + // initialisation du style des bordures de la premiere partie de tableau + $this->Rectangle( + $HTML2PDF_TABLEAU[$param['num']]['curr_x'], + $HTML2PDF_TABLEAU[$param['num']]['curr_y'], + $HTML2PDF_TABLEAU[$param['num']]['width'], + $HTML2PDF_TABLEAU[$param['num']]['height'][$HTML2PDF_TABLEAU[$param['num']]['page']], + $this->style->value['border'], + $this->style->value['padding'], + $HTML2PDF_TABLEAU[$param['num']]['cellspacing']*0.5, + $this->style->value['background'] + ); + + $this->style->value = $old; + } + } + + if ($HTML2PDF_TABLEAU[$param['num']]['new_page'] && count($HTML2PDF_TABLEAU[$param['num']]['thead']['code'])) + { + $HTML2PDF_TABLEAU[$param['num']]['new_page'] = false; + $tmp_tr = $HTML2PDF_TABLEAU[$param['num']]['tr_curr']; + $tmp_td = $HTML2PDF_TABLEAU[$param['num']]['td_curr']; + $OLD_parse_pos = $this->parse_pos; + $OLD_parse_code = $this->parsing->code; + + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = $HTML2PDF_TABLEAU[$param['num']]['thead']['tr'][0]; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = 0; + $this->parse_pos = 0; + $this->parsing->code = $HTML2PDF_TABLEAU[$param['num']]['thead']['code']; + $this->MakeHTMLcode(); + + $this->parse_pos = $OLD_parse_pos; + $this->parsing->code = $OLD_parse_code; + $HTML2PDF_TABLEAU[$param['num']]['tr_curr'] = $tmp_tr; + $HTML2PDF_TABLEAU[$param['num']]['td_curr'] = $tmp_td; + $HTML2PDF_TABLEAU[$param['num']]['new_page'] = true; + } + } + else + { + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1] = array(); + } + + return true; + } + + /** + * balise : TR + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TR($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + global $HTML2PDF_TABLEAU; + + // restauration du style + $this->style->load(); + $this->style->FontSet(); + + // si on est pas dans un sub_html + if (!$this->sub_part) + { + // Y courant apres la ligne + $ty=null; + for($ii=0; $iiforOneLine) return false; + + $this->maxH = 0; + global $HTML2PDF_TABLEAU; + + $param['cellpadding'] = $HTML2PDF_TABLEAU[$param['num']]['cellpadding'].'mm'; + $param['cellspacing'] = $HTML2PDF_TABLEAU[$param['num']]['cellspacing'].'mm'; + + if ($other=='li') + { + $special_li = true; + } + else + { + $special_li = false; + if ($other=='li_sub') + { + $param['style']['border'] = 'none'; + $param['style']['background-color'] = 'transparent'; + $param['style']['background-image'] = 'none'; + $param['style']['background-position'] = ''; + $param['style']['background-repeat'] = ''; + $other = 'li'; + } + } + + // est-on en collapse + $collapse = false; + if (in_array($other, array('td', 'th'))) + $collapse = isset($this->style->value['border']['collapse']) ? $this->style->value['border']['collapse'] : false; + + + // analyse du style + $this->style->save(); + $this->style->analyse($other, $param); + + if ($special_li) + { + $this->style->value['width']-= $this->style->ConvertToMM($this->listeGetWidth()); + $this->style->value['width']-= $this->style->ConvertToMM($this->listeGetPadding()); + } + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // si on est en collapse : modification du style + if ($collapse) + { + if (!$this->sub_part) + { + if ($HTML2PDF_TABLEAU[$param['num']]['tr_curr']>1 && !$HTML2PDF_TABLEAU[$param['num']]['new_page']) + $this->style->value['border']['t'] = $this->style->readBorder('none'); + } + + if ($HTML2PDF_TABLEAU[$param['num']]['td_curr']>0) + $this->style->value['border']['l'] = $this->style->readBorder('none'); + } + + $marge = array(); + $marge['t'] = $this->style->value['padding']['t']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['t']['width']; + $marge['r'] = $this->style->value['padding']['r']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['r']['width']; + $marge['b'] = $this->style->value['padding']['b']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['b']['width']; + $marge['l'] = $this->style->value['padding']['l']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['l']['width']; + + // si on est dans un sub_html + if ($this->sub_part) + { + // on se positionne dans le tableau + $HTML2PDF_TABLEAU[$param['num']]['td_curr']++; + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1] = array(); + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['w'] = 0; + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['h'] = 0; + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['dw'] = 0; + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['colspan'] = isset($param['colspan']) ? $param['colspan'] : 1; + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['rowspan'] = isset($param['rowspan']) ? $param['rowspan'] : 1; + + // on extrait tout ce qui est contenu dans le TD + $res = $this->parsing->getLevel($this->temp_pos); + + // on en créé un sous HTML que l'on transforme en PDF + // pour analyse les dimensions + // et les récupérer dans le tableau global. + $this->CreateSubHTML($this->sub_html); + $this->sub_html->writeHTML($res[1]); + $this->temp_pos = $res[0]-2; + } + else + { + // on se positionne dans le tableau + $HTML2PDF_TABLEAU[$param['num']]['td_curr']++; + $HTML2PDF_TABLEAU[$param['num']]['td_x']+= $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['dw']; + + // initialisation du style des bordures de la premiere partie de tableau + $this->Rectangle( + $HTML2PDF_TABLEAU[$param['num']]['td_x'], + $HTML2PDF_TABLEAU[$param['num']]['td_y'], + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['w'], + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['h'], + $this->style->value['border'], + $this->style->value['padding'], + $HTML2PDF_TABLEAU[$param['num']]['cellspacing']*0.5, + $this->style->value['background'] + ); + + + $this->style->value['width'] = $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['w'] - $marge['l'] - $marge['r']; + + // limitation des marges aux dimensions de la case + $mL = $HTML2PDF_TABLEAU[$param['num']]['td_x']+$marge['l']; + $mR = $this->pdf->w - $mL - $this->style->value['width']; + $this->saveMargin($mL, 0, $mR); + + // positionnement en fonction + $h_corr = $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['h']; + $h_reel = $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['real_h']; + switch($this->style->value['vertical-align']) + { + case 'bottom': + $y_corr = $h_corr-$h_reel; + break; + + case 'middle': + $y_corr = ($h_corr-$h_reel)*0.5; + break; + + case 'top': + default: + $y_corr = 0; + break; + } + + $this->pdf->setX($HTML2PDF_TABLEAU[$param['num']]['td_x']+$marge['l']); + $this->pdf->setY($HTML2PDF_TABLEAU[$param['num']]['td_y']+$marge['t']+$y_corr); + $this->setNewPositionForNewLine(); + } + + return true; + } + + /** + * balise : TD + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TD($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + global $HTML2PDF_TABLEAU; + + // récupération de la marge + $marge = array(); + $marge['t'] = $this->style->value['padding']['t']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['t']['width']; + $marge['r'] = $this->style->value['padding']['r']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['r']['width']; + $marge['b'] = $this->style->value['padding']['b']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['b']['width']; + $marge['l'] = $this->style->value['padding']['l']+0.5*$HTML2PDF_TABLEAU[$param['num']]['cellspacing']+$this->style->value['border']['l']['width']; + $marge['t']+= 0.01; + $marge['r']+= 0.01; + $marge['b']+= 0.01; + $marge['l']+= 0.01; + + // si on est dans un sub_html + if ($this->sub_part) + { + if ($this->testTDin1page && $this->sub_html->pdf->page>1) HTML2PDF::makeError(7, __FILE__, __LINE__); + + // dimentions de cette case + $w0 = $this->sub_html->maxX + $marge['l'] + $marge['r']; + $h0 = $this->sub_html->maxY + $marge['t'] + $marge['b']; + + // dimensions imposées par le style + $w2 = $this->style->value['width'] + $marge['l'] + $marge['r']; + $h2 = $this->style->value['height'] + $marge['t'] + $marge['b']; + + // dimension finale de la case = max des 2 ci-dessus + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['w'] = max(array($w0, $w2)); + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['h'] = max(array($h0, $h2)); + + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['real_w'] = $w0; + $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['real_h'] = $h0; + + // suppresion du sous_html + $this->DestroySubHTML(); + } + else + { + $this->loadMargin(); + //positionnement + $HTML2PDF_TABLEAU[$param['num']]['td_x']+= $HTML2PDF_TABLEAU[$param['num']]['cases'][$HTML2PDF_TABLEAU[$param['num']]['tr_curr']-1][$HTML2PDF_TABLEAU[$param['num']]['td_curr']-1]['w']; + } + + // restauration du style + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + function calculTailleCases(&$cases) + { + // construction d'un tableau de correlation + $corr = array(); + + // on fait correspondre chaque case d'un tableau normé aux cases réelles, en prennant en compte les colspan et rowspan + $Yr=0; + for($y=0; $y0) ? '' : array($x, $y, $cases[$y][$x]['colspan'], $cases[$y][$x]['rowspan']); + } + } + $Xr+= $cases[$y][$x]['colspan']; + while(isset($corr[$Yr][$Xr])) $Xr++; + } + $Yr++; + } + + if (!isset($corr[0])) return true; + + // on détermine, pour les cases sans colspan, la largeur maximale de chaque colone + $sw = array(); + for($x=0; $x1) + { + // somme des colonnes correspondant au colspan + $s = 0; for($i=0; $i<$corr[$y][$x][2]; $i++) $s+= $sw[$x+$i]; + + // si la somme est inférieure à la taille necessaire => règle de 3 pour adapter + if ($s>0 && $s<$cases[$corr[$y][$x][1]][$corr[$y][$x][0]]['w']) + for($i=0; $i<$corr[$y][$x][2]; $i++) + $sw[$x+$i] = $sw[$x+$i]/$s*$cases[$corr[$y][$x][1]][$corr[$y][$x][0]]['w']; + } + } + } + + // on applique les nouvelles largeurs + for($x=0; $x1) + { + // somme des colonnes correspondant au colspan + $s = 0; for($i=0; $i<$corr[$y][$x][3]; $i++) $s+= $sh[$y+$i]; + + // si la somme est inférieure à la taille necessaire => règle de 3 pour adapter + if ($s>0 && $s<$cases[$corr[$y][$x][1]][$corr[$y][$x][0]]['h']) + for($i=0; $i<$corr[$y][$x][3]; $i++) + $sh[$y+$i] = $sh[$y+$i]/$s*$cases[$corr[$y][$x][1]][$corr[$y][$x][0]]['h']; + } + } + } + + + // on applique les nouvelles hauteurs + for($y=0; $yforOneLine) return false; + + $this->maxH = 0; + // identique à TD mais en gras + if (!isset($param['style']['font-weight'])) $param['style']['font-weight'] = 'bold'; + $this->o_TD($param, 'th'); + + return true; + } + + /** + * balise : TH + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TH($param) + { + if ($this->forOneLine) return false; + + $this->maxH = 0; + // identique à TD + $this->c_TD($param); + + return true; + } + + /** + * balise : IMG + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_IMG($param) + { + // analyse du style + $src = str_replace('&', '&', $param['src']); + + $this->style->save(); + $this->style->value['width'] = 0; + $this->style->value['height'] = 0; + $this->style->value['border'] = array( + 'type' => 'none', + 'width' => 0, + 'color' => array(0, 0, 0), + ); + $this->style->value['background'] = array( + 'color' => null, + 'image' => null, + 'position' => null, + 'repeat' => null + ); + $this->style->analyse('img', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // affichage de l'image + $this->Image($src, isset($param['sub_li'])); + + // restauration du style + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : SELECT + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_SELECT($param) + { + // preparation du champs + if (!isset($param['name'])) $param['name'] = 'champs_pdf_'.(count($this->lstChamps)+1); + + $param['name'] = strtolower($param['name']); + + if (isset($this->champs[$param['name']])) + $this->champs[$param['name']]++; + else + $this->champs[$param['name']] = 1; + + $this->style->save(); + $this->style->analyse('select', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + $this->lstSelect = array(); + $this->lstSelect['name'] = $param['name']; + $this->lstSelect['multi'] = isset($param['multiple']) ? true : false; + $this->lstSelect['size'] = isset($param['size']) ? $param['size'] : 1; + $this->lstSelect['options'] = array(); + + if ($this->lstSelect['multi'] && $this->lstSelect['size']<3) $this->lstSelect['size'] = 3; + + return true; + } + + /** + * balise : OPTION + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_OPTION($param) + { + // on extrait tout ce qui est contenu dans l'option + $res = $this->parsing->getLevel($this->parse_pos); + $this->parse_pos = $res[0]-2; + $texte = $res[1]; + $value = isset($param['value']) ? $param['value'] : 'auto_opt_'.(count($this->lstSelect)+1); + + $this->lstSelect['options'][$value] = $texte; + + return true; + } + + /** + * balise : OPTION + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_OPTION($param) { return true; } + + /** + * balise : SELECT + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_SELECT() + { + // position d'affichage + $x = $this->pdf->getX(); + $y = $this->pdf->getY(); + $f = 1.08*$this->style->value['font-size']; + + $w = $this->style->value['width']; if (!$w) $w = 50; + $h = ($f*1.07*$this->lstSelect['size'] + 1); + $prop = array(); + if ($this->lstSelect['multi']) $prop['multipleSelection'] = true; + $this->pdf->form_Select($this->lstSelect['name'], $x, $y, $w, $h, $this->lstSelect['options'], $this->lstSelect['size']>1, $prop); + + $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + $this->maxH = max($this->maxH, $h); + $this->pdf->setX($x+$w); + + $this->style->load(); + $this->style->FontSet(); + + $this->lstSelect = array(); + + return true; + } + + /** + * balise : TEXTAREA + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_TEXTAREA($param) + { + // preparation du champs + if (!isset($param['name'])) $param['name'] = 'champs_pdf_'.(count($this->lstChamps)+1); + + $param['name'] = strtolower($param['name']); + + if (isset($this->champs[$param['name']])) + $this->champs[$param['name']]++; + else + $this->champs[$param['name']] = 1; + + $this->style->save(); + $this->style->analyse('textarea', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + // position d'affichage + $x = $this->pdf->getX(); + $y = $this->pdf->getY(); + $fx = 0.65*$this->style->value['font-size']; + $fy = 1.08*$this->style->value['font-size']; + + // on extrait tout ce qui est contenu dans le textarea + $res = $this->parsing->getLevel($this->parse_pos); + $this->parse_pos = $res[0]-2; + $texte = $res[1]; + + $w = $fx*(isset($param['cols']) ? $param['cols'] : 22)+1; + $h = $fy*1.07*(isset($param['rows']) ? $param['rows'] : 3)+3; + +// if ($this->style->value['width']) $w = $this->style->value['width']; +// if ($this->style->value['height']) $h = $this->style->value['height']; + + $prop = array(); + $prop['value'] = $texte; + $prop['multiline'] = true; + + $this->pdf->form_InputText($param['name'], $x, $y, $w, $h, $prop); + + $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + $this->maxH = max($this->maxH, $h); + $this->pdf->setX($x+$w); + + return true; + } + + /** + * balise : TEXTAREA + * mode : FERMETURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function c_TEXTAREA() + { + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + /** + * balise : INPUT + * mode : OUVERTURE + * + * @param array paramètres de l'élément de parsing + * @return null + */ + function o_INPUT($param) + { + // preparation du champs + if (!isset($param['name'])) $param['name'] = 'champs_pdf_'.(count($this->lstChamps)+1); + if (!isset($param['value'])) $param['value'] = ''; + if (!isset($param['type'])) $param['type'] = 'text'; + + $param['name'] = strtolower($param['name']); + $param['type'] = strtolower($param['type']); + + if (!in_array($param['type'], array('text', 'checkbox', 'radio', 'hidden', 'submit', 'reset', 'button'))) $param['type'] = 'text'; + + if (isset($this->champs[$param['name']])) + $this->champs[$param['name']]++; + else + $this->champs[$param['name']] = 1; + + $this->style->save(); + $this->style->analyse('input', $param); + $this->style->setPosition($this->pdf->x, $this->pdf->y); + $this->style->FontSet(); + + $name = $param['name']; + + // position d'affichage + $x = $this->pdf->getX(); + $y = $this->pdf->getY(); + $f = 1.08*$this->style->value['font-size']; + + switch($param['type']) + { + case 'checkbox': + $w = 3; + $h = $w; + if ($h<$f) $y+= ($f-$h)*0.5; + $this->pdf->form_InputCheckBox($name, $x, $y, $w, isset($param['checked'])); + break; + + case 'radio': + $w = 3; + $h = $w; + if ($h<$f) $y+= ($f-$h)*0.5; + $this->pdf->form_InputRadio($name, $x, $y, $w); + break; + + case 'hidden': + $w = 0; + $h = 0; + $this->pdf->form_InputHidden($name, $param['value']); + break; + + case 'text': + $w = $this->style->value['width']; if (!$w) $w = 40; + $h = $f*1.3; + $prop = array(); + $prop['value'] = $param['value']; + $this->pdf->form_InputText($name, $x, $y, $w, $h, $prop); + break; + + case 'submit': + case 'reset': + case 'button': + $action = isset($param['onclick']) ? $param['onclick'] : ''; + $w = $this->style->value['width']; if (!$w) $w = 40; + $h = $this->style->value['height']; if (!$h) $h = $f*1.3; + $prop = array(); + $this->pdf->form_InputButton($name, $x, $y, $w, $h, $param['value'], $action, $prop); + break; + + default: + $w = 0; + $h = 0; + break; + } + + $this->maxX = max($this->maxX, $x+$w); + $this->maxY = max($this->maxY, $y+$h); + $this->maxH = max($this->maxH, $h); + $this->pdf->setX($x+$w); + + $this->style->load(); + $this->style->FontSet(); + + return true; + } + + function textLOAD($langue) + { + if (!preg_match('/^([a-z0-9]+)$/isU', $langue)) + { + echo 'ERROR : language code '.$langue.' incorrect.'; + exit; + } + + $file = dirname(__FILE__).'/langues/'.strtolower($langue).'.txt'; + if (!is_file($file)) + { + echo 'ERROR : language code '.$langue.' unknown.
'; + echo 'You can create the translation file '.$file.' and send it to me in order to integrate it into a future version.'; + exit; + } + + $texte = array(); + $infos = file($file); + foreach($infos as $val) + { + $val = trim($val); + $val = explode("\t", $val); + if (count($val)<2) continue; + + $t_k = trim($val[0]); unset($val[0]); + $t_v = trim(implode(' ', $val)); + if ($t_k && $t_v) $texte[$t_k] = $t_v; + } + global $HTML2PDF_TEXTE_FILE; + $HTML2PDF_TEXTE_FILE = $texte; + } + + function textGET($key) + { + global $HTML2PDF_TEXTE_FILE; + if (!isset($HTML2PDF_TEXTE_FILE[$key])) return '######'; + + return $HTML2PDF_TEXTE_FILE[$key]; + } + + function makeError($err, $file, $line, $other = null) + { + $msg = ''; + switch($err) + { + case 1: + $msg = (HTML2PDF::textGET('err01')); + $msg = str_replace('[[OTHER]]', $other, $msg); + break; + + case 2: + $msg = (HTML2PDF::textGET('err02')); + $msg = str_replace('[[OTHER_0]]', $other[0], $msg); + $msg = str_replace('[[OTHER_1]]', $other[1], $msg); + $msg = str_replace('[[OTHER_2]]', $other[2], $msg); + break; + + case 3: + $msg = (HTML2PDF::textGET('err03')); + $msg = str_replace('[[OTHER]]', $other, $msg); + break; + + case 4: + $msg = (HTML2PDF::textGET('err04')); + $msg = str_replace('[[OTHER]]', print_r($other, true), $msg); + break; + + case 5: + $msg = (HTML2PDF::textGET('err05')); + $msg = str_replace('[[OTHER]]', print_r($other, true), $msg); + break; + + case 6: + $msg = (HTML2PDF::textGET('err06')); + $msg = str_replace('[[OTHER]]', $other, $msg); + break; + + case 7: + $msg = (HTML2PDF::textGET('err07')); + break; + } + echo ''.(HTML2PDF::textGET('txt01')).$err.'
'; + echo (HTML2PDF::textGET('txt02')).' '.$file.'
'; + echo (HTML2PDF::textGET('txt03')).' '.$line.'
'; + echo '
'; + echo $msg; + exit; + } + } +} + diff --git a/includes/html2pdf/langues/ca.txt b/includes/html2pdf/langues/ca.txt new file mode 100644 index 000000000..099071d4c --- /dev/null +++ b/includes/html2pdf/langues/ca.txt @@ -0,0 +1,19 @@ +err01 L'etiqueta <[[OTHER]]> encara no existeix.

Si voleu afegir-la, heu de crear els mètodes o_[[OTHER]] (per l'obertura) i c_[[OTHER]] (pel tancament) seguint el model de les etiquetes existents.

A més, si creeu nous mètodes, envieu-ho a webmaster@spipu.net per tal d'afegir-los a les següents versions d'HTML2PDF, i que tothom en pugui gaudir. +err02 Frase de 1000 línies => massa llarga
Frase : [[OTHER_0]]
Mida casella : [[OTHER_1]]
Mida text : [[OTHER_2]]
+err03 Codi HTML no vàlid, una etiqueta té un tancament de més : <[[OTHER]]> +err04 Codi HTML no vàlid, les etiquetes no estan tancades en l'ordre correcte.
Estat :
[[OTHER]]
+err05 Codi HTML no vàlid, totes les etiquetes han de tenir el seu tancament.
Estat :
[[OTHER]]
+err06 Impossible carregar la imatge [[OTHER]] +err07 El contenido de una etiqueta TD no encaja en una sola página +txt01 ERROR n° +txt02 Fitxer : +txt03 Línia : +pdf01 Document generat el [[date_d]]/[[date_m]]/[[date_y]] +pdf02 Document generat a les [[date_h]]:[[date_i]] +pdf03 Document generat el [[date_d]]/[[date_m]]/[[date_y]] a les [[date_h]]:[[date_i]] +pdf04 Pàgina [[current]]/[[nb]] +pdf05 Els formularis requereixen l'ús de l'Adobe Reader 9 +vue01 ENCABEZAR +vue02 PEU DE PÀGINA +vue03 PÀGINA +vue04 Visualització diff --git a/includes/html2pdf/langues/de.txt b/includes/html2pdf/langues/de.txt new file mode 100644 index 000000000..a241f0619 --- /dev/null +++ b/includes/html2pdf/langues/de.txt @@ -0,0 +1,19 @@ +err01 Das Tag <[[OTHER]]> existiert noch nicht.

Wenn Sie es hinzufügen möchten, sollen Sie die Methodeno_[[OTHER]] (zu öffnen) und c_[[OTHER]] (zu schließen) nach dem Modell den existierenden Tags.

Wenn Sie diese Methoden außerdem aufbauen, bitte teilen Sie sie duch eine E-Mail an meine Adresse : webmaster@spipu.net, so daß sie künftig in die nächste Version von HTML2PDF erscheinen. +err02 1000-Linien Satz => zu lang
Satz : [[OTHER_0]]
Breite des Eingabefelds : [[OTHER_1]]
Länge des Texts : [[OTHER_2]]
+err03 Falsches HTML Code, überzähliges geschloßene Tag : <[[OTHER]]> +err04 Falsches HTML Code, die Tags sind nicht in richtiger Ordnung geschloßen.
Status :
[[OTHER]]
+err05 Falsches HTML Code, alle Tags sollen geschloßen sein.
Status :
[[OTHER]]
+err06 Ladung des Bilds unmöglich [[OTHER]] +err07 Er Inhalt eines TD-Tag passt nicht nur auf einer Seite +txt01 Fehler n° +txt02 Datei : +txt03 Linie : +pdf01 Datei aufgebaut am [[date_d]]/[[date_m]]/[[date_y]] +pdf02 Datei aufgebaut um [[date_h]]:[[date_m]] +pdf03 Datei aufgebaut am [[date_d]]/[[date_m]]/[[date_y]] um [[date_h]]:[[date_i]] +pdf04 Seite [[current]]/[[nb]] +pdf05 Die Formulare benötigen Sie den Adobe Reader 9 +vue01 Seite-Header +vue02 Fußzeile +vue03 Seite +vue04 Visualisierung diff --git a/includes/html2pdf/langues/en.txt b/includes/html2pdf/langues/en.txt new file mode 100644 index 000000000..ce31fce62 --- /dev/null +++ b/includes/html2pdf/langues/en.txt @@ -0,0 +1,19 @@ +err01 The tag <[[OTHER]]> does not yet exist.

If you want to add it, you must create the methods o_[[OTHER]] (for opening) and c_[[OTHER]] (for closure) by following the model of existing tags.

If you create these methods, do not hesitate to send me an email to webmaster@spipu.net to included them in the next version of HTML2PDF. +err02 Sentence of 1000 lines => too long
Sentence : [[OTHER_0]]
Width box : [[OTHER_1]]
Length text : [[OTHER_2]]
+err03 HTML code invalid, a tag is closed too many times: <[[OTHER]]> +err04 HTML code invalid, the tags are not closed in an orderly fashion.
Status :
[[OTHER]]
+err05 HTML code invalid, all tags must be closed.
Status :
[[OTHER]]
+err06 Impossible to load the image [[OTHER]] +err07 The content of a TD tag does not fit on only one page +txt01 ERROR n° +txt02 File : +txt03 Line : +pdf01 Document generated on [[date_y]]-[[date_m]]-[[date_d]] +pdf02 Document generated at [[date_h]]:[[date_i]] +pdf03 Document generated on [[date_y]]-[[date_m]]-[[date_d]] at [[date_h]]:[[date_i]] +pdf04 Page [[current]]/[[nb]] +pdf05 The forms require the use of Adobe Reader 9 +vue01 HEADER +vue02 FOOTER +vue03 PAGE +vue04 View diff --git a/includes/html2pdf/langues/es.txt b/includes/html2pdf/langues/es.txt new file mode 100644 index 000000000..b2bdf7d8a --- /dev/null +++ b/includes/html2pdf/langues/es.txt @@ -0,0 +1,19 @@ +err01 La etiqueta <[[OTHER]]> todavía no existe.

Si quiere añadirla, debe crear los métodos o_[[OTHER]] (para la apertura) y c_[[OTHER]] (para el cierre) siguiendo el modelo de las etiquetas existentes.

Si crea nuevos métodos, envíelos a webmaster@spipu.net para añadirlos a las siguientes versiones de HTML2PDF, y que todo el mundo se pueda beneficiar. +err02 Frase de 1000 líneas => demasiado larga
Frase : [[OTHER_0]]
Tamaño casilla : [[OTHER_1]]
Tamaño texto : [[OTHER_2]]
+err03 Código HTML no válido, una etiqueta tiene un cierre de más : <[[OTHER]]> +err04 Código HTML no válido, las etiquetas no estan cerradas en el orden correcto.
Estado :
[[OTHER]]
+err05 Código HTML no válido, todas las etiquetas deben tener su cierre.
Estado :
[[OTHER]]
+err06 Imposible cargar la imagen [[OTHER]] +err07 El contenido de una etiqueta TD no encaja en una sola página +txt01 ERROR n° +txt02 Fichero : +txt03 Línea : +pdf01 Documento generado el [[date_d]]/[[date_m]]/[[date_y]] +pdf02 Documento generado a las [[date_h]]:[[date_i]] +pdf03 Documento generado el [[date_d]]/[[date_m]]/[[date_y]] a las [[date_h]]:[[date_i]] +pdf04 Página [[current]]/[[nb]] +pdf05 Los formularios requieren el uso de Adobe Reader 9 +vue01 ENCABEZADO +vue02 PIE DE PÁGINA +vue03 PÁGINA +vue04 Visualización diff --git a/includes/html2pdf/langues/fr.txt b/includes/html2pdf/langues/fr.txt new file mode 100644 index 000000000..0c9ced6c7 --- /dev/null +++ b/includes/html2pdf/langues/fr.txt @@ -0,0 +1,19 @@ +err01 La balise <[[OTHER]]> n'existe pas encore.

Si vous voulez la rajouter, vous devez créer les méthodes o_[[OTHER]] (pour l'ouverture) et c_[[OTHER]] (pour la fermeture) en suivant le modèle des balises existantes.

De plus, si vous créez ces méthodes, n'hésitez pas à en faire profiter tout le monde en m'écrivant sur webmaster@spipu.net afin qu'elles se retrouvent dans la prochaine version d'HTML2PDF. +err02 Phrase de 1000 lignes => trop long
Phrase : [[OTHER_0]]
Largeur case : [[OTHER_1]]
Longueur text : [[OTHER_2]]
+err03 Code HTML non valide, une balise est fermée en trop : <[[OTHER]]> +err04 Code HTML non valide, les balises ne sont pas fermées dans le bon ordre.
Etat :
[[OTHER]]
+err05 Code HTML non valide, toutes les balises doivent être fermées.
Etat :
[[OTHER]]
+err06 Impossible de charger l'image [[OTHER]] +err07 le contenu d'une balise TD ne rentre pas sur une seule page +txt01 ERREUR n° +txt02 Fichier : +txt03 Ligne : +pdf01 Document généré le [[date_d]]/[[date_m]]/[[date_y]] +pdf02 Document généré à [[date_h]]:[[date_i]] +pdf03 Document généré le [[date_d]]/[[date_m]]/[[date_y]] à [[date_h]]:[[date_i]] +pdf04 Page [[current]]/[[nb]] +pdf05 Les formulaires nécessitent l'utilisation de Adobe Reader 9 +vue01 HEADER +vue02 FOOTER +vue03 PAGE +vue04 Restitution diff --git a/includes/html2pdf/langues/it.txt b/includes/html2pdf/langues/it.txt new file mode 100644 index 000000000..b5c029c45 --- /dev/null +++ b/includes/html2pdf/langues/it.txt @@ -0,0 +1,19 @@ +err01 Il tag <[[OTHER]]> non esiste ancora.

Se si desidera aggiungere, è necessario creare metodi o_[[OTHER]] (di apertura) e C_[[OTHER]] (per la chiusura) secondo il modello esistente di tag.

Inoltre, se si creare questi metodi, non esitate a portare il mondo intero ha scritto su webmaster@spipu.net in modo che alla fine nella prossima versione di HTML2PDF. +err02 Citazione di 1000 linee => troppo lungo
frase : [[OTHER_0]]
casella Larghezza : [[OTHER_1]]
Lunghezza testo : [[OTHER_2]]
+err03 HTML non valido, un tag è chiusa troppo <[[OTHER]]> +err04 HTML non validi, i tag non sono chiusi nel corretto ordine.
Stato :
[[OTHER]]
+err05 HTML non valido, tutte le tag deve essere chiuso.
Stato :
[[OTHER]]
+err06 Impossibile caricare l'immagine [[OTHER]] +err07 il contenuto di un tag TD non rientra in una sola pagina +txt01 ERRORE n° +txt02 File : +txt03 Linea : +pdf01 Documento generato il [[date_d]]/[[date_m]]/[[date_y]] +pdf02 Documento generato [[date_h]]:[[date_i]] +pdf03 Documento generato il [[date_d]]/[[date_m]]/[[date_y]] nel [[date_h]]:[[date_i]] +pdf04 Pagina [[current]]/[[nb]] +pdf05 I moduli richiedono l'uso di Adobe Reader 9 +vue01 HEADER +vue02 FOOTER +vue03 PAGINA +vue04 Visualization diff --git a/includes/html2pdf/langues/nl.txt b/includes/html2pdf/langues/nl.txt new file mode 100644 index 000000000..18b82a11d --- /dev/null +++ b/includes/html2pdf/langues/nl.txt @@ -0,0 +1,19 @@ +err01 De tag <[[OTHER]]> bestaat nog niet.

Om deze toe te voegen, gebruik de methods o_[[OTHER]] (om te openen) en c_[[OTHER]] (om te sluiten) volgens het model van de bestaande tags.

Als u deze methods maakt, stuur deze dan a.u.b. via e-mail naar webmaster@spipu.net voor opname in de volgende versie van HTML2PDF. +err02 Zin van 1000 regels => te lang
Zin : [[OTHER_0]]
Kaderbreedte : [[OTHER_1]]
Tekstlengte : [[OTHER_2]]
+err03 Ongeldige HTML code, overvloedig afgesloten tag : <[[OTHER]]> +err04 Ongeldige HTML code, de tags zijn niet correct afgesloten.
Status :
[[OTHER]]
+err05 Ongeldige HTML code, alle tags dienen te zijn gesloten.
Status :
[[OTHER]]
+err06 Kan afbeelding niet laden: [[OTHER]] +err07 De inhoud van de cel () past niet op een pagina +txt01 Fout nr +txt02 Bestand : +txt03 Regel : +pdf01 Document gemaakt op [[date_d]]-[[date_m]]-[[date_y]] +pdf02 Document gemaakt om [[date_h]]:[[date_i]] +pdf03 Document gemaakt op [[date_d]]-[[date_m]]-[[date_y]] om [[date_h]]:[[date_i]] +pdf04 Pagina [[current]] van [[nb]] +pdf05 De formulieren vereisen het gebruik van Adobe Reader 9 +vue01 Paginakop +vue02 Paginavoet +vue03 Pagina +vue04 Bekijken diff --git a/includes/html2pdf/langues/pt.txt b/includes/html2pdf/langues/pt.txt new file mode 100644 index 000000000..0bd6bef75 --- /dev/null +++ b/includes/html2pdf/langues/pt.txt @@ -0,0 +1,19 @@ +err01 A tag <[[OTHER]]> ainda não existe.

Se você quer inserí-la, deve criar os métodos o_[[OTHER]] (para abrí-la) e c_[[OTHER]] (para fechá-la) seguindo o modelo das tags existentes.

Se você criar novos métodos, os envie para webmaster@spipu.net para que as próximas versões de HTML2PDF, e o restante do mundo se beneficie com isso. +err02 Frase de 1000 linhas => muito grande
Frase : [[OTHER_0]]
Tamanho do quadro : [[OTHER_1]]
Tamanho do texto : [[OTHER_2]]
+err03 Código HTML não válido, uma tag está com fechamento sobrando : <[[OTHER]]> +err04 Código HTML não válido, as tags não estão fechadas na ordem correta.
Estado :
[[OTHER]]
+err05 Código HTML não válido, todas as tags devem ser fechadas.
Estado :
[[OTHER]]
+err06 Impossível carregar imagem [[OTHER]] +err07 O conteúdo de uma tag TD não se encaixa em apenas uma página +txt01 ERRO n° +txt02 Arquivo : +txt03 Linha : +pdf01 Documento generado em [[date_d]]/[[date_m]]/[[date_y]] +pdf02 Documento generado às [[date_h]]:[[date_i]] +pdf03 Documento generado em [[date_d]]/[[date_m]]/[[date_y]] às [[date_h]]:[[date_i]] +pdf04 Página [[current]]/[[nb]] +pdf05 Os formulários exigem a utilização do Adobe Reader 9 +vue01 CABEÇALHO +vue02 RODAPÉ +vue03 PÁGINA +vue04 Visualização diff --git a/includes/html2pdf/langues/tr.txt b/includes/html2pdf/langues/tr.txt new file mode 100644 index 000000000..3a239c736 --- /dev/null +++ b/includes/html2pdf/langues/tr.txt @@ -0,0 +1,19 @@ +err01 <[[OTHER]]> etiketi bulunamadý.

Eklemek isterseniz, o_[[OTHER]] þeklinde açýp, c_[[OTHER]] þeklinde kapatabilirsiniz.

Bu þekilde etiketler üretirseniz lütfen daha sonraki HTML2PDF versiyonuna eklenmek üzere bana gönderin. ( webmaster@spipu.net ). +err02 Ýçerik 1000 satýrdan fazla ve gerekenden uzun
Konu : [[OTHER_0]]
Geniþlik : [[OTHER_1]]
Yazý boyutu : [[OTHER_2]]
+err03 HTML kodu hatalý, etiket birden fazla defa kapatýlmýþ: <[[OTHER]]> +err04 HTML kodu hatalý, etiketler gereken düzen içinde kapatýlmamýþ.
Durum :
[[OTHER]]
+err05 HTML kodu hatalý, bütün etiketler kapatýlmalý.
Durum :
[[OTHER]]
+err06 Resim dosyasý okunamýyor [[OTHER]] +err07 TD içeriði bir sayfaya sýðmýyor +txt01 HATA n° +txt02 Dosya : +txt03 Satýr : +pdf01 Doküman üretilme tarihi [[date_y]]-[[date_m]]-[[date_d]] +pdf02 Doküman üretilme tarihi [[date_h]]:[[date_i]] +pdf03 Doküman üretilme tarihi [[date_y]]-[[date_m]]-[[date_d]] saati [[date_h]]:[[date_i]] +pdf04 Sayfa [[current]]/[[nb]] +pdf05 Adobe Reader 9 gerektirir +vue01 DOSYA ÜSTÜ +vue02 DOSYA ALTI +vue03 SAYFA +vue04 Görünüm diff --git a/includes/html2pdf/parsingHTML.class.php b/includes/html2pdf/parsingHTML.class.php new file mode 100644 index 000000000..3f0274505 --- /dev/null +++ b/includes/html2pdf/parsingHTML.class.php @@ -0,0 +1,421 @@ + PDF, utilise fpdf de Olivier PLATHEY + * Distribué sous la licence LGPL. + * + * @author Laurent MINGUET + * @version 3.22a - 15/06/2009 + */ + +if (!defined('__CLASS_PARSINGHTML__')) +{ + define('__CLASS_PARSINGHTML__', true); + + class parsingHTML + { + var $html = ''; // code HTML à parser + var $code = array(); // code HTML parsé + var $num = 0; // numéro de table + var $level = 0; // niveaux de table + + /** + * Constructeur + * + * @return null + */ + function parsingHTML() + { + $this->num = 0; + $this->level = array($this->num); + $this->html = ''; + $this->code = array(); + } + + /** + * Définir le code HTML à parser + * + * @param string code html + * @return null + */ + function setHTML($html) + { + $html = preg_replace('//isU', '', $html); + $this->html = $html; + } + + /** + * parser le code HTML + * + * @return null + */ + function parse() + { + $parents = array(); + // récupérer le code à parser + $content = $this->html; + + // chercher les balises HTML du code + $tmp = array(); + $this->searchCode($content, $tmp); + + // identifier les balises une à une + $pre_in = false; + $pre_br = array( + 'name' => 'br', + 'close' => false, + 'param' => array( + 'style' => array(), + 'num' => 0 + ) + ); + + $todos = array(); + foreach($tmp as $part) + { + // si c'est un texte + if ($part[0]=='txt') + { + // enregistrer l'action correspondante + if (!$pre_in) + { + if (trim($part[1])!=='') + { + // remplacer tous les espaces, tabulations, saufs de ligne multiples par de simples espaces + $part[1] = preg_replace('/([\s]+)/is', ' ', $part[1]); + + $todos[] = array( + 'name' => 'write', + 'close' => false, + 'param' => array('txt' => $part[1]), + ); + } + } + else + { + $part[1] = str_replace("\r", '', $part[1]); + $part[1] = explode("\n", $part[1]); + + foreach($part[1] as $k => $txt) + { + $txt = str_replace("\t", ' ', $txt); + $txt = str_replace(' ', ' ', $txt); + if ($k>0) $todos[] = $pre_br; + + $todos[] = array( + 'name' => 'write', + 'close' => false, + 'param' => array('txt' => $txt), + ); + } + } + } + // sinon, analyser le code + else + { + $res = $this->analiseCode($part[1]); + if ($res) + { + if (!in_array($res['name'], array('br', 'hr', 'img', 'input', 'link', 'option'))) + { + if ($res['close']) + { + if (count($parents)<1) + HTML2PDF::makeError(3, __FILE__, __LINE__, $res['name']); + else if ($parents[count($parents)-1]!=$res['name']) + HTML2PDF::makeError(4, __FILE__, __LINE__, $parents); + else + unset($parents[count($parents)-1]); + } + else + { + $parents[count($parents)] = $res['name']; + } + } + if ($res['name']=='pre' || $res['name']=='code') + { + $pre_in = !$res['close']; + } + $todos[] = $res; + } + } + } + + // pour chaque action identifiée, il faut nettoyer le début et la fin des textes + // en fonction des balises qui l'entourent. + $nb = count($todos); + for($k=0; $k<$nb; $k++) + { + //si c'est un texte + if ($todos[$k]['name']=='write') + { + // et qu'une balise spécifique le précède => on nettoye les espaces du début du texte + if ($k>0 && in_array($todos[$k-1]['name'], array('table', 'tr', 'td', 'th', 'br', 'div', 'hr', 'p', 'ul', 'ol', 'li'))) + $todos[$k]['param']['txt'] = preg_replace('/^([\s]*)([^\s])/isU', '$2', $todos[$k]['param']['txt']); + + // et qu'une balise spécifique le suit => on nettoye les espaces de la fin du texte + if ($kcode = $todos; + } + + /** + * parser le code HTML + * + * @param string contenu à parser. + * @param &array tableau de retour des données + * @return null + */ + function searchCode($content, &$tmp) + { + // séparer les balises du texte + $tmp = array(); + $reg = '/(<[^>]+>)|([^<]+)+/isU'; + + // pour chaque élément trouvé : + $str = ''; + $offset = 0; + while(preg_match($reg, $content, $parse, PREG_OFFSET_CAPTURE, $offset)) + { + // si une balise a été détectée + if ($parse[1][0]) + { + // sauvegarde du texte précédent si il existe + if ($str!=='') $tmp[] = array('txt',$str); + + // sauvegarde de la balise + $tmp[] = array('code',trim($parse[1][0])); + + // initialisation du texte suivant + $str = ''; + } + else + { + // ajout du texte à la fin de celui qui est déjà détecté + $str.= $parse[2][0]; + } + // Update offset to the end of the match + $offset = $parse[0][1] + strlen($parse[0][0]); + unset($parse); + } + // si un texte est présent à la fin, on l'enregistre + if ($str!='') $tmp[] = array('txt',$str); + unset($str); + } + + /** + * analyse une balise HTML + * + * @param string code HTML à identifier + * @return array action correspondante + */ + function analiseCode($code) + { + // nom de la balise et ouverture ou fermeture + $balise = '<([\/]{0,1})([_a-z0-9]+)([\/>\s]+)'; + preg_match('/'.$balise.'/isU', $code, $match); + $close = ($match[1]=='/' ? true : false); + $name = strtolower($match[2]); + + // paramètres obligatoires en fonction du nom de la balise + $param = array(); + $param['style'] = ''; + if ($name=='img') { $param['alt'] = ''; $param['src'] = ''; } + if ($name=='a') { $param['href'] = ''; } + + // lecture des paramétres du type nom=valeur + $prop = '([a-zA-Z0-9_]+)=([^"\'\s>]+)'; + preg_match_all('/'.$prop.'/is', $code, $match); + for($k=0; $k $val) + { + $key = strtolower($key); + switch($key) + { + case 'width': + unset($param[$key]); + $param['style'] = 'width: '.$val.'px; '.$param['style']; + break; + + case 'align': + if ($name!=='table') + { + unset($param[$key]); + $param['style'] = 'text-align: '.$val.'; '.$param['style']; + } + break; + + case 'valign': + unset($param[$key]); + $param['style'] = 'vertical-align: '.$val.'; '.$param['style']; + break; + + case 'height': + unset($param[$key]); + $param['style'] = 'height: '.$val.'px; '.$param['style']; + break; + + case 'bgcolor': + unset($param[$key]); + $param['style'] = 'background: '.$val.'; '.$param['style']; + break; + + case 'bordercolor': + unset($param[$key]); + $color = $val; + break; + + case 'border': + unset($param[$key]); + if (preg_match('/^[0-9]$/isU', $val)) $val = $val.'px'; + $border = $val; + break; + + case 'cellpadding': + case 'cellspacing': + if (preg_match('/^([0-9]+)$/isU', $val)) $param[$key] = $val.'px'; + break; + + case 'colspan': + case 'rowspan': + $val = preg_replace('/[^0-9]/isU', '', $val); + if (!$val) $val = 1; + $param[$key] = $val; + break; + } + } + if ($border!==null) + { + if ($border) $param['style'] = 'border: solid '.$border.' '.$color.'; '.$param['style']; + else $param['style'] = 'border: none'; + } + + // lecture des styles - décomposition + $styles = explode(';', $param['style']); + $param['style'] = array(); + foreach($styles as $style) + { + $tmp = explode(':', $style); + if (count($tmp)>1) + { + $cod = $tmp[0]; unset($tmp[0]); $tmp = implode(':', $tmp); + $param['style'][trim(strtolower($cod))] = preg_replace('/[\s]+/isU', ' ', trim($tmp)); + } + } + + // détermination du niveau de table pour les ouverture, avec ajout d'un level + if (in_array($name, array('ul', 'ol', 'table')) && !$close) + { + $this->num++; + $this->level[count($this->level)] = $this->num; + } + + // attribution du niveau de table où se trouve l'élément + if (!isset($param['num'])) $param['num'] = $this->level[count($this->level)-1]; + + // pour les fins de table : suppression d'un level + if (in_array($name, array('ul', 'ol', 'table')) && $close) + { + unset($this->level[count($this->level)-1]); + } + + // retour de l'action identifiée + return array('name' => $name, 'close' => $close ? 1 : 0, 'param' => $param); + } + + // récupérer un niveau complet d'HTML entre une ouverture de balise et la fermeture correspondante + function getLevel($k) + { + // si le code n'existe pas : fin + if (!isset($this->code[$k])) return ''; + + // quelle balise faudra-t-il détecter + $detect = $this->code[$k]['name']; + + $level = 0; // niveau de profondeur + $end = false; // etat de fin de recherche + $code = ''; // code extrait + + // tant que c'est pas fini, on boucle + while (!$end) + { + // action courante + $row = $this->code[$k]; + + // si write => on ajoute le texte + if ($row['name']=='write') + { + $code.= $row['param']['txt']; + } + // sinon, c'est une balise html + else + { + $not = false; // indicateur de non prise en compte de la balise courante + + // si c'est la balise que l'on cherche + if ($row['name']==$detect) + { + if ($level==0) { $not = true; } // si on est à la premiere balise : on l'ignore + $level+= ($row['close'] ? -1 : 1); // modification du niveau en cours en fonction de l'ouvertre / fermeture + if ($level==0) { $not = true; $end = true; } // si on est au niveau 0 : on a fini + } + + // si on doit prendre en compte la balise courante + if (!$not) + { + // ecriture du code HTML de la balise + $code.= '<'.($row['close'] ? '/' : '').$row['name']; + foreach($row['param'] as $key => $val) + { + if ($key=='style') + { + $tmp = ''; + if (isset($val['text-align'])) unset($val['text-align']); + foreach($val as $ks => $vs) $tmp.= $ks.':'.$vs.'; '; + if (trim($tmp)) $code.= ' '.$key.'="'.$tmp.'"'; + } + else + { + $code.= ' '.$key.'="'.$val.'"'; + } + } + $code.= '>'; + } + } + + // on continue tant qu'il y a du code à analyser... + if (isset($this->code[$k+1])) + $k++; + else + $end = true; + } + + // retourne la position finale et le code HTML extrait + return array($k, $code); + } + } +} +?> \ No newline at end of file diff --git a/includes/html2pdf/styleHTML.class.php b/includes/html2pdf/styleHTML.class.php new file mode 100644 index 000000000..272e6c436 --- /dev/null +++ b/includes/html2pdf/styleHTML.class.php @@ -0,0 +1,1440 @@ + PDF, utilise fpdf de Olivier PLATHEY + * Distribué sous la licence LGPL. + * + * @author Laurent MINGUET + * @version 3.22a - 15/06/2009 + */ + +if (!defined('__CLASS_STYLEHTML__')) +{ + define('__CLASS_STYLEHTML__', true); + + class styleHTML + { + var $css = array(); // tableau des CSS + var $css_keys = array(); // tableau des clefs CSS, pour l'ordre d'execution + var $value = array(); // valeurs actuelles + var $table = array(); // tableau d'empilement pour historisation des niveaux + var $pdf = null; // référence au PDF parent + var $htmlColor = array(); // liste des couleurs HTML + var $onlyLeft = false; // indique si on est dans un sous HTML et qu'on bloque à gauche + + /** + * Constructeur + * + * @param &pdf référence à l'objet HTML2PDF parent + * @return null + */ + function styleHTML(&$pdf) + { + $this->init(); // initialisation + $this->pdf = &$pdf; + } + + /** + * Initialisation du style + * + * @return null + */ + function init() + { + $color = array(); + $color['AliceBlue'] = '#F0F8FF'; + $color['AntiqueWhite'] = '#FAEBD7'; + $color['Aqua'] = '#00FFFF'; + $color['Aquamarine'] = '#7FFFD4'; + $color['Azure'] = '#F0FFFF'; + $color['Beige'] = '#F5F5DC'; + $color['Bisque'] = '#FFE4C4'; + $color['Black'] = '#000000'; + $color['BlanchedAlmond'] = '#FFEBCD'; + $color['Blue'] = '#0000FF'; + $color['BlueViolet'] = '#8A2BE2'; + $color['Brown'] = '#A52A2A'; + $color['BurlyWood'] = '#DEB887'; + $color['CadetBlue'] = '#5F9EA0'; + $color['Chartreuse'] = '#7FFF00'; + $color['Chocolate'] = '#D2691E'; + $color['Coral'] = '#FF7F50'; + $color['CornflowerBlue'] = '#6495ED'; + $color['Cornsilk'] = '#FFF8DC'; + $color['Crimson'] = '#DC143C'; + $color['Cyan'] = '#00FFFF'; + $color['DarkBlue'] = '#00008B'; + $color['DarkCyan'] = '#008B8B'; + $color['DarkGoldenRod'] = '#B8860B'; + $color['DarkGray'] = '#A9A9A9'; + $color['DarkGrey'] = '#A9A9A9'; + $color['DarkGreen'] = '#006400'; + $color['DarkKhaki'] = '#BDB76B'; + $color['DarkMagenta'] = '#8B008B'; + $color['DarkOliveGreen'] = '#556B2F'; + $color['Darkorange'] = '#FF8C00'; + $color['DarkOrchid'] = '#9932CC'; + $color['DarkRed'] = '#8B0000'; + $color['DarkSalmon'] = '#E9967A'; + $color['DarkSeaGreen'] = '#8FBC8F'; + $color['DarkSlateBlue'] = '#483D8B'; + $color['DarkSlateGray'] = '#2F4F4F'; + $color['DarkSlateGrey'] = '#2F4F4F'; + $color['DarkTurquoise'] = '#00CED1'; + $color['DarkViolet'] = '#9400D3'; + $color['DeepPink'] = '#FF1493'; + $color['DeepSkyBlue'] = '#00BFFF'; + $color['DimGray'] = '#696969'; + $color['DimGrey'] = '#696969'; + $color['DodgerBlue'] = '#1E90FF'; + $color['FireBrick'] = '#B22222'; + $color['FloralWhite'] = '#FFFAF0'; + $color['ForestGreen'] = '#228B22'; + $color['Fuchsia'] = '#FF00FF'; + $color['Gainsboro'] = '#DCDCDC'; + $color['GhostWhite'] = '#F8F8FF'; + $color['Gold'] = '#FFD700'; + $color['GoldenRod'] = '#DAA520'; + $color['Gray'] = '#808080'; + $color['Grey'] = '#808080'; + $color['Green'] = '#008000'; + $color['GreenYellow'] = '#ADFF2F'; + $color['HoneyDew'] = '#F0FFF0'; + $color['HotPink'] = '#FF69B4'; + $color['IndianRed'] = '#CD5C5C'; + $color['Indigo'] = '#4B0082'; + $color['Ivory'] = '#FFFFF0'; + $color['Khaki'] = '#F0E68C'; + $color['Lavender'] = '#E6E6FA'; + $color['LavenderBlush'] = '#FFF0F5'; + $color['LawnGreen'] = '#7CFC00'; + $color['LemonChiffon'] = '#FFFACD'; + $color['LightBlue'] = '#ADD8E6'; + $color['LightCoral'] = '#F08080'; + $color['LightCyan'] = '#E0FFFF'; + $color['LightGoldenRodYellow'] = '#FAFAD2'; + $color['LightGray'] = '#D3D3D3'; + $color['LightGrey'] = '#D3D3D3'; + $color['LightGreen'] = '#90EE90'; + $color['LightPink'] = '#FFB6C1'; + $color['LightSalmon'] = '#FFA07A'; + $color['LightSeaGreen'] = '#20B2AA'; + $color['LightSkyBlue'] = '#87CEFA'; + $color['LightSlateGray'] = '#778899'; + $color['LightSlateGrey'] = '#778899'; + $color['LightSteelBlue'] = '#B0C4DE'; + $color['LightYellow'] = '#FFFFE0'; + $color['Lime'] = '#00FF00'; + $color['LimeGreen'] = '#32CD32'; + $color['Linen'] = '#FAF0E6'; + $color['Magenta'] = '#FF00FF'; + $color['Maroon'] = '#800000'; + $color['MediumAquaMarine'] = '#66CDAA'; + $color['MediumBlue'] = '#0000CD'; + $color['MediumOrchid'] = '#BA55D3'; + $color['MediumPurple'] = '#9370D8'; + $color['MediumSeaGreen'] = '#3CB371'; + $color['MediumSlateBlue'] = '#7B68EE'; + $color['MediumSpringGreen'] = '#00FA9A'; + $color['MediumTurquoise'] = '#48D1CC'; + $color['MediumVioletRed'] = '#C71585'; + $color['MidnightBlue'] = '#191970'; + $color['MintCream'] = '#F5FFFA'; + $color['MistyRose'] = '#FFE4E1'; + $color['Moccasin'] = '#FFE4B5'; + $color['NavajoWhite'] = '#FFDEAD'; + $color['Navy'] = '#000080'; + $color['OldLace'] = '#FDF5E6'; + $color['Olive'] = '#808000'; + $color['OliveDrab'] = '#6B8E23'; + $color['Orange'] = '#FFA500'; + $color['OrangeRed'] = '#FF4500'; + $color['Orchid'] = '#DA70D6'; + $color['PaleGoldenRod'] = '#EEE8AA'; + $color['PaleGreen'] = '#98FB98'; + $color['PaleTurquoise'] = '#AFEEEE'; + $color['PaleVioletRed'] = '#D87093'; + $color['PapayaWhip'] = '#FFEFD5'; + $color['PeachPuff'] = '#FFDAB9'; + $color['Peru'] = '#CD853F'; + $color['Pink'] = '#FFC0CB'; + $color['Plum'] = '#DDA0DD'; + $color['PowderBlue'] = '#B0E0E6'; + $color['Purple'] = '#800080'; + $color['Red'] = '#FF0000'; + $color['RosyBrown'] = '#BC8F8F'; + $color['RoyalBlue'] = '#4169E1'; + $color['SaddleBrown'] = '#8B4513'; + $color['Salmon'] = '#FA8072'; + $color['SandyBrown'] = '#F4A460'; + $color['SeaGreen'] = '#2E8B57'; + $color['SeaShell'] = '#FFF5EE'; + $color['Sienna'] = '#A0522D'; + $color['Silver'] = '#C0C0C0'; + $color['SkyBlue'] = '#87CEEB'; + $color['SlateBlue'] = '#6A5ACD'; + $color['SlateGray'] = '#708090'; + $color['SlateGrey'] = '#708090'; + $color['Snow'] = '#FFFAFA'; + $color['SpringGreen'] = '#00FF7F'; + $color['SteelBlue'] = '#4682B4'; + $color['Tan'] = '#D2B48C'; + $color['Teal'] = '#008080'; + $color['Thistle'] = '#D8BFD8'; + $color['Tomato'] = '#FF6347'; + $color['Turquoise'] = '#40E0D0'; + $color['Violet'] = '#EE82EE'; + $color['Wheat'] = '#F5DEB3'; + $color['White'] = '#FFFFFF'; + $color['WhiteSmoke'] = '#F5F5F5'; + $color['Yellow'] = '#FFFF00'; + $color['YellowGreen'] = '#9ACD32'; + + $this->htmlColor = array(); + foreach($color as $key => $val) $this->htmlColor[strtolower($key)] = $val; + unset($color); + + $this->table = array(); + + $this->value = array(); + $this->initStyle(); + + // initialisation des styles sans héritages + $this->resetStyle(); + } + + function initStyle() + { + $this->value['id_balise'] = 'body'; // balise + $this->value['id_name'] = null; // name + $this->value['id_id'] = null; // id + $this->value['id_class'] = null; // class + $this->value['id_lst'] = array('*'); // lst de dependance + $this->value['mini-size'] = 1.; // rapport de taille spécifique aux sup, sub + $this->value['mini-decal'] = 0; // rapport de position spécifique aux sup, sub + $this->value['font-family'] = 'Arial'; + $this->value['font-bold'] = false; + $this->value['font-italic'] = false; + $this->value['font-underline'] = false; + $this->value['font-overline'] = false; + $this->value['font-linethrough'] = false; + $this->value['font-size'] = $this->ConvertToMM('10pt'); + $this->value['text-indent'] = 0; + $this->value['text-align'] = 'left'; + $this->value['vertical-align'] = 'middle'; + $this->value['line-height'] = 'normal'; + + $this->value['position'] = null; + $this->value['x'] = null; + $this->value['y'] = null; + $this->value['width'] = 0; + $this->value['height'] = 0; + $this->value['top'] = null; + $this->value['right'] = null; + $this->value['bottom'] = null; + $this->value['left'] = null; + $this->value['float'] = null; + $this->value['display'] = null; + + $this->value['color'] = array(0, 0, 0); + $this->value['background'] = array('color' => null, 'image' => null, 'position' => null, 'repeat' => null); + $this->value['border'] = array(); + $this->value['padding'] = array(); + $this->value['margin'] = array(); + $this->value['margin-auto'] = false; + + $this->value['list-style-type'] = ''; + $this->value['list-style-image'] = ''; + + $this->value['xc'] = null; + $this->value['yc'] = null; + } + + /** + * Initialisation des styles sans héritages + * + * @param string balise HTML + * @return null + */ + function resetStyle($balise = '') + { + $collapse = isset($this->value['border']['collapse']) ? $this->value['border']['collapse'] : false; + if (!in_array($balise, array('tr', 'td', 'th'))) $collapse = false; + + $this->value['position'] = null; + $this->value['x'] = null; + $this->value['y'] = null; + $this->value['width'] = 0; + $this->value['height'] = 0; + $this->value['top'] = null; + $this->value['right'] = null; + $this->value['bottom'] = null; + $this->value['left'] = null; + $this->value['float'] = null; + $this->value['display'] = null; + $this->value['background'] = array('color' => null, 'image' => null, 'position' => null, 'repeat' => null); + $this->value['border'] = array( + 't' => $this->readBorder('none'), + 'r' => $this->readBorder('none'), + 'b' => $this->readBorder('none'), + 'l' => $this->readBorder('none'), + 'radius' => array(0, 0), + 'collapse' => $collapse, + ); + + $this->value['margin'] = array( + 't' => 0, + 'r' => 0, + 'b' => 0, + 'l' => 0 + ); + $this->value['margin-auto'] = false; + + if (in_array($balise, array('div'))) + $this->value['vertical-align'] = 'top'; + + if (in_array($balise, array('ul', 'li'))) + { + $this->value['list-style-type'] = ''; + $this->value['list-style-image'] = ''; + } + + if (!in_array($balise, array('tr', 'td'))) + { + $this->value['padding'] = array( + 't' => 0, + 'r' => 0, + 'b' => 0, + 'l' => 0 + ); + } + else + { + $this->value['padding'] = array( + 't' => $this->ConvertToMM('1px'), + 'r' => $this->ConvertToMM('1px'), + 'b' => $this->ConvertToMM('1px'), + 'l' => $this->ConvertToMM('1px') + ); + } + + if ($balise=='hr') + { + $this->value['border'] = array( + 't' => $this->readBorder('solid 1px #000000'), + 'r' => $this->readBorder('solid 1px #000000'), + 'b' => $this->readBorder('solid 1px #000000'), + 'l' => $this->readBorder('solid 1px #000000'), + 'radius' => array(0, 0), + 'collapse' => false, + ); + $this->ConvertBackground('#FFFFFF', $this->value['background']); + } + + $this->value['xc'] = null; + $this->value['yc'] = null; + } + + /** + * Initialisation de la font PDF + * + * @return null + */ + function FontSet() + { + $b = ($this->value['font-bold'] ? 'B' : ''); + $i = ($this->value['font-italic'] ? 'I' : ''); + $u = ($this->value['font-underline'] ? 'U' : ''); + + // taille en mm, à ramener en pt + $size = $this->value['font-size']; + $size = 72 * $size / 25.4; + + $this->pdf->setOverline($this->value['font-overline']); + $this->pdf->setLinethrough($this->value['font-linethrough']); + + // application de la fonte + $this->pdf->SetFont($this->value['font-family'], $b.$i.$u, $this->value['mini-size']*$size); + $this->pdf->SetTextColor($this->value['color'][0],$this->value['color'][1], $this->value['color'][2]); + if ($this->value['background']['color']) + $this->pdf->SetFillColor($this->value['background']['color'][0],$this->value['background']['color'][1], $this->value['background']['color'][2]); + else + $this->pdf->SetFillColor(255); + } + + /** + * Monter d'un niveau dans l'historisation + * + * @return null + */ + function save() + { + $this->table[count($this->table)] = $this->value; + } + + /** + * Descendre d'un niveau dans l'historisation + * + * @return null + */ + function load() + { + if (count($this->table)) + { + $this->value = $this->table[count($this->table)-1]; + unset($this->table[count($this->table)-1]); + } + } + + function setPosition(&$current_x, &$current_y) + { + $this->value['xc'] = $current_x; + $this->value['yc'] = $current_y; + + if ($this->value['position']=='relative' || $this->value['position']=='absolute') + { + if ($this->value['right']!==null) + { + $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width']; + if ($this->value['margin']['r']) $x-= $this->value['margin']['r']; + } + else + { + $x = $this->value['left']; + if ($this->value['margin']['l']) $x+= $this->value['margin']['l']; + } + + if ($this->value['bottom']!==null) + { + $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height']; + if ($this->value['margin']['b']) $y-= $this->value['margin']['b']; + } + else + { + $y = $this->value['top']; + if ($this->value['margin']['t']) $y+= $this->value['margin']['t']; + } + + if ($this->value['position']=='relative') + { + $this->value['x'] = $current_x + $x; + $this->value['y'] = $current_y + $y; + } + else + { + $this->value['x'] = $this->getLastAbsoluteX()+$x; + $this->value['y'] = $this->getLastAbsoluteY()+$y; + } + } + else + { + $this->value['x'] = $current_x; + $this->value['y'] = $current_y; + if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l']; + if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t']; + } + + $current_x = $this->value['x']; + $current_y = $this->value['y']; + } + + /** + * Analyse un tableau de style provenant du parseurHTML + * + * @param string nom de la balise + * @param array tableau de style + * @return null + */ + function analyse($balise, &$param) + { + // preparation + $balise = strtolower($balise); + $id = isset($param['id']) ? strtolower(trim($param['id'])) : null; if (!$id) $id = null; + $name = isset($param['name']) ? strtolower(trim($param['name'])) : null; if (!$name) $name = null; + + // lecture de la propriete classe + $class = array(); + $tmp = isset($param['class']) ? preg_replace('/[\s]+/', ' ', strtolower($param['class'])) : ''; + $tmp = explode(' ', $tmp); + foreach($tmp as $k => $v) + { + $v = trim($v); + if ($v) $class[] = $v; + } + + // identification de la balise et des styles direct qui pourraient lui être appliqués + $this->value['id_balise'] = $balise; + $this->value['id_name'] = $name; + $this->value['id_id'] = $id; + $this->value['id_class'] = $class; + $this->value['id_lst'] = array(); + $this->value['id_lst'][] = '*'; + $this->value['id_lst'][] = $balise; + if (count($class)) + { + foreach($class as $v) + { + $this->value['id_lst'][] = '*.'.$v; + $this->value['id_lst'][] = '.'.$v; + $this->value['id_lst'][] = $balise.'.'.$v; + } + } + if ($id) + { + $this->value['id_lst'][] = '*#'.$id; + $this->value['id_lst'][] = '#'.$id; + $this->value['id_lst'][] = $id.'#'.$id; + } + + // style CSS + $styles = $this->getFromCSS(); + + // on ajoute le style propre à la balise + $styles = array_merge($styles, $param['style']); + if (isset($param['allwidth']) && !isset($styles['width'])) $styles['width'] = '100%'; + + // mise à zero des styles non hérités + $this->resetStyle($balise); + + // interpreration des nouvelles valeurs + $correct_width = false; + foreach($styles as $nom => $val) + { + switch($nom) + { + case 'font-family': + $val = explode(',', $val); + $val = trim($val[0]); + + if ($val) $this->value['font-family'] = $val; + break; + + case 'font-weight': + $this->value['font-bold'] = ($val=='bold'); + break; + + case 'font-style': + $this->value['font-italic'] = ($val=='italic'); + break; + + case 'text-decoration': + $val = explode(' ', $val); + $this->value['font-underline'] = (in_array('underline', $val)); + $this->value['font-overline'] = (in_array('overline', $val)); + $this->value['font-linethrough'] = (in_array('line-through', $val)); + break; + + case 'text-indent': + $this->value['text-indent'] = $this->ConvertToMM($val); + break; + + case 'font-size': + $val = $this->ConvertToMM($val, $this->value['font-size']); + if ($val) $this->value['font-size'] = $val; + break; + + case 'color': + $res = null; + $this->value['color'] = $this->ConvertToRVB($val, $res); + + if ($balise=='hr') + { + $this->value['border']['l']['color'] = $this->value['color']; + $this->value['border']['t']['color'] = $this->value['color']; + $this->value['border']['r']['color'] = $this->value['color']; + $this->value['border']['b']['color'] = $this->value['color']; + } + break; + + case 'text-align': + $this->value['text-align'] = $val; + break; + + case 'vertical-align': + $this->value['vertical-align'] = $val; + break; + + case 'width': + $this->value['width'] = $this->ConvertToMM($val, $this->getLastWidth()); + if ($this->value['width'] && substr($val, -1)=='%') $correct_width=true; + break; + + case 'height': + $this->value['height'] = $this->ConvertToMM($val, $this->getLastHeight()); + break; + + case 'line-height': + if (preg_match('/^[0-9\.]+$/isU', $val)) $val = floor($val*100).'%'; + $this->value['line-height'] = $val; + break; + + case 'padding': + $val = explode(' ', $val); + foreach($val as $k => $v) + { + $v = trim($v); + if ($v!='') $val[$k] = $v; + else unset($val[$k]); + } + $val = array_values($val); + if (count($val)!=4) + { + $val = $this->ConvertToMM($val[0], 0); + $this->value['padding']['t'] = $val; + $this->value['padding']['r'] = $val; + $this->value['padding']['b'] = $val; + $this->value['padding']['l'] = $val; + } + else + { + $this->value['padding']['t'] = $this->ConvertToMM($val[0], 0); + $this->value['padding']['r'] = $this->ConvertToMM($val[1], 0); + $this->value['padding']['b'] = $this->ConvertToMM($val[2], 0); + $this->value['padding']['l'] = $this->ConvertToMM($val[3], 0); + } + break; + + case 'padding-top': + $this->value['padding']['t'] = $this->ConvertToMM($val, 0); + break; + + case 'padding-right': + $this->value['padding']['r'] = $this->ConvertToMM($val, 0); + break; + + case 'padding-bottom': + $this->value['padding']['b'] = $this->ConvertToMM($val, 0); + break; + + case 'padding-left': + $this->value['padding']['l'] = $this->ConvertToMM($val, 0); + break; + + case 'margin': + if ($val=='auto') + { + $this->value['margin-auto'] = true; + break; + } + $val = explode(' ', $val); + foreach($val as $k => $v) + { + $v = trim($v); + if ($v!='') $val[$k] = $v; + else unset($val[$k]); + } + $val = array_values($val); + if (count($val)!=4) + { + $val = $this->ConvertToMM($val[0], 0); + $this->value['margin']['t'] = $val; + $this->value['margin']['r'] = $val; + $this->value['margin']['b'] = $val; + $this->value['margin']['l'] = $val; + } + else + { + $this->value['margin']['t'] = $this->ConvertToMM($val[0], 0); + $this->value['margin']['r'] = $this->ConvertToMM($val[1], 0); + $this->value['margin']['b'] = $this->ConvertToMM($val[2], 0); + $this->value['margin']['l'] = $this->ConvertToMM($val[3], 0); + } + break; + + case 'margin-top': + $this->value['margin']['t'] = $this->ConvertToMM($val, 0); + break; + + case 'margin-right': + $this->value['margin']['r'] = $this->ConvertToMM($val, 0); + break; + + case 'margin-bottom': + $this->value['margin']['b'] = $this->ConvertToMM($val, 0); + break; + + case 'margin-left': + $this->value['margin']['l'] = $this->ConvertToMM($val, 0); + break; + + case 'border': + $val = $this->readBorder($val); + $this->value['border']['t'] = $val; + $this->value['border']['r'] = $val; + $this->value['border']['b'] = $val; + $this->value['border']['l'] = $val; + break; + + case 'border-style': + $val = explode(' ', $val); + foreach($val as $val_k => $val_v) + if (!in_array($val_v, array('solid', 'dotted', 'dashed'))) + $val[$val_k] = null; + $this->duplicateBorder($val); + + if ($val[0]) $this->value['border']['t']['type'] = $val[0]; + if ($val[1]) $this->value['border']['r']['type'] = $val[1]; + if ($val[2]) $this->value['border']['b']['type'] = $val[2]; + if ($val[3]) $this->value['border']['l']['type'] = $val[3]; + break; + + case 'border-top-style': + if (in_array($val, array('solid', 'dotted', 'dashed'))) + $this->value['border']['t']['type'] = $val; + break; + + case 'border-right-style': + if (in_array($val, array('solid', 'dotted', 'dashed'))) + $this->value['border']['r']['type'] = $val; + break; + + case 'border-bottom-style': + if (in_array($val, array('solid', 'dotted', 'dashed'))) + $this->value['border']['b']['type'] = $val; + break; + + case 'border-left-style': + if (in_array($val, array('solid', 'dotted', 'dashed'))) + $this->value['border']['l']['type'] = $val; + break; + + case 'border-color': + $res = false; + $val = preg_replace('/,[\s]+/', ',', $val); + $val = explode(' ', $val); + + foreach($val as $val_k => $val_v) + { + $val[$val_k] = $this->ConvertToRVB($val_v, $res); + if (!$res) $val[$val_k] = null; + } + $this->duplicateBorder($val); + + if (is_array($val[0])) $this->value['border']['t']['color'] = $val[0]; + if (is_array($val[1])) $this->value['border']['r']['color'] = $val[1]; + if (is_array($val[2])) $this->value['border']['b']['color'] = $val[2]; + if (is_array($val[3])) $this->value['border']['l']['color'] = $val[3]; + + break; + + case 'border-top-color': + $res = false; + $val = $this->ConvertToRVB($val, $res); + if ($res) $this->value['border']['t']['color'] = $val; + break; + + case 'border-right-color': + $res = false; + $val = $this->ConvertToRVB($val, $res); + if ($res) $this->value['border']['r']['color'] = $val; + break; + + case 'border-bottom-color': + $res = false; + $val = $this->ConvertToRVB($val, $res); + if ($res) $this->value['border']['b']['color'] = $val; + break; + + case 'border-left-color': + $res = false; + $val = $this->ConvertToRVB($val, $res); + if ($res) $this->value['border']['l']['color'] = $val; + break; + + case 'border-width': + $val = explode(' ', $val); + foreach($val as $val_k => $val_v) + { + $val[$val_k] = $this->ConvertToMM($val_v, 0); + } + $this->duplicateBorder($val); + + if ($val[0]) $this->value['border']['t']['width'] = $val[0]; + if ($val[1]) $this->value['border']['r']['width'] = $val[1]; + if ($val[2]) $this->value['border']['b']['width'] = $val[2]; + if ($val[3]) $this->value['border']['l']['width'] = $val[3]; + break; + + case 'border-top-width': + $val = $this->ConvertToMM($val, 0);; + if ($val) $this->value['border']['t']['width'] = $val; + break; + + case 'border-right-width': + $val = $this->ConvertToMM($val, 0);; + if ($val) $this->value['border']['r']['width'] = $val; + break; + + case 'border-bottom-width': + $val = $this->ConvertToMM($val, 0);; + if ($val) $this->value['border']['b']['width'] = $val; + break; + + case 'border-left-width': + $val = $this->ConvertToMM($val, 0);; + if ($val) $this->value['border']['l']['width'] = $val; + break; + + case 'border-collapse': + if ($balise=='table') $this->value['border']['collapse'] = ($val=='collapse'); + break; + + case 'border-radius': + // nettoyage des valeurs + $val = explode(' ', $val); + foreach($val as $k => $v) + { + $v = trim($v); + if ($v) + { + $v = $this->ConvertToMM($v, 0); + if ($v) $val[$k] = $v; + else unset($val[$k]); + } + else unset($val[$k]); + } + $val = array_values($val); + + if (!isset($val[1]) && isset($val[0])) $val[1] = $val[0]; + if (count($val)==2) + $this->value['border']['radius'] = array($val[0], $val[1]); + + break; + + case 'border-top': + $this->value['border']['t'] = $this->readBorder($val); + break; + + case 'border-right': + $this->value['border']['r'] = $this->readBorder($val); + break; + + case 'border-bottom': + $this->value['border']['b'] = $this->readBorder($val); + break; + + case 'border-left': + $this->value['border']['l'] = $this->readBorder($val); + break; + + case 'background-color': + $this->value['background']['color'] = $this->ConvertBackgroundColor($val); + break; + + case 'background-image': + $this->value['background']['image'] = $this->ConvertBackgroundImage($val); + break; + + case 'background-position': + $res = null; + $this->value['background']['position'] = $this->ConvertBackgroundPosition($val, $res); + break; + + case 'background-repeat': + $this->value['background']['repeat'] = $this->ConvertBackgroundRepeat($val); + break; + + case 'background': + $this->ConvertBackground($val, $this->value['background']); + break; + + case 'position': + if ($val=='absolute') $this->value['position'] = 'absolute'; + else if ($val=='relative') $this->value['position'] = 'relative'; + else $this->value['position'] = null; + break; + + case 'float': + if ($val=='left') $this->value['float'] = 'left'; + else if ($val=='right') $this->value['float'] = 'right'; + else $this->value['float'] = null; + break; + + case 'display': + if ($val=='inline') $this->value['display'] = 'inline'; + else if ($val=='block') $this->value['display'] = 'block'; + else if ($val=='none') $this->value['display'] = 'none'; + else $this->value['display'] = null; + break; + + case 'top': + case 'bottom': + case 'left': + case 'right': + $this->value[$nom] = $val; + break; + + case 'list-style': + case 'list-style-type': + case 'list-style-image': + if ($nom=='list-style') $nom = 'list-style-type'; + $this->value[$nom] = $val; + break; + + default: + break; + } + } + + if ($this->onlyLeft) $this->value['text-align'] = 'left'; + + // correction de la largeur pour correspondre au modèle de boite quick + if ($correct_width) + { + if (!in_array($balise, array('table', 'div', 'hr'))) + { + $this->value['width']-= $this->value['padding']['l'] + $this->value['padding']['r']; + $this->value['width']-= $this->value['border']['l']['width'] + $this->value['border']['r']['width']; + } + if (in_array($balise, array('th', 'td'))) + { + $this->value['width']-= $this->ConvertToMM(isset($param['cellspacing']) ? $param['cellspacing'] : '2px'); + } + if ($this->value['width']<0) $this->value['width']=0; + } + else + { + if ($this->value['width']) + { + if ($this->value['border']['l']['width']) $this->value['width'] += $this->value['border']['l']['width']; + if ($this->value['border']['r']['width']) $this->value['width'] += $this->value['border']['r']['width']; + if ($this->value['padding']['l']) $this->value['width'] += $this->value['padding']['l']; + if ($this->value['padding']['r']) $this->value['width'] += $this->value['padding']['r']; + } + } + if ($this->value['height']) + { + if ($this->value['border']['b']['width']) { $this->value['height'] += $this->value['border']['b']['width']; } + if ($this->value['border']['t']['width']) { $this->value['height'] += $this->value['border']['t']['width']; } + if ($this->value['padding']['b']) $this->value['height'] += $this->value['padding']['b']; + if ($this->value['padding']['t']) $this->value['height'] += $this->value['padding']['t']; + } + + if ($this->value['top']!=null) $this->value['top'] = $this->ConvertToMM($this->value['top'], $this->getLastHeight(true)); + if ($this->value['bottom']!=null) $this->value['bottom'] = $this->ConvertToMM($this->value['bottom'], $this->getLastHeight(true)); + if ($this->value['left']!=null) $this->value['left'] = $this->ConvertToMM($this->value['left'], $this->getLastWidth(true)); + if ($this->value['right']!=null) $this->value['right'] = $this->ConvertToMM($this->value['right'], $this->getLastWidth(true)); + + if ($this->value['top'] && $this->value['bottom'] && $this->value['height']) $this->value['bottom'] = null; + if ($this->value['left'] && $this->value['right'] && $this->value['width']) $this->value['right'] = null; + } + + /** + * Récupération de la hauteur de ligne courante + * + * @return float hauteur en mm + */ + function getLineHeight() + { + $val = $this->value['line-height']; + if ($val=='normal') $val = '108%'; + return $this->ConvertToMM($val, $this->value['font-size']); + } + + /** + * Récupération de la largeur de l'objet parent + * + * @return float largeur + */ + function getLastWidth($mode = false) + { + for($k=count($this->table); $k>0; $k--) + { + if ($this->table[$k-1]['width']) + { + $w = $this->table[$k-1]['width']; + if ($mode) + { + $w+= $this->table[$k-1]['border']['l']['width'] + $this->table[$k-1]['padding']['l']+0.02; + $w+= $this->table[$k-1]['border']['r']['width'] + $this->table[$k-1]['padding']['r']+0.02; + } + return $w; + } + } + return $this->pdf->w - $this->pdf->lMargin - $this->pdf->rMargin; + } + + /** + * Récupération de la hauteur de l'objet parent + * + * @return float hauteur + */ + function getLastHeight($mode = false) + { + for($k=count($this->table); $k>0; $k--) + { + if ($this->table[$k-1]['height']) + { + $h = $this->table[$k-1]['height']; + if ($mode) + { + $h+= $this->table[$k-1]['border']['t']['width'] + $this->table[$k-1]['padding']['t']+0.02; + $h+= $this->table[$k-1]['border']['b']['width'] + $this->table[$k-1]['padding']['b']+0.02; + } + return $h; + } + } + return $this->pdf->h - $this->pdf->tMargin - $this->pdf->bMargin; + } + + function getFloat() + { + if ($this->value['float']=='left') return 'left'; + if ($this->value['float']=='right') return 'right'; + return null; + } + + function getLastAbsoluteX() + { + for($k=count($this->table); $k>0; $k--) + { + if ($this->table[$k-1]['x'] && $this->table[$k-1]['position']) return $this->table[$k-1]['x']; + } + return $this->pdf->lMargin; + } + + function getLastAbsoluteY() + { + for($k=count($this->table); $k>0; $k--) + { + if ($this->table[$k-1]['y'] && $this->table[$k-1]['position']) return $this->table[$k-1]['y']; + } + return $this->pdf->tMargin; + } + + /** + * Récupération des propriétés CSS de la balise en cours + * + * @return array() tableau des propriétés CSS + */ + function getFromCSS() + { + $styles = array(); // style à appliquer + $getit = array(); // styles à récuperer + + // identification des styles direct, et ceux des parents + $lst = array(); + $lst[] = $this->value['id_lst']; + for($i=count($this->table)-1; $i>=0; $i--) $lst[] = $this->table[$i]['id_lst']; + + // identification des styles à récuperer + foreach($this->css_keys as $key => $num) + if ($this->getReccursiveStyle($key, $lst)) + $getit[$key] = $num; + + // si des styles sont à recuperer + if (count($getit)) + { + // on les récupère, mais dans l'odre de définition, afin de garder les priorités + asort($getit); + foreach($getit as $key => $val) $styles = array_merge($styles, $this->css[$key]); + } + + return $styles; + } + + /** + * Identification des styles à récuperer, en fonction de la balise et de ses parents + * + * @param string clef CSS à analyser + * @param array() tableau des styles direct, et ceux des parents + * @param string prochaine etape + * @return boolean clef autorisée ou non + */ + function getReccursiveStyle($key, $lst, $next = null) + { + // si propchaine etape, on construit les valeurs + if ($next!==null) + { + if ($next) $key = trim(substr($key, 0, -strlen($next))); // on elève cette etape + unset($lst[0]); + if (!count($lst)) return false; // pas d'etape possible + $lst = array_values($lst); + } + + // pour chaque style direct possible de l'etape en cours + foreach($lst[0] as $nom) + { + if ($key==$nom) return true; // si la clef conrrespond => ok + if (substr($key, -strlen(' '.$nom))==' '.$nom && $this->getReccursiveStyle($key, $lst, $nom)) return true; // si la clef est la fin, on analyse ce qui précède + } + + // si on est pas à la premiere etape, on doit analyse toutes les sous etapes + if ($next!==null && $this->getReccursiveStyle($key, $lst, '')) return true; + + // aucun style trouvé + return false; + } + + /** + * Analyse d'une propriété Border + * + * @param string propriété border + * @return array() propriété décodée + */ + function readBorder($val) + { + $none = array('type' => 'none', 'width' => 0, 'color' => array(0, 0, 0)); + + // valeurs par défault + $type = 'solid'; + $width = $this->ConvertToMM('1pt'); + $color = array(0, 0, 0); + + // nettoyage des valeurs + $val = explode(' ', $val); + foreach($val as $k => $v) + { + $v = trim($v); + if ($v) $val[$k] = $v; + else unset($val[$k]); + } + $val = array_values($val); + // identification des valeurs + $res = null; + foreach($val as $key) + { + if ($key=='none' || $key=='hidden') return $none; + + if ($this->ConvertToMM($key)!==null) $width = $this->ConvertToMM($key); + else if (in_array($key, array('solid', 'dotted', 'dashed'))) $type = $key; + else + { + $tmp = $this->ConvertToRVB($key, $res); + if ($res) $color = $tmp; + } + } + if (!$width) return $none; + return array('type' => $type, 'width' => $width, 'color' => $color); + } + + function duplicateBorder(&$val) + { + if (count($val)==1) + { + $val[1] = $val[0]; + $val[2] = $val[0]; + $val[3] = $val[0]; + } + else if (count($val)==2) + { + $val[2] = $val[0]; + $val[3] = $val[1]; + } + else if (count($val)==3) + { + $val[3] = $val[1]; + } + } + + function ConvertBackground($stl, &$res) + { + // Image + $text = '/url\(([^)]*)\)/isU'; + if (preg_match($text, $stl, $match)) + { + $res['image'] = $this->ConvertBackgroundImage($match[0]); + $stl = preg_replace($text, '', $stl); + $stl = preg_replace('/[\s]+/', ' ', $stl); + } + + // protection des espaces + $stl = preg_replace('/,[\s]+/', ',', $stl); + $lst = explode(' ', $stl); + + $pos = ''; + foreach($lst as $val) + { + $ok = false; + $color = $this->ConvertToRVB($val, $ok); + + if ($ok) + { + $res['color'] = $color; + } + else if ($val=='transparent') + { + $res['color'] = null; + } + else + { + $repeat = $this->ConvertBackgroundRepeat($val); + if ($repeat) + { + $res['repeat'] = $repeat; + } + else + { + $pos.= ($pos ? ' ' : '').$val; + } + } + } + if ($pos) + { + $pos = $this->ConvertBackgroundPosition($pos, $ok); + if ($ok) $res['position'] = $pos; + } + } + + function ConvertBackgroundColor($val) + { + $res = null; + if ($val=='transparent') return null; + else return $this->ConvertToRVB($val, $res); + } + + function ConvertBackgroundImage($val) + { + if ($val=='none') + return null; + else if (preg_match('/^url\(([^)]*)\)$/isU', $val, $match)) + return $match[1]; + else + return null; + } + + function ConvertBackgroundPosition($val, &$res) + { + $val = explode(' ', $val); + if (count($val)<2) + { + if (!$val[0]) return null; + $val[1] = 'center'; + } + if (count($val)>2) return null; + + $x = 0; + $y = 0; + $res = true; + + if ($val[0]=='left') $x = '0%'; + else if ($val[0]=='center') $x = '50%'; + else if ($val[0]=='right') $x = '100%'; + else if ($val[0]=='top') $y = '0%'; + else if ($val[0]=='bottom') $y = '100%'; + else if (preg_match('/^[-]?[0-9\.]+%$/isU', $val[0])) $x = $val[0]; + else if ($this->ConvertToMM($val[0])) $x = $this->ConvertToMM($val[0]); + else $res = false; + + if ($val[1]=='left') $x = '0%'; + else if ($val[1]=='right') $x = '100%'; + else if ($val[1]=='top') $y = '0%'; + else if ($val[1]=='center') $y = '50%'; + else if ($val[1]=='bottom') $y = '100%'; + else if (preg_match('/^[-]?[0-9\.]+%$/isU', $val[1])) $y = $val[1]; + else if ($this->ConvertToMM($val[1])) $y = $this->ConvertToMM($val[1]); + else $res = false; + + $val[0] = $x; + $val[1] = $y; + + return $val; + } + + function ConvertBackgroundRepeat($val) + { + switch($val) + { + case 'repeat': + return array(true, true); + case 'repeat-x': + return array(true, false); + case 'repeat-y': + return array(false, true); + case 'no-repeat': + return array(false, false); + } + return null; + } + /** + * Convertir une longueur en mm + * + * @param string longueur, avec unité, à convertir + * @param float longueur du parent + * @return float longueur exprimée en mm + */ + function ConvertToMM($val, $old=0.) + { + $val = trim($val); + if (preg_match('/^[0-9\.\-]+$/isU', $val)) $val.= 'px'; + if (preg_match('/^[0-9\.\-]+px$/isU', $val)) $val = 25.4/96. * str_replace('px', '', $val); + else if (preg_match('/^[0-9\.\-]+pt$/isU', $val)) $val = 25.4/72. * str_replace('pt', '', $val); + else if (preg_match('/^[0-9\.\-]+in$/isU', $val)) $val = 25.4 * str_replace('in', '', $val); + else if (preg_match('/^[0-9\.\-]+mm$/isU', $val)) $val = 1.*str_replace('mm', '', $val); + else if (preg_match('/^[0-9\.\-]+%$/isU', $val)) $val = 1.*$old*str_replace('%', '', $val)/100.; + else $val = null; + + return $val; + } + + /** + * Décomposition d'un code couleur HTML + * + * @param string couleur au format CSS + * @return array(r, v, b) couleur exprimé par ses comporantes R, V, B, de 0 à 255. + */ + function ConvertToRVB($val, &$res) + { + $val = trim($val); + $res = true; + + if (strtolower($val)=='transparent') return array(null, null, null); + if (isset($this->htmlColor[strtolower($val)])) $val = $this->htmlColor[strtolower($val)]; + + if (preg_match('/rgb\([\s]*([0-9%]+)[\s]*,[\s]*([0-9%]+)[\s]*,[\s]*([0-9%]+)[\s]*\)/isU', $val, $match)) + { + $r =$match[1]; if (substr($r, -1)=='%') $r = floor(255*substr($r, 0, -1)/100); + $v =$match[2]; if (substr($v, -1)=='%') $v = floor(255*substr($v, 0, -1)/100); + $b =$match[3]; if (substr($b, -1)=='%') $b = floor(255*substr($b, 0, -1)/100); + } + else if (strlen($val)==7 && substr($val, 0, 1)=='#') + { + $r = hexdec(substr($val, 1, 2)); + $v = hexdec(substr($val, 3, 2)); + $b = hexdec(substr($val, 5, 2)); + } + else if (strlen($val)==4 && substr($val, 0, 1)=='#') + { + $r = hexdec(substr($val, 1, 1).substr($val, 1, 1)); + $v = hexdec(substr($val, 2, 1).substr($val, 2, 1)); + $b = hexdec(substr($val, 3, 1).substr($val, 3, 1)); + } + else + { + $r=0; + $v=0; + $b=0; + $res = false; + } + return array(floor($r), floor($v), floor($b)); + } + + /** + * Analyser une feuille de style + * + * @param string code CSS + * @return null + */ + function analyseStyle(&$code) + { + // on remplace tous les espaces, tab, \r, \n, par des espaces uniques + $code = preg_replace('/[\s]+/', ' ', $code); + + // on enlève les commentaires + $code = preg_replace('/\/\*.*?\*\//s', '', $code); + + // on analyse chaque style + preg_match_all('/([^{}]+){([^}]*)}/isU', $code, $match); + for($k=0; $k on remplie le tableau correspondant + $styles = trim($match[2][$k]); + $styles = explode(';', $styles); + $stl = array(); + foreach($styles as $style) + { + $tmp = explode(':', $style); + if (count($tmp)>1) + { + $cod = $tmp[0]; unset($tmp[0]); $tmp = implode(':', $tmp); + $stl[trim(strtolower($cod))] = trim($tmp); + } + } + + // décomposition des noms par les , + $noms = explode(',', $noms); + foreach($noms as $nom) + { + $nom = trim($nom); + // Si il a une fonction spécifique, comme :hover => on zap + if (strpos($nom, ':')!==false) continue; + if (!isset($this->css[$nom])) + $this->css[$nom] = $stl; + else + $this->css[$nom] = array_merge($this->css[$nom], $stl); + + } + } + + $this->css_keys = array_flip(array_keys($this->css)); + } + + /** + * Extraction des feuille de style du code HTML + * + * @param string code HTML + * @return null + */ + function readStyle(&$html) + { + $style = ' '; + + // extraction des balises link, et suppression de celles-ci dans le code HTML + preg_match_all('/]*)>/isU', $html, $match); + $html = preg_replace('/]*>/isU', '', $html); + $html = preg_replace('/<\/link[^>]*>/isU', '', $html); + + // analyse de chaque balise + foreach($match[1] as $code) + { + $tmp = array(); + // lecture des paramétres du type nom=valeur + $prop = '([a-zA-Z0-9_]+)=([^"\'\s>]+)'; + preg_match_all('/'.$prop.'/is', $code, $match); + for($k=0; $k on garde + if (isset($tmp['type']) && strtolower($tmp['type'])=='text/css' && isset($tmp['href'])) + { + $content = @file_get_contents($tmp['href']); + $url = $tmp['href']; + if (strpos($url, 'http://')!==false) + { + $url = str_replace('http://', '', $url); + $url = explode('/', $url); + $url_main = 'http://'.$url[0].'/'; + $url_self = $url; unset($url_self[count($url_self)-1]); $url_self = 'http://'.implode('/', $url_self).'/'; + + $content = preg_replace('/url\(([^\\\\][^)]*)\)/isU', 'url('.$url_self.'$1)', $content); + $content = preg_replace('/url\((\\\\[^)]*)\)/isU', 'url('.$url_main.'$1)', $content); + } + + $style.= $content."\n"; + } + } + + + // extraction des balises style, et suppression de celles-ci dans le code HTML + preg_match_all('/]*>(.*)<\/style[^>]*>/isU', $html, $match); + $html = preg_replace('/]*>(.*)<\/style[^>]*>/isU', '', $html); + + // analyse de chaque balise + foreach($match[1] as $code) + { + $code = str_replace('', '', $code); + $style.= $code."\n"; + } + + $this->analyseStyle($style); + } + } +} +?> \ No newline at end of file