changed mpdf with tcpdf

This commit is contained in:
tcit 2014-09-27 19:34:17 +02:00
parent d4690a8fa1
commit 824f8c45ed
125 changed files with 61824 additions and 97985 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +0,0 @@
/*******************************************************************************
* Software: FPDF *
* Version: 1.53 *
* Date: 2004-12-31 *
* Author: Olivier PLATHEY *
* License: Freeware *
* *
* You may use and modify this software as you wish. *
*******************************************************************************/
/*******************************************************************************
* HTML2FPDF is a php script to read a HTML text and generate a PDF file. *
* Copyright (C) 2004-2005 Renato Coelho *
* *
* html2fpdf.php, htmltoolkit.php *
*******************************************************************************/
CREDITS From HTML2FPDF:
-Olivier Plathey for the fpdf.php class [http://www.fpdf.org]
-Damon Kohler for the Flowing Block script [mailto:damonkohler@yahoo.com]
-Clément Lavoillotte for HTML-oriented FPDF idea
-Yamasoft for the gif.php class [http://www.yamasoft.com/]
-Jérôme Fenal for the _parsegif() function
-"VIETCOM" for the PDFTable code [http://www.freepgs.com/vietcom/tool/pdftable/] [mailto:vncommando@yahoo.com]
-Yukihiro O. for the SetDash() function [mailto:yukihiro_o@infoseek.jp]
-Ron Korving for the WordWrap() function
-Michel Poulain for the DisplayPreferences() function
-Patrick Benny for the MultiCellBlt() function idea [no longer in use]
-Seb for the _SetTextRendering() and SetTextOutline() functions [mailto:captainseb@wanadoo.fr]
-MorphSoft for the colornames list idea
-W3SCHOOLS for HTML-related reference info [http://www.w3schools.com/]
/****************************************************************************
* Software: FPDF_Protection *
* Version: 1.02 *
* Date: 2005/05/08 *
* Author: Klemen VODOPIVEC *
* License: Freeware *
* *
* You may use and modify this software as you wish as stated in original *
* FPDF package. *
****************************************************************************/
/****************************************************************************
// FPDI - Version 1.2
//
// Copyright 2004-2007 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
****************************************************************************/
/****************************************************************************
* @copyright Khaled Al-Shamaa 2008
* @link http://www.ar-php.org
* @author Khaled Al-Shamaa <khaled@ar-php.org>
* @desc Set of PHP5 / UTF-8 Classes developed to enhance Arabic web
* applications by providing set of tools includes stem-based searching,
* translitiration, soundex, Hijri calendar, charset detection and
* converter, spell numbers, keyboard language, Muslim prayer time,
* auto-summarization, and more...
* @package Arabic
*
* @version 1.8 released in Feb 15, 2009
*
* @license LGPL
****************************************************************************/
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation;
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
[http://www.opensource.org/licenses/lgpl-license.php]

View File

@ -1,164 +0,0 @@
=================
Open Source Fonts
=================
mPDF should be able to read most TrueType Unicode font files with a .ttf extension
Truetype fonts with .ttf or .otf extension and .ttc TrueType collections should also work OK.
You will probably therefore have access to any number of fonts, but here are some useful sources for
open-source or free-use fonts. Many of these were included with earlier versions of mPDF:
General collections
-------------------
- DejaVu font collection from: http://dejavu-fonts.org/wiki/Main_Page (included in the release)
- GNU FreeFont from: http://www.gnu.org/software/freefont/
- Linux Libertine from: http://www.linuxlibertine.org (use the .ttf files - not the .otf)
- Liberation Fonts from: https://fedorahosted.org/liberation-fonts/ or directly https://fedorahosted.org/releases/l/i/liberation-fonts/
Thai fonts
----------
- Collection of Thai fonts from: ftp://linux.thai.net/pub/thailinux/software/thai-ttf/
OCR-B
-----
OCRB (ocrb10) font: http://ansuz.sooke.bc.ca/software/ocrb.php
Useful for barcodes (included in the release)
Pan-Unicode fonts (fonts containing most characters defined in Unicode)
-----------------------------------------------------------------------
- BitStream Cyberbit from: http://aol-4.vo.llnwd.net/pub/communicator/extras/fonts/windows/
Cyberbit.ZIP (or just Google it)
(NB if run with $debug_fonts gives warning of invalid table checksum - just turn it off!)
- Code2000 (NB shareware) from: http://www.code2000.net/code2000_page.htm
- Quivira from: http://www.quivira-font.com/ (combining diacritics are not placed correctly, but has a very full set of glyphs)
CJK (Chinese-Japanese-Korean)
-----------------------------
HanNomA and B from: http://vietunicode.sourceforge.net/fonts/fonts_hannom.html
unBatang_0613 from: http://people.ktug.or.kr/~nomos/mine/UnBatang_0613.ttf
Sun-ExtA and Sun-ExtB from: http://www.alanwood.net/unicode/fonts-east-asian.html
(http://www.alanwood.net/downloads/index.html)
Fonts which contain both Unicode BMP and SIP (Supplementary Ideographic Plane)
characters in one file e.g. "AR PL UMing" and "AR PL UKai"
from: http://www.freedesktop.org
http://www.freedesktop.org/wiki/Software/CJKUnifonts/Download
[MS Windows fonts such as MS Mincho and MingLiU also work]
Japanese IPA fonts: http://ossipedia.ipa.go.jp/ipafont/index.html
Arabic/Eastern fonts
--------------------
- XW Zar fonts can be downloaded from: http://www.redlers.com/downloadfont.html
(2 of these fonts are included in the release)
(original site in Farsi: http://wiki.irmug.org/index.php/XWZar)
- See below for more details and font names of the fonts used in mPDF 4.x
Other sources
-------------
http://www.unifont.org/fontguide/
http://www.alanwood.net/unicode/fonts.html
http://cooltext.com (e.g. http://cooltext.com/Fonts-Unicode+Arabic)
ApparatusSIL, DoulosSIL, Padauk from SIL: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&cat_id=FontDownloads
DaiBanna (Tai Le)
Mediaeval & Ancient Scripts
---------------------------
Junicode: http://junicode.sourceforge.net/
Cardo: http://scholarsfonts.net/cardofnt.html
Syriac fonts
------------
http://www.bethmardutho.org/meltho/
============
ARABIC FONTS
============
You can use any appropriate Unicode-encoded .ttf or .ttc font file for arabic text, but
the font file must include the Arabic Presentation Forms-B (U+FE70U+FEFF).
2 of the XW Zar fonts are included in the release.
===========
INDIC FONTS
===========
Indic scripts e.g. Hindi, Bengali etc. use conjuct forms which have no Unicode assignment. You
cannot therefore use any standard .ttf font files with mPDF.
A set of fonts has been adapted to use specifically with mPDF. They are based on a set of fonts from:
http://www.cdacmumbai.in/projects/indix/e_introduction.shtml
NB These fonts are released under GNU GPL Version 2 license
You need these adapted fonts (ind_bn_1_001.ttf etc.) to work with mPDF, as the glyphs have been
assigned to Unicode values in the Private Use area (U+E000 ->). These are included in the
mPDF download.
Users of mPDF v4.x
------------------
The original indic font files do not contain a full set of even basic ASCII
characters. The fonts supplied have been "fixed" to include those extra
characters. This now works whether the font is subset or not.
=========
CJK Fonts
=========
Supplemental Ideographic Plane
==============================
SIP = Supplemental Ideographic Plane ( = Plane 2) = U+20000 - U+2FFFF (131072 - 196607)
These characters are required for the HKSCS Hong Kong Supplementary Character Set. Fonts with
SIP characters are commonly divided into a second file e.g. MingLiU and MingLiU-ExtB
mPDF requires 2 fonts and they should be cross-referenced in config_fonts.php e.g.
"sun-exta" => array(
'R' => "Sun-ExtA.ttf",
'sip-ext' => 'sun-extb',
),
"sun-extb" => array(
'R' => "Sun-ExtB.ttf",
),
--OR--
(NB these ones also define the font number within the TTC Collection as TTCfontID)
'mingliu' => array (
'R' => 'mingliu.ttc',
'TTCfontID' => array (
'R' => 1,
),
'sip-ext' => 'mingliu-extb',
),
'mingliu-extb' => array (
'R' => 'mingliub.ttc',
'TTCfontID' => array (
'R' => 1,
),
),
'mingliu_hkscs' => array (
'R' => 'mingliu.ttc',
'TTCfontID' => array (
'R' => 3,
),
'sip-ext' => 'mingliu_hkscs-extb',
),
'mingliu_hkscs-extb' => array (
'R' => 'mingliub.ttc',
'TTCfontID' => array (
'R' => 3,
),
),

View File

@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -1,148 +0,0 @@
Installation
============
* Download the .zip file and unzip it
* Create a folder e.g. /mpdf on your server
* Upload all of the files to the server, maintaining the folders as they are
* Ensure that you have write permissions set (CHMOD 6xx or 7xx) for the following folders:
/ttfontdata/ - used to cache font data; improves performance a lot
/tmp/ - used for some images and ProgressBar
/graph_cache/ - if you are using JpGraph in conjunction with mPDF
To test the installation, point your browser to the basic example file : [path_to_mpdf_folder]/mpdf/examples/example_basic.php
If you wish to define a different folder for temporary files rather than /tmp/ see the note on 'Folder for temporary files' in
the section on Installation & Setup in the manual (http://mpdf1.com/manual/).
If you have problems, please read the section on troubleshooting in the manual.
Fonts
=====
I will refer to font names in 2 ways:
"CSS font-family name" - mPDF is designed primarily to read HTML and CSS. This is the name used in CSS e.g.
<p style="font-family: 'Trebuchet MS';">
"mPDF font-family name" - the name used internally to process fonts. This could be anything you like,
but by default mPDF will convert CSS font-family names by removing any spaces and changing
to lowercase. Reading the name above, mPDF will look for a "mPDF font-family name" of
'trebuchetms'.
The configurable values referred to below are set in the config_fonts.php file
When parsing HTML/CSS, mPDF will read the CSS font-family name (e.g. 'Trebuchet MS') and convert
by removing any spaces and changing to lowercase, to look for a mPDF font-family name (trebuchetms).
Next it will look for a translation (if set) e.g.:
$this->fonttrans = array(
'trebuchetms' => 'trebuchet'
)
Now the mPDF font-family name to be used is 'trebuchet'
If you wish to make this font available, you need to specify the Truetype .ttf font files for each variant.
These should be defined in the array:
$this->fontdata = array(
"trebuchet" => array(
'R' => "trebuc.ttf",
'B' => "trebucbd.ttf",
'I' => "trebucit.ttf",
'BI' => "trebucbi.ttf",
)
)
This is the array which determines whether a font is available to mPDF. Each font-family must have a
Regular ['R'] file defined - the others (bold, italic, bold-italic) are optional.
mPDF will try to load the font-file. If you have defined _MPDF_SYSTEM_TTFONTS at the top of the
config_fonts.php file, it will first look for the font-file there. This is useful if you are running
mPDF on a computer which already has a folder with TTF fonts in (e.g. on Windows)
If the font-file is not there, or _MPDF_SYSTEM_TTFONTS is not defined, mPDF will look in the folder
/[your_path_to_mpdf]/ttfonts/
Note that the font-file names are case-sensitive and can contain capitals.
If the folder /ttfontdata/ is writeable (CHMOD 644 or 755), mPDF will save files there which it can
re-use next time it accesses a particular font. This will significantly improve processing time
and is strongly recommended.
mPDF should be able to read most TrueType Unicode font files with a .ttf extension
Truetype fonts with .ttf extension that are OpenType also work OK.
TrueType collections (.ttc) will also work if they contain TrueType Unicode fonts.
Character substitution
----------------------
Most people will have access to a Pan-Unicode font with most Unicode characters in it such as
Arial Unicode MS. Set $this->backupSubsFont = array('arialunicodems'); at the top of the config_fonts.php file
to use this font when substituting any characters not found in the specific font being used.
Example:
You can set $mpdf->useSubstitutions = true; at runtime
or $this->useSubstitutions = true; in the config.php file
<p style="font-family: 'Comic Sans MS'">This text contains a Thai character &#3617; which does not exist
in the Comic Sans MS font file</p>
When useSubstitutions is true, mPDF will try to find substitutions for any missing characters:
1) firstly looks if the character is available in the inbuilt Symbols or ZapfDingbats fonts;
2) [If defined] looks in each of the the font(s) set by $this->backupSubsFont array
NB There is an increase in processing time when using substitutions, and even more so if
a backupSubsFont is defined.
Controlling mPDF mode
=====================
The first parameter of new mPDF('') works as follows:
new mPDF('c') - forces mPDF to only use the built-in [c]ore Adobe fonts (Helvetica, Times etc)
new mPDF('') - default - font subsetting behaviour is determined by the configurable variables
$this->maxTTFFilesize and $this->percentSubset (see below)
Default values are set so that: 1) very large font files are always subset
2) Fonts are embedded as subsets if < 30% of the characters are used
new mPDF('..-x') - used together with a language or language/country code, this will cause
mPDF to use only in-built core fonts (Helvetica, Times) if the language specified is appropiate;
otherwise it will force subsetting (equivalent to using "")
e.g. new mPDF('de-x') or new mPDF('pt-BR-x') will use in-built core fonts
and new mPDF('ru-x') will use subsets of any available TrueType fonts
The languages that use core fonts are defined in config_cp.php (using the value $coreSuitable).
new mPDF('..+aCJK') new mPDF('+aCJK')
new mPDF('..-aCJK') new mPDF('-aCJK')
- used optionally together with a language or language/country code, +aCJK will force mPDF
to use the Adobe non-embedded CJK fonts when a passage is marked with e.g. "lang: ja"
This can be used at runtime to override the value set for $mpdf->useAdobeCJK in config.php
Use in conjunction with settings in config_cp.php
For backwards compatibility, new mPDF('-s') and new mPDF('s') will force subsetting by
setting $this->percentSubset=100 (see below)
new mPDF('utf-8-s') and new mPDF('ar-s') are also recognised
Language/Country (ll-cc)
------------------------
You can use a language code ('en') or language/country code ('en-GB') to control which
mode/fonts are used. The behaviour is set up in config_cp.php file.
The default settings show some of the things you can do:
new mPDF('de') - as German is a Western European langauge, it is suitable to use the Adobe core fonts.
Using 'de' alone will do nothing, but if you use ('de-x'), this will use core fonts.
new mPDF('th') - many fonts do not contain the characters necessary for Thai script. The value $unifonts
defines a restricted list of fonts available for mPDF to use.
NB <html dir="rtl"> or <body dir="rtl"> are supported.
Configuration variables changed
===============================
Configuration variables are documented in the on-line manual (http://mpdf1.com/manual/).
Font folders
============
If you wish to define your own font file folders (perhaps to share),
you can define the 2 constants in your script before including the mpdf.php script e.g.:
define('_MPDF_TTFONTPATH','your_path/ttfonts/');
define('_MPDF_TTFONTDATAPATH','your_path/ttfontdata/'); // should be writeable

View File

@ -1,248 +0,0 @@
<?php
class bmp {
var $mpdf = null;
function bmp(&$mpdf) {
$this->mpdf = $mpdf;
}
function _getBMPimage($data, $file) {
$info = array();
// Adapted from script by Valentin Schmidt
// http://staff.dasdeck.de/valentin/fpdf/fpdf_bmp/
$bfOffBits=$this->_fourbytes2int_le(substr($data,10,4));
$width=$this->_fourbytes2int_le(substr($data,18,4));
$height=$this->_fourbytes2int_le(substr($data,22,4));
$flip = ($height<0);
if ($flip) $height =-$height;
$biBitCount=$this->_twobytes2int_le(substr($data,28,2));
$biCompression=$this->_fourbytes2int_le(substr($data,30,4));
$info = array('w'=>$width, 'h'=>$height);
if ($biBitCount<16){
$info['cs'] = 'Indexed';
$info['bpc'] = $biBitCount;
$palStr = substr($data,54,($bfOffBits-54));
$pal = '';
$cnt = strlen($palStr)/4;
for ($i=0;$i<$cnt;$i++){
$n = 4*$i;
$pal .= $palStr[$n+2].$palStr[$n+1].$palStr[$n];
}
$info['pal'] = $pal;
}
else{
$info['cs'] = 'DeviceRGB';
$info['bpc'] = 8;
}
if ($this->mpdf->restrictColorSpace==1 || $this->mpdf->PDFX || $this->mpdf->restrictColorSpace==3) {
if (($this->mpdf->PDFA && !$this->mpdf->PDFAauto) || ($this->mpdf->PDFX && !$this->mpdf->PDFXauto)) { $this->mpdf->PDFAXwarnings[] = "Image cannot be converted to suitable colour space for PDFA or PDFX file - ".$file." - (Image replaced by 'no-image'.)"; }
return array('error' => "BMP Image cannot be converted to suitable colour space - ".$file." - (Image replaced by 'no-image'.)");
}
$biXPelsPerMeter=$this->_fourbytes2int_le(substr($data,38,4)); // horizontal pixels per meter, usually set to zero
//$biYPelsPerMeter=$this->_fourbytes2int_le(substr($data,42,4)); // vertical pixels per meter, usually set to zero
$biXPelsPerMeter=round($biXPelsPerMeter/1000 *25.4);
//$biYPelsPerMeter=round($biYPelsPerMeter/1000 *25.4);
$info['set-dpi'] = $biXPelsPerMeter;
switch ($biCompression){
case 0:
$str = substr($data,$bfOffBits);
break;
case 1: # BI_RLE8
$str = $this->rle8_decode(substr($data,$bfOffBits), $width);
break;
case 2: # BI_RLE4
$str = $this->rle4_decode(substr($data,$bfOffBits), $width);
break;
}
$bmpdata = '';
$padCnt = (4-ceil(($width/(8/$biBitCount)))%4)%4;
switch ($biBitCount){
case 1:
case 4:
case 8:
$w = floor($width/(8/$biBitCount)) + ($width%(8/$biBitCount)?1:0);
$w_row = $w + $padCnt;
if ($flip){
for ($y=0;$y<$height;$y++){
$y0 = $y*$w_row;
for ($x=0;$x<$w;$x++)
$bmpdata .= $str[$y0+$x];
}
}else{
for ($y=$height-1;$y>=0;$y--){
$y0 = $y*$w_row;
for ($x=0;$x<$w;$x++)
$bmpdata .= $str[$y0+$x];
}
}
break;
case 16:
$w_row = $width*2 + $padCnt;
if ($flip){
for ($y=0;$y<$height;$y++){
$y0 = $y*$w_row;
for ($x=0;$x<$width;$x++){
$n = (ord( $str[$y0 + 2*$x + 1])*256 + ord( $str[$y0 + 2*$x]));
$b = ($n & 31)<<3; $g = ($n & 992)>>2; $r = ($n & 31744)>>7128;
$bmpdata .= chr($r) . chr($g) . chr($b);
}
}
}else{
for ($y=$height-1;$y>=0;$y--){
$y0 = $y*$w_row;
for ($x=0;$x<$width;$x++){
$n = (ord( $str[$y0 + 2*$x + 1])*256 + ord( $str[$y0 + 2*$x]));
$b = ($n & 31)<<3; $g = ($n & 992)>>2; $r = ($n & 31744)>>7;
$bmpdata .= chr($r) . chr($g) . chr($b);
}
}
}
break;
case 24:
case 32:
$byteCnt = $biBitCount/8;
$w_row = $width*$byteCnt + $padCnt;
if ($flip){
for ($y=0;$y<$height;$y++){
$y0 = $y*$w_row;
for ($x=0;$x<$width;$x++){
$i = $y0 + $x*$byteCnt ; # + 1
$bmpdata .= $str[$i+2].$str[$i+1].$str[$i];
}
}
}else{
for ($y=$height-1;$y>=0;$y--){
$y0 = $y*$w_row;
for ($x=0;$x<$width;$x++){
$i = $y0 + $x*$byteCnt ; # + 1
$bmpdata .= $str[$i+2].$str[$i+1].$str[$i];
}
}
}
break;
default:
return array('error' => 'Error parsing BMP image - Unsupported image biBitCount');
}
if ($this->mpdf->compress) {
$bmpdata=gzcompress($bmpdata);
$info['f']='FlateDecode';
}
$info['data']=$bmpdata;
$info['type']='bmp';
return $info;
}
function _fourbytes2int_le($s) {
//Read a 4-byte integer from string
return (ord($s[3])<<24) + (ord($s[2])<<16) + (ord($s[1])<<8) + ord($s[0]);
}
function _twobytes2int_le($s) {
//Read a 2-byte integer from string
return (ord(substr($s, 1, 1))<<8) + ord(substr($s, 0, 1));
}
# Decoder for RLE8 compression in windows bitmaps
# see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp
function rle8_decode ($str, $width){
$lineWidth = $width + (3 - ($width-1) % 4);
$out = '';
$cnt = strlen($str);
for ($i=0;$i<$cnt;$i++){
$o = ord($str[$i]);
switch ($o){
case 0: # ESCAPE
$i++;
switch (ord($str[$i])){
case 0: # NEW LINE
$padCnt = $lineWidth - strlen($out)%$lineWidth;
if ($padCnt<$lineWidth) $out .= str_repeat(chr(0), $padCnt); # pad line
break;
case 1: # END OF FILE
$padCnt = $lineWidth - strlen($out)%$lineWidth;
if ($padCnt<$lineWidth) $out .= str_repeat(chr(0), $padCnt); # pad line
break 3;
case 2: # DELTA
$i += 2;
break;
default: # ABSOLUTE MODE
$num = ord($str[$i]);
for ($j=0;$j<$num;$j++)
$out .= $str[++$i];
if ($num % 2) $i++;
}
break;
default:
$out .= str_repeat($str[++$i], $o);
}
}
return $out;
}
# Decoder for RLE4 compression in windows bitmaps
# see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp
function rle4_decode ($str, $width){
$w = floor($width/2) + ($width % 2);
$lineWidth = $w + (3 - ( ($width-1) / 2) % 4);
$pixels = array();
$cnt = strlen($str);
for ($i=0;$i<$cnt;$i++){
$o = ord($str[$i]);
switch ($o){
case 0: # ESCAPE
$i++;
switch (ord($str[$i])){
case 0: # NEW LINE
while (count($pixels)%$lineWidth!=0)
$pixels[]=0;
break;
case 1: # END OF FILE
while (count($pixels)%$lineWidth!=0)
$pixels[]=0;
break 3;
case 2: # DELTA
$i += 2;
break;
default: # ABSOLUTE MODE
$num = ord($str[$i]);
for ($j=0;$j<$num;$j++){
if ($j%2==0){
$c = ord($str[++$i]);
$pixels[] = ($c & 240)>>4;
} else
$pixels[] = $c & 15;
}
if ($num % 2) $i++;
}
break;
default:
$c = ord($str[++$i]);
for ($j=0;$j<$o;$j++)
$pixels[] = ($j%2==0 ? ($c & 240)>>4 : $c & 15);
}
}
$out = '';
if (count($pixels)%2) $pixels[]=0;
$cnt = count($pixels)/2;
for ($i=0;$i<$cnt;$i++)
$out .= chr(16*$pixels[2*$i] + $pixels[2*$i+1]);
return $out;
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,408 +0,0 @@
<?php
class directw {
var $mpdf = null;
function directw(&$mpdf) {
$this->mpdf = $mpdf;
}
function Write($h,$txt,$currentx=0,$link='',$directionality='ltr',$align='') {
if (!$align) {
if ($directionality=='rtl') { $align = 'R'; }
else { $align = 'L'; }
}
if ($h == 0) { $this->mpdf->SetLineHeight(); $h = $this->mpdf->lineheight; }
//Output text in flowing mode
$w = $this->mpdf->w - $this->mpdf->rMargin - $this->mpdf->x;
$wmax = ($w - ($this->mpdf->cMarginL+$this->mpdf->cMarginR));
$s=str_replace("\r",'',$txt);
if ($this->mpdf->usingCoreFont) { $nb=strlen($s); }
else {
$nb=mb_strlen($s, $this->mpdf->mb_enc );
// handle single space character
if(($nb==1) && $s == " ") {
$this->mpdf->x += $this->mpdf->GetStringWidth($s);
return;
}
}
$sep=-1;
$i=0;
$j=0;
$l=0;
$nl=1;
if (!$this->mpdf->usingCoreFont) {
if (preg_match("/([".$this->mpdf->pregRTLchars."])/u", $txt)) { $this->mpdf->biDirectional = true; } // *RTL*
$checkCursive=false;
if ($this->mpdf->biDirectional) { $checkCursive=true; } // *RTL*
else if (isset($this->mpdf->CurrentFont['indic']) && $this->mpdf->CurrentFont['indic']) { $checkCursive=true; } // *INDIC*
while($i<$nb) {
//Get next character
$c = mb_substr($s,$i,1,$this->mpdf->mb_enc );
if($c == "\n") {
// WORD SPACING
$this->mpdf->ResetSpacing();
//Explicit line break
$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mpdf->mb_enc));
if ($directionality == 'rtl' && $align == 'J') { $align = 'R'; } // *RTL*
$this->mpdf->magic_reverse_dir($tmp, true, $directionality); // *RTL*
$this->mpdf->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link);
$i++;
$sep = -1;
$j = $i;
$l = 0;
if($nl == 1) {
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
$w = $this->mpdf->w - $this->mpdf->rMargin - $this->mpdf->x;
$wmax = ($w - ($this->mpdf->cMarginL+$this->mpdf->cMarginR));
}
$nl++;
continue;
}
if($c == " ") { $sep= $i; }
$l += $this->mpdf->GetCharWidthNonCore($c); // mPDF 5.3.04
if($l > $wmax) {
//Automatic line break (word wrapping)
if($sep == -1) {
// WORD SPACING
$this->mpdf->ResetSpacing();
if($this->mpdf->x > $this->mpdf->lMargin) {
//Move to next line
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
$this->mpdf->y+=$h;
$w=$this->mpdf->w-$this->mpdf->rMargin-$this->mpdf->x;
$wmax = ($w - ($this->mpdf->cMarginL+$this->mpdf->cMarginR));
$i++;
$nl++;
continue;
}
if($i==$j) { $i++; }
$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mpdf->mb_enc));
if ($directionality == 'rtl' && $align == 'J') { $align = 'R'; } // *RTL*
$this->mpdf->magic_reverse_dir($tmp, true, $directionality); // *RTL*
$this->mpdf->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link);
}
else {
$tmp = rtrim(mb_substr($s,$j,$sep-$j,$this->mpdf->mb_enc));
if ($directionality == 'rtl' && $align == 'J') { $align = 'R'; } // *RTL*
$this->mpdf->magic_reverse_dir($tmp, true, $directionality); // *RTL*
if($align=='J') {
//////////////////////////////////////////
// JUSTIFY J using Unicode fonts (Word spacing doesn't work)
// WORD SPACING
// Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
$tmp = str_replace(chr(194).chr(160),chr(32),$tmp );
$len_ligne = $this->mpdf->GetStringWidth($tmp );
$nb_carac = mb_strlen( $tmp , $this->mpdf->mb_enc ) ;
$nb_spaces = mb_substr_count( $tmp ,' ', $this->mpdf->mb_enc ) ;
$inclCursive=false;
if ($checkCursive) {
if (preg_match("/([".$this->mpdf->pregRTLchars."])/u", $tmp)) { $inclCursive = true; } // *RTL*
if (preg_match("/([".$this->mpdf->pregHIchars.$this->mpdf->pregBNchars.$this->mpdf->pregPAchars."])/u", $tmp)) { $inclCursive = true; } // *INDIC*
}
list($charspacing,$ws) = $this->mpdf->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * _MPDFK),$inclCursive);
$this->mpdf->SetSpacing($charspacing,$ws);
//////////////////////////////////////////
}
$this->mpdf->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link);
$i=$sep+1;
}
$sep = -1;
$j = $i;
$l = 0;
if($nl==1) {
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
$w=$this->mpdf->w-$this->mpdf->rMargin-$this->mpdf->x;
$wmax = ($w - ($this->mpdf->cMarginL+$this->mpdf->cMarginR));
}
$nl++;
}
else { $i++; }
}
//Last chunk
// WORD SPACING
$this->mpdf->ResetSpacing();
}
else {
while($i<$nb) {
//Get next character
$c=$s[$i];
if($c == "\n") {
//Explicit line break
// WORD SPACING
$this->mpdf->ResetSpacing();
$this->mpdf->Cell($w, $h, substr($s, $j, $i-$j), 0, 2, $align, $fill, $link);
$i++;
$sep = -1;
$j = $i;
$l = 0;
if($nl == 1) {
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
$w = $this->mpdf->w - $this->mpdf->rMargin - $this->mpdf->x;
$wmax=$w-($this->mpdf->cMarginL+$this->mpdf->cMarginR);
}
$nl++;
continue;
}
if($c == " ") { $sep= $i; }
$l += $this->mpdf->GetCharWidthCore($c); // mPDF 5.3.04
if($l > $wmax) {
//Automatic line break (word wrapping)
if($sep == -1) {
// WORD SPACING
$this->mpdf->ResetSpacing();
if($this->mpdf->x > $this->mpdf->lMargin) {
//Move to next line
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
$this->mpdf->y+=$h;
$w=$this->mpdf->w-$this->mpdf->rMargin-$this->mpdf->x;
$wmax=$w-($this->mpdf->cMarginL+$this->mpdf->cMarginR);
$i++;
$nl++;
continue;
}
if($i==$j) { $i++; }
$this->mpdf->Cell($w, $h, substr($s, $j, $i-$j), 0, 2, $align, $fill, $link);
}
else {
$tmp = substr($s, $j, $sep-$j);
if($align=='J') {
//////////////////////////////////////////
// JUSTIFY J using Unicode fonts (Word spacing doesn't work)
// WORD SPACING
// Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
$tmp = str_replace(chr(160),chr(32),$tmp );
$len_ligne = $this->mpdf->GetStringWidth($tmp );
$nb_carac = strlen( $tmp ) ;
$nb_spaces = substr_count( $tmp ,' ' ) ;
list($charspacing,$ws) = $this->mpdf->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * _MPDFK),$false);
$this->mpdf->SetSpacing($charspacing,$ws);
//////////////////////////////////////////
}
$this->mpdf->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link);
$i=$sep+1;
}
$sep = -1;
$j = $i;
$l = 0;
if($nl==1) {
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
$w=$this->mpdf->w-$this->mpdf->rMargin-$this->mpdf->x;
$wmax=$w-($this->mpdf->cMarginL+$this->mpdf->cMarginR);
}
$nl++;
}
else {
$i++;
}
}
// WORD SPACING
$this->mpdf->ResetSpacing();
}
//Last chunk
if($i!=$j) {
if ($currentx != 0) $this->mpdf->x=$currentx;
else $this->mpdf->x=$this->mpdf->lMargin;
if ($this->mpdf->usingCoreFont) { $tmp = substr($s,$j,$i-$j); }
else {
$tmp = mb_substr($s,$j,$i-$j,$this->mpdf->mb_enc);
if ($directionality == 'rtl' && $align == 'J') { $align = 'R'; } // *RTL*
$this->mpdf->magic_reverse_dir($tmp, true, $directionality); // *RTL*
}
$this->mpdf->Cell($w,$h,$tmp,0,0,$align,$fill,$link);
}
}
function CircularText($x, $y, $r, $text, $align='top', $fontfamily='', $fontsizePt=0, $fontstyle='', $kerning=120, $fontwidth=100, $divider='') { // mPDF 5.5.23
if ($font || $fontstyle || $fontsizePt) $this->mpdf->SetFont($fontfamily,$fontstyle,$fontsizePt);
$kerning/=100;
$fontwidth/=100;
if($kerning==0) $this->mpdf->Error('Please use values unequal to zero for kerning (CircularText)');
if($fontwidth==0) $this->mpdf->Error('Please use values unequal to zero for font width (CircularText)');
$text=str_replace("\r",'',$text);
//circumference
$u=($r*2)*M_PI;
// mPDF 5.5.23
$checking = true;
$autoset = false;
while($checking) {
$t=0;
$w = array();
if ($this->mpdf->usingCoreFont) {
$nb=strlen($text);
for($i=0; $i<$nb; $i++){
$w[$i]=$this->mpdf->GetStringWidth($text[$i]);
$w[$i]*=$kerning*$fontwidth;
$t+=$w[$i];
}
}
else {
$nb=mb_strlen($text, $this->mpdf->mb_enc );
$lastchar = '';
$unicode = $this->mpdf->UTF8StringToArray($text);
for($i=0; $i<$nb; $i++){
$c = mb_substr($text,$i,1,$this->mpdf->mb_enc );
$w[$i]=$this->mpdf->GetStringWidth($c);
$w[$i]*=$kerning*$fontwidth;
$char = $unicode[$i];
if ($this->mpdf->useKerning && $lastchar) {
if (isset($this->mpdf->CurrentFont['kerninfo'][$lastchar][$char])) {
$tk = $this->mpdf->CurrentFont['kerninfo'][$lastchar][$char] * ($this->mpdf->FontSize/ 1000) * $kerning * $fontwidth;
$w[$i] += $tk/2;
$w[$i-1] += $tk/2;
$t+=$tk;
}
}
$lastchar = $char;
$t+=$w[$i];
}
}
if ($fontsizePt>=0 || $autoset) { $checking = false; }
else {
$t+=$this->mpdf->GetStringWidth(' ');
if ($divider)
$t+=$this->mpdf->GetStringWidth(' ');
if ($fontsizePt==-2)
$fontsizePt = $this->mpdf->FontSizePt * 0.5 * $u/$t;
else
$fontsizePt = $this->mpdf->FontSizePt * $u/$t;
$this->mpdf->SetFontSize($fontsizePt);
$autoset = true;
}
}
//total width of string in degrees
$d=($t/$u)*360;
$this->mpdf->StartTransform();
// rotate matrix for the first letter to center the text
// (half of total degrees)
if($align=='top'){
$this->mpdf->transformRotate(-$d/2, $x, $y);
}
else{
$this->mpdf->transformRotate($d/2, $x, $y);
}
//run through the string
for($i=0; $i<$nb; $i++){
if($align=='top'){
//rotate matrix half of the width of current letter + half of the width of preceding letter
if($i==0){
$this->mpdf->transformRotate((($w[$i]/2)/$u)*360, $x, $y);
}
else{
$this->mpdf->transformRotate((($w[$i]/2+$w[$i-1]/2)/$u)*360, $x, $y);
}
if($fontwidth!=1){
$this->mpdf->StartTransform();
$this->mpdf->transformScale($fontwidth*100, 100, $x, $y);
}
$this->mpdf->SetXY($x-$w[$i]/2, $y-$r);
}
else{
//rotate matrix half of the width of current letter + half of the width of preceding letter
if($i==0){
$this->mpdf->transformRotate(-(($w[$i]/2)/$u)*360, $x, $y);
}
else{
$this->mpdf->transformRotate(-(($w[$i]/2+$w[$i-1]/2)/$u)*360, $x, $y);
}
if($fontwidth!=1){
$this->mpdf->StartTransform();
$this->mpdf->transformScale($fontwidth*100, 100, $x, $y);
}
$this->mpdf->SetXY($x-$w[$i]/2, $y+$r-($this->mpdf->FontSize));
}
if ($this->mpdf->usingCoreFont) { $c=$text[$i]; }
else { $c = mb_substr($text,$i,1,$this->mpdf->mb_enc ); }
$this->mpdf->Cell(($w[$i]),$this->mpdf->FontSize,$c,0,0,'C'); // mPDF 5.3.53
if($fontwidth!=1){
$this->mpdf->StopTransform();
}
}
$this->mpdf->StopTransform();
// mPDF 5.5.23
if($align=='top' && $divider!=''){
$wc=$this->mpdf->GetStringWidth($divider);
$wc*=$kerning*$fontwidth;
$this->mpdf->StartTransform();
$this->mpdf->transformRotate(90, $x, $y);
$this->mpdf->SetXY($x-$wc/2, $y-$r);
$this->mpdf->Cell(($wc),$this->mpdf->FontSize,$divider,0,0,'C');
$this->mpdf->StopTransform();
$this->mpdf->StartTransform();
$this->mpdf->transformRotate(-90, $x, $y);
$this->mpdf->SetXY($x-$wc/2, $y-$r);
$this->mpdf->Cell(($wc),$this->mpdf->FontSize,$divider,0,0,'C');
$this->mpdf->StopTransform();
}
}
function Shaded_box( $text,$font='',$fontstyle='B',$szfont='',$width='70%',$style='DF',$radius=2.5,$fill='#FFFFFF',$color='#000000',$pad=2 )
{
// F (shading - no line),S (line, no shading),DF (both)
if (!$font) { $font= $this->mpdf->default_font; }
if (!$szfont) { $szfont = ($this->mpdf->default_font_size * 1.8); }
$text = $this->mpdf->purify_utf8_text($text);
if ($this->mpdf->text_input_as_HTML) {
$text = $this->mpdf->all_entities_to_utf8($text);
}
if ($this->mpdf->usingCoreFont) { $text = mb_convert_encoding($text,$this->mpdf->mb_enc,'UTF-8'); }
// DIRECTIONALITY
$this->mpdf->magic_reverse_dir($text, true, $this->mpdf->directionality); // *RTL*
// Font-specific ligature substitution for Indic fonts
if (isset($this->mpdf->CurrentFont['indic']) && $this->mpdf->CurrentFont['indic']) $this->mpdf->ConvertIndic($text); // *INDIC*
$text = ' '.$text.' ';
if (!$width) { $width = $this->mpdf->pgwidth; } else { $width=$this->mpdf->ConvertSize($width,$this->mpdf->pgwidth); }
$midpt = $this->mpdf->lMargin+($this->mpdf->pgwidth/2);
$r1 = $midpt-($width/2); //($this->mpdf->w / 2) - 40;
$r2 = $r1 + $width; //$r1 + 80;
$y1 = $this->mpdf->y;
$mid = ($r1 + $r2 ) / 2;
$loop = 0;
while ( $loop == 0 )
{
$this->mpdf->SetFont( $font, $fontstyle, $szfont );
$sz = $this->mpdf->GetStringWidth( $text );
if ( ($r1+$sz) > $r2 )
$szfont --;
else
$loop ++;
}
$y2 = $this->mpdf->FontSize+($pad*2);
$this->mpdf->SetLineWidth(0.1);
$fc = $this->mpdf->ConvertColor($fill);
$tc = $this->mpdf->ConvertColor($color);
$this->mpdf->SetFColor($fc);
$this->mpdf->SetTColor($tc);
$this->mpdf->RoundedRect($r1, $y1, ($r2 - $r1), $y2, $radius, $style);
$this->mpdf->SetX( $r1);
$this->mpdf->Cell($r2-$r1, $y2, $text, 0, 1, "C" );
$this->mpdf->SetY($y1+$y2+2); // +2 = mm margin below shaded box
$this->mpdf->Reset();
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,700 +0,0 @@
<?php
///////////////////////////////////////////////////////////////////////////////////////////////////
// 2009-12-22 Adapted for mPDF 4.2
///////////////////////////////////////////////////////////////////////////////////////////////////
// GIF Util - (C) 2003 Yamasoft (S/C)
// http://www.yamasoft.com
// All Rights Reserved
// This file can be freely copied, distributed, modified, updated by anyone under the only
// condition to leave the original address (Yamasoft, http://www.yamasoft.com) and this header.
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
// 2009-12-22 Adapted INB
// Functions calling functionname($x, $len = 0) were not working on PHP5.1.5 as pass by reference
// All edited to $len = 0; then call function.
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
class CGIFLZW
{
var $MAX_LZW_BITS;
var $Fresh, $CodeSize, $SetCodeSize, $MaxCode, $MaxCodeSize, $FirstCode, $OldCode;
var $ClearCode, $EndCode, $Next, $Vals, $Stack, $sp, $Buf, $CurBit, $LastBit, $Done, $LastByte;
///////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
function CGIFLZW()
{
$this->MAX_LZW_BITS = 12;
unSet($this->Next);
unSet($this->Vals);
unSet($this->Stack);
unSet($this->Buf);
$this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1);
$this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1);
$this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1);
$this->Buf = range(0, 279);
}
///////////////////////////////////////////////////////////////////////////
function deCompress($data, &$datLen)
{
$stLen = strlen($data);
$datLen = 0;
$ret = "";
$dp = 0; // data pointer
// INITIALIZATION
$this->LZWCommandInit($data, $dp);
while(($iIndex = $this->LZWCommand($data, $dp)) >= 0) {
$ret .= chr($iIndex);
}
$datLen = $dp;
if($iIndex != -2) {
return false;
}
return $ret;
}
///////////////////////////////////////////////////////////////////////////
function LZWCommandInit(&$data, &$dp)
{
$this->SetCodeSize = ord($data[0]);
$dp += 1;
$this->CodeSize = $this->SetCodeSize + 1;
$this->ClearCode = 1 << $this->SetCodeSize;
$this->EndCode = $this->ClearCode + 1;
$this->MaxCode = $this->ClearCode + 2;
$this->MaxCodeSize = $this->ClearCode << 1;
$this->GetCodeInit($data, $dp);
$this->Fresh = 1;
for($i = 0; $i < $this->ClearCode; $i++) {
$this->Next[$i] = 0;
$this->Vals[$i] = $i;
}
for(; $i < (1 << $this->MAX_LZW_BITS); $i++) {
$this->Next[$i] = 0;
$this->Vals[$i] = 0;
}
$this->sp = 0;
return 1;
}
function LZWCommand(&$data, &$dp)
{
if($this->Fresh) {
$this->Fresh = 0;
do {
$this->FirstCode = $this->GetCode($data, $dp);
$this->OldCode = $this->FirstCode;
}
while($this->FirstCode == $this->ClearCode);
return $this->FirstCode;
}
if($this->sp > 0) {
$this->sp--;
return $this->Stack[$this->sp];
}
while(($Code = $this->GetCode($data, $dp)) >= 0) {
if($Code == $this->ClearCode) {
for($i = 0; $i < $this->ClearCode; $i++) {
$this->Next[$i] = 0;
$this->Vals[$i] = $i;
}
for(; $i < (1 << $this->MAX_LZW_BITS); $i++) {
$this->Next[$i] = 0;
$this->Vals[$i] = 0;
}
$this->CodeSize = $this->SetCodeSize + 1;
$this->MaxCodeSize = $this->ClearCode << 1;
$this->MaxCode = $this->ClearCode + 2;
$this->sp = 0;
$this->FirstCode = $this->GetCode($data, $dp);
$this->OldCode = $this->FirstCode;
return $this->FirstCode;
}
if($Code == $this->EndCode) {
return -2;
}
$InCode = $Code;
if($Code >= $this->MaxCode) {
$this->Stack[$this->sp++] = $this->FirstCode;
$Code = $this->OldCode;
}
while($Code >= $this->ClearCode) {
$this->Stack[$this->sp++] = $this->Vals[$Code];
if($Code == $this->Next[$Code]) // Circular table entry, big GIF Error!
return -1;
$Code = $this->Next[$Code];
}
$this->FirstCode = $this->Vals[$Code];
$this->Stack[$this->sp++] = $this->FirstCode;
if(($Code = $this->MaxCode) < (1 << $this->MAX_LZW_BITS)) {
$this->Next[$Code] = $this->OldCode;
$this->Vals[$Code] = $this->FirstCode;
$this->MaxCode++;
if(($this->MaxCode >= $this->MaxCodeSize) && ($this->MaxCodeSize < (1 << $this->MAX_LZW_BITS))) {
$this->MaxCodeSize *= 2;
$this->CodeSize++;
}
}
$this->OldCode = $InCode;
if($this->sp > 0) {
$this->sp--;
return $this->Stack[$this->sp];
}
}
return $Code;
}
///////////////////////////////////////////////////////////////////////////
function GetCodeInit(&$data, &$dp)
{
$this->CurBit = 0;
$this->LastBit = 0;
$this->Done = 0;
$this->LastByte = 2;
return 1;
}
function GetCode(&$data, &$dp)
{
if(($this->CurBit + $this->CodeSize) >= $this->LastBit) {
if($this->Done) {
if($this->CurBit >= $this->LastBit) {
// Ran off the end of my bits
return 0;
}
return -1;
}
$this->Buf[0] = $this->Buf[$this->LastByte - 2];
$this->Buf[1] = $this->Buf[$this->LastByte - 1];
$Count = ord($data[$dp]);
$dp += 1;
if($Count) {
for($i = 0; $i < $Count; $i++) {
$this->Buf[2 + $i] = ord($data[$dp+$i]);
}
$dp += $Count;
}
else {
$this->Done = 1;
}
$this->LastByte = 2 + $Count;
$this->CurBit = ($this->CurBit - $this->LastBit) + 16;
$this->LastBit = (2 + $Count) << 3;
}
$iRet = 0;
for($i = $this->CurBit, $j = 0; $j < $this->CodeSize; $i++, $j++) {
$iRet |= (($this->Buf[intval($i / 8)] & (1 << ($i % 8))) != 0) << $j;
}
$this->CurBit += $this->CodeSize;
return $iRet;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
class CGIFCOLORTABLE
{
var $m_nColors;
var $m_arColors;
///////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
function CGIFCOLORTABLE()
{
unSet($this->m_nColors);
unSet($this->m_arColors);
}
///////////////////////////////////////////////////////////////////////////
function load($lpData, $num)
{
$this->m_nColors = 0;
$this->m_arColors = array();
for($i = 0; $i < $num; $i++) {
$rgb = substr($lpData, $i * 3, 3);
if(strlen($rgb) < 3) {
return false;
}
$this->m_arColors[] = (ord($rgb[2]) << 16) + (ord($rgb[1]) << 8) + ord($rgb[0]);
$this->m_nColors++;
}
return true;
}
///////////////////////////////////////////////////////////////////////////
function toString()
{
$ret = "";
for($i = 0; $i < $this->m_nColors; $i++) {
$ret .=
chr(($this->m_arColors[$i] & 0x000000FF)) . // R
chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B
}
return $ret;
}
///////////////////////////////////////////////////////////////////////////
function colorIndex($rgb)
{
$rgb = intval($rgb) & 0xFFFFFF;
$r1 = ($rgb & 0x0000FF);
$g1 = ($rgb & 0x00FF00) >> 8;
$b1 = ($rgb & 0xFF0000) >> 16;
$idx = -1;
for($i = 0; $i < $this->m_nColors; $i++) {
$r2 = ($this->m_arColors[$i] & 0x000000FF);
$g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8;
$b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16;
$d = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1);
if(($idx == -1) || ($d < $dif)) {
$idx = $i;
$dif = $d;
}
}
return $idx;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
class CGIFFILEHEADER
{
var $m_lpVer;
var $m_nWidth;
var $m_nHeight;
var $m_bGlobalClr;
var $m_nColorRes;
var $m_bSorted;
var $m_nTableSize;
var $m_nBgColor;
var $m_nPixelRatio;
var $m_colorTable;
///////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
function CGIFFILEHEADER()
{
unSet($this->m_lpVer);
unSet($this->m_nWidth);
unSet($this->m_nHeight);
unSet($this->m_bGlobalClr);
unSet($this->m_nColorRes);
unSet($this->m_bSorted);
unSet($this->m_nTableSize);
unSet($this->m_nBgColor);
unSet($this->m_nPixelRatio);
unSet($this->m_colorTable);
}
///////////////////////////////////////////////////////////////////////////
function load($lpData, &$hdrLen)
{
$hdrLen = 0;
$this->m_lpVer = substr($lpData, 0, 6);
if(($this->m_lpVer <> "GIF87a") && ($this->m_lpVer <> "GIF89a")) {
return false;
}
$this->m_nWidth = $this->w2i(substr($lpData, 6, 2));
$this->m_nHeight = $this->w2i(substr($lpData, 8, 2));
if(!$this->m_nWidth || !$this->m_nHeight) {
return false;
}
$b = ord(substr($lpData, 10, 1));
$this->m_bGlobalClr = ($b & 0x80) ? true : false;
$this->m_nColorRes = ($b & 0x70) >> 4;
$this->m_bSorted = ($b & 0x08) ? true : false;
$this->m_nTableSize = 2 << ($b & 0x07);
$this->m_nBgColor = ord(substr($lpData, 11, 1));
$this->m_nPixelRatio = ord(substr($lpData, 12, 1));
$hdrLen = 13;
if($this->m_bGlobalClr) {
$this->m_colorTable = new CGIFCOLORTABLE();
if(!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) {
return false;
}
$hdrLen += 3 * $this->m_nTableSize;
}
return true;
}
///////////////////////////////////////////////////////////////////////////
function w2i($str)
{
return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
class CGIFIMAGEHEADER
{
var $m_nLeft;
var $m_nTop;
var $m_nWidth;
var $m_nHeight;
var $m_bLocalClr;
var $m_bInterlace;
var $m_bSorted;
var $m_nTableSize;
var $m_colorTable;
///////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
function CGIFIMAGEHEADER()
{
unSet($this->m_nLeft);
unSet($this->m_nTop);
unSet($this->m_nWidth);
unSet($this->m_nHeight);
unSet($this->m_bLocalClr);
unSet($this->m_bInterlace);
unSet($this->m_bSorted);
unSet($this->m_nTableSize);
unSet($this->m_colorTable);
}
///////////////////////////////////////////////////////////////////////////
function load($lpData, &$hdrLen)
{
$hdrLen = 0;
$this->m_nLeft = $this->w2i(substr($lpData, 0, 2));
$this->m_nTop = $this->w2i(substr($lpData, 2, 2));
$this->m_nWidth = $this->w2i(substr($lpData, 4, 2));
$this->m_nHeight = $this->w2i(substr($lpData, 6, 2));
if(!$this->m_nWidth || !$this->m_nHeight) {
return false;
}
$b = ord($lpData{8});
$this->m_bLocalClr = ($b & 0x80) ? true : false;
$this->m_bInterlace = ($b & 0x40) ? true : false;
$this->m_bSorted = ($b & 0x20) ? true : false;
$this->m_nTableSize = 2 << ($b & 0x07);
$hdrLen = 9;
if($this->m_bLocalClr) {
$this->m_colorTable = new CGIFCOLORTABLE();
if(!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) {
return false;
}
$hdrLen += 3 * $this->m_nTableSize;
}
return true;
}
///////////////////////////////////////////////////////////////////////////
function w2i($str)
{
return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
class CGIFIMAGE
{
var $m_disp;
var $m_bUser;
var $m_bTrans;
var $m_nDelay;
var $m_nTrans;
var $m_lpComm;
var $m_gih;
var $m_data;
var $m_lzw;
///////////////////////////////////////////////////////////////////////////
function CGIFIMAGE()
{
unSet($this->m_disp);
unSet($this->m_bUser);
unSet($this->m_bTrans);
unSet($this->m_nDelay);
unSet($this->m_nTrans);
unSet($this->m_lpComm);
unSet($this->m_data);
$this->m_gih = new CGIFIMAGEHEADER();
$this->m_lzw = new CGIFLZW();
}
///////////////////////////////////////////////////////////////////////////
function load($data, &$datLen)
{
$datLen = 0;
while(true) {
$b = ord($data[0]);
$data = substr($data, 1);
$datLen++;
switch($b) {
case 0x21: // Extension
$len = 0;
if(!$this->skipExt($data, $len)) {
return false;
}
$datLen += $len;
break;
case 0x2C: // Image
// LOAD HEADER & COLOR TABLE
$len = 0;
if(!$this->m_gih->load($data, $len)) {
return false;
}
$data = substr($data, $len);
$datLen += $len;
// ALLOC BUFFER
$len = 0;
if(!($this->m_data = $this->m_lzw->deCompress($data, $len))) {
return false;
}
$data = substr($data, $len);
$datLen += $len;
if($this->m_gih->m_bInterlace) {
$this->deInterlace();
}
return true;
case 0x3B: // EOF
default:
return false;
}
}
return false;
}
///////////////////////////////////////////////////////////////////////////
function skipExt(&$data, &$extLen)
{
$extLen = 0;
$b = ord($data[0]);
$data = substr($data, 1);
$extLen++;
switch($b) {
case 0xF9: // Graphic Control
$b = ord($data[1]);
$this->m_disp = ($b & 0x1C) >> 2;
$this->m_bUser = ($b & 0x02) ? true : false;
$this->m_bTrans = ($b & 0x01) ? true : false;
$this->m_nDelay = $this->w2i(substr($data, 2, 2));
$this->m_nTrans = ord($data[4]);
break;
case 0xFE: // Comment
$this->m_lpComm = substr($data, 1, ord($data[0]));
break;
case 0x01: // Plain text
break;
case 0xFF: // Application
break;
}
// SKIP DEFAULT AS DEFS MAY CHANGE
$b = ord($data[0]);
$data = substr($data, 1);
$extLen++;
while($b > 0) {
$data = substr($data, $b);
$extLen += $b;
$b = ord($data[0]);
$data = substr($data, 1);
$extLen++;
}
return true;
}
///////////////////////////////////////////////////////////////////////////
function w2i($str)
{
return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
}
///////////////////////////////////////////////////////////////////////////
function deInterlace()
{
$data = $this->m_data;
for($i = 0; $i < 4; $i++) {
switch($i) {
case 0:
$s = 8;
$y = 0;
break;
case 1:
$s = 8;
$y = 4;
break;
case 2:
$s = 4;
$y = 2;
break;
case 3:
$s = 2;
$y = 1;
break;
}
for(; $y < $this->m_gih->m_nHeight; $y += $s) {
$lne = substr($this->m_data, 0, $this->m_gih->m_nWidth);
$this->m_data = substr($this->m_data, $this->m_gih->m_nWidth);
$data =
substr($data, 0, $y * $this->m_gih->m_nWidth) .
$lne .
substr($data, ($y + 1) * $this->m_gih->m_nWidth);
}
}
$this->m_data = $data;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
class CGIF
{
var $m_gfh;
var $m_lpData;
var $m_img;
var $m_bLoaded;
///////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
function CGIF()
{
$this->m_gfh = new CGIFFILEHEADER();
$this->m_img = new CGIFIMAGE();
$this->m_lpData = "";
$this->m_bLoaded = false;
}
///////////////////////////////////////////////////////////////////////////
function ClearData() {
$this->m_lpData = '';
unSet($this->m_img->m_data);
unSet($this->m_img->m_lzw->Next);
unSet($this->m_img->m_lzw->Vals);
unSet($this->m_img->m_lzw->Stack);
unSet($this->m_img->m_lzw->Buf);
}
function loadFile(&$data, $iIndex)
{
if($iIndex < 0) {
return false;
}
$this->m_lpData = $data;
// GET FILE HEADER
$len = 0;
if(!$this->m_gfh->load($this->m_lpData, $len)) {
return false;
}
$this->m_lpData = substr($this->m_lpData, $len);
do {
$imgLen = 0;
if(!$this->m_img->load($this->m_lpData, $imgLen)) {
return false;
}
$this->m_lpData = substr($this->m_lpData, $imgLen);
}
while($iIndex-- > 0);
$this->m_bLoaded = true;
return true;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
?>

View File

@ -1,723 +0,0 @@
<?php
class grad {
var $mpdf = null;
function grad(&$mpdf) {
$this->mpdf = $mpdf;
}
// mPDF 5.3.A1
function CoonsPatchMesh($x, $y, $w, $h, $patch_array=array(), $x_min=0, $x_max=1, $y_min=0, $y_max=1, $colspace='RGB', $return=false){
$s=' q ';
$s.=sprintf(' %.3F %.3F %.3F %.3F re W n ', $x*_MPDFK, ($this->mpdf->h-$y)*_MPDFK, $w*_MPDFK, -$h*_MPDFK);
$s.=sprintf(' %.3F 0 0 %.3F %.3F %.3F cm ', $w*_MPDFK, $h*_MPDFK, $x*_MPDFK, ($this->mpdf->h-($y+$h))*_MPDFK);
$n = count($this->mpdf->gradients)+1;
$this->mpdf->gradients[$n]['type'] = 6; //coons patch mesh
$this->mpdf->gradients[$n]['colorspace'] = $colspace; //coons patch mesh
$bpcd=65535; //16 BitsPerCoordinate
$trans = false;
$this->mpdf->gradients[$n]['stream']='';
for($i=0;$i<count($patch_array);$i++){
$this->mpdf->gradients[$n]['stream'].=chr($patch_array[$i]['f']); //start with the edge flag as 8 bit
for($j=0;$j<count($patch_array[$i]['points']);$j++){
//each point as 16 bit
if (($j % 2) == 1) { // Y coordinate (adjusted as input is From top left)
$patch_array[$i]['points'][$j]=(($patch_array[$i]['points'][$j]-$y_min)/($y_max-$y_min))*$bpcd;
$patch_array[$i]['points'][$j]=$bpcd-$patch_array[$i]['points'][$j];
}
else {
$patch_array[$i]['points'][$j]=(($patch_array[$i]['points'][$j]-$x_min)/($x_max-$x_min))*$bpcd;
}
if($patch_array[$i]['points'][$j]<0) $patch_array[$i]['points'][$j]=0;
if($patch_array[$i]['points'][$j]>$bpcd) $patch_array[$i]['points'][$j]=$bpcd;
$this->mpdf->gradients[$n]['stream'].=chr(floor($patch_array[$i]['points'][$j]/256));
$this->mpdf->gradients[$n]['stream'].=chr(floor($patch_array[$i]['points'][$j]%256));
}
for($j=0;$j<count($patch_array[$i]['colors']);$j++){
//each color component as 8 bit
if ($colspace=='RGB') {
$this->mpdf->gradients[$n]['stream'].=($patch_array[$i]['colors'][$j][1]);
$this->mpdf->gradients[$n]['stream'].=($patch_array[$i]['colors'][$j][2]);
$this->mpdf->gradients[$n]['stream'].=($patch_array[$i]['colors'][$j][3]);
if (isset($patch_array[$i]['colors'][$j][4]) && ord($patch_array[$i]['colors'][$j][4])<100) { $trans = true; }
}
else if ($colspace=='CMYK') {
$this->mpdf->gradients[$n]['stream'].=chr(ord($patch_array[$i]['colors'][$j][1])*2.55);
$this->mpdf->gradients[$n]['stream'].=chr(ord($patch_array[$i]['colors'][$j][2])*2.55);
$this->mpdf->gradients[$n]['stream'].=chr(ord($patch_array[$i]['colors'][$j][3])*2.55);
$this->mpdf->gradients[$n]['stream'].=chr(ord($patch_array[$i]['colors'][$j][4])*2.55);
if (isset($patch_array[$i]['colors'][$j][5]) && ord($patch_array[$i]['colors'][$j][5])<100) { $trans = true; }
}
else if ($colspace=='Gray') {
$this->mpdf->gradients[$n]['stream'].=($patch_array[$i]['colors'][$j][1]);
if ($patch_array[$i]['colors'][$j][2]==1) { $trans = true; } // transparency converted from rgba or cmyka()
}
}
}
// TRANSPARENCY
if ($trans) {
$this->mpdf->gradients[$n]['stream_trans']='';
for($i=0;$i<count($patch_array);$i++){
$this->mpdf->gradients[$n]['stream_trans'].=chr($patch_array[$i]['f']);
for($j=0;$j<count($patch_array[$i]['points']);$j++){
//each point as 16 bit
$this->mpdf->gradients[$n]['stream_trans'].=chr(floor($patch_array[$i]['points'][$j]/256));
$this->mpdf->gradients[$n]['stream_trans'].=chr(floor($patch_array[$i]['points'][$j]%256));
}
for($j=0;$j<count($patch_array[$i]['colors']);$j++){
//each color component as 8 bit // OPACITY
if ($colspace=='RGB') {
$this->mpdf->gradients[$n]['stream_trans'].=chr(intval(ord($patch_array[$i]['colors'][$j][4])*2.55));
}
else if ($colspace=='CMYK') {
$this->mpdf->gradients[$n]['stream_trans'].=chr(intval(ord($patch_array[$i]['colors'][$j][5])*2.55));
}
else if ($colspace=='Gray') {
$this->mpdf->gradients[$n]['stream_trans'].=chr(intval(ord($patch_array[$i]['colors'][$j][3])*2.55));
}
}
}
$this->mpdf->gradients[$n]['trans'] = true;
$s .= ' /TGS'.$n.' gs ';
}
//paint the gradient
$s .= '/Sh'.$n.' sh'."\n";
//restore previous Graphic State
$s .= 'Q'."\n";
if ($return) { return $s; }
else { $this->mpdf->_out($s); }
}
// type = linear:2; radial: 3;
// Linear: $coords - array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg).
// The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
// Radial: $coords - array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1,
// (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg).
// (fx, fy) should be inside the circle, otherwise some areas will not be defined
// $col = array(R,G,B/255); or array(G/255); or array(C,M,Y,K/100)
// $stops = array('col'=>$col [, 'opacity'=>0-1] [, 'offset'=>0-1])
function Gradient($x, $y, $w, $h, $type, $stops=array(), $colorspace='RGB', $coords='', $extend='', $return=false, $is_mask=false) {
if (strtoupper(substr($type,0,1)) == 'L') { $type = 2; } // linear
else if (strtoupper(substr($type,0,1)) == 'R') { $type = 3; } // radial
if ($colorspace != 'CMYK' && $colorspace != 'Gray') {
$colorspace = 'RGB';
}
$bboxw = $w;
$bboxh = $h;
$usex = $x;
$usey = $y;
$usew = $bboxw;
$useh = $bboxh;
if ($type < 1) { $type = 2; }
if ($coords[0]!==false && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$coords[0],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $coords[0] = $tmp/$w; }
}
if ($coords[1]!==false && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$coords[1],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $coords[1] = 1-($tmp/$h); }
}
// LINEAR
if ($type == 2) {
$angle = $coords[4];
$repeat = $coords[5];
// ALL POINTS SET (default for custom mPDF linear gradient) - no -moz
if ($coords[0]!==false && $coords[1]!==false && $coords[2]!==false && $coords[3]!==false) {
// do nothing - coords used as they are
}
// If both a <point> and <angle> are defined, the gradient axis starts from the point and runs along the angle. The end point is
// defined as before - in this case start points may not be in corners, and axis may not correctly fall in the right quadrant.
// NO end points (Angle defined & Start points)
else if ($angle!==false && $coords[0]!==false && $coords[1]!==false && $coords[2]===false && $coords[3]===false) {
if ($angle==0 || $angle==360) { $coords[3]=$coords[1]; if ($coords[0]==1) $coords[2]=2; else $coords[2]=1; }
else if ($angle==90) { $coords[2]=$coords[0]; $coords[3]=1; if ($coords[1]==1) $coords[3]=2; else $coords[3]=1; }
else if ($angle==180) { if ($coords[4]==0) $coords[2]=-1; else $coords[2]=0; $coords[3]=$coords[1]; }
else if ($angle==270) { $coords[2]=$coords[0]; if ($coords[1]==0) $coords[3]=-1; else $coords[3]=0; }
else {
$endx=1; $endy=1;
if ($angle <=90) {
if ($angle <=45) { $endy=tan(deg2rad($angle)); }
else { $endx=tan(deg2rad(90-$angle)); }
$b = atan2(($endy*$bboxh), ($endx*$bboxw));
$ny = 1 - $coords[1] - (tan($b) * (1-$coords[0]));
$tx = sin($b) * cos($b) * $ny;
$ty = cos($b) * cos($b) * $ny;
$coords[2] = 1+$tx; $coords[3] = 1-$ty;
}
else if ($angle <=180) {
if ($angle <=135) { $endx=tan(deg2rad($angle-90)); }
else { $endy=tan(deg2rad(180-$angle)); }
$b = atan2(($endy*$bboxh), ($endx*$bboxw));
$ny = 1 - $coords[1] - (tan($b) * ($coords[0]));
$tx = sin($b) * cos($b) * $ny;
$ty = cos($b) * cos($b) * $ny;
$coords[2] = -$tx; $coords[3] = 1-$ty;
}
else if ($angle <=270) {
if ($angle <=225) { $endy=tan(deg2rad($angle-180)); }
else { $endx=tan(deg2rad(270-$angle)); }
$b = atan2(($endy*$bboxh), ($endx*$bboxw));
$ny = $coords[1] - (tan($b) * ($coords[0]));
$tx = sin($b) * cos($b) * $ny;
$ty = cos($b) * cos($b) * $ny;
$coords[2] = -$tx; $coords[3] = $ty;
}
else {
if ($angle <=315) { $endx=tan(deg2rad($angle-270)); }
else { $endy=tan(deg2rad(360-$angle)); }
$b = atan2(($endy*$bboxh), ($endx*$bboxw));
$ny = $coords[1] - (tan($b) * (1-$coords[0]));
$tx = sin($b) * cos($b) * $ny;
$ty = cos($b) * cos($b) * $ny;
$coords[2] = 1+$tx; $coords[3] = $ty;
}
}
}
// -moz If the first parameter is only an <angle>, the gradient axis starts from the box's corner that would ensure the
// axis goes through the box. The axis runs along the specified angle. The end point of the axis is defined such that the
// farthest corner of the box from the starting point is perpendicular to the gradient axis at that point.
// NO end points or Start points (Angle defined)
else if ($angle!==false && $coords[0]===false && $coords[1]===false) {
if ($angle==0 || $angle==360) { $coords[0]=0; $coords[1]=0; $coords[2]=1; $coords[3]=0; }
else if ($angle==90) { $coords[0]=0; $coords[1]=0; $coords[2]=0; $coords[3]=1; }
else if ($angle==180) { $coords[0]=1; $coords[1]=0; $coords[2]=0; $coords[3]=0; }
else if ($angle==270) { $coords[0]=0; $coords[1]=1; $coords[2]=0; $coords[3]=0; }
else {
if ($angle <=90) {
$coords[0]=0; $coords[1]=0;
if ($angle <=45) { $endx=1; $endy=tan(deg2rad($angle)); }
else { $endx=tan(deg2rad(90-$angle)); $endy=1; }
}
else if ($angle <=180) {
$coords[0]=1; $coords[1]=0;
if ($angle <=135) { $endx=tan(deg2rad($angle-90)); $endy=1; }
else { $endx=1; $endy=tan(deg2rad(180-$angle)); }
}
else if ($angle <=270) {
$coords[0]=1; $coords[1]=1;
if ($angle <=225) { $endx=1; $endy=tan(deg2rad($angle-180)); }
else { $endx=tan(deg2rad(270-$angle)); $endy=1; }
}
else {
$coords[0]=0; $coords[1]=1;
if ($angle <=315) { $endx=tan(deg2rad($angle-270)); $endy=1; }
else { $endx=1; $endy=tan(deg2rad(360-$angle)); }
}
$b = atan2(($endy*$bboxh), ($endx*$bboxw));
$h2 = $bboxh - ($bboxh * tan($b));
$px = $bboxh + ($h2 * sin($b) * cos($b));
$py = ($bboxh * tan($b)) + ($h2 * sin($b) * sin($b));
$x1 = $px / $bboxh;
$y1 = $py / $bboxh;
if ($angle <=90) { $coords[2] = $x1; $coords[3] = $y1; }
else if ($angle <=180) { $coords[2] = 1-$x1; $coords[3] = $y1; }
else if ($angle <=270) { $coords[2] = 1-$x1; $coords[3] = 1-$y1; }
else { $coords[2] = $x1; $coords[3] = 1-$y1; }
}
}
// -moz If the first parameter to the gradient function is only a <point>, the gradient axis starts from the specified point,
// and ends at the point you would get if you rotated the starting point by 180 degrees about the center of the box that the
// gradient is to be applied to.
// NO angle and NO end points (Start points defined)
else if ((!isset($angle) || $angle===false) && $coords[0]!==false && $coords[1]!==false) { // should have start and end defined
$coords[2] = 1-$coords[0]; $coords[3] = 1-$coords[1];
$angle = rad2deg(atan2($coords[3]-$coords[1],$coords[2]-$coords[0]));
if ($angle < 0) { $angle += 360; }
else if ($angle > 360) { $angle -= 360; }
if ($angle!=0 && $angle!=360 && $angle!=90 && $angle!=180 && $angle!=270) {
if ($w >= $h) {
$coords[1] *= $h/$w ;
$coords[3] *= $h/$w ;
$usew = $useh = $bboxw;
$usey -= ($w-$h);
}
else {
$coords[0] *= $w/$h ;
$coords[2] *= $w/$h ;
$usew = $useh = $bboxh;
}
}
}
// -moz If neither a <point> or <angle> is specified, i.e. the entire function consists of only <stop> values, the gradient
// axis starts from the top of the box and runs vertically downwards, ending at the bottom of the box.
else { // default values T2B
// All values are set in parseMozGradient - so won't appear here
$coords = array(0,0,1,0); // default for original linear gradient (L2R)
}
$s = ' q';
$s .= sprintf(' %.3F %.3F %.3F %.3F re W n', $x*_MPDFK, ($this->mpdf->h-$y)*_MPDFK, $w*_MPDFK, -$h*_MPDFK)."\n";
$s .= sprintf(' %.3F 0 0 %.3F %.3F %.3F cm', $usew*_MPDFK, $useh*_MPDFK, $usex*_MPDFK, ($this->mpdf->h-($usey+$useh))*_MPDFK)."\n";
}
// RADIAL
else if ($type == 3) {
$radius = $coords[4];
$angle = $coords[5]; // ?? no effect
$shape = $coords[6];
$size = $coords[7];
$repeat = $coords[8];
// ALL POINTS AND RADIUS SET (default for custom mPDF radial gradient) - no -moz
if ($coords[0]!==false && $coords[1]!==false && $coords[2]!==false && $coords[3]!==false && $coords[4]!==false) {
// do nothing - coords used as they are
}
// If a <point> is defined
else if ($shape!==false && $size!==false) {
if ($coords[2]==false) { $coords[2] = $coords[0]; }
if ($coords[3]==false) { $coords[3] = $coords[1]; }
// ELLIPSE
if ($shape=='ellipse') {
$corner1 = sqrt(pow($coords[0],2) + pow($coords[1],2));
$corner2 = sqrt(pow($coords[0],2) + pow((1-$coords[1]),2));
$corner3 = sqrt(pow((1-$coords[0]),2) + pow($coords[1],2));
$corner4 = sqrt(pow((1-$coords[0]),2) + pow((1-$coords[1]),2));
if ($size=='closest-side') { $radius = min($coords[0], $coords[1], (1-$coords[0]), (1-$coords[1])); }
else if ($size=='closest-corner') { $radius = min($corner1, $corner2, $corner3, $corner4); }
else if ($size=='farthest-side') { $radius = max($coords[0], $coords[1], (1-$coords[0]), (1-$coords[1])); }
else { $radius = max($corner1, $corner2, $corner3, $corner4); } // farthest corner (default)
}
// CIRCLE
else if ($shape=='circle') {
if ($w >= $h) {
$coords[1] = $coords[3] = ($coords[1] * $h/$w) ;
$corner1 = sqrt(pow($coords[0],2) + pow($coords[1],2));
$corner2 = sqrt(pow($coords[0],2) + pow((($h/$w)-$coords[1]),2));
$corner3 = sqrt(pow((1-$coords[0]),2) + pow($coords[1],2));
$corner4 = sqrt(pow((1-$coords[0]),2) + pow((($h/$w)-$coords[1]),2));
if ($size=='closest-side') { $radius = min($coords[0], $coords[1], (1-$coords[0]), (($h/$w)-$coords[1])); }
else if ($size=='closest-corner') { $radius = min($corner1, $corner2, $corner3, $corner4); }
else if ($size=='farthest-side') { $radius = max($coords[0], $coords[1], (1-$coords[0]), (($h/$w)-$coords[1])); }
else if ($size=='farthest-corner') { $radius = max($corner1, $corner2, $corner3, $corner4); } // farthest corner (default)
$usew = $useh = $bboxw;
$usey -= ($w-$h);
}
else {
$coords[0] = $coords[2] = ($coords[0] * $w/$h) ;
$corner1 = sqrt(pow($coords[0],2) + pow($coords[1],2));
$corner2 = sqrt(pow($coords[0],2) + pow((1-$coords[1]),2));
$corner3 = sqrt(pow((($w/$h)-$coords[0]),2) + pow($coords[1],2));
$corner4 = sqrt(pow((($w/$h)-$coords[0]),2) + pow((1-$coords[1]),2));
if ($size=='closest-side') { $radius = min($coords[0], $coords[1], (($w/$h)-$coords[0]), (1-$coords[1])); }
else if ($size=='closest-corner') { $radius = min($corner1, $corner2, $corner3, $corner4); }
else if ($size=='farthest-side') { $radius = max($coords[0], $coords[1], (($w/$h)-$coords[0]), (1-$coords[1])); }
else if ($size=='farthest-corner') { $radius = max($corner1, $corner2, $corner3, $corner4); } // farthest corner (default)
$usew = $useh = $bboxh;
}
}
if ($radius==0) { $radius=0.001; } // to prevent error
$coords[4] = $radius;
}
// -moz If entire function consists of only <stop> values
else { // default values
// All values are set in parseMozGradient - so won't appear here
$coords = array(0.5,0.5,0.5,0.5); // default for radial gradient (centred)
}
$s = ' q';
$s .= sprintf(' %.3F %.3F %.3F %.3F re W n', $x*_MPDFK, ($this->mpdf->h-$y)*_MPDFK, $w*_MPDFK, -$h*_MPDFK)."\n";
$s .= sprintf(' %.3F 0 0 %.3F %.3F %.3F cm', $usew*_MPDFK, $useh*_MPDFK, $usex*_MPDFK, ($this->mpdf->h-($usey+$useh))*_MPDFK)."\n";
}
$n = count($this->mpdf->gradients) + 1;
$this->mpdf->gradients[$n]['type'] = $type;
$this->mpdf->gradients[$n]['colorspace'] = $colorspace;
$trans = false;
$this->mpdf->gradients[$n]['is_mask'] = $is_mask;
if ($is_mask) { $trans = true; }
if (count($stops) == 1) { $stops[1] = $stops[0]; }
if (!isset($stops[0]['offset'])) { $stops[0]['offset'] = 0; }
if (!isset($stops[(count($stops)-1)]['offset'])) { $stops[(count($stops)-1)]['offset'] = 1; }
// Fix stop-offsets set as absolute lengths
if ($type==2) {
$axisx = ($coords[2]-$coords[0])*$usew;
$axisy = ($coords[3]-$coords[1])*$useh;
$axis_length = sqrt(pow($axisx,2) + pow($axisy,2));
}
else { $axis_length = $coords[4]*$usew; } // Absolute lengths are meaningless for an ellipse - Firefox uses Width as reference
for($i=0;$i<count($stops);$i++) {
if (isset($stops[$i]['offset']) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$stops[$i]['offset'],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
$stops[$i]['offset'] = $tmp/$axis_length;
}
}
if (isset($stops[0]['offset']) && $stops[0]['offset']>0) {
$firststop = $stops[0];
$firststop['offset'] = 0;
array_unshift($stops, $firststop);
}
if (!$repeat && isset($stops[(count($stops)-1)]['offset']) && $stops[(count($stops)-1)]['offset']<1) {
$endstop = $stops[(count($stops)-1)];
$endstop['offset'] = 1;
$stops[] = $endstop;
}
if ($stops[0]['offset'] > $stops[(count($stops)-1)]['offset']) {
$stops[0]['offset'] = 0;
$stops[(count($stops)-1)]['offset'] = 1;
}
for($i=0;$i<count($stops);$i++) {
// mPDF 5.3.74
if ($colorspace == 'CMYK') {
$this->mpdf->gradients[$n]['stops'][$i]['col'] = sprintf('%.3F %.3F %.3F %.3F', (ord($stops[$i]['col']{1})/100), (ord($stops[$i]['col']{2})/100), (ord($stops[$i]['col']{3})/100), (ord($stops[$i]['col']{4})/100));
}
else if ($colorspace == 'Gray') {
$this->mpdf->gradients[$n]['stops'][$i]['col'] = sprintf('%.3F', (ord($stops[$i]['col']{1})/255));
}
else {
$this->mpdf->gradients[$n]['stops'][$i]['col'] = sprintf('%.3F %.3F %.3F', (ord($stops[$i]['col']{1})/255), (ord($stops[$i]['col']{2})/255), (ord($stops[$i]['col']{3})/255));
}
if (!isset($stops[$i]['opacity'])) { $stops[$i]['opacity'] = 1; }
else if ($stops[$i]['opacity'] > 1 || $stops[$i]['opacity'] < 0) { $stops[$i]['opacity'] = 1; }
else if ($stops[$i]['opacity'] < 1) {
$trans = true;
}
$this->mpdf->gradients[$n]['stops'][$i]['opacity'] = $stops[$i]['opacity'];
// OFFSET
if ($i>0 && $i<(count($stops)-1)) {
if (!isset($stops[$i]['offset']) || (isset($stops[$i+1]['offset']) && $stops[$i]['offset']>$stops[$i+1]['offset']) || $stops[$i]['offset']<$stops[$i-1]['offset']) {
if (isset($stops[$i-1]['offset']) && isset($stops[$i+1]['offset'])) {
$stops[$i]['offset'] = ($stops[$i-1]['offset']+$stops[$i+1]['offset'])/2;
}
else {
for($j=($i+1);$j<count($stops);$j++) {
if(isset($stops[$j]['offset'])) { break; }
}
$int = ($stops[$j]['offset'] - $stops[($i-1)]['offset'])/($j-$i+1);
for($f=0;$f<($j-$i-1);$f++) {
$stops[($i+$f)]['offset'] = $stops[($i+$f-1)]['offset'] + ($int);
}
}
}
}
$this->mpdf->gradients[$n]['stops'][$i]['offset'] = $stops[$i]['offset'];
$this->mpdf->gradients[$n]['stops'][$i]['offset'] = $stops[$i]['offset'];
}
if ($repeat) {
$ns = count($this->mpdf->gradients[$n]['stops']);
$offs = array();
for($i=0;$i<$ns;$i++) {
$offs[$i] = $this->mpdf->gradients[$n]['stops'][$i]['offset'];
}
$gp = 0;
$inside=true;
while($inside) {
$gp++;
for($i=0;$i<$ns;$i++) {
$this->mpdf->gradients[$n]['stops'][(($ns*$gp)+$i)] = $this->mpdf->gradients[$n]['stops'][(($ns*($gp-1))+$i)];
$tmp = $this->mpdf->gradients[$n]['stops'][(($ns*($gp-1))+($ns-1))]['offset']+$offs[$i] ;
if ($tmp < 1) { $this->mpdf->gradients[$n]['stops'][(($ns*$gp)+$i)]['offset'] = $tmp; }
else {
$this->mpdf->gradients[$n]['stops'][(($ns*$gp)+$i)]['offset'] = 1;
$inside = false;
break(2);
}
}
}
}
if ($trans) {
$this->mpdf->gradients[$n]['trans'] = true;
$s .= ' /TGS'.$n.' gs ';
}
if (!is_array($extend) || count($extend) <1) {
$extend=array('true', 'true'); // These are supposed to be quoted - appear in PDF file as text
}
$this->mpdf->gradients[$n]['coords'] = $coords;
$this->mpdf->gradients[$n]['extend'] = $extend;
//paint the gradient
$s .= '/Sh'.$n.' sh '."\n";
//restore previous Graphic State
$s .= ' Q '."\n";
if ($return) { return $s; }
else { $this->mpdf->_out($s); }
}
function parseMozGradient($bg) {
// background[-image]: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
// background[-image]: linear-gradient(left, #c7Fdde 20%, #FF0000 ); // CSS3
if (preg_match('/repeating-/',$bg)) { $repeat = true; }
else { $repeat = false; }
if (preg_match('/linear-gradient\((.*)\)/',$bg,$m)) {
$g = array();
$g['type'] = 2;
$g['colorspace'] = 'RGB';
$g['extend'] = array('true','true');
$v = trim($m[1]);
// Change commas inside e.g. rgb(x,x,x)
while(preg_match('/(\([^\)]*?),/',$v)) { $v = preg_replace('/(\([^\)]*?),/','\\1@',$v); }
// Remove spaces inside e.g. rgb(x, x, x)
while(preg_match('/(\([^\)]*?)[ ]/',$v)) { $v = preg_replace('/(\([^\)]*?)[ ]/','\\1',$v); }
$bgr = preg_split('/\s*,\s*/',$v);
for($i=0;$i<count($bgr);$i++) { $bgr[$i] = preg_replace('/@/', ',', $bgr[$i]); }
// Is first part $bgr[0] a valid point/angle?
$first = preg_split('/\s+/',trim($bgr[0]));
if (preg_match('/(left|center|right|bottom|top|deg|grad|rad)/i',$bgr[0]) && !preg_match('/(<#|rgb|rgba|hsl|hsla)/i',$bgr[0])) {
$startStops = 1;
}
else if (trim($first[(count($first)-1)]) === "0") {
$startStops = 1;
}
else {
$check = $this->mpdf->ConvertColor($first[0]);
if ($check) $startStops = 0;
else $startStops = 1;
}
// first part a valid point/angle?
if ($startStops == 1) { // default values
// [<point> || <angle>,] = [<% em px left center right bottom top> || <deg grad rad 0>,]
if (preg_match('/([\-]*[0-9\.]+)(deg|grad|rad)/i',$bgr[0],$m)) {
$angle = $m[1] + 0;
if (strtolower($m[2])=='deg') { $angle = $angle; }
else if (strtolower($m[2])=='grad') { $angle *= (360/400); }
else if (strtolower($m[2])=='rad') { $angle = rad2deg($angle); }
while($angle < 0) { $angle += 360; }
$angle = ($angle % 360);
}
else if (trim($first[(count($first)-1)]) === "0") { $angle = 0; }
if (preg_match('/left/i',$bgr[0])) { $startx = 0; }
else if (preg_match('/right/i',$bgr[0])) { $startx = 1; }
if (preg_match('/top/i',$bgr[0])) { $starty = 1; }
else if (preg_match('/bottom/i',$bgr[0])) { $starty = 0; }
// Check for %? ?% or %%
if (preg_match('/(\d+)[%]/i',$first[0],$m)) { $startx = $m[1]/100; }
else if (!isset($startx) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[0],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $startx = $m[1]; }
}
if (isset($first[1]) && preg_match('/(\d+)[%]/i',$first[1],$m)) { $starty = 1 - ($m[1]/100); }
else if (!isset($starty) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[1],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $starty = $m[1]; }
}
if (isset($startx) && !isset($starty)) { $starty = 0.5; }
if (!isset($startx) && isset($starty)) { $startx = 0.5; }
}
// If neither a <point> or <angle> is specified, i.e. the entire function consists of only <stop> values, the gradient axis starts from the top of the box and runs vertically downwards, ending at the bottom of the box.
else { // default values T2B
$starty = 1; $startx = 0.5;
$endy = 0; $endx = 0.5;
}
$coords = array();
if (!isset($startx)) { $startx = false; }
if (!isset($starty)) { $starty = false; }
if (!isset($endx)) { $endx = false; }
if (!isset($endy)) { $endy = false; }
if (!isset($angle)) { $angle = false; }
$g['coords'] = array($startx ,$starty ,$endx ,$endy, $angle, $repeat );
$g['stops'] = array();
for($i=$startStops;$i<count($bgr);$i++) {
$stop = array();
// parse stops
$el = preg_split('/\s+/',trim($bgr[$i]));
// mPDF 5.3.74
$col = $this->mpdf->ConvertColor($el[0]);
if ($col) { $stop['col'] = $col; }
else { $stop['col'] = $col = $this->mpdf->ConvertColor(255); }
if ($col{0}==1) $g['colorspace'] = 'Gray';
else if ($col{0}==4 || $col{0}==6) $g['colorspace'] = 'CMYK';
if ($col{0}==5) { $stop['opacity'] = ord($col{4})/100; } // transparency from rgba()
else if ($col{0}==6) { $stop['opacity'] = ord($col{5})/100; } // transparency from cmyka()
else if ($col{0}==1 && $col{2}==1) { $stop['opacity'] = ord($col{3})/100; } // transparency converted from rgba or cmyka()
if (isset($el[1]) && preg_match('/(\d+)[%]/',$el[1],$m)) {
$stop['offset'] = $m[1]/100;
if ($stop['offset']>1) { unset($stop['offset']); }
}
else if (isset($el[1]) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$el[1],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $stop['offset'] = $m[1]; }
}
$g['stops'][] = $stop;
}
if (count($g['stops'] )) { return $g; }
}
else if (preg_match('/radial-gradient\((.*)\)/',$bg,$m)) {
$g = array();
$g['type'] = 3;
$g['colorspace'] = 'RGB';
$g['extend'] = array('true','true');
$v = trim($m[1]);
// Change commas inside e.g. rgb(x,x,x)
while(preg_match('/(\([^\)]*?),/',$v)) { $v = preg_replace('/(\([^\)]*?),/','\\1@',$v); }
// Remove spaces inside e.g. rgb(x, x, x)
while(preg_match('/(\([^\)]*?)[ ]/',$v)) { $v = preg_replace('/(\([^\)]*?)[ ]/','\\1',$v); }
$bgr = preg_split('/\s*,\s*/',$v);
for($i=0;$i<count($bgr);$i++) { $bgr[$i] = preg_replace('/@/', ',', $bgr[$i]); }
// Is first part $bgr[0] a valid point/angle?
$startStops = 0;
$pos_angle = false;
$shape_size = false;
$first = preg_split('/\s+/',trim($bgr[0]));
$checkCol = $this->mpdf->ConvertColor($first[0]);
if (preg_match('/(left|center|right|bottom|top|deg|grad|rad)/i',$bgr[0]) && !preg_match('/(<#|rgb|rgba|hsl|hsla)/i',$bgr[0])) {
$startStops=1;
$pos_angle = $bgr[0];
}
else if (trim($first[(count($first)-1)]) === "0") {
$startStops=1;
$pos_angle = $bgr[0];
}
else if (preg_match('/(circle|ellipse|closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/i',$bgr[0])) {
$startStops=1;
$shape_size = $bgr[0];
}
else if (!$checkCol) {
$startStops=1;
$pos_angle = $bgr[0];
}
if (preg_match('/(circle|ellipse|closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/i',$bgr[1])) {
$startStops=2;
$shape_size = $bgr[1];
}
// If valid point/angle?
if ($pos_angle) { // default values
// [<point> || <angle>,] = [<% em px left center right bottom top> || <deg grad rad 0>,]
if (preg_match('/left/i',$pos_angle)) { $startx = 0; }
else if (preg_match('/right/i',$pos_angle)) { $startx = 1; }
if (preg_match('/top/i',$pos_angle)) { $starty = 1; }
else if (preg_match('/bottom/i',$pos_angle)) { $starty = 0; }
// Check for %? ?% or %%
if (preg_match('/(\d+)[%]/i',$first[0],$m)) { $startx = $m[1]/100; }
else if (!isset($startx) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[0],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $startx = $m[1]; }
}
if (isset($first[1]) && preg_match('/(\d+)[%]/i',$first[1],$m)) { $starty = 1 - ($m[1]/100); }
else if (!isset($starty) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$first[1],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
if ($tmp) { $starty = $m[1]; }
}
/*
// ?? Angle has no effect in radial gradient (does not exist in CSS3 spec.)
if (preg_match('/([\-]*[0-9\.]+)(deg|grad|rad)/i',$pos_angle,$m)) {
$angle = $m[1] + 0;
if (strtolower($m[2])=='deg') { $angle = $angle; }
else if (strtolower($m[2])=='grad') { $angle *= (360/400); }
else if (strtolower($m[2])=='rad') { $angle = rad2deg($angle); }
while($angle < 0) { $angle += 360; }
$angle = ($angle % 360);
}
*/
if (!isset($starty)) { $starty = 0.5; }
if (!isset($startx)) { $startx = 0.5; }
}
// If neither a <point> or <angle> is specified, i.e. the entire function consists of only <stop> values, the gradient axis starts from the top of the box and runs vertically downwards, ending at the bottom of the box.
else { // default values Center
$starty = 0.5; $startx = 0.5;
$endy = 0.5; $endx = 0.5;
}
// If valid shape/size?
$shape = 'ellipse'; // default
$size = 'farthest-corner'; // default
if ($shape_size) { // default values
if (preg_match('/(circle|ellipse)/i',$shape_size, $m)) {
$shape = $m[1];
}
if (preg_match('/(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/i',$shape_size, $m)) {
$size = $m[1];
if ($size=='contain') { $size = 'closest-side'; }
else if ($size=='cover') { $size = 'farthest-corner'; }
}
}
$coords = array();
if (!isset($startx)) { $startx = false; }
if (!isset($starty)) { $starty = false; }
if (!isset($endx)) { $endx = false; }
if (!isset($endy)) { $endy = false; }
if (!isset($radius)) { $radius = false; }
if (!isset($angle)) { $angle = 0; }
$g['coords'] = array($startx ,$starty ,$endx ,$endy, $radius, $angle, $shape, $size, $repeat );
$g['stops'] = array();
for($i=$startStops;$i<count($bgr);$i++) {
$stop = array();
// parse stops
$el = preg_split('/\s+/',trim($bgr[$i]));
// mPDF 5.3.74
$col = $this->mpdf->ConvertColor($el[0]);
if ($col) { $stop['col'] = $col; }
else { $stop['col'] = $col = $this->mpdf->ConvertColor(255); }
if ($col{0}==1) $g['colorspace'] = 'Gray';
else if ($col{0}==4 || $col{0}==6) $g['colorspace'] = 'CMYK';
if ($col{0}==5) { $stop['opacity'] = ord($col{4})/100; } // transparency from rgba()
else if ($col{0}==6) { $stop['opacity'] = ord($col{5})/100; } // transparency from cmyka()
else if ($col{0}==1 && $col{2}==1) { $stop['opacity'] = ord($col{3})/100; } // transparency converted from rgba or cmyka()
if (isset($el[1]) && preg_match('/(\d+)[%]/',$el[1],$m)) {
$stop['offset'] = $m[1]/100;
if ($stop['offset']>1) { unset($stop['offset']); }
}
else if (isset($el[1]) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i',$el[1],$m)) {
$tmp = $this->mpdf->ConvertSize($m[1],$this->mpdf->w,$this->mpdf->FontSize,false);
$stop['offset'] = $el[1];
}
$g['stops'][] = $stop;
}
if (count($g['stops'] )) { return $g; }
}
return array();
}
function parseBackgroundGradient($bg) {
// background-gradient: linear #00FFFF #FFFF00 0 0.5 1 0.5; or
// background-gradient: radial #00FFFF #FFFF00 0.5 0.5 1 1 1.2;
$v = trim($bg);
$bgr = preg_split('/\s+/',$v);
$g = array();
if (count($bgr)> 6) {
if (strtoupper(substr($bgr[0],0,1)) == 'L' && count($bgr)==7) { // linear
$g['type'] = 2;
//$coords = array(0,0,1,1 ); // 0 0 1 0 or 0 1 1 1 is L 2 R; 1,1,0,1 is R2L; 1,1,1,0 is T2B; 1,0,1,1 is B2T
// Linear: $coords - array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg).
// The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
$g['coords'] = array($bgr[3], $bgr[4], $bgr[5], $bgr[6]);
}
else if (count($bgr)==8) { // radial
$g['type'] = 3;
// Radial: $coords - array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1,
// (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg).
// (fx, fy) should be inside the circle, otherwise some areas will not be defined
$g['coords'] = array($bgr[3], $bgr[4], $bgr[5], $bgr[6], $bgr[7]);
}
$g['colorspace'] = 'RGB';
// mPDF 5.3.74
$cor = $this->mpdf->ConvertColor($bgr[1]);
if ($cor{0}==1) $g['colorspace'] = 'Gray';
else if ($cor{0}==4 || $cor{0}==6) $g['colorspace'] = 'CMYK';
if ($cor) { $g['col'] = $cor; }
else { $g['col'] = $this->mpdf->ConvertColor(255); }
$cor = $this->mpdf->ConvertColor($bgr[2]);
if ($cor) { $g['col2'] = $cor; }
else { $g['col2'] = $this->mpdf->ConvertColor(255); }
$g['extend'] = array('true','true');
$g['stops'] = array(array('col'=>$g['col'], 'opacity'=>1, 'offset'=>0), array('col'=>$g['col2'], 'opacity'=>1, 'offset'=>1));
return $g;
}
return false;
}
}
?>

View File

@ -1,433 +0,0 @@
<?php
class indic {
function indic() {
}
function substituteIndic($earr, $lang, $font) {
global $voltdata;
if (!isset($voltdata[$font])) {
include_once(_MPDF_PATH.'includes/'.$font.'.volt.php');
$voltdata[$font] = $volt;
}
foreach($earr as $eid=>$char) {
$earr[$eid] = sprintf("%04s", strtoupper(dechex($char)));
}
$vstr = "0020 ".implode(" ",$earr)." 0020";
//============================
// Common Indic Punctuation marks
// If NOT devanagari
if ($lang!='hi') {
$vstr = str_replace('0964','007C', $vstr); // U+0964 replace with "|"
$vstr = str_replace('0965','007C 007C', $vstr); // U+0964 replace with "|"
}
//============================
// Tamil numeral for Zero missing Added mPDF 4.2
if ($lang=='ta') {
$vstr = str_replace('0BE6','0030', $vstr); // U+0BEB replace with "0"
}
//============================
// Re-order vowels
// DEVANAGARI vowel sign matraI[093F] before consonant
if ($lang=='hi') {
$prebasedvowels = "(093F)";
$nukta = "093C";
$halant = "094D";
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.' '.$nukta.'/','\\2 \\1 '.$nukta, $vstr); // before NUKTA
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$prebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT == VIRAMA
}
// BENGALI vowels [09BF 09C7 09C8]
else if ($lang=='bn') {
// Khanda Ta 09CE not in font -> replace with 09A4|09CD
$vstr = preg_replace('/09CE/','09A4 09CD 200D', $vstr); // mPDF 5.3.09
// BENGALI double-part vowels [09CB 09C7 09BE][09CC 09C7 09D7]
$vstr = str_replace('09CB','09C7 09BE', $vstr); // convert to 2 parts
$vstr = str_replace('09CC','09C7 09D7', $vstr); // 09C7 pre-based is then shifted below
$prebasedvowels = "(09BF|09C7|09C8)";
$nukta = "09BC";
$halant = "09CD";
// mPDF 5.0.044
$bnfullcons = "0995|0996|0997|0998|0999|099A|099B|099C|099D|099F|09A0|09A1|09A2|09A3|09A4|09A5|09A6|09A7|09A8|09AA|09AB|09AC|09AD|09AE|09AF|09B0|09B2|09B6|09B7|09B8|09B9|09DC|09DD|09DF";
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.' '.$nukta.'/','\\2 \\1 '.$nukta, $vstr); // before NUKTA
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$prebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT
// mPDF 5.0.044
// .. and shifting left-based vowel further to the left in case 3 consonants together.
$vstr = preg_replace('/('.$bnfullcons.') '.$halant.' '.$prebasedvowels.'/','\\2 \\1 '.$halant, $vstr);
// mPDF 5.0.044
// If left-based vowel has now been shifted to left of RA/Halant (09B0/09CD)
// Convert here to above-line form (E068) as it would get missed later
// e.g. 09B0 09CD 09AD 09C7 would be changed above =>
// e.g. 09C7 09B0 09CD 09AD. The 09B0 09CD should => E068
// ??? need to add 09BF as well (09BF|09C7|09C8)
$vstr = preg_replace('/(09C7|09C8) 09B0 09CD/', '\\1 E068', $vstr);
}
// GUJARATI pre-based vowel [0ABF]
else if ($lang=='gu') {
$prebasedvowels = "(0ABF)";
$nukta = "0ABC";
$halant = "0ACD";
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.' '.$nukta.'/','\\2 \\1 '.$nukta, $vstr); // before NUKTA
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$prebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT
}
// GURMUKHI/PUNJABI pre-based vowel [0ABF]
else if ($lang=='pa') {
$prebasedvowels = "(0A3F)";
$nukta = "0A3C";
$halant = "0A4D";
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.' '.$nukta.'/','\\2 \\1 '.$nukta, $vstr); // before NUKTA
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$prebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT
}
// TAMIL pre-based vowel [0ABF]
else if ($lang=='ta') {
// Shrii (Shree)
$vstr = preg_replace('/0BB6 0BCD 0BB0 0BC0/','E04B', $vstr);
// TAMIL double-part vowels [0BCA 0BC6 0BBE][0BCB 0BC7 0BBE][0BCC 0BC6 0BD7]
$vstr = preg_replace('/0BCA/','0BC6 0BBE', $vstr); // convert to 2 parts
$vstr = preg_replace('/0BCB/','0BC7 0BBE', $vstr); // pre-based is then shifted below
$vstr = preg_replace('/0BCC/','0BC6 0BD7', $vstr);
$prebasedvowels = "(0BC6|0BC7|0BC8)";
// No nukta
$halant = "0BCD"; // Doesn't seem to move most in front of halanted consonants
$vstr = preg_replace('/([A-F0-9]{4}) '.$prebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
// ? Only for special case KSS (already moved to left of 0BB7)
$vstr = preg_replace('/0B95 '.$halant.' '.$prebasedvowels.' 0BB7/','\\1 0B95 '.$halant.' 0BB7', $vstr);
}
// ORIYA
else if ($lang=='or') {
// ORIYA double-part vowels []
$vstr = str_replace('0B48','0B47 0B56', $vstr); // 2-part Vowel
$vstr = str_replace('0B4B','0B47 0B3E', $vstr); // 2-part Vowel
$vstr = str_replace('0B4C','0B47 0B57', $vstr); // 2-part Vowel
$orprebasedvowels = "(0B47)";
// No nukta
$halant = "0B4D";
$vstr = preg_replace('/([A-F0-9]{4}) '.$orprebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$orprebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$orprebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT
}
// MALAYALAM
else if ($lang=='ml') {
// Chillus - old forms - remove ZWNJ after
// This font Volt rules recognises e.g. "Na Halant(Virama)" as ChilluN
$vstr = preg_replace('/(0D23 0D4D|0D28 0D4D|0D30 0D4D|0D32 0D4D|0D33 0D4D) 200D/','\\1', $vstr);
// See Chillus in Unicode [http://en.wikipedia.org/wiki/Malayalam_script]
$vstr = str_replace('0D7A','0D23 0D4D', $vstr); // [mlymChilluNn]
$vstr = str_replace('0D7B','0D28 0D4D', $vstr); // [mlymChilluN]
$vstr = str_replace('0D7C','0D30 0D4D', $vstr); // [mlymChilluR]
$vstr = str_replace('0D7D','0D32 0D4D', $vstr); // [mlymChilluL]
$vstr = str_replace('0D7E','0D33 0D4D', $vstr); // [mlymChilluLl]
/*
// Chillus - 0D7A-0D7E not in font directly, but as E005-E009
$vstr = preg_replace('/0D23 0D4D 200D/','0D7A', $vstr);
$vstr = preg_replace('/0D28 0D4D 200D/','0D7B', $vstr);
$vstr = preg_replace('/0D30 0D4D 200D/','0D7C', $vstr);
$vstr = preg_replace('/0D32 0D4D 200D/','0D7D', $vstr);
$vstr = preg_replace('/0D33 0D4D 200D/','0D7E', $vstr);
$vstr = preg_replace('/0D7F/','E004', $vstr); // [mlymChilluK]
$vstr = preg_replace('/0D7A/','E005', $vstr); // [mlymChilluNn]
$vstr = preg_replace('/0D7B/','E006', $vstr); // [mlymChilluN]
$vstr = preg_replace('/0D7C/','E007', $vstr); // [mlymChilluR]
$vstr = preg_replace('/0D7D/','E008', $vstr); // [mlymChilluL]
$vstr = preg_replace('/0D7E/','E009', $vstr); // [mlymChilluLl]
*/
// MALAYALAM double-part vowels []
$vstr = str_replace('0D4A','0D46 0D3E', $vstr); // 2-part Vowel
$vstr = str_replace('0D4B','0D47 0D3E', $vstr); // 2-part Vowel
$vstr = str_replace('0D4C','0D46 0D57', $vstr); // 2-part Vowel
$mlprebasedvowels = "(0D46|0D47|0D48)";
// No nukta
$halant = "0D4D";
$vstr = preg_replace('/([A-F0-9]{4}) '.$mlprebasedvowels.'/','\\2 \\1', $vstr); // vowel sign pre-based shift left
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$mlprebasedvowels.'/','\\2 \\1 '.$halant, $vstr); // before CHAR HALANT
}
// TELUGU
else if ($lang=='te') {
// TELUGU double-part vowels [0C48 -> 0C46 0C56]
$vstr = str_replace('0C48','0C46 0C56', $vstr); // 2-part Vowel
$prebasedvowels = "(0C46)";
$abvvowels = "(0C3E|0C3F|0C40|0C46|0C47|0C4A|0C4B|0C4C|0C55)";
// No nukta
$halant = "0C4D";
$tefullforms = "0C15|0C17|0C18|0C1A|0C1B|0C1C|0C1D|0C20|0C21|0C22|0C24|0C25|0C26|0C27|0C28|0C2A|0C2B|0C2D|0C2E|0C2F|0C30|0C33|0C35|0C36|0C37|0C38|0C39|E028|E029|E02A|E02B|E078|E07A|E07B";
$vstr = preg_replace('/('.$tefullforms .') '.$halant.' ('.$tefullforms .') '.$abvvowels .'/','\\1 \\3 '.$halant.' \\2', $vstr); // before HALANT
}
// KANNADA
else if ($lang=='kn') {
// KANNADA double-part vowels [0CC8 -> 0CC6 0CD6]
$vstr = str_replace('0CC0','0CBF 0CD5', $vstr); // 2-part Vowel
$vstr = str_replace('0CC7','0CC6 0CD5', $vstr); // 2-part Vowel
$vstr = str_replace('0CC8','0CC6 0CD6', $vstr); // 2-part Vowel AI - no glyph for single
$vstr = str_replace('0CCA','0CC6 0CC2', $vstr); // 2-part Vowel
$vstr = str_replace('0CCB','0CC6 0CC2 0CD5', $vstr); // 2-part Vowel
$prebasedvowels = "(0CBF|0CC6)";
$halant = "0CCD";
}
//============================
// SPECIALS
// DEVANAGARI Ra Halant Ra
if ($lang=='hi') {
$vstr = str_replace('0930 094D 0930','E05D 0930', $vstr); // Ra Halant Ra => halfRa FullRa
}
// GUJARATI
if ($lang=='gu') {
$vstr = str_replace('0AB0 0AC2','E02E', $vstr); // Ra VowelUu => SpecialForm RaUu
}
// TELUGU Ra Halant <Consonant> Halant => halfRa Halant<Consonant> Halant
if ($lang=='te') {
$vstr = preg_replace('/0C30 0C4D ([A-F0-9]{4}) 0C4D/','E021 0C4D \\1 0C4D', $vstr);
}
// KANNADA
// Reph at end of word becomes E0CC instead of E00B
if ($lang=='kn') {
$vstr = str_replace('0CB0 0CCD 0020','E0CC 0020', $vstr); // mPDF 5.3.87
}
//============================
// MAIN BIT FROM VOLT RULES
foreach($voltdata[$font] AS $rid=>$reps) {
//echo $rid . ': ' . $vstr.'<br />';
$vstr = preg_replace('/'.$reps['match'].'/',$reps['replace'], $vstr);
}
//echo $vstr.'<br />'; exit;
//============================
// SPECIALS
// KANNADA
// <Base> <BelowBase1> [<BelowBase2> ] MatraI -> <Base/MatraI ligature> <Belowbase1> etc
if ($lang=='kn') {
$matraI = "0CBF";
$knbase = preg_split('/\|/', "0C95|0C96|0C97|0C98|0C9A|0C9B|0C9C|0C9D|0CA0|0CA1|0CA2|0CA3|0CA4|0CA5|0CA6|0CA7|0CA8|0CAA|0CAB|0CAC|0CAD|0CAE|0CAF|0CB0|0CB2|0CB3|0CB5|0CB6|0CB7|0CB8|0CB9|E0A3|E07D|E07E");
$knmatraIligature = preg_split('/\|/', "E082|E083|E084|E085|E086|E087|E088|E089|E08A|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A4|E0A1|E0A2");
$belowbase1 = "E02E|E02F|E030|E031|E032|E033|E034|E035|E036|E037|E038|E039|E03A|E03B|E03C|E03D|E03E|E03F|E040|E041|E042|E043|E044|E045|E046|E047|E048|E049|E04A|E04B|E04C|E04D|E04E|E04F|E050|E081";
$belowbase2 = "E052|E053|E054|E055|E056|E057|E058|E059|E05A|E05B|E05C|E05D|E05E|E05F|E060|E061|E062|E063|E064|E065|E066|E067|E068|E069|E06A|E06B|E06C|E06D|E06E|E06F|E070|E071|E072|E073|E074|E081";
for ($i=0; $i<count($knbase);$i++) {
$vstr = preg_replace('/'.$knbase[$i].' ('.$belowbase1.') ('.$belowbase2.') '.$matraI.'/', $knmatraIligature[$i].' \\1 \\2', $vstr);
$vstr = preg_replace('/'.$knbase[$i].' ('.$belowbase1.') '.$matraI.'/', $knmatraIligature[$i].' \\1', $vstr);
}
}
// KANNADA
// [KanTtaFull] [matraI] => [KanTtaPartial] [matraI]
if ($lang=='kn') {
$vstr = preg_replace('/0C9F '.$matraI.'/', 'E015 '.$matraI, $vstr);
}
// ORIYA
if ($lang=='or') {
// SpecialCase Ra[0B30] Halant still left before [oryaFullNnNna] => E00F
$vstr = preg_replace('/0B30 '.$halant.' E00F/','E00F E069', $vstr); // convert to Reph
}
//============================
// SHIFT REPH
// DEVANAGARI Shift Reph [E015]
if ($lang=='hi') {
// FIRSTLY - halfRa = E05D - Change this to Reph [E015]
$himatchhalfforms = "E043|E044|E045|E046|E047|E048|E049|E04A|E04B|E04C|E04D|E04E|E04F|E050|E051|E052|E053|E054|E055|E056|E057|E058|E059|E05A|E05B|E05C|E05D|E05E|E05F|E060|E061|E062|E063|E064|E065|E066|E067|E068|E069|E06A|E06B|E06C|E06D|E06E|E06F|E070|E071|E072|E073|E074|E075|E076|E077|E078|E079|E07A|E07B|E07C|E07D|E07E|E07F|E080|E081|E082|E083|E084|E085|E086|E087|E088|E089|E08A|E0D3|E0D4|E0D5|E0D6|E0D7|E0D8|E0D9|E0DA|E0DB|E0DC|E0DD|E0DE|E0DF|E0E0|E0E1|E0E2|E0E3|E0E4|E0E5|E0E6|E0E7|E0E8|E0E9|E0EA|E0EB|E0EC|E0ED|E0EE|E0EF|E0F0|E0F1|E0F2|E0F3|E0F4|E0F5|E0F6|E0F7|E0F8|E0F9|E0FA|E0FB|E0FC|E0FD|E0FE|E0FF|E100|E101|E102|E103|E104|E105|E106|E107|E108|E109|E10A|E10B|E10C|E10D|E10E|E10F|E110|E111|E112|E113|E114|E115|E116|E117|E118|E119|E11A|E13D|E13E|E13F|E140|E141|E142|E143|E144|E145";
$himatchfullforms = "0915|0916|0917|0918|0919|091A|091B|091C|091D|091E|091F|0920|0921|0922|0923|0924|0925|0926|0927|0928|092A|092B|092C|092D|092E|092F|0930|0932|0933|0935|0936|0937|0938|0939|E028|E029|0958|0959|095A|E02A|E02B|E02C|E02D|095B|E02E|E02F|E030|E031|095C|095D|E032|E033|E034|E035|E036|0929|E037|095E|E038|E039|E03A|095F|0931|E03B|0934|E03C|E03D|E03E|E03F|E040|E041|E042|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A1|E0A2|E0A3|E0A4|E0A5|E0A6|E0A7|E0A8|E0A9|E0AA|E0AB|E0AC|E0AD|E0AE|E0AF|E0B0|E0B1|E0B2|E0B3|E0B4|E0B5|E0B6|E0B7|E0B8|E0B9|E0BA|E0BB|E0BC|E0BD|E0BE|E0BF|E0C0|E0C1|E0C2|E0C3|E0C4|E0C5|E0C6|E0C7|E0C8|E0C9|E0CA|E0CB|E0CC|E0CD|E0CE|E0CF|E0D0|E0D1|E0D2|E11E|E11F|E120|E121|E122|E123|E124|E125|E126|E127|E128|E129|E12A|E12B|E12C|E12D|E12E|E12F|E130|E131|E132|E133";
$vstr = preg_replace('/E05D ('.$himatchhalfforms.'|'.$himatchfullforms.')/', 'E015 \\1', $vstr);
// Reph = E015 - Shift Right to just after end of syllable
// FullAllForms + HalfAllForms + 093E matraA
while(preg_match('/E015 ('.$himatchhalfforms.')/', $vstr)) {
$vstr = preg_replace('/E015 ('.$himatchhalfforms.')/', '\\1 E015', $vstr);
}
$vstr = preg_replace('/E015 ('.$himatchfullforms.')/', '\\1 E015', $vstr);
// Now shift it beyond post-based vowels // ??? Need to add others e.g. 0949,094A,094B,094C + presentation forms like E198
$vstr = str_replace('E015 093E', '093E E015', $vstr);
$vstr = preg_replace('/E015 (0940|E194|E195|E196|E197|E198)/', '\\1 E014', $vstr); // (Small) reph [E014] to Right of matraI
$vstr = str_replace('E015 0947', '0947 E014', $vstr); // (Small) reph [E014] to Right of matraI
}
// BENGALI Shift Reph [E068]
else if ($lang=='bn') {
$bnfullconjuncts = "E002|E003|E004|E041|E042|E043|E044|E045|E046|E047|E048|E049|E04A|E04B|E04C|E04D|E04E|E04F|E050|E051|E052|E053|E054|E055|E056|E057|E058|E059|E05A|E05B|E05C|E05D|E05E|E05F|E060|E061|E062|E063|E064|E065|E06A|E06B|E06C|E06D|E06E|E06F|E070|E071|E072|E073|E074|E075|E076|E077|E078|E079|E07A|E07B|E07C|E07D|E07E|E07F|E080|E081|E082|E083|E084|E085|E086|E087|E088|E089|E08A|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A1|E0A2|E0A3|E0A4|E0A5|E0A6|E0A7|E0A8|E0A9|E0AA|E0AB|E0AC|E0AD|E0AE|E0AF|E0B0|E0B1|E0B2|E0B3|E0B4|E0B5|E0B6|E0B7|E0B8|E0B9|E0BA|E0BB|E0BC|E0BD|E0BE|E0BF|E0C0|E0C1|E0C2|E0C3|E0C4|E0C5|E0C6|E0C7|E0C8|E0C9|E0CA|E0CB|E0CC|E0CD|E0CE|E0CF|E0D0|E0D1|E0D2|E0D3|E0D4|E0D5|E0D6|E0D7|E0D8|E0D9|E0DA|E0DB|E0DC|E0DD|E0DE|E0DF|E0E0|E0E1|E0E2|E0E3|E0E4|E0E5|E0E6|E0E7|E0E8|E0E9|E0EA|E0EB|E0EC|E0ED|E0EE|E0EF|E0F0|E0F1|E0F2|E0F3|E0F4|E0F5|E0F6|E0F7|E0F8|E0F9|E0FA|E0FB|E0FC|E0FD|E0FE|E0FF|E100|E101|E102|E103|E104|E105|E106|E107|E108|E109|E10A|E10B|E10C|E10D|E10E|E10F|E110|E111|E112|E113|E114|E115|E116|E117|E118|E119|E11A|E11B|E11C|E11D|E11E|E11F|E120|E121|E122|E123|E124|E125|E126|E127|E128|E129|E12A|E12B|E12C|E12D|E12E|E12F|E130|E131|E132|E133|E134|E135|E136|E137|E138|E139|E13A|E13B|E13C|E13D|E13E|E13F|E140|E141|E142|E143|E144|E145|E146|E147|E148|E149|E14A|E14B|E14C|E14D|E14E|E14F|E150|E151|E152|E153|E154|E155|E156|E157|E158|E159|E15A|E15B|E15C|E15D|E15E|E15F|E160|E161|E162|E163|E164|E165|E166|E167|E168|E169|E16A|E16B|E16C|E16D|E16E|E16F|E170|E171|E172|E173|E174|E175|E176|E177|E178|E179|E17A|E17B|E17C|E17D|E17E|E17F|E180|E181|E182|E183|E184|E185|E186|E187|E188|E189|E18A|E18B|E18C|E18D|E18E|E18F|E190|E191|E192|E193|E194|E195|E196|E197|E198|E199|E19A";
// $bnfullcons - set above;
$vstr = preg_replace('/E068 ('.$bnfullconjuncts.'|'.$bnfullcons.')/', '\\1 E068', $vstr);
// ? Need to shift it beyond post-base vowels 09BE, 09C0, 09D7 haven't found so can't test??
$vstr = preg_replace('/E068 (09BE|09C0|09D7)/', '\\1 E068', $vstr);
}
// GUJARATI Shift Reph [E032]
else if ($lang=='gu') {
$gufullforms = "0A95|0A96|0A97|0A98|0A99|0A9A|0A9B|0A9C|0A9D|0A9E|0A9F|0AA0|0AA1|0AA2|0AA3|0AA4|0AA5|0AA6|0AA7|0AA8|0AAA|0AAB|0AAC|0AAD|0AAE|0AAF|0AB0|0AB2|0AB3|0AB5|0AB6|0AB7|0AB8|0AB9|E002|E003|E004|E005|E006|E007|E008|E009|E00A|E00B|E00C|E00D|E00E|E00F|E010|E011|E012|E013|E014|E015|E016|E017|E018|E019|E01A|E01B|E01C|E01D|E01E|E01F|E020|E021|E022|E023|E024|E025|E026|E027|E05E|E05F|E060|E061|E062|E063|E064|E065|E066|E067|E068|E069|E06A|E06B|E06C|E06D|E06E|E06F|E070|E071|E072|E073|E074|E075|E076|E077|E078|E079|E07A|E07B|E07C|E07D|E07E|E07F|E080|E081|E082|E083|E084|E085|E086|E087|E088|E089|E08A|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A1|E0A2|E0A3|E0A4|E0A5";
$vstr = preg_replace('/E032 ('.$gufullforms.')/', '\\1 E032', $vstr);
// Now shift it beyond post-based vowels // ??? Need to add others e.g. 0949,094A,094B,094C + presentation forms like E198
// ? Need to shift it beyond post-base vowels 0ABE, 0AC0 haven't found so can't test??
$vstr = preg_replace('/E032 (0ABE|0AC0)/', '\\1 E032', $vstr);
}
// TELUGU Shift Reph to LEFT [E046|E069|E077] [TelRaSmallOne] => E046 [TelRaSmallTwo] => E069 [TelRaSmallThree] => E077
else if ($lang=='te') {
// tefullforms defined earlier
$tepartialforms = "E00D|E00E|E00F|E010|E011|E012|E013|E014|E015|E016|E017|E018|E019|E01A|E01B|E01C|E01D|E01E|E01F|E020|E021|E022|E023|E024|E025|E026|E027|E07C|E07D|E07E";
$matraligs = "E07F|E080|E081|E082|E083|E084|E085|E086|E087|E088|E089|E08A|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A1|E0A2|E0A3|E0A4|E0A5|E0A6|E0A7|E0A8|E0A9|E0AA|E0AB|E0AC|E0AD|E0AE|E0AF";
$tevowels = "0C3E|0C3F|0C40|0C46|0C47|0C56|0C4A|0C4B|0C4C"
."|0C41|0C42|0C43|0C44"; // post matras
$vstr = preg_replace('/('.$tevowels.') (E046|E069|E077)/', '\\2 \\1', $vstr);
while(preg_match('/('.$tepartialforms.') (E046|E069|E077)/', $vstr)) {
$vstr = preg_replace('/('.$tepartialforms.') (E046|E069|E077)/', '\\2 \\1', $vstr);
}
$vstr = preg_replace('/('.$tefullforms .'|'.$matraligs.') (E046|E069|E077)/', '\\2 \\1', $vstr);
}
// KANNADA Shift Reph to RIGHT [E00B]
else if ($lang=='kn') {
$knfullforms = "0C95|0C96|0C97|0C98|0C99|0C9A|0C9B|0C9C|0C9D|0C9E|0C9F|0CA0|0CA1|0CA2|0CA3|0CA4|0CA5|0CA6|0CA7|0CA8|0CAA|0CAB|0CAC|0CAD|0CAE|0CAF|0CB0|0CB1|0CB2|0CB3|0CB5|0CB6|0CB7|0CB8|0CB9|E07D|E07E|E0A3";
$knpartialforms = "E00C|E00D|E00E|E00F|E010|E011|E012|E013|E014|0C9E|E015|E016|E017|E018|E019|E01A|E01B|E01C|E01D|E01E|E01F|E020|E021|E022|E023|E024|E025|E026|E027|E028|E029|E02A|E02B|E02C|E02D|E07F";
while(preg_match('/E00B ('.$knpartialforms.')/', $vstr)) {
$vstr = preg_replace('/E00B ('.$knpartialforms.')/', '\\1 E00B', $vstr);
}
// mPDF 5.3.47 Also move Reph to right of matraIligatures
$knfullforms .= "|E082|E083|E084|E085|E086|E087|E088|E089|E08A|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A4|E0A1|E0A2";
$vstr = preg_replace('/E00B ('.$knfullforms.')/', '\\1 E00B', $vstr);
// ? Need to shift it beyond base or below-base forms - haven't found so can't test??
// mPDF 5.3.87
// E004 added to list (which is a transformed version of 0CBE)
$knvowels = "0CBE|0CC0|0CC1|0CC2|0CC3|0CC4|0CC7|0CC8|0CCA|0CCB|0CD5|0CD6|E004";
$vstr = preg_replace('/E00B ('.$knvowels.')/', '\\1 E00B', $vstr);
}
// ORIYA Shift Reph to RIGHT [E069|E06A|E06B|E06C]
else if ($lang=='or') {
$orrephs = "E069|E06A|E06B|E06C";
$orfullforms = "0B15|0B16|0B17|0B18|0B19|0B1A|0B1B|0B1C|0B1D|0B1E|0B1F|0B20|0B21|0B22|0B23|0B24|0B25|0B26|0B27|0B28|0B29|0B2A|0B2B|0B2C|0B2D|0B2E|0B2F|0B30|0B31|0B32|0B33|0B34|0B35|0B36|0B37|0B38|E003|E004|E005|E006|E007|E008|E009|E00A|E00B|E00C|E00D|E00E|E00F|E010|E011|E012|E013|E014|E015|E016|E017|E018|E019|E01A|E01B|E01C|E01D|E01E|E01F|E020|E021|E022|E023|E024|E025|E026|E027|E028|E029|E02A|E02B|E02C|E02D|E02E|E02F|E030|E031|E032|E033|E034|E035|E036|E037";
// E123 - E147 FullHalant forms ? add to FullForms
$orpartialforms = "E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A1|E0A2|E0A3|E0A4|E0A5|E0A6|E0A7|E0A8|E0A9|E0AA|E0AB|E0AC|E0AD|E0AE|E0AF|E0B0|E0B1|E0B2|E0B3|E0B4|E0B5|E0B6|E0B7|E0B8|E0B9|E0BA|E0BB|E0BC|E0BD|E0BE|E0BF|E0C0|E0C1|E0C2|E0C3|E0C4|E0C5|E0C6|E0C7|E0C8|E0C9|E0CA|E0CB|E0CC|E0CD|E0CE|E0CF|E0D0|E0D1|E0D2|E0D3|E0D4|E0D5|E0D6|E0D7|E0D8|E0D9|E0DA|E0DB|E0DC|E0DD|E0DE|E0DF|E0E0|E0E1|E0E2|E0E3|E0E4|E0E5|E0E6|E0E7|E0E8|E0E9|E0EA|E0EB|E0EC|E0ED|E0EE|E0EF|E0F0|E0F1|E0F2|E0F3|E0F4|E0F5";
// Combined MatraIReph[E06D] split [0B3F & E069] to allow reph to be shifted forwards
$vstr = preg_replace('/('.$orfullforms.') E06D ('.$orfullforms.') 0B3E/', '\\1 0B3F E069 \\2 0B3E', $vstr);
while(preg_match('/('.$orrephs.') ('.$orpartialforms.')/', $vstr)) {
$vstr = preg_replace('/('.$orrephs.') ('.$orpartialforms.')/', '\\2 \\1', $vstr);
}
$vstr = preg_replace('/('.$orrephs.') ('.$orfullforms.')/', '\\2 \\1', $vstr);
// Combine Reph and MatraI
$vstr = str_replace('E069 0B3F', 'E06D', $vstr); // Reph and MatraI -> MatraIReph
$vstr = str_replace('E06A 0B3F', 'E06E', $vstr); // Reph and MatraI -> MatraIReph
$vstr = str_replace('E06B 0B3F', 'E06F', $vstr); // Reph and MatraI -> MatraIReph
}
// MALAYALAM Shift Reph to LEFT [E00E] (mlylmRaVattu)
else if ($lang=='ml') {
$halant = "0D4D";
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' 0D30/','E00E \\1', $vstr); // 0D30 = Ra
$vstr = preg_replace('/([A-F0-9]{4}) '.$halant.' '.$mlprebasedvowels .' 0D30/','\\2 E00E \\1', $vstr); // 0D30 = Ra
$mlfullforms = "0D15|0D16|0D17|0D18|0D19|0D1A|0D1B|0D1C|0D1D|0D1E|0D1F|0D20|0D21|0D22|0D23|0D24|0D25|0D26|0D27|0D28|0D2A|0D2B|0D2C|0D2D|0D2E|0D2F|0D30|0D31|0D32|0D33|0D34|0D35|0D36|0D37|0D38|0D39"
."|E010|E011|E012|E013|E014|E015|E016|E017|E018|E019|E01A|E01B|E01C|E01D|E01E|E01F|E020|E021|E022|E023|E024|E025|E026|E027|E028|E029|E02A|E02B|E02C|E02D|E02E|E02F|E030|E031|E032|E033|E034|E035|E036|E037|E038|E039|E03A|E03B|E03C|E03D|E03E|E03F|E040|E041|E042|E043|E044|E045|E046|E047|E048|E049|E04A|E04B|E04C|E04D|E04E|E04F|E050|E051|E052|E053|E054|E055|E056|E057|E058|E059|E05A|E05B|E05C|E05D|E05E|E05F|E060|E061|E062|E063|E064|E065|E066|E067|E068|E069|E06A|E06B|E06C|E06D|E06E|E06F|E070|E071|E072|E073|E074|E075|E076|E077|E078|E079|E07A|E07B|E07C|E07D";
// = FullConsonants + FullConjuncts
// = Add Chillu characters // mPDF 5.0.024
$mlfullforms .= "|E004|E005|E006|E007|E008|E009";
while(preg_match('/('.$mlfullforms.') E00E/', $vstr))
$vstr = preg_replace('/('.$mlfullforms.') E00E/', 'E00E \\1', $vstr);
}
//============================
// SHIFT post-based vowels to Left of SmallForms (NOT to left of full forms)
// TELUGU Shift
if ($lang=='te') {
// NB $tevowels defined above
// NB $tefullforms defined above
$tebelowbase1 = "E02C|E02D|E02E|E02F|E030|E031|E032|E033|E034|E035|E036|E037|E038|E039|E03A|E03B|E03C|E03D|E03E|E03F|E040|E041|E042|E043|E044|E045|E046|E047|E048|E049|E04A|E04B|E04C|E04D|E04E"; //'Small1KaToHa'
$tebelowbase2 = "E04F|E050|E051|E052|E053|E054|E055|E056|E057|E058|E059|E05A|E05B|E05C|E05D|E05E|E05F|E060|E061|E062|E063|E064|E065|E066|E067|E068|E069|E06A|E06B|E06C|E06D|E06E|E06F|E070|E071"; // 'Small2KaToHa'
$vstr = preg_replace('/('.$tebelowbase2.') ('.$tevowels.')/', '\\2 \\1', $vstr);
$vstr = preg_replace('/('.$tebelowbase1.') ('.$tevowels.')/', '\\2 \\1', $vstr);
}
// KANNADA Shift
else if ($lang=='kn') {
$knvowels = "0CBE|0CC0|0CC1|0CC2|0CC3|0CC4|0CC7|0CC8|0CCA|0CCB|0CD5|0CD6"
// mPDF 5.3.87 Shouldn't swop E082 and E047 (belowbase1) below
// E082 is a matraIligature
// ."|E082|E083|E084|E085|E086|E087|E088|E089|E08A|E08B|E08C|E08D|E08E|E08F|E090|E091|E092|E093|E094|E095|E096|E097|E098|E099|E09A|E09B|E09C|E09D|E09E|E09F|E0A0|E0A1|E0A2|E0A3|E0A4|E0A5|E0A6|E0A7|E0A8|E0A9|E0AA|E0AB"
."|E004|E007|E008|E009|E00A";
// NB $knvowels defined above
// NB $fullforms defined above
// $belowbase1/2 defined above
$vstr = preg_replace('/('.$belowbase2.') ('.$knvowels.')/', '\\2 \\1', $vstr);
// mPDF 5.3.87
$vstr = preg_replace('/('.$belowbase1.') ('.$knvowels.')/', '\\2 \\1', $vstr);
//$vstr = preg_replace('/('.$fullforms.') ('.$knvowels.')/', '\\2 \\1', $vstr);
}
//============================
// Clear unwanted ZWJ, ZWNJ
// MALAYALAM
if ($lang=='ml') {
$vstr = preg_replace('/(200C|200D) /','', $vstr);
}
//============================
// END & PUT IT BACK TOGETHER
$vstr = preg_replace('/^0020 (.*) 0020$/', '\\1', $vstr);
$varr = explode(" ",$vstr);
$e = '';
foreach($varr AS $v) {
$e.=code2utf(hexdec($v));
}
//============================
return $e;
}
}
?>

View File

@ -1,224 +0,0 @@
<?php
class meter {
function __construct() {
}
function makeSVG($tag, $type, $value, $max, $min, $optimum, $low, $high) {
$svg = '';
if ($tag == 'meter') {
if ($type=='2') {
/////////////////////////////////////////////////////////////////////////////////////
///////// CUSTOM <meter type="2">
/////////////////////////////////////////////////////////////////////////////////////
$h = 10;
$w = 160;
$border_radius = 0.143; // Factor of Height
$svg = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="'.$w.'px" height="'.$h.'px" viewBox="0 0 '.$w.' '.$h.'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><g>
<defs>
<linearGradient id="GrGRAY" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(222, 222, 222)" />
<stop offset="20%" stop-color="rgb(232, 232, 232)" />
<stop offset="25%" stop-color="rgb(232, 232, 232)" />
<stop offset="100%" stop-color="rgb(182, 182, 182)" />
</linearGradient>
</defs>
';
$svg .= '<rect x="0" y="0" width="'.$w.'" height="'.$h.'" fill="#f4f4f4" stroke="none" />';
// LOW to HIGH region
//if ($low && $high && ($low != $min || $high != $max)) {
if ($low && $high) {
$barx = (($low-$min) / ($max-$min) ) * $w;
$barw = (($high-$low) / ($max-$min) ) * $w;
$svg .= '<rect x="'.$barx.'" y="0" width="'.$barw.'" height="'.$h.'" fill="url(#GrGRAY)" stroke="#888888" stroke-width="0.5px" />';
}
// OPTIMUM Marker (? AVERAGE)
if ($optimum) {
$barx = (($optimum-$min) / ($max-$min) ) * $w;
$barw = $h/2;
$barcol = '#888888';
$svg .= '<rect x="'.$barx.'" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$barw.'" height="'.$h.'" fill="'.$barcol.'" stroke="none" />';
}
// VALUE Marker
if ($value) {
if ($min != $low && $value < $low) { $col = 'orange'; }
else if ($max != $high && $value > $high) { $col = 'orange'; }
else { $col = '#008800'; }
$cx = (($value-$min) / ($max-$min) ) * $w;
$cy = $h/2;
$rx = $h/3.5;
$ry = $h/2.2;
$svg .= '<ellipse fill="'.$col.'" stroke="#000000" stroke-width="0.5px" cx="'.$cx.'" cy="'.$cy.'" rx="'.$rx.'" ry="'.$ry.'"/>';
}
// BoRDER
$svg .= '<rect x="0" y="0" width="'.$w.'" height="'.$h.'" fill="none" stroke="#888888" stroke-width="0.5px" />';
$svg .= '</g></svg>';
}
else {
/////////////////////////////////////////////////////////////////////////////////////
///////// DEFAULT <meter>
/////////////////////////////////////////////////////////////////////////////////////
$h = 10;
$w = 50;
$border_radius = 0.143; // Factor of Height
$svg = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="'.$w.'px" height="'.$h.'px" viewBox="0 0 '.$w.' '.$h.'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><g>
<defs>
<linearGradient id="GrGRAY" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(222, 222, 222)" />
<stop offset="20%" stop-color="rgb(232, 232, 232)" />
<stop offset="25%" stop-color="rgb(232, 232, 232)" />
<stop offset="100%" stop-color="rgb(182, 182, 182)" />
</linearGradient>
<linearGradient id="GrRED" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(255, 162, 162)" />
<stop offset="20%" stop-color="rgb(255, 218, 218)" />
<stop offset="25%" stop-color="rgb(255, 218, 218)" />
<stop offset="100%" stop-color="rgb(255, 0, 0)" />
</linearGradient>
<linearGradient id="GrGREEN" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(102, 230, 102)" />
<stop offset="20%" stop-color="rgb(218, 255, 218)" />
<stop offset="25%" stop-color="rgb(218, 255, 218)" />
<stop offset="100%" stop-color="rgb(0, 148, 0)" />
</linearGradient>
<linearGradient id="GrBLUE" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(102, 102, 230)" />
<stop offset="20%" stop-color="rgb(238, 238, 238)" />
<stop offset="25%" stop-color="rgb(238, 238, 238)" />
<stop offset="100%" stop-color="rgb(0, 0, 128)" />
</linearGradient>
<linearGradient id="GrORANGE" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(255, 186, 0)" />
<stop offset="20%" stop-color="rgb(255, 238, 168)" />
<stop offset="25%" stop-color="rgb(255, 238, 168)" />
<stop offset="100%" stop-color="rgb(255, 155, 0)" />
</linearGradient>
</defs>
<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$w.'" height="'.$h.'" fill="url(#GrGRAY)" stroke="none" />
';
if ($value) {
$barw = (($value-$min) / ($max-$min) ) * $w;
if ($optimum < $low) {
if ($value < $low) { $barcol = 'url(#GrGREEN)'; }
else if ($value > $high) { $barcol = 'url(#GrRED)'; }
else { $barcol = 'url(#GrORANGE)'; }
}
else if ($optimum > $high) {
if ($value < $low) { $barcol = 'url(#GrRED)'; }
else if ($value > $high) { $barcol = 'url(#GrGREEN)'; }
else { $barcol = 'url(#GrORANGE)'; }
}
else {
if ($value < $low) { $barcol = 'url(#GrORANGE)'; }
else if ($value > $high) { $barcol = 'url(#GrORANGE)'; }
else { $barcol = 'url(#GrGREEN)'; }
}
$svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$barw.'" height="'.$h.'" fill="'.$barcol.'" stroke="none" />';
}
// Borders
//$svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$w.'" height="'.$h.'" fill="none" stroke="#888888" stroke-width="0.5px" />';
if ($value) {
// $svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$barw.'" height="'.$h.'" fill="none" stroke="#888888" stroke-width="0.5px" />';
}
$svg .= '</g></svg>';
}
}
else { // $tag == 'progress'
if ($type=='2') {
/////////////////////////////////////////////////////////////////////////////////////
///////// CUSTOM <progress type="2">
/////////////////////////////////////////////////////////////////////////////////////
}
else {
/////////////////////////////////////////////////////////////////////////////////////
///////// DEFAULT <progress>
/////////////////////////////////////////////////////////////////////////////////////
$h = 10;
$w = 100;
$border_radius = 0.143; // Factor of Height
if ($value or $value==='0') {
$fill = 'url(#GrGRAY)';
}
else {
$fill = '#f8f8f8';
}
$svg = '<svg width="'.$w.'px" height="'.$h.'px" viewBox="0 0 '.$w.' '.$h.'"><g>
<defs>
<linearGradient id="GrGRAY" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(222, 222, 222)" />
<stop offset="20%" stop-color="rgb(232, 232, 232)" />
<stop offset="25%" stop-color="rgb(232, 232, 232)" />
<stop offset="100%" stop-color="rgb(182, 182, 182)" />
</linearGradient>
<linearGradient id="GrGREEN" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox">
<stop offset="0%" stop-color="rgb(102, 230, 102)" />
<stop offset="20%" stop-color="rgb(218, 255, 218)" />
<stop offset="25%" stop-color="rgb(218, 255, 218)" />
<stop offset="100%" stop-color="rgb(0, 148, 0)" />
</linearGradient>
</defs>
<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$w.'" height="'.$h.'" fill="'.$fill.'" stroke="none" />
';
if ($value) {
$barw = (($value-$min) / ($max-$min) ) * $w;
$barcol = 'url(#GrGREEN)';
$svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$barw.'" height="'.$h.'" fill="'.$barcol.'" stroke="none" />';
}
// Borders
$svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$w.'" height="'.$h.'" fill="none" stroke="#888888" stroke-width="0.5px" />';
if ($value) {
// $svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$barw.'" height="'.$h.'" fill="none" stroke="#888888" stroke-width="0.5px" />';
}
$svg .= '</g></svg>';
}
}
return $svg;
}
} // end of class
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,467 +0,0 @@
<?php
class tocontents {
var $mpdf = null;
var $_toc;
var $TOCmark;
var $TOCoutdent; // mPDF 5.6.31
var $TOCpreHTML;
var $TOCpostHTML;
var $TOCbookmarkText;
var $TOCusePaging;
var $TOCuseLinking;
var $TOCorientation;
var $TOC_margin_left;
var $TOC_margin_right;
var $TOC_margin_top;
var $TOC_margin_bottom;
var $TOC_margin_header;
var $TOC_margin_footer;
var $TOC_odd_header_name;
var $TOC_even_header_name;
var $TOC_odd_footer_name;
var $TOC_even_footer_name;
var $TOC_odd_header_value;
var $TOC_even_header_value;
var $TOC_odd_footer_value;
var $TOC_even_footer_value;
var $TOC_page_selector;
var $m_TOC;
function tocontents(&$mpdf) {
$this->mpdf = $mpdf;
$this->_toc=array();
$this->TOCmark = 0;
$this->m_TOC=array();
}
function TOCpagebreak($tocfont='', $tocfontsize='', $tocindent='', $TOCusePaging=true, $TOCuseLinking='', $toc_orientation='', $toc_mgl='',$toc_mgr='',$toc_mgt='',$toc_mgb='',$toc_mgh='',$toc_mgf='',$toc_ohname='',$toc_ehname='',$toc_ofname='',$toc_efname='',$toc_ohvalue=0,$toc_ehvalue=0,$toc_ofvalue=0, $toc_efvalue=0, $toc_preHTML='', $toc_postHTML='', $toc_bookmarkText='', $resetpagenum='', $pagenumstyle='', $suppress='', $orientation='', $mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf='',$ohname='',$ehname='',$ofname='',$efname='',$ohvalue=0,$ehvalue=0,$ofvalue=0,$efvalue=0, $toc_id=0, $pagesel='', $toc_pagesel='', $sheetsize='', $toc_sheetsize='', $tocoutdent='') { // mPDF 5.6.19
if (strtoupper($toc_id)=='ALL') { $toc_id = '_mpdf_all'; }
else if (!$toc_id) { $toc_id = 0; }
else { $toc_id = strtolower($toc_id); }
if ($TOCusePaging === false || strtolower($TOCusePaging) == "off" || $TOCusePaging === 0 || $TOCusePaging === "0" || $TOCusePaging === "") { $TOCusePaging = false; }
else { $TOCusePaging = true; }
if (!$TOCuseLinking) { $TOCuseLinking = false; }
if ($toc_id) {
$this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
$this->m_TOC[$toc_id]['TOCoutdent'] = $tocoutdent;
$this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation;
$this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking;
$this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging;
if ($toc_preHTML) { $this->m_TOC[$toc_id]['TOCpreHTML'] = $toc_preHTML; }
if ($toc_postHTML) { $this->m_TOC[$toc_id]['TOCpostHTML'] = $toc_postHTML; }
if ($toc_bookmarkText) { $this->m_TOC[$toc_id]['TOCbookmarkText'] = $toc_bookmarkText; }
$this->m_TOC[$toc_id]['TOC_margin_left'] = $toc_mgl;
$this->m_TOC[$toc_id]['TOC_margin_right'] = $toc_mgr;
$this->m_TOC[$toc_id]['TOC_margin_top'] = $toc_mgt;
$this->m_TOC[$toc_id]['TOC_margin_bottom'] = $toc_mgb;
$this->m_TOC[$toc_id]['TOC_margin_header'] = $toc_mgh;
$this->m_TOC[$toc_id]['TOC_margin_footer'] = $toc_mgf;
$this->m_TOC[$toc_id]['TOC_odd_header_name'] = $toc_ohname;
$this->m_TOC[$toc_id]['TOC_even_header_name'] = $toc_ehname;
$this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $toc_ofname;
$this->m_TOC[$toc_id]['TOC_even_footer_name'] = $toc_efname;
$this->m_TOC[$toc_id]['TOC_odd_header_value'] = $toc_ohvalue;
$this->m_TOC[$toc_id]['TOC_even_header_value'] = $toc_ehvalue;
$this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $toc_ofvalue;
$this->m_TOC[$toc_id]['TOC_even_footer_value'] = $toc_efvalue;
$this->m_TOC[$toc_id]['TOC_page_selector'] = $toc_pagesel;
$this->m_TOC[$toc_id]['TOCsheetsize'] = $toc_sheetsize;
}
else {
$this->TOCmark = $this->mpdf->page;
$this->TOCoutdent = $tocoutdent;
$this->TOCorientation = $toc_orientation;
$this->TOCuseLinking = $TOCuseLinking;
$this->TOCusePaging = $TOCusePaging;
if ($toc_preHTML) { $this->TOCpreHTML = $toc_preHTML; }
if ($toc_postHTML) { $this->TOCpostHTML = $toc_postHTML; }
if ($toc_bookmarkText) { $this->TOCbookmarkText = $toc_bookmarkText; }
$this->TOC_margin_left = $toc_mgl;
$this->TOC_margin_right = $toc_mgr;
$this->TOC_margin_top = $toc_mgt;
$this->TOC_margin_bottom = $toc_mgb;
$this->TOC_margin_header = $toc_mgh;
$this->TOC_margin_footer = $toc_mgf;
$this->TOC_odd_header_name = $toc_ohname;
$this->TOC_even_header_name = $toc_ehname;
$this->TOC_odd_footer_name = $toc_ofname;
$this->TOC_even_footer_name = $toc_efname;
$this->TOC_odd_header_value = $toc_ohvalue;
$this->TOC_even_header_value = $toc_ehvalue;
$this->TOC_odd_footer_value = $toc_ofvalue;
$this->TOC_even_footer_value = $toc_efvalue;
$this->TOC_page_selector = $toc_pagesel;
$this->TOCsheetsize = $toc_sheetsize;
}
}
// Initiate, and Mark a place for the Table of Contents to be inserted
function TOC($tocfont='', $tocfontsize=0, $tocindent=0, $resetpagenum='', $pagenumstyle='', $suppress='', $toc_orientation='', $TOCusePaging=true, $TOCuseLinking=false, $toc_id=0, $tocoutdent='') { // mPDF 5.6.19) {
if (strtoupper($toc_id)=='ALL') { $toc_id = '_mpdf_all'; }
else if (!$toc_id) { $toc_id = 0; }
else { $toc_id = strtolower($toc_id); }
// To use odd and even pages
// Cannot start table of contents on an even page
if (($this->mpdf->mirrorMargins) && (($this->mpdf->page)%2==0)) { // EVEN
if ($this->mpdf->ColActive) {
if (count($this->mpdf->columnbuffer)) { $this->mpdf->printcolumnbuffer(); }
}
$this->mpdf->AddPage($this->mpdf->CurOrientation,'',$resetpagenum, $pagenumstyle, $suppress);
}
else {
$this->mpdf->PageNumSubstitutions[] = array('from'=>$this->mpdf->page, 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=>$suppress);
}
if ($toc_id) {
$this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
$this->m_TOC[$toc_id]['TOCoutdent'] = $tocoutdent;
$this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation;
$this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking;
$this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging;
}
else {
$this->TOCmark = $this->mpdf->page;
$this->TOCoutdent = $tocoutdent;
$this->TOCorientation = $toc_orientation;
$this->TOCuseLinking = $TOCuseLinking;
$this->TOCusePaging = $TOCusePaging;
}
}
function insertTOC() {
$notocs = 0;
if ($this->TOCmark) { $notocs = 1; }
$notocs += count($this->m_TOC);
if ($notocs==0) { return; }
if (count($this->m_TOC)) { reset($this->m_TOC); }
$added_toc_pages = 0;
if ($this->mpdf->ColActive) { $this->mpdf->SetColumns(0); }
if (($this->mpdf->mirrorMargins) && (($this->mpdf->page)%2==1)) { // ODD
$this->mpdf->AddPage($this->mpdf->CurOrientation);
$extrapage = true;
}
else { $extrapage = false; }
for ($toci = 0; $toci<$notocs; $toci++) {
if ($toci==0 && $this->TOCmark) {
$toc_id = 0;
$toc_page = $this->TOCmark;
$tocoutdent = $this->TOCoutdent;
$toc_orientation = $this->TOCorientation;
$TOCuseLinking = $this->TOCuseLinking;
$TOCusePaging = $this->TOCusePaging;
$toc_preHTML = $this->TOCpreHTML;
$toc_postHTML = $this->TOCpostHTML;
$toc_bookmarkText = $this->TOCbookmarkText;
$toc_mgl = $this->TOC_margin_left;
$toc_mgr = $this->TOC_margin_right;
$toc_mgt = $this->TOC_margin_top;
$toc_mgb = $this->TOC_margin_bottom;
$toc_mgh = $this->TOC_margin_header;
$toc_mgf = $this->TOC_margin_footer;
$toc_ohname = $this->TOC_odd_header_name;
$toc_ehname = $this->TOC_even_header_name;
$toc_ofname = $this->TOC_odd_footer_name;
$toc_efname = $this->TOC_even_footer_name;
$toc_ohvalue = $this->TOC_odd_header_value;
$toc_ehvalue = $this->TOC_even_header_value;
$toc_ofvalue = $this->TOC_odd_footer_value;
$toc_efvalue = $this->TOC_even_footer_value;
$toc_page_selector = $this->TOC_page_selector;
$toc_sheet_size = $this->TOCsheetsize;
}
else {
$arr = current($this->m_TOC);
$toc_id = key($this->m_TOC);
$toc_page = $this->m_TOC[$toc_id]['TOCmark'];
$tocoutdent = $this->m_TOC[$toc_id]['TOCoutdent'];
$toc_orientation = $this->m_TOC[$toc_id]['TOCorientation'];
$TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking'];
$TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging'];
if (isset($this->m_TOC[$toc_id]['TOCpreHTML'])) { $toc_preHTML = $this->m_TOC[$toc_id]['TOCpreHTML']; }
else { $toc_preHTML = ''; }
if (isset($this->m_TOC[$toc_id]['TOCpostHTML'])) { $toc_postHTML = $this->m_TOC[$toc_id]['TOCpostHTML']; }
else { $toc_postHTML = ''; }
if (isset($this->m_TOC[$toc_id]['TOCbookmarkText'])) { $toc_bookmarkText = $this->m_TOC[$toc_id]['TOCbookmarkText']; }
else { $toc_bookmarkText = ''; } // *BOOKMARKS*
$toc_mgl = $this->m_TOC[$toc_id]['TOC_margin_left'];
$toc_mgr = $this->m_TOC[$toc_id]['TOC_margin_right'];
$toc_mgt = $this->m_TOC[$toc_id]['TOC_margin_top'];
$toc_mgb = $this->m_TOC[$toc_id]['TOC_margin_bottom'];
$toc_mgh = $this->m_TOC[$toc_id]['TOC_margin_header'];
$toc_mgf = $this->m_TOC[$toc_id]['TOC_margin_footer'];
$toc_ohname = $this->m_TOC[$toc_id]['TOC_odd_header_name'];
$toc_ehname = $this->m_TOC[$toc_id]['TOC_even_header_name'];
$toc_ofname = $this->m_TOC[$toc_id]['TOC_odd_footer_name'];
$toc_efname = $this->m_TOC[$toc_id]['TOC_even_footer_name'];
$toc_ohvalue = $this->m_TOC[$toc_id]['TOC_odd_header_value'];
$toc_ehvalue = $this->m_TOC[$toc_id]['TOC_even_header_value'];
$toc_ofvalue = $this->m_TOC[$toc_id]['TOC_odd_footer_value'];
$toc_efvalue = $this->m_TOC[$toc_id]['TOC_even_footer_value'];
$toc_page_selector = $this->m_TOC[$toc_id]['TOC_page_selector'];
$toc_sheet_size = $this->m_TOC[$toc_id]['TOCsheetsize'];
next($this->m_TOC);
}
// mPDF 5.6.31
if (!$toc_orientation) { $toc_orientation= $this->mpdf->DefOrientation; }
$this->mpdf->AddPage($toc_orientation, '', '', '', "on", $toc_mgl, $toc_mgr, $toc_mgt, $toc_mgb, $toc_mgh, $toc_mgf, $toc_ohname, $toc_ehname, $toc_ofname, $toc_efname, $toc_ohvalue, $toc_ehvalue, $toc_ofvalue, $toc_efvalue, $toc_page_selector, $toc_sheet_size );
$this->mpdf->writingToC = true; // mPDF 5.6.38
// mPDF 5.6.31
$tocstart=count($this->mpdf->pages);
if ($toc_preHTML) { $this->mpdf->WriteHTML($toc_preHTML); }
// mPDF 5.6.19
$html ='<div class="mpdf_toc" id="mpdf_toc_'.$toc_id.'">';
foreach($this->_toc as $t) {
if ($t['toc_id']==='_mpdf_all' || $t['toc_id']===$toc_id ) {
$html .= '<div class="mpdf_toc_level_'.$t['l'].'">';
if ($TOCuseLinking) { $html .= '<a class="mpdf_toc_a" href="#__mpdfinternallink_'.$t['link'].'">'; }
$html .= '<span class="mpdf_toc_t_level_'.$t['l'].'">'.$t['t'].'</span>';
if ($TOCuseLinking) { $html .= '</a>'; }
if (!$tocoutdent) { $tocoutdent = '0'; }
if ($TOCusePaging) { $html .= ' <dottab outdent="'.$tocoutdent.'" /> ';
if ($TOCuseLinking) { $html .= '<a class="mpdf_toc_a" href="#__mpdfinternallink_'.$t['link'].'">'; }
$html .= '<span class="mpdf_toc_p_level_'.$t['l'].'">'.$this->mpdf->docPageNum($t['p']).'</span>';
if ($TOCuseLinking) { $html .= '</a>'; }
}
$html .= '</div>';
}
}
$html .= '</div>';
$this->mpdf->WriteHTML($html);
if ($toc_postHTML) { $this->mpdf->WriteHTML($toc_postHTML); }
$this->mpdf->writingToC = false; // mPDF 5.6.38
$this->mpdf->AddPage($toc_orientation,'E');
$n_toc = $this->mpdf->page - $tocstart + 1;
if ($toci==0 && $this->TOCmark) {
$TOC_start = $tocstart ;
$TOC_end = $this->mpdf->page;
$TOC_npages = $n_toc;
}
else {
$this->m_TOC[$toc_id]['start'] = $tocstart ;
$this->m_TOC[$toc_id]['end'] = $this->mpdf->page;
$this->m_TOC[$toc_id]['npages'] = $n_toc;
}
}
$s = '';
$s .= $this->mpdf->PrintBodyBackgrounds();
$s .= $this->mpdf->PrintPageBackgrounds();
$this->mpdf->pages[$this->mpdf->page] = preg_replace('/(___BACKGROUND___PATTERNS'.$this->mpdf->uniqstr.')/', "\n".$s."\n".'\\1', $this->mpdf->pages[$this->mpdf->page]);
$this->mpdf->pageBackgrounds = array();
//Page footer
$this->mpdf->InFooter=true;
$this->mpdf->Footer();
$this->mpdf->InFooter=false;
// 2nd time through to move pages etc.
$added_toc_pages = 0;
if (count($this->m_TOC)) { reset($this->m_TOC); }
for ($toci = 0; $toci<$notocs; $toci++) {
if ($toci==0 && $this->TOCmark) {
$toc_id = 0;
$toc_page = $this->TOCmark + $added_toc_pages;
$toc_orientation = $this->TOCorientation;
$TOCuseLinking = $this->TOCuseLinking;
$TOCusePaging = $this->TOCusePaging;
$toc_bookmarkText = $this->TOCbookmarkText; // *BOOKMARKS*
$tocstart = $TOC_start ;
$tocend = $n = $TOC_end;
$n_toc = $TOC_npages;
}
else {
$arr = current($this->m_TOC);
$toc_id = key($this->m_TOC);
$toc_page = $this->m_TOC[$toc_id]['TOCmark'] + $added_toc_pages;
$toc_orientation = $this->m_TOC[$toc_id]['TOCorientation'];
$TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking'];
$TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging'];
$toc_bookmarkText = $this->m_TOC[$toc_id]['TOCbookmarkText']; // *BOOKMARKS*
$tocstart = $this->m_TOC[$toc_id]['start'] ;
$tocend = $n = $this->m_TOC[$toc_id]['end'] ;
$n_toc = $this->m_TOC[$toc_id]['npages'] ;
next($this->m_TOC);
}
// Now pages moved
$added_toc_pages += $n_toc;
$this->mpdf->MovePages($toc_page, $tocstart, $tocend) ;
$this->mpdf->pgsIns[$toc_page] = $tocend - $tocstart + 1;
/*-- BOOKMARKS --*/
// Insert new Bookmark for Bookmark
if ($toc_bookmarkText) {
$insert = -1;
foreach($this->mpdf->BMoutlines as $i=>$o) {
if($o['p']<$toc_page) { // i.e. before point of insertion
$insert = $i;
}
}
$txt = $this->mpdf->purify_utf8_text($toc_bookmarkText);
if ($this->mpdf->text_input_as_HTML) {
$txt = $this->mpdf->all_entities_to_utf8($txt);
}
$newBookmark[0] = array('t'=>$txt,'l'=>0,'y'=>0,'p'=>$toc_page );
array_splice($this->mpdf->BMoutlines,($insert+1),0,$newBookmark);
}
/*-- END BOOKMARKS --*/
}
// Delete empty page that was inserted earlier
if ($extrapage) {
unset($this->mpdf->pages[count($this->mpdf->pages)]);
$this->mpdf->page--; // Reset page pointer
}
}
function openTagTOC($attr) {
if (isset($attr['OUTDENT']) && $attr['OUTDENT']) { $tocoutdent = $attr['OUTDENT']; } else { $tocoutdent = ''; } // mPDF 5.6.19
if (isset($attr['RESETPAGENUM']) && $attr['RESETPAGENUM']) { $resetpagenum = $attr['RESETPAGENUM']; } else { $resetpagenum = ''; }
if (isset($attr['PAGENUMSTYLE']) && $attr['PAGENUMSTYLE']) { $pagenumstyle = $attr['PAGENUMSTYLE']; } else { $pagenumstyle= ''; }
if (isset($attr['SUPPRESS']) && $attr['SUPPRESS']) { $suppress = $attr['SUPPRESS']; } else { $suppress = ''; }
if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) { $toc_orientation = $attr['TOC-ORIENTATION']; } else { $toc_orientation = ''; }
if (isset($attr['PAGING']) && (strtoupper($attr['PAGING'])=='OFF' || $attr['PAGING']==='0')) { $paging = false; }
else { $paging = true; }
if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $links = true; }
else { $links = false; }
if (isset($attr['NAME']) && $attr['NAME']) { $toc_id = strtolower($attr['NAME']); } else { $toc_id = 0; }
$this->TOC('',0,0,$resetpagenum, $pagenumstyle, $suppress, $toc_orientation, $paging, $links, $toc_id, $tocoutdent); // mPDF 5.6.19 5.6.31
}
function openTagTOCPAGEBREAK($attr) {
if (isset($attr['NAME']) && $attr['NAME']) { $toc_id = strtolower($attr['NAME']); } else { $toc_id = 0; }
if ($toc_id) {
if (isset($attr['OUTDENT']) && $attr['OUTDENT']) { $this->m_TOC[$toc_id]['TOCoutdent'] = $attr['OUTDENT']; } else { $this->m_TOC[$toc_id]['TOCoutdent'] = ''; } // mPDF 5.6.19
if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) { $this->m_TOC[$toc_id]['TOCorientation'] = $attr['TOC-ORIENTATION']; } else { $this->m_TOC[$toc_id]['TOCorientation'] = ''; }
if (isset($attr['PAGING']) && (strtoupper($attr['PAGING'])=='OFF' || $attr['PAGING']==='0')) { $this->m_TOC[$toc_id]['TOCusePaging'] = false; }
else { $this->m_TOC[$toc_id]['TOCusePaging'] = true; }
if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $this->m_TOC[$toc_id]['TOCuseLinking'] = true; }
else { $this->m_TOC[$toc_id]['TOCuseLinking'] = false; }
$this->m_TOC[$toc_id]['TOC_margin_left'] = $this->m_TOC[$toc_id]['TOC_margin_right'] = $this->m_TOC[$toc_id]['TOC_margin_top'] = $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->m_TOC[$toc_id]['TOC_margin_header'] = $this->m_TOC[$toc_id]['TOC_margin_footer'] = '';
if (isset($attr['TOC-MARGIN-RIGHT'])) { $this->m_TOC[$toc_id]['TOC_margin_right'] = $this->mpdf->ConvertSize($attr['TOC-MARGIN-RIGHT'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-LEFT'])) { $this->m_TOC[$toc_id]['TOC_margin_left'] = $this->mpdf->ConvertSize($attr['TOC-MARGIN-LEFT'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-TOP'])) { $this->m_TOC[$toc_id]['TOC_margin_top'] = $this->mpdf->ConvertSize($attr['TOC-MARGIN-TOP'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-BOTTOM'])) { $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->mpdf->ConvertSize($attr['TOC-MARGIN-BOTTOM'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-HEADER'])) { $this->m_TOC[$toc_id]['TOC_margin_header'] = $this->mpdf->ConvertSize($attr['TOC-MARGIN-HEADER'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-FOOTER'])) { $this->m_TOC[$toc_id]['TOC_margin_footer'] = $this->mpdf->ConvertSize($attr['TOC-MARGIN-FOOTER'],$this->mpdf->w,$this->mpdf->FontSize,false); }
$this->m_TOC[$toc_id]['TOC_odd_header_name'] = $this->m_TOC[$toc_id]['TOC_even_header_name'] = $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $this->m_TOC[$toc_id]['TOC_even_footer_name'] = '';
if (isset($attr['TOC-ODD-HEADER-NAME']) && $attr['TOC-ODD-HEADER-NAME']) { $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $attr['TOC-ODD-HEADER-NAME']; }
if (isset($attr['TOC-EVEN-HEADER-NAME']) && $attr['TOC-EVEN-HEADER-NAME']) { $this->m_TOC[$toc_id]['TOC_even_header_name'] = $attr['TOC-EVEN-HEADER-NAME']; }
if (isset($attr['TOC-ODD-FOOTER-NAME']) && $attr['TOC-ODD-FOOTER-NAME']) { $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $attr['TOC-ODD-FOOTER-NAME']; }
if (isset($attr['TOC-EVEN-FOOTER-NAME']) && $attr['TOC-EVEN-FOOTER-NAME']) { $this->m_TOC[$toc_id]['TOC_even_footer_name'] = $attr['TOC-EVEN-FOOTER-NAME']; }
$this->m_TOC[$toc_id]['TOC_odd_header_value'] = $this->m_TOC[$toc_id]['TOC_even_header_value'] = $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $this->m_TOC[$toc_id]['TOC_even_footer_value'] = 0;
if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_odd_header_value'] = 1; }
else if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_odd_header_value'] = -1; }
if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_even_header_value'] = 1; }
else if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_even_header_value'] = -1; }
if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = 1; }
else if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = -1; }
if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_even_footer_value'] = 1; }
else if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_even_footer_value'] = -1; }
if (isset($attr['TOC-PAGE-SELECTOR']) && $attr['TOC-PAGE-SELECTOR']) { $this->m_TOC[$toc_id]['TOC_page_selector'] = $attr['TOC-PAGE-SELECTOR']; }
else { $this->m_TOC[$toc_id]['TOC_page_selector'] = ''; }
if (isset($attr['TOC-SHEET-SIZE']) && $attr['TOC-SHEET-SIZE']) { $this->m_TOC[$toc_id]['TOCsheetsize'] = $attr['TOC-SHEET-SIZE']; } else { $this->m_TOC[$toc_id]['TOCsheetsize'] = ''; }
if (isset($attr['TOC-PREHTML']) && $attr['TOC-PREHTML']) { $this->m_TOC[$toc_id]['TOCpreHTML'] = htmlspecialchars_decode($attr['TOC-PREHTML'],ENT_QUOTES); }
if (isset($attr['TOC-POSTHTML']) && $attr['TOC-POSTHTML']) { $this->m_TOC[$toc_id]['TOCpostHTML'] = htmlspecialchars_decode($attr['TOC-POSTHTML'],ENT_QUOTES); }
if (isset($attr['TOC-BOOKMARKTEXT']) && $attr['TOC-BOOKMARKTEXT']) { $this->m_TOC[$toc_id]['TOCbookmarkText'] = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'],ENT_QUOTES); } // *BOOKMARKS*
}
else {
if (isset($attr['OUTDENT']) && $attr['OUTDENT']) { $this->TOCoutdent = $attr['OUTDENT']; } else { $this->TOCoutdent = ''; } // mPDF 5.6.19
if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) { $this->TOCorientation = $attr['TOC-ORIENTATION']; } else { $this->TOCorientation = ''; }
if (isset($attr['PAGING']) && (strtoupper($attr['PAGING'])=='OFF' || $attr['PAGING']==='0')) { $this->TOCusePaging = false; }
else { $this->TOCusePaging = true; }
if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $this->TOCuseLinking = true; }
else { $this->TOCuseLinking = false; }
$this->TOC_margin_left = $this->TOC_margin_right = $this->TOC_margin_top = $this->TOC_margin_bottom = $this->TOC_margin_header = $this->TOC_margin_footer = '';
if (isset($attr['TOC-MARGIN-RIGHT'])) { $this->TOC_margin_right = $this->mpdf->ConvertSize($attr['TOC-MARGIN-RIGHT'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-LEFT'])) { $this->TOC_margin_left = $this->mpdf->ConvertSize($attr['TOC-MARGIN-LEFT'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-TOP'])) { $this->TOC_margin_top = $this->mpdf->ConvertSize($attr['TOC-MARGIN-TOP'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-BOTTOM'])) { $this->TOC_margin_bottom = $this->mpdf->ConvertSize($attr['TOC-MARGIN-BOTTOM'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-HEADER'])) { $this->TOC_margin_header = $this->mpdf->ConvertSize($attr['TOC-MARGIN-HEADER'],$this->mpdf->w,$this->mpdf->FontSize,false); }
if (isset($attr['TOC-MARGIN-FOOTER'])) { $this->TOC_margin_footer = $this->mpdf->ConvertSize($attr['TOC-MARGIN-FOOTER'],$this->mpdf->w,$this->mpdf->FontSize,false); }
$this->TOC_odd_header_name = $this->TOC_even_header_name = $this->TOC_odd_footer_name = $this->TOC_even_footer_name = '';
if (isset($attr['TOC-ODD-HEADER-NAME']) && $attr['TOC-ODD-HEADER-NAME']) { $this->TOC_odd_header_name = $attr['TOC-ODD-HEADER-NAME']; }
if (isset($attr['TOC-EVEN-HEADER-NAME']) && $attr['TOC-EVEN-HEADER-NAME']) { $this->TOC_even_header_name = $attr['TOC-EVEN-HEADER-NAME']; }
if (isset($attr['TOC-ODD-FOOTER-NAME']) && $attr['TOC-ODD-FOOTER-NAME']) { $this->TOC_odd_footer_name = $attr['TOC-ODD-FOOTER-NAME']; }
if (isset($attr['TOC-EVEN-FOOTER-NAME']) && $attr['TOC-EVEN-FOOTER-NAME']) { $this->TOC_even_footer_name = $attr['TOC-EVEN-FOOTER-NAME']; }
$this->TOC_odd_header_value = $this->TOC_even_header_value = $this->TOC_odd_footer_value = $this->TOC_even_footer_value = 0;
if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='ON')) { $this->TOC_odd_header_value = 1; }
else if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='OFF')) { $this->TOC_odd_header_value = -1; }
if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='ON')) { $this->TOC_even_header_value = 1; }
else if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='OFF')) { $this->TOC_even_header_value = -1; }
if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='ON')) { $this->TOC_odd_footer_value = 1; }
else if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='OFF')) { $this->TOC_odd_footer_value = -1; }
if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='ON')) { $this->TOC_even_footer_value = 1; }
else if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='OFF')) { $this->TOC_even_footer_value = -1; }
if (isset($attr['TOC-PAGE-SELECTOR']) && $attr['TOC-PAGE-SELECTOR']) { $this->TOC_page_selector = $attr['TOC-PAGE-SELECTOR']; }
else { $this->TOC_page_selector = ''; }
if (isset($attr['TOC-SHEET-SIZE']) && $attr['TOC-SHEET-SIZE']) { $this->TOCsheetsize = $attr['TOC-SHEET-SIZE']; } else { $this->TOCsheetsize = ''; }
if (isset($attr['TOC-PREHTML']) && $attr['TOC-PREHTML']) { $this->TOCpreHTML = htmlspecialchars_decode($attr['TOC-PREHTML'],ENT_QUOTES); }
if (isset($attr['TOC-POSTHTML']) && $attr['TOC-POSTHTML']) { $this->TOCpostHTML = htmlspecialchars_decode($attr['TOC-POSTHTML'],ENT_QUOTES); }
if (isset($attr['TOC-BOOKMARKTEXT']) && $attr['TOC-BOOKMARKTEXT']) { $this->TOCbookmarkText = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'],ENT_QUOTES); }
}
if ($this->mpdf->y == $this->mpdf->tMargin && (!$this->mpdf->mirrorMargins ||($this->mpdf->mirrorMargins && $this->mpdf->page % 2==1))) {
if ($toc_id) { $this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page; }
else { $this->TOCmark = $this->mpdf->page; }
// Don't add a page
if ($this->mpdf->page==1 && count($this->mpdf->PageNumSubstitutions)==0) {
$resetpagenum = '';
$pagenumstyle = '';
$suppress = '';
if (isset($attr['RESETPAGENUM'])) { $resetpagenum = $attr['RESETPAGENUM']; }
if (isset($attr['PAGENUMSTYLE'])) { $pagenumstyle = $attr['PAGENUMSTYLE']; }
if (isset($attr['SUPPRESS'])) { $suppress = $attr['SUPPRESS']; }
if (!$suppress) { $suppress = 'off'; }
if (!$resetpagenum) { $resetpagenum= 1; }
$this->mpdf->PageNumSubstitutions[] = array('from'=>1, 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=> $suppress);
}
return array(true, $toc_id);
}
// No break - continues as PAGEBREAK...
return array(false, $toc_id);
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,463 +0,0 @@
<?php
require_once(_MPDF_PATH.'classes/ttfontsuni.php');
class TTFontFile_Analysis EXTENDS TTFontFile {
// Used to get font information from files in directory
function extractCoreInfo($file, $TTCfontID=0) {
$this->filename = $file;
$this->fh = fopen($file,'rb');
if (!$this->fh) { return ('ERROR - Can\'t open file ' . $file); }
$this->_pos = 0;
$this->charWidths = '';
$this->glyphPos = array();
$this->charToGlyph = array();
$this->tables = array();
$this->otables = array();
$this->ascent = 0;
$this->descent = 0;
$this->numTTCFonts = 0;
$this->TTCFonts = array();
$this->version = $version = $this->read_ulong();
$this->panose = array(); // mPDF 5.0
if ($version==0x4F54544F)
return("ERROR - NOT ADDED as Postscript outlines are not supported - " . $file);
if ($version==0x74746366) {
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, array(0x00010000,0x00020000)))
return("ERROR - NOT ADDED as Error parsing TrueType Collection: version=".$version." - " . $file);
}
else return("ERROR - Error parsing TrueType Collection - " . $file);
$this->numTTCFonts = $this->read_ulong();
for ($i=1; $i<=$this->numTTCFonts; $i++) {
$this->TTCFonts[$i]['offset'] = $this->read_ulong();
}
$this->seek($this->TTCFonts[$TTCfontID]['offset']);
$this->version = $version = $this->read_ulong(); // TTFont version again now
$this->readTableDirectory(false);
}
else {
if (!in_array($version, array(0x00010000,0x74727565)))
return("ERROR - NOT ADDED as Not a TrueType font: version=".$version." - " . $file);
$this->readTableDirectory(false);
}
/* Included for testing...
$cmap_offset = $this->seek_table("cmap");
$this->skip(2);
$cmapTableCount = $this->read_ushort();
$unicode_cmap_offset = 0;
for ($i=0;$i<$cmapTableCount;$i++) {
$x[$i]['platformId'] = $this->read_ushort();
$x[$i]['encodingId'] = $this->read_ushort();
$x[$i]['offset'] = $this->read_ulong();
$save_pos = $this->_pos;
$x[$i]['format'] = $this->get_ushort($cmap_offset + $x[$i]['offset'] );
$this->seek($save_pos );
}
print_r($x); exit;
*/
///////////////////////////////////
// name - Naming table
///////////////////////////////////
/* Test purposes - displays table of names
$name_offset = $this->seek_table("name");
$format = $this->read_ushort();
if ($format != 0 && $format != 1) // mPDF 5.3.73
die("Unknown name table format ".$format);
$numRecords = $this->read_ushort();
$string_data_offset = $name_offset + $this->read_ushort();
for ($i=0;$i<$numRecords; $i++) {
$x[$i]['platformId'] = $this->read_ushort();
$x[$i]['encodingId'] = $this->read_ushort();
$x[$i]['languageId'] = $this->read_ushort();
$x[$i]['nameId'] = $this->read_ushort();
$x[$i]['length'] = $this->read_ushort();
$x[$i]['offset'] = $this->read_ushort();
$N = '';
if ($x[$i]['platformId'] == 1 && $x[$i]['encodingId'] == 0 && $x[$i]['languageId'] == 0) { // Roman
$opos = $this->_pos;
$N = $this->get_chunk($string_data_offset + $x[$i]['offset'] , $x[$i]['length'] );
$this->_pos = $opos;
$this->seek($opos);
}
else { // Unicode
$opos = $this->_pos;
$this->seek($string_data_offset + $x[$i]['offset'] );
$length = $x[$i]['length'] ;
if ($length % 2 != 0)
$length -= 1;
// die("PostScript name is UTF-16BE string of odd length");
$length /= 2;
$N = '';
while ($length > 0) {
$char = $this->read_ushort();
$N .= (chr($char));
$length -= 1;
}
$this->_pos = $opos;
$this->seek($opos);
}
$x[$i]['names'][$nameId] = $N;
}
print_r($x); exit;
*/
$name_offset = $this->seek_table("name");
$format = $this->read_ushort();
if ($format != 0 && $format != 1) // mPDF 5.3.73
return("ERROR - NOT ADDED as Unknown name table format ".$format." - " . $file);
$numRecords = $this->read_ushort();
$string_data_offset = $name_offset + $this->read_ushort();
$names = array(1=>'',2=>'',3=>'',4=>'',6=>'');
$K = array_keys($names);
$nameCount = count($names);
for ($i=0;$i<$numRecords; $i++) {
$platformId = $this->read_ushort();
$encodingId = $this->read_ushort();
$languageId = $this->read_ushort();
$nameId = $this->read_ushort();
$length = $this->read_ushort();
$offset = $this->read_ushort();
if (!in_array($nameId,$K)) continue;
$N = '';
if ($platformId == 3 && $encodingId == 1 && $languageId == 0x409) { // Microsoft, Unicode, US English, PS Name
$opos = $this->_pos;
$this->seek($string_data_offset + $offset);
if ($length % 2 != 0)
$length += 1;
$length /= 2;
$N = '';
while ($length > 0) {
$char = $this->read_ushort();
$N .= (chr($char));
$length -= 1;
}
$this->_pos = $opos;
$this->seek($opos);
}
else if ($platformId == 1 && $encodingId == 0 && $languageId == 0) { // Macintosh, Roman, English, PS Name
$opos = $this->_pos;
$N = $this->get_chunk($string_data_offset + $offset, $length);
$this->_pos = $opos;
$this->seek($opos);
}
if ($N && $names[$nameId]=='') {
$names[$nameId] = $N;
$nameCount -= 1;
if ($nameCount==0) break;
}
}
if ($names[6])
$psName = preg_replace('/ /','-',$names[6]);
else if ($names[4])
$psName = preg_replace('/ /','-',$names[4]);
else if ($names[1])
$psName = preg_replace('/ /','-',$names[1]);
else
$psName = '';
if (!$names[1] && !$psName)
return("ERROR - NOT ADDED as Could not find valid font name - " . $file);
$this->name = $psName;
if ($names[1]) { $this->familyName = $names[1]; } else { $this->familyName = $psName; }
if ($names[2]) { $this->styleName = $names[2]; } else { $this->styleName = 'Regular'; }
///////////////////////////////////
// head - Font header table
///////////////////////////////////
$this->seek_table("head");
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1)
return('ERROR - NOT ADDED as Unknown head table version '. $ver_maj .'.'. $ver_min." - " . $file);
$this->fontRevision = $this->read_ushort() . $this->read_ushort();
$this->skip(4);
$magic = $this->read_ulong();
if ($magic != 0x5F0F3CF5)
return('ERROR - NOT ADDED as Invalid head table magic ' .$magic." - " . $file);
$this->skip(2);
$this->unitsPerEm = $unitsPerEm = $this->read_ushort();
$scale = 1000 / $unitsPerEm;
$this->skip(24);
$macStyle = $this->read_short();
$this->skip(4);
$indexLocFormat = $this->read_short();
///////////////////////////////////
// OS/2 - OS/2 and Windows metrics table
///////////////////////////////////
$sFamily = '';
$panose = '';
$fsSelection = '';
if (isset($this->tables["OS/2"])) {
$this->seek_table("OS/2");
$this->skip(30);
$sF = $this->read_short();
$sFamily = ($sF >> 8);
$this->_pos += 10; //PANOSE = 10 byte length
$panose = fread($this->fh,10);
$this->panose = array();
for ($p=0;$p<strlen($panose);$p++) { $this->panose[] = ord($panose[$p]); }
$this->skip(20);
$fsSelection = $this->read_short();
}
///////////////////////////////////
// post - PostScript table
///////////////////////////////////
$this->seek_table("post");
$this->skip(4);
$this->italicAngle = $this->read_short() + $this->read_ushort() / 65536.0;
$this->skip(4);
$isFixedPitch = $this->read_ulong();
///////////////////////////////////
// cmap - Character to glyph index mapping table
///////////////////////////////////
$cmap_offset = $this->seek_table("cmap");
$this->skip(2);
$cmapTableCount = $this->read_ushort();
$unicode_cmap_offset = 0;
for ($i=0;$i<$cmapTableCount;$i++) {
$platformID = $this->read_ushort();
$encodingID = $this->read_ushort();
$offset = $this->read_ulong();
$save_pos = $this->_pos;
if (($platformID == 3 && $encodingID == 1) || $platformID == 0) { // Microsoft, Unicode
$format = $this->get_ushort($cmap_offset + $offset);
if ($format == 4) {
if (!$unicode_cmap_offset) $unicode_cmap_offset = $cmap_offset + $offset;
}
}
else if ((($platformID == 3 && $encodingID == 10) || $platformID == 0)) { // Microsoft, Unicode Format 12 table HKCS
$format = $this->get_ushort($cmap_offset + $offset);
if ($format == 12) {
$unicode_cmap_offset = $cmap_offset + $offset;
break;
}
}
$this->seek($save_pos );
}
if (!$unicode_cmap_offset)
return('ERROR - Font ('.$this->filename .') NOT ADDED as it is not Unicode encoded, and cannot be used by mPDF');
$rtl = false;
$indic = false;
$cjk = false;
$sip = false;
$smp = false;
$pua = false;
$puaag = false;
$glyphToChar = array();
$unAGlyphs = '';
// Format 12 CMAP does characters above Unicode BMP i.e. some HKCS characters U+20000 and above
if ($format == 12) {
$this->seek($unicode_cmap_offset + 4);
$length = $this->read_ulong();
$limit = $unicode_cmap_offset + $length;
$this->skip(4);
$nGroups = $this->read_ulong();
for($i=0; $i<$nGroups ; $i++) {
$startCharCode = $this->read_ulong();
$endCharCode = $this->read_ulong();
$startGlyphCode = $this->read_ulong();
if (($endCharCode > 0x20000 && $endCharCode < 0x2A6DF) || ($endCharCode > 0x2F800 && $endCharCode < 0x2FA1F)) {
$sip = true;
}
if ($endCharCode > 0x10000 && $endCharCode < 0x1FFFF) {
$smp = true;
}
if (($endCharCode > 0x0590 && $endCharCode < 0x077F) || ($endCharCode > 0xFE70 && $endCharCode < 0xFEFF) || ($endCharCode > 0xFB50 && $endCharCode < 0xFDFF)) {
$rtl = true;
}
if ($endCharCode > 0x0900 && $endCharCode < 0x0DFF) {
$indic = true;
}
if ($endCharCode > 0xE000 && $endCharCode < 0xF8FF) {
$pua = true;
if ($endCharCode > 0xF500 && $endCharCode < 0xF7FF) {
$puaag = true;
}
}
if (($endCharCode > 0x2E80 && $endCharCode < 0x4DC0) || ($endCharCode > 0x4E00 && $endCharCode < 0xA4CF) || ($endCharCode > 0xAC00 && $endCharCode < 0xD7AF) || ($endCharCode > 0xF900 && $endCharCode < 0xFAFF) || ($endCharCode > 0xFE30 && $endCharCode < 0xFE4F)) {
$cjk = true;
}
$offset = 0;
// Get each glyphToChar - only point if going to analyse un-mapped Arabic Glyphs
if (isset($this->tables['post'])) {
for ($unichar=$startCharCode;$unichar<=$endCharCode;$unichar++) {
$glyph = $startGlyphCode + $offset ;
$offset++;
$glyphToChar[$glyph][] = $unichar;
}
}
}
}
else { // Format 4 CMap
$this->seek($unicode_cmap_offset + 2);
$length = $this->read_ushort();
$limit = $unicode_cmap_offset + $length;
$this->skip(2);
$segCount = $this->read_ushort() / 2;
$this->skip(6);
$endCount = array();
for($i=0; $i<$segCount; $i++) { $endCount[] = $this->read_ushort(); }
$this->skip(2);
$startCount = array();
for($i=0; $i<$segCount; $i++) { $startCount[] = $this->read_ushort(); }
$idDelta = array();
for($i=0; $i<$segCount; $i++) { $idDelta[] = $this->read_short(); }
$idRangeOffset_start = $this->_pos;
$idRangeOffset = array();
for($i=0; $i<$segCount; $i++) { $idRangeOffset[] = $this->read_ushort(); }
for ($n=0;$n<$segCount;$n++) {
if (($endCount[$n] > 0x0590 && $endCount[$n] < 0x077F) || ($endCount[$n] > 0xFE70 && $endCount[$n] < 0xFEFF) || ($endCount[$n] > 0xFB50 && $endCount[$n] < 0xFDFF)) {
$rtl = true;
}
if ($endCount[$n] > 0x0900 && $endCount[$n] < 0x0DFF) {
$indic = true;
}
if (($endCount[$n] > 0x2E80 && $endCount[$n] < 0x4DC0) || ($endCount[$n] > 0x4E00 && $endCount[$n] < 0xA4CF) || ($endCount[$n] > 0xAC00 && $endCount[$n] < 0xD7AF) || ($endCount[$n] > 0xF900 && $endCount[$n] < 0xFAFF) || ($endCount[$n] > 0xFE30 && $endCount[$n] < 0xFE4F)) {
$cjk = true;
}
if ($endCount[$n] > 0xE000 && $endCount[$n] < 0xF8FF) {
$pua = true;
if ($endCount[$n] > 0xF500 && $endCount[$n] < 0xF7FF) {
$puaag = true;
}
}
// Get each glyphToChar - only point if going to analyse un-mapped Arabic Glyphs
if (isset($this->tables['post'])) {
$endpoint = ($endCount[$n] + 1);
for ($unichar=$startCount[$n];$unichar<$endpoint;$unichar++) {
if ($idRangeOffset[$n] == 0)
$glyph = ($unichar + $idDelta[$n]) & 0xFFFF;
else {
$offset = ($unichar - $startCount[$n]) * 2 + $idRangeOffset[$n];
$offset = $idRangeOffset_start + 2 * $n + $offset;
if ($offset >= $limit)
$glyph = 0;
else {
$glyph = $this->get_ushort($offset);
if ($glyph != 0)
$glyph = ($glyph + $idDelta[$n]) & 0xFFFF;
}
}
$glyphToChar[$glyph][] = $unichar;
}
}
}
}
// 'POST' table for un-mapped arabic glyphs
if (isset($this->tables['post'])) {
$this->seek_table("post");
// Only works on Format 2.0
$formata = $this->read_ushort();
$formatb = $this->read_ushort();
if ($formata == 2 && $formatb == 0) {
$this->skip(28);
$nGlyfs = $this->read_ushort();
$glyphNameIndex = array();
for ($i=0; $i<$nGlyfs; $i++) {
$glyphNameIndex[($this->read_ushort())] = $i;
}
$opost = $this->get_table('post');
$ptr = 34+($nGlyfs*2);
for ($i=0; $i<$nGlyfs; $i++) {
$len = ord(substr($opost,$ptr,1));
$ptr++;
$name = substr($opost,$ptr,$len);
$gid = $glyphNameIndex[$i+258];
// Select uni0600.xxx(x) - uni06FF.xxx(x)
if (preg_match('/^uni(06[0-9a-f]{2})\.(fina|medi|init|fin|med|ini)$/i',$name,$m)) {
if (!isset($glyphToChar[$gid]) || (isset($glyphToChar[$gid]) && is_array($glyphToChar[$gid]) && count($glyphToChar[$gid])==1 && $glyphToChar[$gid][0]>57343 && $glyphToChar[$gid][0]<63489)) { // if set in PUA private use area E000-F8FF, or NOT Unicode mapped
$uni = hexdec($m[1]);
$form = strtoupper(substr($m[2],0,1));
// Assign new PUA Unicode between F500 - F7FF
$bit = $uni & 0xFF;
if ($form == 'I') { $bit += 0xF600; }
else if ($form == 'M') { $bit += 0xF700; }
else { $bit += 0xF500; }
$unAGlyphs .= $gid;
$name = 'uni'.strtoupper($m[1]).'.'.strtolower($m[2]);
$unAGlyphs .= ' : '.$name;
$unihexstr = $m[1];
$unAGlyphs .= ' : '.$unihexstr;
$unAGlyphs .= ' : '.$uni;
$unAGlyphs .= ' : '.$form;
// if already set in PUA private use area E000-F8FF
if (isset($glyphToChar[$gid]) && $glyphToChar[$gid][0]>57343 && $glyphToChar[$gid][0]<63489) {
$unAGlyphs .= ' : '.$glyphToChar[$gid][0].' {'.dechex($glyphToChar[$gid][0]).'}';
}
//else $unAGlyphs .= ':';
$unAGlyphs .= ' : '.strtoupper(dechex($bit));
$unAGlyphs .= '<br />';
}
}
$ptr += $len;
}
if ($unAGlyphs) {
$unAGlyphs = 'GID:Name:Unicode base Hex:Dec:Form:PUA Unicode<br />'.$unAGlyphs ;
}
}
}
$bold = false;
$italic = false;
$ftype = '';
if ($macStyle & (1 << 0)) { $bold = true; } // bit 0 bold
else if ($fsSelection & (1 << 5)) { $bold = true; } // 5 BOLD Characters are emboldened
if ($macStyle & (1 << 1)) { $italic = true; } // bit 1 italic
else if ($fsSelection & (1 << 0)) { $italic = true; } // 0 ITALIC Font contains Italic characters, otherwise they are upright
else if ($this->italicAngle <> 0) { $italic = true; }
if ($isFixedPitch ) { $ftype = 'mono'; }
else if ($sFamily >0 && $sFamily <8) { $ftype = 'serif'; }
else if ($sFamily ==8) { $ftype = 'sans'; }
else if ($sFamily ==10) { $ftype = 'cursive'; }
// Use PANOSE
if ($panose) {
$bFamilyType=ord($panose[0]);
if ($bFamilyType==2) {
$bSerifStyle=ord($panose[1]);
if (!$ftype) {
if ($bSerifStyle>1 && $bSerifStyle<11) { $ftype = 'serif'; }
else if ($bSerifStyle>10) { $ftype = 'sans'; }
}
$bProportion=ord($panose[3]);
if ($bProportion==9 || $bProportion==1) { $ftype = 'mono'; } // ==1 i.e. No Fit needed for OCR-a and -b
}
else if ($bFamilyType==3) {
$ftype = 'cursive';
}
}
fclose($this->fh);
return array($this->familyName, $bold, $italic, $ftype, $TTCfontID, $rtl, $indic, $cjk, $sip, $smp, $puaag, $pua, $unAGlyphs);
}
}
?>

View File

@ -1,236 +0,0 @@
<?php
class wmf {
var $mpdf = null;
var $gdiObjectArray;
function wmf(&$mpdf) {
$this->mpdf = $mpdf;
}
function _getWMFimage($data) {
$k = _MPDFK;
$this->gdiObjectArray = array();
$a=unpack('stest',"\1\0");
if ($a['test']!=1)
return array(0, 'Error parsing WMF image - Big-endian architecture not supported');
// check for Aldus placeable metafile header
$key = unpack('Lmagic', substr($data, 0, 4));
$p = 18; // WMF header
if ($key['magic'] == (int)0x9AC6CDD7) { $p +=22; } // Aldus header
// define some state variables
$wo=null; // window origin
$we=null; // window extent
$polyFillMode = 0;
$nullPen = false;
$nullBrush = false;
$endRecord = false;
$wmfdata = '';
while ($p < strlen($data) && !$endRecord) {
$recordInfo = unpack('Lsize/Sfunc', substr($data, $p, 6)); $p += 6;
// size of record given in WORDs (= 2 bytes)
$size = $recordInfo['size'];
// func is number of GDI function
$func = $recordInfo['func'];
if ($size > 3) {
$parms = substr($data, $p, 2*($size-3)); $p += 2*($size-3);
}
switch ($func) {
case 0x020b: // SetWindowOrg
// do not allow window origin to be changed
// after drawing has begun
if (!$wmfdata)
$wo = array_reverse(unpack('s2', $parms));
break;
case 0x020c: // SetWindowExt
// do not allow window extent to be changed
// after drawing has begun
if (!$wmfdata)
$we = array_reverse(unpack('s2', $parms));
break;
case 0x02fc: // CreateBrushIndirect
$brush = unpack('sstyle/Cr/Cg/Cb/Ca/Shatch', $parms);
$brush['type'] = 'B';
$this->_AddGDIObject($brush);
break;
case 0x02fa: // CreatePenIndirect
$pen = unpack('Sstyle/swidth/sdummy/Cr/Cg/Cb/Ca', $parms);
// convert width from twips to user unit
$pen['width'] /= (20 * $k);
$pen['type'] = 'P';
$this->_AddGDIObject($pen);
break;
// MUST create other GDI objects even if we don't handle them
case 0x06fe: // CreateBitmap
case 0x02fd: // CreateBitmapIndirect
case 0x00f8: // CreateBrush
case 0x02fb: // CreateFontIndirect
case 0x00f7: // CreatePalette
case 0x01f9: // CreatePatternBrush
case 0x06ff: // CreateRegion
case 0x0142: // DibCreatePatternBrush
$dummyObject = array('type'=>'D');
$this->_AddGDIObject($dummyObject);
break;
case 0x0106: // SetPolyFillMode
$polyFillMode = unpack('smode', $parms);
$polyFillMode = $polyFillMode['mode'];
break;
case 0x01f0: // DeleteObject
$idx = unpack('Sidx', $parms);
$idx = $idx['idx'];
$this->_DeleteGDIObject($idx);
break;
case 0x012d: // SelectObject
$idx = unpack('Sidx', $parms);
$idx = $idx['idx'];
$obj = $this->_GetGDIObject($idx);
switch ($obj['type']) {
case 'B':
$nullBrush = false;
if ($obj['style'] == 1) { $nullBrush = true; }
else {
$wmfdata .= $this->mpdf->SetFColor($this->mpdf->ConvertColor('rgb('.$obj['r'].','.$obj['g'].','.$obj['b'].')'), true)."\n";
}
break;
case 'P':
$nullPen = false;
$dashArray = array();
// dash parameters are custom
switch ($obj['style']) {
case 0: // PS_SOLID
break;
case 1: // PS_DASH
$dashArray = array(3,1);
break;
case 2: // PS_DOT
$dashArray = array(0.5,0.5);
break;
case 3: // PS_DASHDOT
$dashArray = array(2,1,0.5,1);
break;
case 4: // PS_DASHDOTDOT
$dashArray = array(2,1,0.5,1,0.5,1);
break;
case 5: // PS_NULL
$nullPen = true;
break;
}
if (!$nullPen) {
$wmfdata .= $this->mpdf->SetDColor($this->mpdf->ConvertColor('rgb('.$obj['r'].','.$obj['g'].','.$obj['b'].')'), true)."\n";
$wmfdata .= sprintf("%.3F w\n",$obj['width']*$k);
}
if (!empty($dashArray)) {
$s = '[';
for ($i=0; $i<count($dashArray);$i++) {
$s .= $dashArray[$i] * $k;
if ($i != count($dashArray)-1) { $s .= ' '; }
}
$s .= '] 0 d';
$wmfdata .= $s."\n";
}
break;
}
break;
case 0x0325: // Polyline
case 0x0324: // Polygon
$coords = unpack('s'.($size-3), $parms);
$numpoints = $coords[1];
for ($i = $numpoints; $i > 0; $i--) {
$px = $coords[2*$i];
$py = $coords[2*$i+1];
if ($i < $numpoints) { $wmfdata .= $this->_LineTo($px, $py); }
else { $wmfdata .= $this->_MoveTo($px, $py); }
}
if ($func == 0x0325) { $op = 's'; }
else if ($func == 0x0324) {
if ($nullPen) {
if ($nullBrush) { $op = 'n'; } // no op
else { $op = 'f'; } // fill
}
else {
if ($nullBrush) { $op = 's'; } // stroke
else { $op = 'b'; } // stroke and fill
}
if ($polyFillMode==1 && ($op=='b' || $op=='f')) { $op .= '*'; } // use even-odd fill rule
}
$wmfdata .= $op."\n";
break;
case 0x0538: // PolyPolygon
$coords = unpack('s'.($size-3), $parms);
$numpolygons = $coords[1];
$adjustment = $numpolygons;
for ($j = 1; $j <= $numpolygons; $j++) {
$numpoints = $coords[$j + 1];
for ($i = $numpoints; $i > 0; $i--) {
$px = $coords[2*$i + $adjustment];
$py = $coords[2*$i+1 + $adjustment];
if ($i == $numpoints) { $wmfdata .= $this->_MoveTo($px, $py); }
else { $wmfdata .= $this->_LineTo($px, $py); }
}
$adjustment += $numpoints * 2;
}
if ($nullPen) {
if ($nullBrush) { $op = 'n'; } // no op
else { $op = 'f'; } // fill
}
else {
if ($nullBrush) { $op = 's'; } // stroke
else { $op = 'b'; } // stroke and fill
}
if ($polyFillMode==1 && ($op=='b' || $op=='f')) { $op .= '*'; } // use even-odd fill rule
$wmfdata .= $op."\n";
break;
case 0x0000:
$endRecord = true;
break;
}
}
return array(1,$wmfdata,$wo,$we);
}
function _MoveTo($x, $y) {
return "$x $y m\n";
}
// a line must have been started using _MoveTo() first
function _LineTo($x, $y) {
return "$x $y l\n";
}
function _AddGDIObject($obj) {
// find next available slot
$idx = 0;
if (!empty($this->gdiObjectArray)) {
$empty = false;
$i = 0;
while (!$empty) {
$empty = !isset($this->gdiObjectArray[$i]);
$i++;
}
$idx = $i-1;
}
$this->gdiObjectArray[$idx] = $obj;
}
function _GetGDIObject($idx) {
return $this->gdiObjectArray[$idx];
}
function _DeleteGDIObject($idx) {
unset($this->gdiObjectArray[$idx]);
}
}
?>

View File

@ -1,172 +0,0 @@
<?php
$excl = array( 'HTML-CSS', 'DIRECTW', 'TABLES', 'LISTS', 'IMAGES-CORE',
'IMAGES-BMP', 'IMAGES-WMF', 'TABLES-ADVANCED-BORDERS', 'HTMLHEADERS-FOOTERS', 'COLUMNS', 'TOC', 'INDEX', 'BOOKMARKS', 'BARCODES', 'FORMS', 'WATERMARK', 'CJK-FONTS', 'RTL', 'INDIC', 'ANNOTATIONS', 'BACKGROUNDS', 'CSS-FLOAT', 'CSS-IMAGE-FLOAT', 'CSS-POSITION', 'CSS-PAGE', 'BORDER-RADIUS', 'HYPHENATION', 'ENCRYPTION', 'IMPORTS', 'PROGRESS-BAR');
// *DIRECTW* = Write, WriteText, WriteCell, Text, Shaded_box, AutosizeText
// IMAGES-CORE = [PNG, GIF, and JPG] NB background-images and watermark images
// Excluding 'HTML-CSS' will also exclude: 'TABLES', 'LISTS', 'TABLES-ADVANCED-BORDERS', 'HTMLHEADERS-FOOTERS', 'FORMS', 'BACKGROUNDS', 'CSS-FLOAT', 'CSS-IMAGE-FLOAT', 'CSS-POSITION', 'CSS-PAGE', 'BORDER-RADIUS'
// Text is marked in mpdf_source.php with e.g. :
/*-- TABLES-ADVANCED-BORDERS --*/
/*-- END TABLES-ADVANCED-BORDERS --*/
// *TABLES-ADVANCED-BORDERS*
if (!isset($_POST['generate']) || $_POST['generate']!='generate') {
if (!file_exists('mpdf_source.php')) {
die("ERROR - Could not find mpdf_source.php file in current directory. Please rename mpdf.php as mpdf_source.php");
}
echo '<html>
<head>
<script language=javascript>
checked=false;
function checkedAll (frm1) {
var aa= document.getElementById("frm1");
if (checked == false)
{
checked = true
}
else
{
checked = false
}
for (var i =0; i < aa.elements.length; i++)
{
aa.elements[i].checked = checked;
}
}
</script>
</head>
<body>
<p><span style="color:red; font-weight: bold;">WARNING</span>: This utility will OVERWRITE mpdf.php file in the current directory.</p>
<p>Select the functions you wish to INCLUDE in your mpdf.php program. When you click generate, a new mpdf.php file will be written to the current directory.</p>
<div><b>Notes</b>
<ul>
<li>HTML-CSS is required for many of the other functions to work including: Tables, Lists, Backgrounds, Forms, Border-radius and all other CSS</li>
<li>DIRECTW includes the functions to Write directly to the PDF file e.g. Write, WriteText, WriteCell, Text, Shaded_box, AutosizeText</li>
<li>You must include either HTML-CSS or DIRECTW</li>
<li>JPG, PNG and JPG images are supported with IMAGES-CORE</li>
<li>For WMF Images, you must include both IMAGES-CORE and IMAGES-WMF</li>
<li>IMAGES-CORE are required for BACKGROUNDS (IMAGES) or WATERMARKS to work</li>
</ul>
</div>
<input type="checkbox" name="checkall" onclick="checkedAll(frm1);"> <i>Select/Unselect All</i><br /><br />
<form id="frm1" action="compress.php" method="POST">
';
foreach($excl AS $k=>$ex) {
echo '<input type="checkbox" value="1" name="inc['.$ex.']"';
if ($k==0 || ($k > 1 && $k < 5)) {
echo ' checked="checked"';
}
echo ' /> '.$ex.'<br />';
}
echo '<br />
<input type="submit" name="generate" value="generate" />
</form>
</body>
</html>';
exit;
}
$inc = $_POST['inc'];
if (is_array($inc) && count($inc)>0 ) {
foreach($inc AS $i=>$v) {
$key = array_search($i, $excl);
unset($excl[$key]);
}
}
if (!defined('PHP_VERSION_ID')) {
$version = explode('.', PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
if (PHP_VERSION_ID < 50300) { $mqr = @get_magic_quotes_runtime(); }
else { $mqr=0; }
if ($mqr) { set_magic_quotes_runtime(0); }
$l = file('mpdf_source.php');
if (!count($l)) { die("ERROR - Could not find mpdf_source.php file in current directory"); }
$exclflags = array();
$x = '';
// Excluding 'HTML-CSS' will also exclude: 'TABLES', 'LISTS', 'TABLES-ADVANCED-BORDERS', 'HTMLHEADERS-FOOTERS', 'FORMS', 'BACKGROUNDS', 'CSS-FLOAT', 'CSS-IMAGE-FLOAT', 'CSS-POSITION', 'CSS-PAGE', 'BORDER-RADIUS'
if ($excl[0]=='HTML-CSS') {
$excl[] = 'TABLES';
$excl[] = 'LISTS';
$excl[] = 'TABLES-ADVANCED-BORDERS';
$excl[] = 'HTMLHEADERS-FOOTERS';
$excl[] = 'FORMS';
$excl[] = 'BACKGROUNDS';
$excl[] = 'CSS-FLOAT';
$excl[] = 'CSS-IMAGE-FLOAT';
$excl[] = 'CSS-POSITION';
$excl[] = 'CSS-PAGE';
$excl[] = 'BORDER-RADIUS';
}
$excl = array_unique($excl);
foreach($l AS $k=>$ln) {
$exclude = false;
// *XXXXX*
preg_match_all("/\/\/ \*([A-Za-z\-]+)\*/", $ln, $m);
foreach($m[1] AS $mm) {
if (in_array($mm, $excl)) {
$exclude = true;
}
}
/*-- XXXXX --*/
preg_match_all("/\/\*-- ([A-Za-z\-]+) --\*\//", $ln, $m);
foreach($m[1] AS $mm) {
if (in_array($mm, $excl)) {
$exclflags[$mm] = true;
}
$exclude = true;
}
$exclflags = array_unique($exclflags);
/*-- END XXXX --*/
preg_match_all("/\/\*-- END ([A-Za-z\-]+) --\*\//", $ln, $m);
foreach($m[1] AS $mm) {
if (in_array($mm, $excl)) {
unset($exclflags[$mm]);
}
$exclude = true;
}
if (count($exclflags)==0 && !$exclude) {
$x .= $ln;
}
}
// mPDF 5.0
if (function_exists('file_put_contents')) {
$check = file_put_contents('mpdf.php', $x);
}
else {
$f=fopen('mpdf.php', 'w');
$check = fwrite($f, $x);
fclose($f);
}
if (!$check) { die("ERROR - Could not write to mpdf.php file. Are permissions correctly set?"); }
echo '<p><b>mPDF file generated successfully!</b></p>';
echo '<div>mPDF file size '.number_format((strlen($x)/1024)).' kB</div>';
unset($l);
unset($x);
include('mpdf.php');
$mpdf = new mPDF();
echo '<div>Memory usage on loading mPDF class '.number_format((memory_get_usage(true)/(1024*1024)),2).' MB</div>';
exit;
?>

View File

@ -1,572 +0,0 @@
<?php
// mPDF 5.7
// Specify whether to automatically generate bookmarks or ToC entries from h1 - h6 tags
$this->h2bookmarks = array();
$this->h2toc = array();
/* Define arrays with e.g. the tag=>ToC-level
Remember bookmark and ToC levels start at 0
(does not work inside tables)
Only the default ToC will be used if > 1 ToCs are defined for the document
H1 - H6 must be uppercase
$this->h2toc = array('H1'=>0, 'H2'=>1, 'H3'=>2);
$this->h2bookmarks = array('H1'=>0, 'H2'=>1, 'H3'=>2);
*/
// mPDF 5.7
// Text-align on decimal marks
// Allowed characters for alignment on decimal marks. Additional codes must start with D
// Non-ASCII characters should be in utf-8 encoding
// DM - middot U+00B7
// DA - arabic decimal mark U+066B
$this->decimal_align = array('DP'=>'.', 'DC'=>',', 'DM'=>"\xc2\xb7", 'DA'=>"\xd9\xab", 'DD'=>'-');
// PAGING
$this->mirrorMargins = 0;
$this->restoreBlockPagebreaks = false;
$this->forcePortraitMargins = false;
$this->displayDefaultOrientation = false;
$this->printers_info = false; // Adds date and page info for printer when using @page and "marks:crop;"
$this->bleedMargin = 5;
$this->crossMarkMargin = 5; // Distance of cross mark from margin in mm
$this->cropMarkMargin = 8; // Distance of crop mark from margin in mm
$this->cropMarkLength = 18; // Default length in mm of crop line
$this->nonPrintMargin = 8; // Non-printable border at edge of paper sheet in mm
// mPDF 5.5
// Avoid just the border/background-color of the end of a block being moved on to next page
$this->margBuffer = 2; // Allows an (empty) end of block to extend beyond the bottom margin by this amount (mm)
// PAGE NUMBERING
$this->pagenumPrefix;
$this->pagenumSuffix;
$this->nbpgPrefix;
$this->nbpgSuffix;
// FONTS, LANGUAGES & CHARACTER SETS
// Set maximum size of TTF font file to allow non-subsets - in kB
// Used to avoid e.g. Arial Unicode MS (perhaps used for substitutions) to ever be fully embedded
// NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
$this->maxTTFFilesize = 2000;
// this value determines whether to subset or not
// 0 - 100 = percent characters
// i.e. if ==40, mPDF will embed whole font if >40% characters in that font
// or embed subset if <40% characters
// 0 will force whole file to be embedded (NO subsetting)
// 100 will force always to subset
// This value is overridden if you set new mPDF('s)
// and/or Can set at runtime
$this->percentSubset = 30;
$this->useAdobeCJK = false; // Uses Adobe CJK fonts for CJK languages
// default TRUE; only set false if you have defined some available fonts that support CJK
// If true this will not stop use of other CJK fonts if specified by font-family:
// and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
// When embedding full TTF font files, remakes the font file using only core tables
// May improve function with some PostScript printers (GhostScript/GSView)
// Does not work with TTC font collections
// Slightly smaller file; increased processing time
$this->repackageTTF = false;
// Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() )
$this->allow_charset_conversion = true;
$this->biDirectional=false; // automatically determine BIDI text in LTR page
$this->autoFontGroupSize = 2; // 1: individual words are spanned; 2: words+; 3: as big chunks as possible.
$this->useLang = true; // Default changed in mPDF 4.0
$this->useSubstitutions = false; // Substitute missing characters in UTF-8(multibyte) documents - from other fonts
$this->falseBoldWeight = 5; // Weight for bold text when using an artificial (outline) bold; value 0 (off) - 10 (rec. max)
// CONFIGURATION
$this->allow_output_buffering = false;
$this->enableImports = false; // Adding mPDFI functions
$this->collapseBlockMargins = true; // Allows top and bottom margins to collapse between block elements
$this->progressBar = 0; // Shows progress-bars whilst generating file 0 off, 1 simple, 2 advanced
$this->progbar_heading = 'mPDF file progress';
$this->progbar_altHTML = ''; // Should include <html> and <body> but NOT end tags
// Can incude <head> and link to stylesheet etc.
// e.g. '<html><body><p><img src="loading.gif" /> Creating PDF file. Please wait...</p>';
$this->dpi = 96; // To interpret "px" pixel values in HTML/CSS (see img_dpi below)
// Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD
// If you are confident input html is valid XHTML, turning this off may make it more reliable(?)
$this->allow_html_optional_endtags = true;
$this->ignore_invalid_utf8 = false;
$this->text_input_as_HTML = false; // Converts all entities in Text inputs to UTF-8 before encoding
$this->useGraphs = false;
// When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
// by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
// the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
// FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
$this->incrementFPR1 = 10; // i.e. will alter by 1/[10]th of width and try again until within closer limits
$this->incrementFPR2 = 20;
$this->incrementFPR3 = 30;
$this->incrementFPR4 = 50; // i.e. will alter by 1/[50]th of width and try again when it nearly fits
// COLORSPACE
// 1 - allow GRAYSCALE only [convert CMYK/RGB->gray]
// 2 - allow RGB / SPOT COLOR / Grayscale [convert CMYK->RGB]
// 3 - allow CMYK / SPOT COLOR / Grayscale [convert RGB->CMYK]
$this->restrictColorSpace = 0;
// PDFX/1-a Compliant files
$this->PDFX = false; // true=Forces compliance with PDFX-1a spec
// Cannot be used with $this->restrictColorSpace (i.e. no RGB)
$this->PDFXauto = false; // Overrides warnings making changes when possible to force PDFX1-a compliance
// PDFA1-b Compliant files
$this->PDFA = false; // true=Forces compliance with PDFA-1b spec
// Can use with $this->restrictColorSpace=3 (for a CMYK file)
// Any other settings, uses RGB profile
$this->PDFAauto = false; // Overrides warnings making changes when possible to force PDFA1-b compliance
$this->ICCProfile = ''; // Colour profile OutputIntent
// sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile
// Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
// DEBUGGING & DEVELOPERS
$this->showStats = false;
$this->debug = false;
$this->debugfonts = false; // Checks and reports on errors when parsing TTF files - adds significantly to processing time
$this->showImageErrors = false;
$this->table_error_report = false; // Die and report error if table is too wide to contain whole words
$this->table_error_report_param = ''; // Parameter which can be passed to show in error report i.e. chapter number being processed//
// ANNOTATIONS
$this->title2annots = false;
$this->annotSize = 0.5; // default mm for Adobe annotations - nominal
$this->annotMargin; // default position for Annotations
$this->annotOpacity = 0.5; // default opacity for Annotations
// BOOKMARKS
$this->anchor2Bookmark = 0; // makes <a name=""> into a bookmark as well as internal link target; 1 = just name; 2 = name (p.34)
// Set an optional array to specify appearance of Bookmarks (by level)
// Default values are Black and normal style
/*
Example:
$this->bookmarkStyles = array(
0 => array('color'=> array(0,64,128), 'style'=>'B'),
1 => array('color'=> array(128,0,0), 'style'=>''),
2 => array('color'=> array(0,128,0), 'style'=>'I'),
);
*/
$this->bookmarkStyles = array();
// CSS & STYLES
$this->CSSselectMedia='print'; // screen, print, or any other CSS @media type (not "all")
// PAGE HEADERS & FOOTERS
$this->forcePortraitHeaders = false;
// Values used if simple FOOTER/HEADER given i.e. not array
$this->defaultheaderfontsize = 8; // pt
$this->defaultheaderfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI'
$this->defaultheaderline = 1; // 1 or 0 - line under the header
$this->defaultfooterfontsize = 8; // pt
$this->defaultfooterfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI'
$this->defaultfooterline = 1; // 1 or 0 - line over the footer
$this->header_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize
$this->footer_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize
// If 'pad' margin-top sets fixed distance in mm (padding) between bottom of header and top of text.
// If 'stretch' margin-top sets a minimum distance in mm between top of page and top of text, which expands if header is too large to fit.
$this->setAutoTopMargin = false;
$this->setAutoBottomMargin = false;
$this->autoMarginPadding = 2; // distance in mm used as padding if 'stretch' mode is used
// TABLES
$this->simpleTables = false; // Forces all cells to have same border, background etc. Improves performance
$this->packTableData = false; // Reduce memory usage processing tables (but with increased processing time)
// Using disk to cache table data can reduce memory usage dramatically, but at a cost of increased
// executon time and disk access (read and write)
$this->cacheTables = false;
$this->ignore_table_percents = false;
$this->ignore_table_widths = false;
$this->keep_table_proportions = false; // If table width set > page width, force resizing but keep relative sizes
// Also forces respect of cell widths set by %
$this->shrink_tables_to_fit = 1.4; // automatically reduce fontsize in table if words would have to split ( not in CJK)
// 0 or false to disable; value (if set) gives maximum factor to reduce fontsize
$this->tableMinSizePriority = false; // If page-break-inside:avoid but cannot fit on full page without
// exceeding autosize; setting this value to true will force respsect for
// autosize, and disable the page-break-inside:avoid
$this->use_kwt = false; // "Keep-with-table"
$this->iterationCounter = false; // Set to TRUE to use table Head iteration counter
$this->splitTableBorderWidth = 0; // Use table border (using this width in mm) when table breaks across pages
// Recommended to use small value e.g. 0.01
// IMAGES
$this->img_dpi = 96; // Default dpi to output images if size not defined
// See also above "dpi"
// TEXT SPACING & JUSTIFICATION
$this->useKerning = false; // true to use kerning
$this->justifyB4br = false; // In justified text, <BR> does not cause the preceding text to be justified in browsers
// Change to true to force justification (as in MS Word)
$this->tabSpaces = 8; // Number of spaces to replace for a TAB in <pre> sections
// Notepad uses 6, HTML specification recommends 8
$this->jSWord = 0.4; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
$this->jSmaxChar = 2; // Maximum spacing to allocate to character spacing. (0 = no maximum)
$this->jSmaxCharLast = 1; // Maximum character spacing allowed (carried over) when finishing a last line
$this->jSmaxWordLast = 2; // Maximum word spacing allowed (carried over) when finishing a last line
$this->normalLineheight = 1.33; // Value used for line-height when CSS specified as 'normal' (default)
// Small Caps
$this->smCapsScale = 0.75; // Factor of 1 to scale capital letters
$this->smCapsStretch = 110; // % to stretch small caps horizontally (i.e. 100 = no stretch)
// CJK Line-breaking
$this->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow
$this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables)
$this->CJKforceend = false; // Forces overflowng punctuation to hang outside right margin mPDF 5.6.40
// HYPHENATION
$this->SHYlang = "en"; // Should be one of: 'en','de','es','fi','fr','it','nl','pl','ru','sv'
$this->SHYleftmin = 2;
$this->SHYrightmin = 2;
$this->SHYcharmin = 2;
$this->SHYcharmax = 10;
// COLUMNS
$this->keepColumns = false; // Set to go to the second column only when the first is full of text etc.
$this->max_colH_correction = 1.15; // Maximum ratio to adjust column height when justifying - too large a value can give ugly results
$this->ColGap=5;
// LISTS
$this->list_align_style = 'R'; // Determines alignment of numbers in numbered lists
$this->list_indent_first_level = 0; // 1/0 yex/no to indent first level of list
$this->list_number_suffix = '.'; // Content to follow a numbered list marker e.g. '.' gives 1. or IV.; ')' gives 1) or a)
// ACTIVE FORMS
$this->useActiveForms = false;
// WATERMARKS
$this->watermarkImgBehind = false;
$this->showWatermarkText = 0;
$this->showWatermarkImage = 0;
$this->watermarkText = '';
$this->watermarkImage = '';
$this->watermark_font = '';
$this->watermarkTextAlpha = 0.2;
$this->watermarkImageAlpha = 0.2;
$this->watermarkImgAlphaBlend = 'Normal';
// Accepts any PDF spec. value: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn,
// HardLight, SoftLight, Difference, Exclusion
// "Multiply" works well for watermark image on top
// BORDERS
$this->autoPadding = false; // Automatically increases padding in block elements when border-radius set - if required
//////////////////////////////////////////////
// Default values if no style sheet offered (cf. http://www.w3.org/TR/CSS21/sample.html)
$this->defaultCSS = array(
'BODY' => array(
'FONT-FAMILY' => 'serif',
'FONT-SIZE' => '11pt',
'TEXT-INDENT' => '0pt',
'LINE-HEIGHT' => 'normal',
'MARGIN-COLLAPSE' => 'collapse', /* Custom property to collapse top/bottom margins at top/bottom of page - ignored in tables/lists */
'HYPHENS' => 'manual', /* mPDF 5.6.08 */
),
'P' => array(
'MARGIN' => '1.12em 0',
),
'H1' => array(
'FONT-SIZE' => '2em',
'FONT-WEIGHT' => 'bold',
'MARGIN' => '0.67em 0',
'PAGE-BREAK-AFTER' => 'avoid',
),
'H2' => array(
'FONT-SIZE' => '1.5em',
'FONT-WEIGHT' => 'bold',
'MARGIN' => '0.75em 0',
'PAGE-BREAK-AFTER' => 'avoid',
),
'H3' => array(
'FONT-SIZE' => '1.17em',
'FONT-WEIGHT' => 'bold',
'MARGIN' => '0.83em 0',
'PAGE-BREAK-AFTER' => 'avoid',
),
'H4' => array(
'FONT-WEIGHT' => 'bold',
'MARGIN' => '1.12em 0',
'PAGE-BREAK-AFTER' => 'avoid',
),
'H5' => array(
'FONT-SIZE' => '0.83em',
'FONT-WEIGHT' => 'bold',
'MARGIN' => '1.5em 0',
'PAGE-BREAK-AFTER' => 'avoid',
),
'H6' => array(
'FONT-SIZE' => '0.75em',
'FONT-WEIGHT' => 'bold',
'MARGIN' => '1.67em 0',
'PAGE-BREAK-AFTER' => 'avoid',
),
'HR' => array(
'COLOR' => '#888888',
'TEXT-ALIGN' => 'center',
'WIDTH' => '100%',
'HEIGHT' => '0.2mm',
'MARGIN-TOP' => '0.83em',
'MARGIN-BOTTOM' => '0.83em',
),
'PRE' => array(
'MARGIN' => '0.83em 0',
'FONT-FAMILY' => 'monospace',
),
'S' => array(
'TEXT-DECORATION' => 'line-through',
),
'STRIKE' => array(
'TEXT-DECORATION' => 'line-through',
),
'DEL' => array(
'TEXT-DECORATION' => 'line-through',
),
'SUB' => array(
'VERTICAL-ALIGN' => 'sub',
'FONT-SIZE' => '55%', /* Recommended 0.83em */
),
'SUP' => array(
'VERTICAL-ALIGN' => 'super',
'FONT-SIZE' => '55%', /* Recommended 0.83em */
),
'U' => array(
'TEXT-DECORATION' => 'underline',
),
'INS' => array(
'TEXT-DECORATION' => 'underline',
),
'B' => array(
'FONT-WEIGHT' => 'bold',
),
'STRONG' => array(
'FONT-WEIGHT' => 'bold',
),
'I' => array(
'FONT-STYLE' => 'italic',
),
'CITE' => array(
'FONT-STYLE' => 'italic',
),
'Q' => array(
'FONT-STYLE' => 'italic',
),
'EM' => array(
'FONT-STYLE' => 'italic',
),
'VAR' => array(
'FONT-STYLE' => 'italic',
),
'SAMP' => array(
'FONT-FAMILY' => 'monospace',
),
'CODE' => array(
'FONT-FAMILY' => 'monospace',
),
'KBD' => array(
'FONT-FAMILY' => 'monospace',
),
'TT' => array(
'FONT-FAMILY' => 'monospace',
),
'SMALL' => array(
'FONT-SIZE' => '83%',
),
'BIG' => array(
'FONT-SIZE' => '117%',
),
'ACRONYM' => array(
'FONT-SIZE' => '77%',
'FONT-WEIGHT' => 'bold',
),
'ADDRESS' => array(
'FONT-STYLE' => 'italic',
),
'BLOCKQUOTE' => array(
'MARGIN-LEFT' => '40px',
'MARGIN-RIGHT' => '40px',
'MARGIN-TOP' => '1.12em',
'MARGIN-BOTTOM' => '1.12em',
),
'A' => array(
'COLOR' => '#0000FF',
'TEXT-DECORATION' => 'underline',
),
'UL' => array(
'MARGIN' => '0.83em 0', /* only applied to top-level of nested lists */
'TEXT-INDENT' => '1.3em', /* Custom effect - list indent */
),
'OL' => array(
'MARGIN' => '0.83em 0', /* only applied to top-level of nested lists */
'TEXT-INDENT' => '1.3em', /* Custom effect - list indent */
),
'DL' => array(
'MARGIN' => '1.67em 0',
),
'DT' => array(
),
'DD' => array(
'PADDING-LEFT' => '40px',
),
'TABLE' => array(
'MARGIN' => '0',
'BORDER-COLLAPSE' => 'separate',
'BORDER-SPACING' => '2px',
'EMPTY-CELLS' => 'show',
'LINE-HEIGHT' => '1.2',
'VERTICAL-ALIGN' => 'middle',
),
'THEAD' => array(
),
'TFOOT' => array(
),
'TH' => array(
'FONT-WEIGHT' => 'bold',
'TEXT-ALIGN' => 'center',
'PADDING-LEFT' => '0.1em',
'PADDING-RIGHT' => '0.1em',
'PADDING-TOP' => '0.1em',
'PADDING-BOTTOM' => '0.1em',
),
'TD' => array(
'PADDING-LEFT' => '0.1em',
'PADDING-RIGHT' => '0.1em',
'PADDING-TOP' => '0.1em',
'PADDING-BOTTOM' => '0.1em',
),
'CAPTION' => array(
'TEXT-ALIGN' => 'center',
),
'IMG' => array(
'MARGIN' => '0',
'VERTICAL-ALIGN' => 'baseline',
),
'INPUT' => array(
'FONT-FAMILY' => 'sans-serif',
'VERTICAL-ALIGN' => 'middle',
'FONT-SIZE' => '0.9em',
),
'SELECT' => array(
'FONT-FAMILY' => 'sans-serif',
'FONT-SIZE' => '0.9em',
'VERTICAL-ALIGN' => 'middle',
),
'TEXTAREA' => array(
'FONT-FAMILY' => 'monospace',
'FONT-SIZE' => '0.9em',
'VERTICAL-ALIGN' => 'text-bottom',
),
'MARK' => array( /* mPDF 5.5.09 */
'BACKGROUND-COLOR' => 'yellow',
),
);
//////////////////////////////////////////////////
// VALUES ONLY LIKELY TO BE CHANGED BY DEVELOPERS
//////////////////////////////////////////////////
$this->pdf_version = '1.4';
// Hyphenation
$this->SHYlanguages = array('en','de','es','fi','fr','it','nl','pl','ru','sv'); // existing defined patterns
$this->default_lineheight_correction=1.2; // Value 1 sets lineheight=fontsize height;
// Value used if line-height not set by CSS (usuallly is)
$this->fontsizes = array('XX-SMALL'=>0.7, 'X-SMALL'=>0.77, 'SMALL'=>0.86, 'MEDIUM'=>1, 'LARGE'=>1.2, 'X-LARGE'=>1.5, 'XX-LARGE'=>2);
// CHARACTER PATTERN MATCHES TO DETECT LANGUAGES
// pattern used to detect RTL characters -> force RTL
$this->pregRTLchars = "\x{0590}-\x{06FF}\x{0700}-\x{083E}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}";
// CJK Chars which require changing and are distinctive of specific charset
$this->pregUHCchars = "\x{1100}-\x{11FF}\x{3130}-\x{318F}\x{AC00}-\x{D7AF}";
$this->pregSJISchars = "\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3190}-\x{319F}\x{31F0}-\x{31FF}";
// Chars which distinguish CJK but not between different
$this->pregCJKchars = "\x{1100}-\x{11FF}\x{2E80}-\x{A4CF}\x{A800}-\x{D7AF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}\x{20000}-\x{2FA1F}";
// For CJK Line-breaking
//Leading characters - Not allowed at end of line
$this->CJKleading = "\$\(\*\[\{\x{00a3}\x{00a5}\x{00ab}\x{00b7}\x{2018}\x{201c}\x{2035}\x{3005}\x{3007}\x{3008}\x{300a}\x{300c}\x{300e}\x{3010}\x{3014}\x{3016}\x{3018}\x{301d}\x{fe34}\x{fe57}\x{fe59}\x{fe5b}\x{ff04}\x{ff08}\x{ff0e}\x{ff3b}\x{ff5b}\x{ff5f}\x{ffe1}\x{ffe5}\x{ffe6}";
// Following characters - Not allowed at start
$this->CJKfollowing = "!%\),\.:;>\?\]\}\x{00a2}\x{00a8}\x{00b0}\x{00b7}\x{00bb}\x{02c7}\x{02c9}\x{2010}\x{2013}-\x{2016}\x{2019}\x{201d}-\x{201f}\x{2020}-\x{2022}\x{2025}\x{2027}\x{203a}\x{203c}\x{2047}-\x{2049}\x{2103}\x{2236}\x{2574}\x{3001}-\x{3003}\x{3005}\x{3006}\x{3009}\x{300b}\x{300d}\x{300f}\x{3011}\x{3015}\x{3017}\x{3019}\x{301c}\x{301e}\x{301f}\x{303b}\x{3041}\x{3043}\x{3045}\x{3047}\x{3049}\x{3063}\x{3083}\x{3085}\x{3087}\x{308e}\x{3095}\x{3096}\x{30a0}\x{30a1}\x{30a3}\x{30a5}\x{30a7}\x{30a9}\x{30c3}\x{30e3}\x{30e5}\x{30e7}\x{30ee}\x{30f5}\x{30f6}\x{30fb}-\x{30fe}\x{31f0}-\x{31ff}\x{fe30}-\x{fe33}\x{fe50}-\x{fe56}\x{fe58}\x{fe5a}\x{fe5c}\x{ff01}\x{ff02}\x{ff05}\x{ff07}\x{ff09}\x{ff0c}\x{ff0e}\x{ff1a}\x{ff1b}\x{ff1f}\x{ff3d}\x{ff40}\x{ff5c}-\x{ff5e}\x{ff60}\x{ff64}";
// Characters which are allowed to overflow the right margin
$this->CJKoverflow = "\.,\x{ff61}\x{ff64}\x{3001}\x{3002}\x{ff0c}\x{ff0e}";
// ASCII Chars which shouldn't break string
// Use for very specific words
$this->pregASCIIchars1 = "\x{0021}-\x{002E}\x{0030}-\x{003B}?"; // no [SPACE]
// Use for words+
$this->pregASCIIchars2 = "\x{0020}-\x{002E}\x{0030}-\x{003B}?"; // [SPACE] punctuation and 0-9
// Use for chunks > words
$this->pregASCIIchars3 = "\x{0000}-\x{002E}\x{0030}-\x{003B}\x{003F}-\x{007E}"; // all except <>
// Vietnamese - specific
$this->pregVIETchars = "\x{01A0}\x{01A1}\x{01AF}\x{01B0}\x{1EA0}-\x{1EF1}";
// Vietnamese - Chars which shouldn't break string
$this->pregVIETPluschars = "\x{0000}-\x{003B}\x{003F}-\x{00FF}\x{0300}-\x{036F}\x{0102}\x{0103}\x{0110}\x{0111}\x{0128}\x{0129}\x{0168}\x{0169}\x{1EF1}-\x{1EF9}"; // omits < >
// Arabic
$this->pregARABICchars = "\x{0600}-\x{06FF}\x{0750}-\x{077F}\x{FB50}-\x{FDFD}\x{FE70}-\x{FEFF}";
// Characters of Urdu, Pashto, Sindhi (but NOT arabic or persian/farsi) [not covered by DejavuSans font]
$this->pregNonARABICchars = "\x{0671}-\x{067D}\x{067F}-\x{0685}\x{0687}-\x{0697}\x{0699}-\x{06A8}\x{06AA}-\x{06AE}\x{06B0}-\x{06CB}\x{06CD}-\x{06D3}";
$this->pregHEBchars = "\x{0590}-\x{05FF}\x{FB00}-\x{FB49}"; // Hebrew
// INDIC
$this->pregHIchars = "\x{0900}-\x{0963}\x{0966}-\x{097F}"; // Devanagari (Hindi) minus the common indic punctuation 0964,0965
$this->pregBNchars = "\x{0980}-\x{09FF}"; // Bengali
$this->pregPAchars = "\x{0A00}-\x{0A7F}"; // Gurmukhi (Punjabi)
$this->pregGUchars = "\x{0A80}-\x{0AFF}"; // Gujarati
$this->pregORchars = "\x{0B00}-\x{0B7F}"; // Oriya
$this->pregTAchars = "\x{0B80}-\x{0BFF}"; // Tamil
$this->pregTEchars = "\x{0C00}-\x{0C7F}"; // Telugu
$this->pregKNchars = "\x{0C80}-\x{0CFF}"; // Kannada
$this->pregMLchars = "\x{0D00}-\x{0D7F}"; // Malayalam
$this->pregSHchars = "\x{0D80}-\x{0DFF}"; // Sinhala
$this->pregINDextra = "\x{200B}-\x{200D}\x{0964}\x{0965}\x{0020}-\x{0022}\x{0024}-\x{002E}\x{003A}-\x{003F}\x{005B}-\x{0060}\x{007B}-\x{007E}\x{00A0}";
// 200B-D=Zero-width joiners; 0964,0965=Generic Indic punctuation; NBSP & general punctuation (excludes # and / so can use in autoFont() )
$this->allowedCSStags = 'DIV|P|H1|H2|H3|H4|H5|H6|FORM|IMG|A|BODY|TABLE|HR|THEAD|TFOOT|TBODY|TH|TR|TD|UL|OL|LI|PRE|BLOCKQUOTE|ADDRESS|DL|DT|DD';
$this->allowedCSStags .= '|ARTICLE|ASIDE|FIGURE|FIGCAPTION|FOOTER|HEADER|HGROUP|NAV|SECTION|MARK|DETAILS|SUMMARY|METER|PROGRESS|TIME'; // mPDF 5.5.09
$this->allowedCSStags .= '|SPAN|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|STRIKE|S|U|DEL|INS|Q|FONT';
$this->allowedCSStags .= '|SELECT|INPUT|TEXTAREA|CAPTION|FIELDSET|LEGEND'; // mPDF 5.4.18
$this->allowedCSStags .= '|TEXTCIRCLE|DOTTAB'; // mPDF 5.5.23 // mPDF 5.6.33
$this->outerblocktags = array('DIV','FORM','CENTER','DL','FIELDSET','ARTICLE','ASIDE','FIGURE','FIGCAPTION', 'FOOTER','HEADER','HGROUP','NAV','SECTION','DETAILS','SUMMARY'); // mPDF 5.5.09 // mPDF 5.5.22
$this->innerblocktags = array('P','BLOCKQUOTE','ADDRESS','PRE','H1','H2','H3','H4','H5','H6','DT','DD','CAPTION');
?>

View File

@ -1,153 +0,0 @@
<?php
function GetLangOpts($llcc, $adobeCJK) {
if (strlen($llcc) == 5) {
$lang = substr(strtolower($llcc),0,2);
$country = substr(strtoupper($llcc),3,2);
}
else { $lang = strtolower($llcc); $country = ''; }
$unifonts = "";
$coreSuitable = false;
switch($lang){
CASE "en":
CASE "ca":
CASE "cy":
CASE "da":
CASE "de":
CASE "es":
CASE "eu":
CASE "fr":
CASE "ga":
CASE "fi":
CASE "is":
CASE "it":
CASE "nl":
CASE "no":
CASE "pt":
CASE "sv":
// Edit this value to define how mPDF behaves when using new mPDF('-x')
// If set to TRUE, mPDF will use Adobe core fonts only when it recognises the languages above
$coreSuitable = true; break;
// RTL Languages
CASE "he":
CASE "yi":
$unifonts = "dejavusans,dejavusansB,dejavusansI,dejavusansBI"; break;
// Arabic
CASE "ar":
$unifonts = "xbriyaz,xbriyazB,xbriyazI,xbriyazBI,xbzar,xbzarB,xbzarI,xbzarBI"; break;
CASE "fa":
$unifonts = "xbriyaz,xbriyazB,xbriyazI,xbriyazBI,xbzar,xbzarB,xbzarI,xbzarBI"; break;
CASE "ps":
$unifonts = "xbriyaz,xbriyazB,xbriyazI,xbriyazBI,xbzar,xbzarB,xbzarI,xbzarBI"; break;
CASE "ur":
$unifonts = "xbriyaz,xbriyazB,xbriyazI,xbriyazBI,xbzar,xbzarB,xbzarI,xbzarBI"; break;
// Sindhi (can be Arabic or Devanagari)
CASE "sd":
if ($country == "IN") { $unifonts = "ind_hi_1_001"; }
// else if ($country == "PK") { $unifonts = ""; }
// else { $unifonts = ""; }
break;
// INDIC
// Assamese
CASE "as": $unifonts = "ind_bn_1_001"; break;
// Bengali
CASE "bn": $unifonts = "ind_bn_1_001"; break;
// Gujarati
CASE "gu": $unifonts = "ind_gu_1_001"; break;
// Hindi (Devanagari)
CASE "hi": $unifonts = "ind_hi_1_001"; break;
// Kannada
CASE "kn": $unifonts = "ind_kn_1_001"; break;
// Kashmiri
CASE "ks": $unifonts = "ind_hi_1_001"; break;
// Malayalam
CASE "ml": $unifonts = "ind_ml_1_001"; break;
// Nepali (Devanagari)
CASE "ne": $unifonts = "ind_hi_1_001"; break;
// Oriya
CASE "or": $unifonts = "ind_or_1_001"; break;
// Punjabi (Gurmukhi)
CASE "pa": $unifonts = "ind_pa_1_001"; break;
// Tamil
CASE "ta": $unifonts = "ind_ta_1_001"; break;
// Telegu
CASE "te": $unifonts = "ind_te_1_001"; break;
// THAI
CASE "th": $unifonts = "garuda,garudaB,garudaI,garudaBI,norasi,norasiB,norasiI,norasiBI"; break;
// VIETNAMESE
CASE "vi":
$unifonts = "dejavusanscondensed,dejavusanscondensedB,dejavusanscondensedI,dejavusanscondensedBI,dejavusans,dejavusansB,dejavusansI,dejavusansBI"; break;
// CJK Langauges
CASE "ja":
if ($adobeCJK) {
$unifonts = "sjis,sjisB,sjisI,sjisBI";
}
/* Uncomment these lines if CJK fonts available */
// else {
// $unifonts = "sun-exta,sun-extb,hannoma,hannomb";
// }
break;
CASE "ko":
if ($adobeCJK) {
$unifonts = "uhc,uhcB,uhcI,uhcBI";
}
/* Uncomment these lines if CJK fonts available */
// else {
// $unifonts = "unbatang_0613";
// }
break;
CASE "zh":
if ($country == "HK" || $country == "TW") {
if ($adobeCJK) {
$unifonts = "big5,big5B,big5I,big5BI";
}
/* Uncomment these lines if CJK fonts available */
// else {
// $unifonts = "sun-exta,sun-extb,hannoma,hannomb";
// }
}
else if ($country == "CN") {
if ($adobeCJK) {
$unifonts = "gb,gbB,gbI,gbBI";
}
/* Uncomment these lines if CJK fonts available */
// else {
// $unifonts = "sun-exta,sun-extb,hannoma,hannomb";
// }
}
else {
if ($adobeCJK) {
$unifonts = "gb,gbB,gbI,gbBI";
}
/* Uncomment these lines if CJK fonts available */
// else {
// $unifonts = "sun-exta,sun-extb,hannoma,hannomb";
// }
}
break;
}
$unifonts_arr = array();
if ($unifonts) {
$unifonts_arr = preg_split('/\s*,\s*/',$unifonts);
}
return array($coreSuitable ,$unifonts_arr);
}
?>

View File

@ -1,304 +0,0 @@
<?php
// Optionally define a folder which contains TTF fonts
// mPDF will look here before looking in the usual _MPDF_TTFONTPATH
// Useful if you already have a folder for your fonts
// e.g. on Windows: define("_MPDF_SYSTEM_TTFONTS", 'C:/Windows/Fonts/');
// Leave undefined if not required
// define("_MPDF_SYSTEM_TTFONTS", '');
// Optionally set font(s) (names as defined below in $this->fontdata) to use for missing characters
// when using useSubstitutions. Use a font with wide coverage - dejavusanscondensed is a good start
// only works using subsets (otherwise would add very large file)
// doesn't do Indic or arabic
// More than 1 font can be specified but each will add to the processing time of the script
$this->backupSubsFont = array('dejavusanscondensed');
// Optionally set a font (name as defined below in $this->fontdata) to use for CJK characters
// in Plane 2 Unicode (> U+20000) when using useSubstitutions.
// Use a font like hannomb or sun-extb if available
// only works using subsets (otherwise would add very large file)
// Leave undefined or blank if not not required
// $this->backupSIPFont = 'sun-extb';
/*
This array defines translations from font-family in CSS or HTML
to the internal font-family name used in mPDF.
Can include as many as want, regardless of which fonts are installed.
By default mPDF will take a CSS/HTML font-family and remove spaces
and change to lowercase e.g. "Arial Unicode MS" will be recognised as
"arialunicodems"
You only need to define additional translations.
You can also use it to define specific substitutions e.g.
'frutiger55roman' => 'arial'
Generic substitutions (i.e. to a sans-serif or serif font) are set
by including the font-family in $this->sans_fonts below
To aid backwards compatability some are included:
*/
$this->fonttrans = array(
'helvetica' => 'arial',
'times' => 'timesnewroman',
'courier' => 'couriernew',
'trebuchet' => 'trebuchetms',
'comic' => 'comicsansms',
'franklin' => 'franklingothicbook',
'albertus' => 'albertusmedium',
'arialuni' => 'arialunicodems',
'zn_hannom_a' => 'hannoma',
'ocr-b' => 'ocrb',
'ocr-b10bt' => 'ocrb',
);
/*
This array lists the file names of the TrueType .ttf or .otf font files
for each variant of the (internal mPDF) font-family name.
['R'] = Regular (Normal), others are Bold, Italic, and Bold-Italic
Each entry must contain an ['R'] entry, but others are optional.
Only the font (files) entered here will be available to use in mPDF.
Put preferred default first in order.
This will be used if a named font cannot be found in any of
$this->sans_fonts, $this->serif_fonts or $this->mono_fonts
['indic'] = true; for special mPDF fonts containing Indic characters
['sip-ext'] = 'hannomb'; name a related font file containing SIP characters
If a .ttc TrueType collection file is referenced, the number of the font
within the collection is required. Fonts in the collection are numbered
starting at 1, as they appear in the .ttc file e.g.
"cambria" => array(
'R' => "cambria.ttc",
'B' => "cambriab.ttf",
'I' => "cambriai.ttf",
'BI' => "cambriaz.ttf",
'TTCfontID' => array(
'R' => 1,
),
),
"cambriamath" => array(
'R' => "cambria.ttc",
'TTCfontID' => array(
'R' => 2,
),
),
*/
$this->fontdata = array(
"dejavusanscondensed" => array(
'R' => "DejaVuSansCondensed.ttf",
'B' => "DejaVuSansCondensed-Bold.ttf",
'I' => "DejaVuSansCondensed-Oblique.ttf",
'BI' => "DejaVuSansCondensed-BoldOblique.ttf",
),
"dejavusans" => array(
'R' => "DejaVuSans.ttf",
'B' => "DejaVuSans-Bold.ttf",
'I' => "DejaVuSans-Oblique.ttf",
'BI' => "DejaVuSans-BoldOblique.ttf",
),
"dejavuserif" => array(
'R' => "DejaVuSerif.ttf",
'B' => "DejaVuSerif-Bold.ttf",
'I' => "DejaVuSerif-Italic.ttf",
'BI' => "DejaVuSerif-BoldItalic.ttf",
),
"dejavuserifcondensed" => array(
'R' => "DejaVuSerifCondensed.ttf",
'B' => "DejaVuSerifCondensed-Bold.ttf",
'I' => "DejaVuSerifCondensed-Italic.ttf",
'BI' => "DejaVuSerifCondensed-BoldItalic.ttf",
),
"dejavusansmono" => array(
'R' => "DejaVuSansMono.ttf",
'B' => "DejaVuSansMono-Bold.ttf",
'I' => "DejaVuSansMono-Oblique.ttf",
'BI' => "DejaVuSansMono-BoldOblique.ttf",
),
/* OCR-B font for Barcodes */
"ocrb" => array(
'R' => "ocrb10.ttf",
),
/* Thai fonts */
"garuda" => array(
'R' => "Garuda.ttf",
'B' => "Garuda-Bold.ttf",
'I' => "Garuda-Oblique.ttf",
'BI' => "Garuda-BoldOblique.ttf",
),
"norasi" => array(
'R' => "Norasi.ttf",
'B' => "Norasi-Bold.ttf",
'I' => "Norasi-Oblique.ttf",
'BI' => "Norasi-BoldOblique.ttf",
),
/* Indic fonts */
"ind_bn_1_001" => array(
'R' => "ind_bn_1_001.ttf",
'indic' => true,
),
"ind_hi_1_001" => array(
'R' => "ind_hi_1_001.ttf",
'indic' => true,
),
"ind_ml_1_001" => array(
'R' => "ind_ml_1_001.ttf",
'indic' => true,
),
"ind_kn_1_001" => array(
'R' => "ind_kn_1_001.ttf",
'indic' => true,
),
"ind_gu_1_001" => array(
'R' => "ind_gu_1_001.ttf",
'indic' => true,
),
"ind_or_1_001" => array(
'R' => "ind_or_1_001.ttf",
'indic' => true,
),
"ind_ta_1_001" => array(
'R' => "ind_ta_1_001.ttf",
'indic' => true,
),
"ind_te_1_001" => array(
'R' => "ind_te_1_001.ttf",
'indic' => true,
),
"ind_pa_1_001" => array(
'R' => "ind_pa_1_001.ttf",
'indic' => true,
),
/* XW Zar Arabic fonts */
"xbriyaz" => array(
'R' => "XB Riyaz.ttf",
'B' => "XB RiyazBd.ttf",
'I' => "XB RiyazIt.ttf",
'BI' => "XB RiyazBdIt.ttf",
'unAGlyphs' => true,
),
"xbzar" => array(
'R' => "XB Zar.ttf",
'B' => "XB Zar Bd.ttf",
'I' => "XB Zar It.ttf",
'BI' => "XB Zar BdIt.ttf",
'unAGlyphs' => true,
),
/* Examples of some CJK fonts */
/*
"unbatang_0613" => array(
'R' => "UnBatang_0613.ttf",
),
"sun-exta" => array(
'R' => "Sun-ExtA.ttf",
'sip-ext' => 'sun-extb',
),
"sun-extb" => array(
'R' => "Sun-ExtB.ttf",
),
"hannoma" => array(
'R' => "HAN NOM A.ttf",
'sip-ext' => 'hannomb',
),
"hannomb" => array(
'R' => "HAN NOM B.ttf",
),
'mingliu' => array (
'R' => 'mingliu.ttc',
'TTCfontID' => array (
'R' => 1,
),
'sip-ext' => 'mingliu-extb',
),
'pmingliu' => array (
'R' => 'mingliu.ttc',
'TTCfontID' => array (
'R' => 2,
),
'sip-ext' => 'pmingliu-extb',
),
'mingliu_hkscs' => array (
'R' => 'mingliu.ttc',
'TTCfontID' => array (
'R' => 3,
),
'sip-ext' => 'mingliu_hkscs-extb',
),
'mingliu-extb' => array (
'R' => 'mingliub.ttc',
'TTCfontID' => array (
'R' => 1,
),
),
'pmingliu-extb' => array (
'R' => 'mingliub.ttc',
'TTCfontID' => array (
'R' => 2,
),
),
'mingliu_hkscs-extb' => array (
'R' => 'mingliub.ttc',
'TTCfontID' => array (
'R' => 3,
),
),
*/
);
// Add fonts to this array if they contain characters in the SIP or SMP Unicode planes
// but you do not require them. This allows a more efficient form of subsetting to be used.
$this->BMPonly = array(
"dejavusanscondensed",
"dejavusans",
"dejavuserifcondensed",
"dejavuserif",
"dejavusansmono",
);
// These next 3 arrays do two things:
// 1. If a font referred to in HTML/CSS is not available to mPDF, these arrays will determine whether
// a serif/sans-serif or monospace font is substituted
// 2. The first font in each array will be the font which is substituted in circumstances as above
// (Otherwise the order is irrelevant)
// Use the mPDF font-family names i.e. lowercase and no spaces (after any translations in $fonttrans)
// Always include "sans-serif", "serif" and "monospace" etc.
$this->sans_fonts = array('dejavusanscondensed','dejavusans','freesans','liberationsans','sans','sans-serif','cursive','fantasy',
'arial','helvetica','verdana','geneva','lucida','arialnarrow','arialblack','arialunicodems',
'franklin','franklingothicbook','tahoma','garuda','calibri','trebuchet','lucidagrande','microsoftsansserif',
'trebuchetms','lucidasansunicode','franklingothicmedium','albertusmedium','xbriyaz','albasuper','quillscript'
);
$this->serif_fonts = array('dejavuserifcondensed','dejavuserif','freeserif','liberationserif','serif',
'timesnewroman','times','centuryschoolbookl','palatinolinotype','centurygothic',
'bookmanoldstyle','bookantiqua','cyberbit','cambria',
'norasi','charis','palatino','constantia','georgia','albertus','xbzar','algerian','garamond',
);
$this->mono_fonts = array('dejavusansmono','freemono','liberationmono','courier', 'mono','monospace','ocrb','ocr-b','lucidaconsole',
'couriernew','monotypecorsiva'
);
?>

View File

@ -1,9 +0,0 @@
<?php
for($i=0;$i<=255;$i++)
$cw[chr($i)]=600;
$desc=array('Ascent'=>629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-23 -250 715 805]');
$up=-100;
$ut=50;
?>

View File

@ -1,9 +0,0 @@
<?php
for($i=0;$i<=255;$i++)
$cw[chr($i)]=600;
$desc=array('Ascent'=>629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-113 -250 749 801]');
$up=-100;
$ut=50;
?>

View File

@ -1,9 +0,0 @@
<?php
for($i=0;$i<=255;$i++)
$cw[chr($i)]=600;
$desc=array('Ascent'=>629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-57 -250 869 801]');
$up=-100;
$ut=50;
?>

View File

@ -1,9 +0,0 @@
<?php
for($i=0;$i<=255;$i++)
$cw[chr($i)]=600;
$desc=array('Ascent'=>629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-27 -250 849 805]');
$up=-100;
$ut=50;
?>

View File

@ -1,20 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-166 -225 1000 931]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -74, ), chr(65)=> array ( chr(84)=> -74, chr(86)=> -74, chr(87)=> -37, chr(89)=> -74, chr(118)=> -18, chr(119)=> -18, chr(121)=> -18, chr(146)=> -74, ), chr(70)=> array ( chr(44)=> -110, chr(46)=> -110, chr(65)=> -55, ), chr(76)=> array ( chr(84)=> -74, chr(86)=> -74, chr(87)=> -74, chr(89)=> -74, chr(121)=> -37, chr(146)=> -55, ), chr(80)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -74, ), chr(82)=> array ( chr(84)=> -18, chr(86)=> -18, chr(87)=> -18, chr(89)=> -18, ), chr(84)=> array ( chr(44)=> -110, chr(46)=> -110, chr(58)=> -110, chr(65)=> -74, chr(79)=> -18, chr(97)=> -110, chr(99)=> -110, chr(101)=> -110, chr(105)=> -37, chr(111)=> -110, chr(114)=> -37, chr(115)=> -110, chr(117)=> -37, chr(119)=> -55, chr(121)=> -55, ), chr(86)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -37, chr(65)=> -74, chr(97)=> -74, chr(101)=> -55, chr(105)=> -18, chr(111)=> -55, chr(114)=> -37, chr(117)=> -37, chr(121)=> -37, ), chr(87)=> array ( chr(44)=> -55, chr(46)=> -55, chr(58)=> -18, chr(65)=> -37, chr(97)=> -37, chr(101)=> -18, chr(105)=> 0, chr(111)=> -18, chr(114)=> -18, chr(117)=> -18, chr(121)=> -8, ), chr(89)=> array ( chr(44)=> -128, chr(46)=> -128, chr(58)=> -55, chr(65)=> -74, chr(97)=> -74, chr(101)=> -91, chr(105)=> -37, chr(111)=> -91, chr(112)=> -74, chr(113)=> -91, chr(117)=> -55, chr(118)=> -55, ), chr(102)=> array ( chr(102)=> -18, chr(146)=> 18, ), chr(114)=> array ( chr(44)=> -55, chr(46)=> -55, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(119)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(121)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(145)=> array ( chr(145)=> -18, ), chr(146)=> array ( chr(115)=> -18, chr(146)=> -18, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-170 -228 1003 962]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -55, ), chr(65)=> array ( chr(84)=> -74, chr(86)=> -74, chr(87)=> -55, chr(89)=> -91, chr(118)=> -37, chr(119)=> -18, chr(121)=> -37, chr(146)=> -55, ), chr(70)=> array ( chr(44)=> -110, chr(46)=> -110, chr(65)=> -55, ), chr(76)=> array ( chr(84)=> -74, chr(86)=> -74, chr(87)=> -55, chr(89)=> -91, chr(121)=> -37, chr(146)=> -55, ), chr(80)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -74, ), chr(82)=> array ( chr(86)=> -18, chr(87)=> -18, chr(89)=> -37, ), chr(84)=> array ( chr(44)=> -110, chr(46)=> -110, chr(58)=> -110, chr(65)=> -74, chr(79)=> -18, chr(97)=> -74, chr(99)=> -74, chr(101)=> -74, chr(105)=> -18, chr(111)=> -74, chr(114)=> -55, chr(115)=> -74, chr(117)=> -74, chr(119)=> -74, chr(121)=> -74, ), chr(86)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -55, chr(65)=> -74, chr(97)=> -55, chr(101)=> -55, chr(105)=> -18, chr(111)=> -74, chr(114)=> -55, chr(117)=> -37, chr(121)=> -37, ), chr(87)=> array ( chr(44)=> -55, chr(46)=> -55, chr(58)=> -18, chr(65)=> -55, chr(97)=> -37, chr(101)=> -18, chr(105)=> -8, chr(111)=> -18, chr(114)=> -18, chr(117)=> -18, chr(121)=> -18, ), chr(89)=> array ( chr(44)=> -110, chr(46)=> -110, chr(58)=> -74, chr(65)=> -91, chr(97)=> -55, chr(101)=> -55, chr(105)=> -37, chr(111)=> -74, chr(112)=> -55, chr(113)=> -74, chr(117)=> -55, chr(118)=> -55, ), chr(102)=> array ( chr(146)=> 18, ), chr(114)=> array ( chr(44)=> -55, chr(46)=> -55, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(119)=> array ( chr(44)=> -37, chr(46)=> -37, ), chr(121)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(145)=> array ( chr(145)=> -37, ), chr(146)=> array ( chr(115)=> -37, chr(146)=> -37, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-174 -228 1114 962]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -74, ), chr(65)=> array ( chr(84)=> -74, chr(86)=> -74, chr(87)=> -55, chr(89)=> -74, chr(146)=> -55, ), chr(70)=> array ( chr(44)=> -110, chr(46)=> -110, chr(65)=> -55, ), chr(76)=> array ( chr(84)=> -74, chr(86)=> -55, chr(87)=> -55, chr(89)=> -74, chr(146)=> -74, ), chr(80)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -74, ), chr(82)=> array ( chr(84)=> -18, chr(87)=> -18, chr(89)=> -18, ), chr(84)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -74, chr(65)=> -74, chr(79)=> -18, chr(97)=> -37, chr(99)=> -37, chr(101)=> -37, chr(105)=> -18, chr(111)=> -37, chr(114)=> -18, chr(115)=> -37, chr(117)=> -18, chr(119)=> -37, chr(121)=> -37, ), chr(86)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -37, chr(65)=> -74, chr(97)=> -37, chr(101)=> -37, chr(105)=> -37, chr(111)=> -37, chr(114)=> -18, chr(117)=> -18, chr(121)=> -18, ), chr(87)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -37, chr(65)=> -55, chr(97)=> -18, chr(101)=> -18, chr(105)=> -8, chr(111)=> -18, chr(114)=> -18, chr(117)=> -18, chr(121)=> -18, ), chr(89)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -55, chr(65)=> -74, chr(97)=> -37, chr(101)=> -37, chr(105)=> -37, chr(111)=> -37, chr(112)=> -37, chr(113)=> -37, chr(117)=> -37, chr(118)=> -37, ), chr(102)=> array ( chr(102)=> -18, chr(146)=> 18, ), chr(114)=> array ( chr(44)=> -55, chr(46)=> -55, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(119)=> array ( chr(44)=> -37, chr(46)=> -37, ), chr(121)=> array ( chr(44)=> -37, chr(46)=> -37, ), chr(145)=> array ( chr(145)=> -37, ), chr(146)=> array ( chr(115)=> -18, chr(116)=> 18, chr(146)=> -37, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-170 -225 1116 931]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -74, ), chr(65)=> array ( chr(84)=> -74, chr(86)=> -55, chr(87)=> -18, chr(89)=> -74, chr(118)=> -18, chr(119)=> -18, chr(121)=> -8, chr(146)=> -37, ), chr(70)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -74, ), chr(76)=> array ( chr(84)=> -74, chr(86)=> -55, chr(87)=> -37, chr(89)=> -91, chr(121)=> -18, chr(146)=> -55, ), chr(80)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -74, ), chr(82)=> array ( chr(84)=> -18, chr(86)=> -18, chr(87)=> -18, chr(89)=> -37, ), chr(84)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -74, chr(65)=> -74, chr(79)=> -18, chr(97)=> -91, chr(99)=> -91, chr(101)=> -91, chr(105)=> -8, chr(111)=> -91, chr(114)=> -74, chr(115)=> -91, chr(117)=> -74, chr(119)=> -74, chr(121)=> -74, ), chr(86)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -18, chr(65)=> -55, chr(97)=> -37, chr(101)=> -37, chr(105)=> -18, chr(111)=> -37, chr(114)=> -18, chr(117)=> -18, chr(121)=> -18, ), chr(87)=> array ( chr(44)=> -37, chr(46)=> -37, chr(65)=> -18, chr(97)=> -18, chr(101)=> -18, chr(105)=> -8, ), chr(89)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -37, chr(65)=> -55, chr(97)=> -74, chr(101)=> -55, chr(105)=> -18, chr(111)=> -55, chr(112)=> -55, chr(113)=> -55, chr(117)=> -37, chr(118)=> -37, ), chr(102)=> array ( chr(146)=> 37, ), chr(114)=> array ( chr(44)=> -55, chr(46)=> -37, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(119)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(121)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(145)=> array ( chr(145)=> -37, ), chr(146)=> array ( chr(115)=> -18, chr(146)=> -37, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('FontBBox'=>'[-180 -293 1090 1010]');
$up=-100;
$ut=50;
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>662,'FontBBox'=>'[-168 -218 1000 898]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -37, ), chr(65)=> array ( chr(84)=> -110, chr(86)=> -128, chr(87)=> -80, chr(89)=> -91, chr(118)=> -74, chr(119)=> -91, chr(121)=> -91, chr(146)=> -110, ), chr(70)=> array ( chr(44)=> -80, chr(46)=> -80, chr(65)=> -74, ), chr(76)=> array ( chr(84)=> -91, chr(86)=> -91, chr(87)=> -74, chr(89)=> -100, chr(121)=> -55, chr(146)=> -91, ), chr(80)=> array ( chr(44)=> -110, chr(46)=> -110, chr(65)=> -91, ), chr(82)=> array ( chr(84)=> -60, chr(86)=> -80, chr(87)=> -55, chr(89)=> -55, chr(121)=> -40, ), chr(84)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -49, chr(65)=> -80, chr(79)=> -18, chr(97)=> -69, chr(99)=> -69, chr(101)=> -69, chr(105)=> -35, chr(111)=> -69, chr(114)=> -35, chr(115)=> -69, chr(117)=> -35, chr(119)=> -69, chr(121)=> -69, ), chr(86)=> array ( chr(44)=> -128, chr(46)=> -128, chr(58)=> -74, chr(65)=> -128, chr(97)=> -110, chr(101)=> -110, chr(105)=> -60, chr(111)=> -128, chr(114)=> -60, chr(117)=> -60, chr(121)=> -110, ), chr(87)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -37, chr(65)=> -110, chr(97)=> -80, chr(101)=> -80, chr(105)=> -40, chr(111)=> -80, chr(114)=> -40, chr(117)=> -40, chr(121)=> -60, ), chr(89)=> array ( chr(44)=> -128, chr(46)=> -128, chr(58)=> -91, chr(65)=> -110, chr(97)=> -100, chr(101)=> -100, chr(105)=> -55, chr(111)=> -100, chr(112)=> -91, chr(113)=> -110, chr(117)=> -110, chr(118)=> -100, ), chr(102)=> array ( chr(102)=> -18, chr(146)=> 55, ), chr(114)=> array ( chr(44)=> -40, chr(46)=> -55, chr(103)=> -18, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -64, chr(46)=> -64, ), chr(119)=> array ( chr(44)=> -64, chr(46)=> -64, ), chr(121)=> array ( chr(44)=> -64, chr(46)=> -64, ), chr(145)=> array ( chr(145)=> -74, ), chr(146)=> array ( chr(115)=> -55, chr(116)=> -18, chr(146)=> -74, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>676,'FontBBox'=>'[-168 -218 1000 935]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -55, ), chr(65)=> array ( chr(84)=> -74, chr(86)=> -128, chr(87)=> -110, chr(89)=> -91, chr(118)=> -74, chr(119)=> -74, chr(121)=> -74, chr(146)=> -74, ), chr(70)=> array ( chr(44)=> -91, chr(46)=> -91, chr(65)=> -74, ), chr(76)=> array ( chr(84)=> -91, chr(86)=> -91, chr(87)=> -91, chr(89)=> -91, chr(121)=> -55, chr(146)=> -91, ), chr(80)=> array ( chr(44)=> -91, chr(46)=> -91, chr(65)=> -74, ), chr(82)=> array ( chr(84)=> -35, chr(86)=> -35, chr(87)=> -35, chr(89)=> -35, chr(121)=> -35, ), chr(84)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -74, chr(65)=> -74, chr(79)=> -18, chr(97)=> -91, chr(99)=> -91, chr(101)=> -91, chr(105)=> -18, chr(111)=> -91, chr(114)=> -74, chr(115)=> -91, chr(117)=> -91, chr(119)=> -74, chr(121)=> -74, ), chr(86)=> array ( chr(44)=> -128, chr(46)=> -128, chr(58)=> -91, chr(65)=> -128, chr(79)=> -20, chr(97)=> -91, chr(101)=> -91, chr(105)=> -37, chr(111)=> -91, chr(114)=> -74, chr(117)=> -91, chr(121)=> -91, ), chr(87)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -55, chr(65)=> -110, chr(97)=> -55, chr(101)=> -55, chr(105)=> -18, chr(111)=> -55, chr(114)=> -18, chr(117)=> -18, chr(121)=> -37, ), chr(89)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -91, chr(65)=> -91, chr(97)=> -110, chr(101)=> -110, chr(105)=> -37, chr(111)=> -110, chr(112)=> -91, chr(113)=> -110, chr(117)=> -91, chr(118)=> -110, ), chr(102)=> array ( chr(102)=> 0, chr(146)=> 55, ), chr(114)=> array ( chr(44)=> -91, chr(46)=> -91, chr(99)=> -18, chr(101)=> -18, chr(104)=> 0, chr(111)=> -18, chr(113)=> -18, chr(116)=> 0, chr(119)=> 0, chr(120)=> 0, chr(121)=> 0, chr(122)=> 0, chr(146)=> 18, ), chr(118)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(119)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(121)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(145)=> array ( chr(145)=> -74, ), chr(146)=> array ( chr(115)=> -37, chr(146)=> -74, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>669,'FontBBox'=>'[-200 -218 996 921]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -55, ), chr(65)=> array ( chr(84)=> -55, chr(86)=> -74, chr(87)=> -91, chr(89)=> -55, chr(118)=> -74, chr(119)=> -74, chr(121)=> -74, chr(146)=> -74, ), chr(70)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -91, ), chr(76)=> array ( chr(84)=> -18, chr(86)=> -37, chr(87)=> -37, chr(89)=> -37, chr(121)=> -37, chr(146)=> -55, ), chr(80)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -74, ), chr(82)=> array ( chr(86)=> -18, chr(87)=> -18, chr(89)=> -18, chr(121)=> -18, ), chr(84)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -74, chr(65)=> -55, chr(79)=> -18, chr(97)=> -91, chr(99)=> -91, chr(101)=> -91, chr(105)=> -37, chr(111)=> -91, chr(114)=> -37, chr(115)=> -91, chr(117)=> -37, chr(119)=> -37, chr(121)=> -37, ), chr(86)=> array ( chr(44)=> -128, chr(46)=> -128, chr(58)=> -74, chr(65)=> -74, chr(97)=> -110, chr(101)=> -110, chr(105)=> -55, chr(111)=> -110, chr(114)=> -55, chr(117)=> -55, chr(121)=> -74, ), chr(87)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -55, chr(65)=> -74, chr(97)=> -74, chr(101)=> -74, chr(105)=> -37, chr(111)=> -74, chr(114)=> -74, chr(117)=> -55, chr(121)=> -55, ), chr(89)=> array ( chr(44)=> -91, chr(46)=> -74, chr(58)=> -91, chr(65)=> -74, chr(97)=> -91, chr(101)=> -110, chr(105)=> -55, chr(111)=> -110, chr(112)=> -74, chr(113)=> -110, chr(117)=> -91, chr(118)=> -91, ), chr(102)=> array ( chr(102)=> -18, chr(146)=> 55, ), chr(114)=> array ( chr(44)=> -55, chr(46)=> -55, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -37, chr(46)=> -37, ), chr(119)=> array ( chr(44)=> -37, chr(46)=> -37, ), chr(121)=> array ( chr(44)=> -37, chr(46)=> -37, ), chr(145)=> array ( chr(145)=> -74, ), chr(146)=> array ( chr(115)=> -74, chr(116)=> -37, chr(146)=> -74, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>653,'FontBBox'=>'[-169 -217 1010 883]');
$up=-100;
$ut=50;
$kerninfo=array ( chr(49)=> array ( chr(49)=> -74, ), chr(65)=> array ( chr(84)=> -37, chr(86)=> -49, chr(87)=> -37, chr(89)=> -55, chr(118)=> -55, chr(119)=> -55, chr(121)=> -55, chr(146)=> -37, ), chr(70)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -128, ), chr(76)=> array ( chr(84)=> -20, chr(86)=> -37, chr(87)=> -37, chr(89)=> -20, chr(121)=> -29, chr(146)=> -37, ), chr(80)=> array ( chr(44)=> -128, chr(46)=> -128, chr(65)=> -128, ), chr(82)=> array ( chr(84)=> 0, chr(86)=> -18, chr(87)=> -18, chr(89)=> -18, chr(121)=> -18, ), chr(84)=> array ( chr(44)=> -74, chr(46)=> -74, chr(58)=> -55, chr(65)=> -74, chr(79)=> -18, chr(97)=> -91, chr(99)=> -91, chr(101)=> -91, chr(105)=> -55, chr(111)=> -91, chr(114)=> -55, chr(115)=> -91, chr(117)=> -55, chr(119)=> -74, chr(121)=> -74, ), chr(86)=> array ( chr(44)=> -128, chr(46)=> -128, chr(58)=> -64, chr(65)=> -74, chr(79)=> -29, chr(97)=> -110, chr(101)=> -110, chr(105)=> -74, chr(111)=> -110, chr(114)=> -74, chr(117)=> -74, chr(121)=> -91, ), chr(87)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -64, chr(65)=> -69, chr(97)=> -91, chr(101)=> -91, chr(105)=> -55, chr(111)=> -91, chr(114)=> -55, chr(117)=> -55, chr(121)=> -91, ), chr(89)=> array ( chr(44)=> -91, chr(46)=> -91, chr(58)=> -64, chr(65)=> -69, chr(97)=> -91, chr(101)=> -91, chr(105)=> -74, chr(111)=> -91, chr(112)=> -91, chr(113)=> -110, chr(117)=> -91, chr(118)=> -91, ), chr(102)=> array ( chr(146)=> 91, ), chr(114)=> array ( chr(44)=> -110, chr(46)=> -110, chr(99)=> -37, chr(100)=> -37, chr(101)=> -37, chr(103)=> -37, chr(104)=> -18, chr(111)=> -37, chr(113)=> -37, chr(114)=> 0, chr(116)=> 0, chr(117)=> 0, chr(118)=> 0, chr(119)=> 0, chr(120)=> 0, chr(121)=> 0, chr(146)=> 37, ), chr(118)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(119)=> array ( chr(44)=> -74, chr(46)=> -74, ), chr(121)=> array ( chr(44)=> -55, chr(46)=> -55, ), chr(145)=> array ( chr(145)=> -110, ), chr(146)=> array ( chr(115)=> -128, chr(116)=> -110, chr(146)=> -110, ), );
?>

View File

@ -1,21 +0,0 @@
<?php
$cw=array(
chr(0)=>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);
$desc=array('FontBBox'=>'[-1 -143 981 820]');
$up=-100;
$ut=50;
?>

View File

@ -1,721 +0,0 @@
<?php
// mPDF 4.5.009
define("FF_USERFONT", 15); // See jpgraph_ttf.inc.php for font IDs
global $JpgUseSVGFormat;
$JpgUseSVGFormat = true;
//======================================================================================================
// DELETE OLD GRAPH FILES FIRST - Housekeeping
// First clear any files in directory that are >1 hrs old
$interval = 3600;
if ($handle = opendir(_MPDF_PATH.'graph_cache')) {
while (false !== ($file = readdir($handle))) {
if (((filemtime(_MPDF_PATH.'graph_cache/'.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) {
@unlink(_MPDF_PATH.'graph_cache/'.$file); // mPDF 4.0
}
}
closedir($handle);
}
//==============================================================================================================
// LOAD GRAPHS
include_once(_JPGRAPH_PATH.'jpgraph.php');
include_once(_JPGRAPH_PATH.'jpgraph_line.php' );
include_once(_JPGRAPH_PATH.'jpgraph_log.php' );
include_once(_JPGRAPH_PATH.'jpgraph_scatter.php' );
include_once(_JPGRAPH_PATH.'jpgraph_regstat.php' );
include_once(_JPGRAPH_PATH.'jpgraph_pie.php');
include_once(_JPGRAPH_PATH.'jpgraph_pie3d.php');
include_once(_JPGRAPH_PATH.'jpgraph_bar.php');
include_once(_JPGRAPH_PATH.'jpgraph_radar.php');
//======================================================================================================
//*****************************************************************************************************
//*****************************************************************************************************
//*****************************************************************************************************
//*****************************************************************************************************
//*****************************************************************************************************
//*****************************************************************************************************
//======================================================================================================
//======================================================================================================
//======================================================================================================
//======================================================================================================
//======================================================================================================
function print_graph($g,$pgwidth) {
$splines = false;
$bandw = false;
$percent = false;
$show_percent = false;
$stacked = false;
$h = false;
$show_values = false;
$hide_grid = false;
$hide_y_axis = false;
if (isset($g['attr']['TYPE']) && $g['attr']['TYPE']) { $type = strtolower($g['attr']['TYPE']); }
if (!in_array($type,array('bar','horiz_bar','line','radar','pie','pie3d','xy','scatter'))) { $type = 'bar'; } // Default=bar
if (isset($g['attr']['STACKED']) && $g['attr']['STACKED']) { $stacked = true; } // stacked for bar or horiz_bar
if (isset($g['attr']['SPLINES']) && $g['attr']['SPLINES'] && $type=='xy') { $splines = true; } // splines for XY line graphs
if (isset($g['attr']['BANDW']) && $g['attr']['BANDW']) { $bandw = true; } // black and white
if (isset($g['attr']['LEGEND-OVERLAP']) && $g['attr']['LEGEND-OVERLAP']) { $overlap = true; } // avoid overlap of Legends over graph (line, bar, horiz_bar only)
if (isset($g['attr']['PERCENT']) && $g['attr']['PERCENT'] && $type != 'xy' && $type != 'scatter') { $percent = true; } // Show data series as percent of total in series
if (isset($g['attr']['SHOW-VALUES']) && $g['attr']['SHOW-VALUES']) { $show_values = true; } // Show the individual data values
if (isset($g['attr']['HIDE-GRID']) && $g['attr']['HIDE-GRID']) { $hide_grid = true; } // Hide the y-axis gridlines
if (isset($g['attr']['HIDE-Y-AXIS']) && $g['attr']['HIDE-Y-AXIS']) { $hide_y_axis = true; } // Hide the y-axis
// Antialias: If true - better quality curves, but graph line will only be 1px even in PDF 300dpi
// default=true for most except line and radar
if (isset($g['attr']['ANTIALIAS']) && ($g['attr']['ANTIALIAS']=='' || $g['attr']['ANTIALIAS']==0)) { $antialias = false; }
else if (isset($g['attr']['ANTIALIAS']) && $g['attr']['ANTIALIAS'] > 0) { $antialias = true; }
else if ($type=='line' || $type=='radar') { $antialias = false; }
else { $antialias = true; }
if ($g['attr']['DPI']) { $dpi = intval($g['attr']['DPI']); }
if (!$dpi || $dpi < 50 || $dpi > 2400) { $dpi = 150; } // Default dpi 150
$k = (0.2645/25.4 * $dpi);
// mPDF 4.5.009
global $JpgUseSVGFormat;
if (isset($JpgUseSVGFormat) && $JpgUseSVGFormat) {
$img_type = 'svg';
$k = 1; // Overrides as Vector scale does not need DPI
}
else {
$img_type = 'png';
}
if (isset($g['attr']['TITLE']) && $g['attr']['TITLE']) { $title = $g['attr']['TITLE']; }
if (isset($g['attr']['LABEL-X']) && $g['attr']['LABEL-X']) { $xlabel = $g['attr']['LABEL-X']; } // NOT IMPLEMENTED??????
if (isset($g['attr']['LABEL-Y']) && $g['attr']['LABEL-Y']) { $ylabel = $g['attr']['LABEL-Y']; }
if (isset($g['attr']['AXIS-X']) && $g['attr']['AXIS-X']) { $xaxis = strtolower($g['attr']['AXIS-X']); }
if (!in_array($xaxis,array('text','lin','linear','log'))) { $xaxis = 'text'; } // Default=text
if ($xaxis == 'linear') { $xaxis = 'lin'; }
if (isset($g['attr']['AXIS-Y']) && $g['attr']['AXIS-Y']) { $yaxis = strtolower($g['attr']['AXIS-Y']); }
if (!in_array($yaxis,array('lin','linear','log','percent'))) { $yaxis = 'lin'; } // Default=lin
if ($yaxis == 'percent') { $show_percent = true; $yaxis = 'lin'; } // Show percent sign on scales
if ($yaxis == 'linear') { $yaxis = 'lin'; }
if ($splines) { $xaxis = 'lin'; }
$axes = $xaxis.$yaxis; // e.g.textlin, textlog, loglog, loglin, linlog (XY)
// mPDF 4.0
if (isset($g['attr']['cWIDTH']) && $g['attr']['cWIDTH']) { $w=($g['attr']['cWIDTH'] / 0.2645); } // pixels
if (isset($g['attr']['cHEIGHT']) && $g['attr']['cHEIGHT']) { $h=($g['attr']['cHEIGHT'] / 0.2645); }
if (isset($g['attr']['SERIES']) && strtolower($g['attr']['SERIES']) == 'rows') { $dataseries = 'rows'; }
else { $dataseries = 'cols'; }
// Defaults - define data
$rowbegin = 2;
$colbegin = 2;
if($type=='scatter' || $type=='xy') {
if ($dataseries == 'rows') { $rowbegin = 1; }
else { $colbegin = 1; }
}
$rowend = 0;
$colend = 0;
if (isset($g['attr']['DATA-ROW-BEGIN']) && ($g['attr']['DATA-ROW-BEGIN'] === '0' || $g['attr']['DATA-ROW-BEGIN'] > 0)) { $rowbegin = $g['attr']['DATA-ROW-BEGIN']; }
if (isset($g['attr']['DATA-COL-BEGIN']) && ($g['attr']['DATA-COL-BEGIN'] === '0' || $g['attr']['DATA-COL-BEGIN'] > 0)) { $colbegin = $g['attr']['DATA-COL-BEGIN']; }
if (isset($g['attr']['DATA-ROW-END']) && ($g['attr']['DATA-ROW-END'] === '0' || $g['attr']['DATA-ROW-END'] <> 0)) { $rowend = $g['attr']['DATA-ROW-END']; }
if (isset($g['attr']['DATA-COL-END']) && ($g['attr']['DATA-COL-END'] === '0' || $g['attr']['DATA-COL-END'] <> 0)) { $colend = $g['attr']['DATA-COL-END']; }
$nr = count($g['data']);
$nc = 0;
foreach($g['data'] AS $r) {
$cc=0;
foreach($r AS $c) { $cc++; }
$nc = max($nc,$cc);
}
if ($colend == 0) { $colend = $nc; }
else if ($colend < 0) { $colend = $nc+$colend; }
if ($rowend == 0) { $rowend = $nr; }
else if ($rowend < 0) { $rowend = $nr+$rowend; }
if ($colend < $colbegin) { $colend = $colbegin; }
if ($rowend < $rowbegin) { $rowend = $rowbegin; }
// if ($type == 'xy' || $type=='scatter') { $colstart=0; }
// Get Data + Totals
$data = array();
$totals = array();
for ($r=($rowbegin-1);$r<$rowend;$r++) {
for ($c=($colbegin-1);$c<$colend;$c++) {
if (isset($g['data'][$r][$c])) { $g['data'][$r][$c] = floatval($g['data'][$r][$c] ); }
else { $g['data'][$r][$c] = 0; }
if ($dataseries=='rows') {
$data[($r+1-$rowbegin)][($c+1-$colbegin)] = $g['data'][$r][$c] ;
$totals[($r+1-$rowbegin)] += $g['data'][$r][$c] ;
}
else {
$data[($c+1-$colbegin)][($r+1-$rowbegin)] = $g['data'][$r][$c] ;
if (isset($totals[($c+1-$colbegin)])) { $totals[($c+1-$colbegin)] += $g['data'][$r][$c] ; }
else { $totals[($c+1-$colbegin)] = $g['data'][$r][$c] ; }
}
}
}
// PERCENT
if ($percent && $type != 'pie' && $type != 'pie3d') {
for ($r=0;$r<count($data);$r++) {
for ($c=0;$c<count($data[$r]);$c++) {
$data[$r][$c] = $data[$r][$c]/$totals[$r] * 100;
}
}
}
// Get Legends and labels
$legends = array();
$labels = array();
$longestlegend = 0;
$longestlabel = 0;
if ($dataseries=='cols') {
if ($colbegin>1) {
for ($r=($rowbegin-1);$r<$rowend;$r++) {
$legends[($r+1-$rowbegin)] = $g['data'][$r][0] ;
$longestlegend = max($longestlegend, strlen( $g['data'][$r][0] ));
}
}
if ($rowbegin>1) {
for ($c=($colbegin-1);$c<$colend;$c++) {
$labels[($c+1-$colbegin)] = $g['data'][0][$c] ;
$longestlabel = max($longestlabel , strlen( $g['data'][0][$c] ));
}
}
}
else if ($dataseries=='rows') {
if ($colbegin>1) {
for ($r=($rowbegin-1);$r<$rowend;$r++) {
$labels[($r+1-$rowbegin)] = $g['data'][$r][0] ;
$longestlabel = max($longestlabel , strlen( $g['data'][$r][0] ));
}
}
if ($rowbegin>1) {
for ($c=($colbegin-1);$c<$colend;$c++) {
$legends[($c+1-$colbegin)] = $g['data'][0][$c] ;
$longestlegend = max($longestlegend, strlen( $g['data'][0][$c] ));
}
}
}
// Default sizes
$defsize = array();
$defsize['pie'] = array('w' => 600, 'h' => 300);
$defsize['pie3d'] = array('w' => 600, 'h' => 300);
$defsize['radar'] = array('w' => 600, 'h' => 300);
$defsize['line'] = array('w' => 600, 'h' => 400);
$defsize['xy'] = array('w' => 600, 'h' => 400);
$defsize['scatter'] = array('w' => 600, 'h' => 400);
$defsize['bar'] = array('w' => 600, 'h' => 400);
$defsize['horiz_bar'] = array('w' => 600, 'h' => 500);
// Use default ratios
if ($w && !$h) { $h = $w*$defsize[$type]['h']/$defsize[$type]['w']; }
if ($h && !$w) { $w = $h*$defsize[$type]['w']/$defsize[$type]['h']; }
if (!$h && !$w) { $w = $defsize[$type]['w']; $h = $defsize[$type]['h']; }
if (count($data)>0 && $type) {
$figure_file = "graph_cache/".rand(11111,999999999).".".$img_type;
if ($bandw) { $colours = array('snow1','black','snow4','snow3','snow2','cadetblue4','cadetblue3','cadetblue1','bisque4','bisque2','beige'); }
else { $colours = array('cyan','darkorchid4','cadetblue3','khaki1','darkolivegreen2','cadetblue4','coral','cyan4','rosybrown3','wheat1'); }
$fills = array('navy','orange','red','yellow','purple','navy','orange','red','yellow','purple');
$patterns = array(PATTERN_DIAG1,PATTERN_CROSS1,PATTERN_STRIPE1,PATTERN_DIAG3,PATTERN_CROSS2,PATTERN_DIAG2,PATTERN_DIAG4,PATTERN_CROSS3, PATTERN_CROSS4,PATTERN_STRIPE1);
$markers = array(MARK_DIAMOND, MARK_SQUARE, MARK_CIRCLE, MARK_UTRIANGLE, MARK_DTRIANGLE, MARK_FILLEDCIRCLE, MARK_CROSS, MARK_STAR, MARK_X);
// LEGENDS
if ($type == 'pie' || $type == 'pie3d') {
$graph = new PieGraph (($w*$k),($h*$k));
}
else if ($type == 'radar') {
$graph = new RadarGraph(($w*$k),($h*$k));
}
else {
$graph = new Graph(($w*$k),($h*$k));
}
// mPDF 4.5.009
// $graph->img->SetImgFormat($img_type) ;
// if (strtoupper($img_type)=='JPEG') { $graph->img->SetQuality(90); }
if ($antialias) { $graph->img->SetAntiAliasing(); }
$graph->SetShadow(true, 2*$k);
$graph->SetMarginColor("white");
// TITLE
$graph->title->Set($title);
$graph->title->SetMargin(10*$k);
$graph->title->SetFont(FF_USERFONT,FS_BOLD,11*$k);
$graph->title->SetColor("black");
$graph->legend->SetLineSpacing(3*$k);
$graph->legend->SetMarkAbsSize(6*$k);
$graph->legend->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
// Set GRAPH IMAGE MARGINS
if ($type == 'pie' || $type == 'pie3d') {
$psize = 0.3;
$pposxabs = ($w/2);
$pposy = 0.55;
if ($longestlegend) { // if legend showing
$pposxabs -= ((($longestlegend * 5) + 20) / 2);
}
$pposx = ($pposxabs / $w);
$graph->legend->Pos(0.02,0.5,'right','center');
}
else if ($type == 'radar') {
$psize = 0.5;
$pposxabs = ($w/2);
$pposy = 0.55;
if ($longestlabel) { // if legend showing
$pposxabs -= ((($longestlabel * 5) + 20) / 2);
}
$pposx = ($pposxabs / $w);
$graph->legend->Pos(0.02,0.5,'right','center');
}
else if ($type == 'xy' || $type == 'scatter') {
$pml = 50;
$pmr = 20;
$pmt = 60;
$pmb = 50;
$xaxislblmargin = $pmb - 30;
$yaxislblmargin = $pml - 15;
$graph->legend->Pos(0.02,0.1,'right','top');
}
else if ($type == 'line' || $type == 'bar') {
$pml = 50;
$pmr = 20;
$pmt = 60;
$pmb = 50;
$xlangle = 0;
$ll = ($longestlegend * 5); // 45 degrees 8pt fontsize
if ($ll > 5 || ($ll>3 && count($data)>10)) {
$pmb = max($pmb, $ll + 30);
$xlangle = 50;
}
$xaxislblmargin = $pmb - 30;
$yaxislblmargin = $pml - 15;
if ($longestlabel && !$overlap) { // if legend showing
$pmr = ((($longestlabel * 5) + 40));
}
$graph->legend->Pos(0.02,0.1,'right','top');
}
else if ($type == 'horiz_bar') {
$pml = 50;
$pmr = 20;
$pmt = 50;
$pmb = 45;
$ll = ($longestlegend * 6.5); // 8pt fontsize
$pml = max($pml, $ll + 20);
$xaxislblmargin = $pml - 20;
$yaxislblmargin = $pmb - 15;
if ($longestlabel && !$overlap) { // if legend showing
$pmr = ((($longestlabel * 5) + 40));
}
$graph->legend->Pos(0.02,0.1,'right','top');
}
// DRAW THE GRAPHS
if ($type == 'pie') {
$p1 = new PiePlot($data[0]);
$p1->SetSliceColors($colours);
if ($show_values) {
$p1->value->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
if ($percent) { $p1->SetLabelType(PIE_VALUE_PERADJ); } //PIE_VAL_PER = default
else { $p1->SetLabelType(PIE_VALUE_ABS); }
if ($percent || $show_percent) { $p1->value->SetFormat("%d%%"); }
else { $p1->value->SetFormat("%s"); }
// Enable and set policy for guide-lines. Make labels line up vertically
$p1->SetGuideLines(true);
$p1->SetGuideLinesAdjust(1.5);
}
else { $p1->value->Show(false); }
$p1->SetLegends($legends);
$p1->SetSize($psize);
$p1->SetCenter($pposx, $pposy);
if ($labels[0]) {
$graph->subtitle->Set($labels[0]);
$graph->subtitle->SetMargin(10*$k);
$graph->subtitle->SetFont(FF_USERFONT,FS_BOLD,11*$k);
$graph->subtitle->SetColor("black");
}
$graph->Add($p1);
}
else if ($type == 'pie3d') {
$p1 = new PiePlot3d($data[0]);
$p1->SetSliceColors($colours);
if ($show_values) {
$p1->value->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
if ($percent) { $p1->SetLabelType(PIE_VALUE_PERADJ); } //PIE_VAL_PER = default
else { $p1->SetLabelType(PIE_VALUE_ABS); }
if ($percent || $show_percent) { $p1->value->SetFormat("%d%%"); }
else { $p1->value->SetFormat("%s"); }
}
else { $p1->value->Show(false); }
$p1->SetLegends($legends);
$p1->SetEdge();
$p1->SetSize($psize);
$p1->SetCenter($pposx, $pposy);
if ($labels[0]) {
$graph->subtitle->Set($labels[0]);
$graph->subtitle->SetMargin(10*$k);
$graph->subtitle->SetFont(FF_USERFONT,FS_BOLD,11*$k);
$graph->subtitle->SetColor("black");
}
$graph->Add( $p1);
}
// RADAR
else if ($type == 'radar') {
$graph->SetSize($psize);
$graph->SetPos($pposx, $pposy);
$graph->SetTitles( $legends); // labels each axis
$graph->axis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->axis->title->SetMargin(5*$k);
$graph->axis->SetWeight(1*$k);
$graph->axis->HideLabels();
$graph->axis->SetFont(FF_USERFONT,FS_NORMAL,6*$k);
$graph->HideTickMarks();
$group = array();
foreach($data AS $series => $dat) {
$rdata = array();
foreach($data[$series] AS $row) { $rdata[] = $row; }
if (count($rdata)<3) { die("ERROR::Graph::Cannot create a Radar Plot with less than 3 data points."); }
// Create the radar plot
$bplot = new RadarPlot($rdata);
$bplot->mark->SetType($markers[$series]);
$bplot->mark->SetFillColor($colours[$series]);
$bplot->mark->SetWidth(3*$k);
$bplot->SetColor($colours[$series]);
if ($series == 0) { $bplot->SetFillColor('lightred'); }
else { $bplot->SetFill(false); }
$bplot->SetLineWeight(1*$k);
$bplot->SetLegend($labels[$series]);
if ($bandw) { $bplot->SetShadow("gray5"); }
$graph->Add($bplot);
}
}
// LINE
else if ($type == 'line') {
// Setup the graph.
$graph->img->SetMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k); // LRTB
$graph->SetScale($axes);
$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
if ($ylabel) {
$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->yaxis->SetTitle($ylabel,'middle');
$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
}
$graph->yaxis->SetLabelMargin(4*$k);
if ($percent || $show_percent) { $graph->yaxis->SetLabelFormat('%d%%'); } // Percent
// Show 0 label on Y-axis (default is not to show)
$graph->yscale->ticks->SupressZeroLabel(true);
if ($hide_y_axis) { $graph->yaxis->Hide(); }
if ($hide_grid) { $graph->ygrid->Show(false); }
// Setup X-axis labels
$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->SetTickLabels($legends);
$graph->xaxis->SetLabelAngle($xlangle);
$graph->xaxis->SetLabelMargin(4*$k);
// X-axis title
if ($xlabel) {
$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->SetTitle($xlabel,'middle');
$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
}
foreach($data AS $series => $rdata) {
$bplot = new LinePlot($rdata);
$bplot->mark->SetType($markers[$series]);
$bplot->mark->SetFillColor($colours[$series]);
$bplot->mark->SetWidth(4*$k);
if ($show_values) {
$bplot->value-> Show(); // Not if scatter
$bplot->value->SetMargin(6*$k);
$bplot->value->SetColor("darkred");
$bplot->value->SetFont( FF_USERFONT, FS_NORMAL, 8*$k);
if ($percent || $show_percent) { $bplot->value->SetFormat( '%d%%'); }
else { $bplot->value->SetFormat("%s"); }
}
// Set color for each line
$bplot->SetColor($colours[$series]);
$bplot->SetWeight(2*$k);
$bplot->SetLegend($labels[$series]);
if ($bandw) { $bplot->SetShadow("gray5"); }
// Indent the X-scale so the first and last point doesn't fall on the edges
$bplot->SetCenter();
$graph->Add($bplot);
}
}
// XY or SCATTER
else if ($type == 'xy' || $type == 'scatter') {
// Setup the graph.
$graph->img->SetMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k); // LRTB
$graph->SetScale($axes);
// Setup font for axis
$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
// Y-axis title
if ($labels[1]) {
$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
$graph->yaxis->SetTitle($labels[1],'middle');
}
$graph->yaxis->SetLabelMargin(4*$k);
if ($percent || $show_percent) { $graph->yaxis->SetLabelFormat('%d%%'); } // Percent
// Show 0 label on Y-axis (default is not to show)
$graph->yscale->ticks->SupressZeroLabel(true);
// Just let the maximum be autoscaled
$graph->yaxis->scale->SetAutoMin(0);
if ($hide_y_axis) { $graph->yaxis->Hide(); }
if ($hide_grid) { $graph->ygrid->Show(false); }
// Setup X-axis labels
$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
// mPDF 2.5 Corrects labelling of x-axis
// $graph->xaxis->SetTickLabels($legends);
$graph->xaxis->SetLabelAngle(50);
$graph->xaxis->SetLabelMargin(4*$k);
// X-axis title
if ($labels[0]) {
$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
$graph->xaxis->SetTitle($labels[0],'middle');
}
// Create the bar plot
// SPLINES
if ($splines && $type=='xy') {
$spline = new Spline($data[0],$data[1]);
list($newx,$newy) = $spline->Get(100);
}
else {
$newx = $data[0];
$newy = $data[1];
}
if ($type=='xy') {
// LINE PLOT
$bplot = new LinePlot($newy, $newx);
// Set color for each line
$bplot->SetColor($fills[0]);
$bplot->SetWeight(4*$k);
if ($bandw) { $bplot->SetShadow("gray5"); }
$graph->Add($bplot);
}
// SCATTER PLOT
$cplot = new ScatterPlot($data[1], $data[0]);
$cplot->mark->SetType($markers[0]);
$cplot->mark->SetFillColor($fills[0]);
$cplot->mark->SetWidth(8*$k);
if ($show_values) {
// mPDF 2.5
if ($type=='xy') { $cplot->value->Show(); } // Not if scatter
$cplot->value->SetMargin(8*$k);
$cplot->value->SetColor("darkred");
$cplot->value->SetFont( FF_USERFONT, FS_NORMAL, 6*$k);
if ($percent || $show_percent) { $cplot->value->SetFormat( '%d%%'); }
else { $cplot->value->SetFormat("%s"); }
}
// Set color for each line
$cplot->SetColor($fills[0]);
$cplot->SetWeight(4*$k);
if ($bandw) { $cplot->SetShadow("gray5"); }
$graph->Add($cplot);
}
// BAR
else if ($type == 'bar') {
// Setup the graph.
$graph->img->SetMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k); // LRTB
$graph->SetScale($axes);
// Setup y-axis
$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
if ($hide_y_axis) { $graph->yaxis->Hide(); }
if ($hide_grid) { $graph->ygrid->Show(false); }
$graph->yaxis->SetLabelMargin(4*$k);
if ($ylabel) {
$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->yaxis->SetTitle($ylabel,'middle');
$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
}
// Show 0 label on Y-axis (default is not to show)
$graph->yscale->ticks->SupressZeroLabel(false);
// Setup X-axis labels
$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->SetTickLabels($legends);
$graph->xaxis->SetLabelAngle($xlangle);
$graph->xaxis->SetLabelMargin(4*$k);
// X-axis title
if ($xlabel) {
$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->SetTitle($xlabel,'middle');
$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
}
$group = array();
foreach($data AS $series => $dat) {
$rdata = array();
foreach($data[$series] AS $row) { $rdata[] = $row; }
// Create the bar plot
$bplot = new BarPlot($rdata);
$bplot->SetWidth(0.6); // for SINGLE??
// Setup color for gradient fill style
if ($bandw) { $bplot->SetPattern( $patterns[$series]); }
else { $bplot->SetFillGradient($fills[$series],"#EEEEEE",GRAD_LEFT_REFLECTION); }
// Set color for the frame of each bar
$bplot->SetColor("darkgray");
$bplot->SetLegend($labels[$series]);
if ($bandw) { $bplot->SetShadow("gray5"); }
if ($show_values) {
$bplot->value->Show();
$bplot->value->SetMargin(6*$k);
$bplot->value->SetColor("darkred");
$bplot->value->SetFont( FF_USERFONT, FS_NORMAL, 8*$k);
if ($percent || $show_percent) { $bplot->value->SetFormat( '%d%%'); }
else { $bplot->value->SetFormat("%s"); }
}
$group[] = $bplot;
}
if (count($data)==1) {
$graph->Add($group[0]);
}
else {
// Create the grouped bar plot
if ($stacked) {
$gbplot = new AccBarPlot ($group);
}
else {
$gbplot = new GroupBarPlot ($group);
}
$graph->Add($gbplot);
}
}
else if ($type == 'horiz_bar') {
$graph->SetScale($axes);
$graph->Set90AndMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k); // LRTB
// Setup y-axis
$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->yaxis->SetLabelMargin(4*$k);
$graph->yaxis->SetPos('max'); // Intersect at top of x-axis i.e. y axis is at bottom
// First make the labels look right
$graph->yaxis->SetLabelAlign('center','top');
if ($percent || $show_percent) { $graph->yaxis->SetLabelFormat('%d%%'); }
$graph->yaxis->SetLabelSide(SIDE_RIGHT);
$graph->yaxis->scale->SetGrace(10); // sets 10% headroom
if ($hide_y_axis) { $graph->yaxis->Hide(); }
if ($hide_grid) { $graph->ygrid->Show(false); }
// The fix the tick marks
$graph->yaxis->SetTickSide(SIDE_LEFT);
if ($ylabel) {
$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->yaxis->SetTitle($ylabel,'middle');
$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
// Finally setup the title
$graph->yaxis->SetTitleSide(SIDE_RIGHT);
// To align the title to the right use :
$graph->yaxis->title->Align('right');
$graph->yaxis->title->SetAngle(0);
}
// Show 0 label on Y-axis (default is not to show)
$graph->yscale->ticks->SupressZeroLabel(false);
// Setup X-axis labels
$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->title->SetAngle(90);
$graph->xaxis->SetTickLabels($legends);
$graph->xaxis->SetLabelMargin(4*$k);
// X-axis title
if ($xlabel) {
$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
$graph->xaxis->SetTitle($xlabel,'middle');
}
$group = array();
foreach($data AS $series => $dat) {
$rdata = array();
foreach($data[$series] AS $row) { $rdata[] = $row; }
// Create the bar pot
$bplot = new BarPlot($rdata);
$bplot->SetWidth(0.6); // for SINGLE??
// Setup color for gradient fill style
if ($bandw) { $bplot->SetPattern( $patterns[$series]); }
else { $bplot->SetFillGradient($fills[$series],"#EEEEEE",GRAD_LEFT_REFLECTION); }
// Set color for the frame of each bar
$bplot->SetColor("darkgray");
$bplot->SetLegend($labels[$series]);
if ($bandw) { $bplot->SetShadow("gray5"); }
if ($show_values) {
$bplot->value-> Show();
$bplot->value->SetMargin(6*$k);
$bplot->value->SetColor("darkred");
$bplot->value->SetFont( FF_USERFONT, FS_NORMAL, 8*$k);
if ($percent || $show_percent) { $bplot->value->SetFormat( '%d%%'); }
else { $bplot->value->SetFormat("%s"); }
}
$group[] = $bplot;
}
if (count($data)==1) {
$graph->Add($group[0]);
}
else {
// Create the grouped bar plot
if ($stacked) {
$gbplot = new AccBarPlot ($group);
}
else {
$gbplot = new GroupBarPlot ($group);
}
$graph->Add($gbplot);
}
}
if ($graph) {
$graph->Stroke( _MPDF_PATH.$figure_file);
$srcpath = str_replace("\\","/",dirname(__FILE__)) . "/";
$srcpath .= $figure_file;
return array('file'=>$srcpath, 'w'=>$w, 'h'=>$h);
}
}
return false;
}
//======================================================================================================
//======================================================================================================
//======================================================================================================
//======================================================================================================
?>

View File

@ -1,2 +0,0 @@
This is just a placeholder file so that the folder is created on install.
It can be deleted once installed.

View File

@ -1,101 +0,0 @@
<?php
// mPDF 2.5
// BIG 5
$cw = array(
32 => 250, 33 => 250, 34 => 408, 35 => 668, 36 => 490, 37 => 875, 38 => 698, 39 => 250, 40 => 240, 41 => 240,
42 => 417, 43 => 667, 44 => 250, 45 => 313, 46 => 250, 47 => 520, 48 => 500, 49 => 500, 50 => 500, 51 => 500,
52 => 500, 53 => 500, 54 => 500, 55 => 500, 56 => 500, 57 => 500, 58 => 250, 59 => 250, 60 => 667, 61 => 667,
62 => 667, 63 => 396, 64 => 921, 65 => 677, 66 => 615, 67 => 719, 68 => 760, 69 => 625, 70 => 552, 71 => 771,
72 => 802, 73 => 354, 74 => 354, 75 => 781, 76 => 604, 77 => 927, 78 => 750, 79 => 823, 80 => 563, 81 => 823,
82 => 729, 83 => 542, 84 => 698, 85 => 771, 86 => 729, 87 => 948, 88 => 771, 89 => 677, 90 => 635, 91 => 344,
92 => 520, 93 => 344, 94 => 469, 95 => 500, 96 => 250, 97 => 469, 98 => 521, 99 => 427, 100 => 521, 101 => 438,
102 => 271, 103 => 469, 104 => 531, 105 => 250, 106 => 250, 107 => 458, 108 => 240, 109 => 802, 110 => 531, 111 => 500,
112 => 521, 113 => 521, 114 => 365, 115 => 333, 116 => 292, 117 => 521, 118 => 458, 119 => 677, 120 => 479, 121 => 458,
122 => 427, 123 => 480, 124 => 496, 125 => 480, 126 => 667,
17601 => 500,
);
$this->Big5_widths=$cw;
// GB
$cw = array(
32 => 207, 33 => 270, 34 => 342, 35 => 467, 36 => 462, 37 => 797, 38 => 710, 39 => 239, 40 => 374, 41 => 374,
42 => 423, 43 => 605, 44 => 238, 45 => 375, 46 => 238, 47 => 334, 48 => 462, 49 => 462, 50 => 462, 51 => 462,
52 => 462, 53 => 462, 54 => 462, 55 => 462, 56 => 462, 57 => 462, 58 => 238, 59 => 238, 60 => 605, 61 => 605,
62 => 605, 63 => 344, 64 => 748, 65 => 684, 66 => 560, 67 => 695, 68 => 739, 69 => 563, 70 => 511, 71 => 729,
72 => 793, 73 => 318, 74 => 312, 75 => 666, 76 => 526, 77 => 896, 78 => 758, 79 => 772, 80 => 544, 81 => 772,
82 => 628, 83 => 465, 84 => 607, 85 => 753, 86 => 711, 87 => 972, 88 => 647, 89 => 620, 90 => 607, 91 => 374,
92 => 333, 93 => 374, 94 => 606, 95 => 500, 96 => 239, 97 => 417, 98 => 503, 99 => 427, 100 => 529, 101 => 415,
102 => 264, 103 => 444, 104 => 518, 105 => 241, 106 => 230, 107 => 495, 108 => 228, 109 => 793, 110 => 527, 111 => 524,
112 => 524, 113 => 504, 114 => 338, 115 => 336, 116 => 277, 117 => 517, 118 => 450, 119 => 652, 120 => 466, 121 => 452,
122 => 407, 123 => 370, 124 => 258, 125 => 370, 126 => 605,
);
$this->GB_widths=$cw;
// Japanese
$cw = array(
32 => 278, 33 => 299, 34 => 353, 35 => 614, 36 => 614, 37 => 721, 38 => 735, 39 => 216, 40 => 323, 41 => 323,
42 => 449, 43 => 529, 44 => 219, 45 => 306, 46 => 219, 47 => 453, 48 => 614, 49 => 614, 50 => 614, 51 => 614,
52 => 614, 53 => 614, 54 => 614, 55 => 614, 56 => 614, 57 => 614, 58 => 219, 59 => 219, 60 => 529, 61 => 529,
62 => 529, 63 => 486, 64 => 744, 65 => 646, 66 => 604, 67 => 617, 68 => 681, 69 => 567, 70 => 537, 71 => 647,
72 => 738, 73 => 320, 74 => 433, 75 => 637, 76 => 566, 77 => 904, 78 => 710, 79 => 716, 80 => 605, 81 => 716,
82 => 623, 83 => 517, 84 => 601, 85 => 690, 86 => 668, 87 => 990, 88 => 681, 89 => 634, 90 => 578, 91 => 316,
92 => 614, 93 => 316, 94 => 529, 95 => 500, 96 => 387, 97 => 509, 98 => 566, 99 => 478, 100 => 565, 101 => 503,
102 => 337, 103 => 549, 104 => 580, 105 => 275, 106 => 266, 107 => 544, 108 => 276, 109 => 854, 110 => 579, 111 => 550,
112 => 578, 113 => 566, 114 => 410, 115 => 444, 116 => 340, 117 => 575, 118 => 512, 119 => 760, 120 => 503, 121 => 529,
122 => 453, 123 => 326, 124 => 380, 125 => 326, 126 => 387, 127 => 216, 128 => 453, 129 => 216, 130 => 380, 131 => 529,
132 => 299, 133 => 614, 134 => 614, 135 => 265, 136 => 614, 137 => 475, 138 => 614, 139 => 353, 140 => 451, 141 => 291,
142 => 291, 143 => 588, 144 => 589, 145 => 500, 146 => 476, 147 => 476, 148 => 219, 149 => 494, 150 => 452, 151 => 216,
152 => 353, 153 => 353, 154 => 451, 156 => 1075, 157 => 486, 158 => 387, 159 => 387, 160 => 387, 161 => 387,
162 => 387, 163 => 387, 164 => 387, 165 => 387, 166 => 387, 167 => 387, 168 => 387, 170 => 880, 171 => 448,
172 => 566, 173 => 716, 174 => 903, 175 => 460, 176 => 805, 177 => 275, 178 => 276, 179 => 550, 180 => 886, 181 => 582,
182 => 529, 183 => 738, 184 => 529, 185 => 738, 186 => 357, 187 => 529, 188 => 406, 189 => 406, 190 => 575, 191 => 406,
192 => 934, 193 => 934, 194 => 934, 195 => 646, 196 => 646, 197 => 646, 198 => 646, 199 => 646, 200 => 646, 201 => 617,
202 => 567, 203 => 567, 204 => 567, 205 => 567, 206 => 320, 207 => 320, 208 => 320, 209 => 320, 210 => 681, 211 => 710,
212 => 716, 213 => 716, 214 => 716, 215 => 716, 216 => 716, 217 => 529, 218 => 690, 219 => 690, 220 => 690, 221 => 690,
222 => 634, 223 => 605, 224 => 509, 225 => 509, 226 => 509, 227 => 509, 228 => 509, 229 => 509, 230 => 478, 231 => 503,
232 => 503, 233 => 503, 234 => 503, 235 => 275, 236 => 275, 237 => 275, 238 => 275, 239 => 550, 240 => 579, 241 => 550,
242 => 550, 243 => 550, 244 => 550, 245 => 550, 246 => 529, 247 => 575, 248 => 575, 249 => 575, 250 => 575, 251 => 529,
252 => 578, 253 => 529, 254 => 517, 255 => 634, 256 => 578, 257 => 445, 258 => 444, 259 => 842, 260 => 453, 261 => 614,
);
$_cr = array(
array(231, 632, 500), // half-width
array(8718, 8718, 500),
array(9738, 9757, 250), // quarter-width
array(9758, 9778, 333), // third-width
array(12063, 12087, 500),
);
foreach($_cr as $_r) {
for($i = $_r[0]; $i <= $_r[1]; $i++) {
$cw[$i+31] = $_r[2];
}
}
$this->SJIS_widths=$cw;
// Korean
$cw = array(
32 => 333, 33 => 416, 34 => 416, 35 => 833, 36 => 625, 37 => 916, 38 => 833, 39 => 250, 40 => 500, 41 => 500,
42 => 500, 43 => 833, 44 => 291, 45 => 450, 46 => 291, 47 => 375, 48 => 625, 49 => 625, 50 => 625, 51 => 625,
52 => 625, 53 => 625, 54 => 625, 55 => 625, 56 => 625, 57 => 625, 58 => 333, 59 => 333, 60 => 833, 61 => 833,
62 => 916, 63 => 500, 64 => 1000, 65 => 791, 66 => 708, 67 => 708, 68 => 750, 69 => 708, 70 => 666, 71 => 750,
72 => 791, 73 => 375, 74 => 500, 75 => 791, 76 => 666, 77 => 916, 78 => 791, 79 => 750, 80 => 666, 81 => 750,
82 => 708, 83 => 666, 84 => 791, 85 => 791, 86 => 750, 87 => 1000, 88 => 708, 89 => 708, 90 => 666, 91 => 500,
92 => 375, 93 => 500, 94 => 500, 95 => 500, 96 => 333, 97 => 541, 98 => 583, 99 => 541, 100 => 583, 101 => 583,
102 => 375, 103 => 583, 104 => 583, 105 => 291, 106 => 333, 107 => 583, 108 => 291, 109 => 875, 110 => 583, 111 => 583,
112 => 583, 113 => 583, 114 => 458, 115 => 541, 116 => 375, 117 => 583, 118 => 583, 119 => 833, 120 => 625, 121 => 625,
122 => 500, 123 => 583, 124 => 583, 125 => 583, 126 => 750,
);
$_cr = array(
array(8094, 8190, 500)
);
foreach($_cr as $_r) {
for($i = $_r[0]; $i <= $_r[1]; $i++) {
$cw[$i+31] = $_r[2];
}
}
$this->UHC_widths=$cw;
?>

View File

@ -1,152 +0,0 @@
<?php
// mPDF 5.7
// Replace a section of an array with the elements in reverse
function array_splice_reverse(&$arr, $offset, $length) {
$tmp = (array_reverse(array_slice($arr, $offset, $length)));
array_splice($arr, $offset, $length, $tmp);
}
// mPDF 5.6.23
function array_insert(&$array, $value, $offset) {
if (is_array($array)) {
$array = array_values($array);
$offset = intval($offset);
if ($offset < 0 || $offset >= count($array)) { array_push($array, $value); }
else if ($offset == 0) { array_unshift($array, $value); }
else {
$temp = array_slice($array, 0, $offset);
array_push($temp, $value);
$array = array_slice($array, $offset);
$array = array_merge($temp, $array);
}
}
else { $array = array($value); }
return count($array);
}
function urlencode_part($url) { // mPDF 5.6.02
if (!preg_match('/^[a-z]+:\/\//i',$url)) { return $url; }
$file=$url;
$query='';
if (preg_match('/[?]/',$url)) {
$bits = preg_split('/[?]/',$url,2);
$file=$bits[0];
$query='?'.$bits[1];
}
$file = str_replace(array(" ","!","$","&","'","(",")","*","+",",",";","="),array("%20","%21","%24","%26","%27","%28","%29","%2A","%2B","%2C","%3B","%3D"),$file);
return $file.$query;
}
function _strspn($str1, $str2, $start=null, $length=null) {
$numargs = func_num_args();
if ($numargs == 2) {
return strspn($str1, $str2);
}
else if ($numargs == 3) {
return strspn($str1, $str2, $start);
}
else {
return strspn($str1, $str2, $start, $length);
}
}
function _strcspn($str1, $str2, $start=null, $length=null) {
$numargs = func_num_args();
if ($numargs == 2) {
return strcspn($str1, $str2);
}
else if ($numargs == 3) {
return strcspn($str1, $str2, $start);
}
else {
return strcspn($str1, $str2, $start, $length);
}
}
function _fgets (&$h, $force=false) {
$startpos = ftell($h);
$s = fgets($h, 1024);
if ($force && preg_match("/^([^\r\n]*[\r\n]{1,2})(.)/",trim($s), $ns)) {
$s = $ns[1];
fseek($h,$startpos+strlen($s));
}
return $s;
}
// For PHP4 compatability
if(!function_exists('str_ireplace')) {
function str_ireplace($search,$replace,$subject) {
$search = preg_quote($search, "/");
return preg_replace("/".$search."/i", $replace, $subject);
}
}
if(!function_exists('htmlspecialchars_decode')) {
function htmlspecialchars_decode ($str) {
return strtr($str, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
}
}
function PreparePreText($text,$ff='//FF//') {
$text = htmlspecialchars($text);
if ($ff) { $text = str_replace($ff,'</pre><formfeed /><pre>',$text); }
return ('<pre>'.$text.'</pre>');
}
if(!function_exists('strcode2utf')){
function strcode2utf($str,$lo=true) {
//converts all the &#nnn; and &#xhhh; in a string to Unicode
// mPDF 5.7
if ($lo) {
$str = preg_replace_callback('/\&\#([0-9]+)\;/m', 'code2utf_lo_callback', $str);
$str = preg_replace_callback('/\&\#x([0-9a-fA-F]+)\;/m', 'codeHex2utf_lo_callback', $str);
}
else {
$str = preg_replace_callback('/\&\#([0-9]+)\;/m', 'code2utf_callback', $str);
$str = preg_replace_callback('/\&\#x([0-9a-fA-F]+)\;/m', 'codeHex2utf_callback', $str);
}
return $str;
}
}
function code2utf_callback($matches) {
return code2utf($matches[1], 0);
}
function code2utf_lo_callback($matches) {
return code2utf($matches[1], 1);
}
function codeHex2utf_callback($matches) {
return codeHex2utf($matches[1], 0);
}
function codeHex2utf_lo_callback($matches) {
return codeHex2utf($matches[1], 1);
}
if(!function_exists('code2utf')){
function code2utf($num,$lo=true){
//Returns the utf string corresponding to the unicode value
if ($num<128) {
if ($lo) return chr($num);
else return '&#'.$num.';';
}
if ($num<2048) return chr(($num>>6)+192).chr(($num&63)+128);
if ($num<65536) return chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128);
if ($num<2097152) return chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128) .chr(($num&63)+128);
return '?';
}
}
if(!function_exists('codeHex2utf')){
function codeHex2utf($hex,$lo=true){
$num = hexdec($hex);
if (($num<128) && !$lo) return '&#x'.$hex.';';
return code2utf($num,$lo);
}
}
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,394 +0,0 @@
<?php
$volt = array (
0 =>
array (
'match' => '0BCD 200D',
'replace' => '014B',
),
1 =>
array (
'match' => '0BCD 200C',
'replace' => 'E002',
),
2 =>
array (
'match' => '200D 0BCD',
'replace' => '014A',
),
3 =>
array (
'match' => '0B95 0BCD 0BB7',
'replace' => 'E005',
),
4 =>
array (
'match' => '0BB8 0BCD 0BB0 0BC0',
'replace' => 'E04B',
),
5 =>
array (
'match' => '0B93 0BAE 0BCD',
'replace' => 'E04C',
),
6 =>
array (
'match' => '(0BB8) 0BC1',
'replace' => '\\1 E00C',
),
7 =>
array (
'match' => '(0BB8) 0BC2',
'replace' => '\\1 E00D',
),
8 =>
array (
'match' => '0B95 0BC2',
'replace' => 'E00F',
),
9 =>
array (
'match' => '0B9C 0BC1',
'replace' => 'E014',
),
10 =>
array (
'match' => '0B9C 0BC2',
'replace' => 'E015',
),
11 =>
array (
'match' => '0B9F 0BBF',
'replace' => 'E018',
),
12 =>
array (
'match' => '0BB2 0BBF',
'replace' => 'E033',
),
13 =>
array (
'match' => '0BB7 0BBF',
'replace' => 'E03F',
),
14 =>
array (
'match' => '0BB7 0BC1',
'replace' => 'E041',
),
15 =>
array (
'match' => '0BB7 0BC2',
'replace' => 'E042',
),
16 =>
array (
'match' => '0BB8 0BBF',
'replace' => 'E043',
),
17 =>
array (
'match' => '0BB9 0BC1',
'replace' => 'E045',
),
18 =>
array (
'match' => '0BB9 0BC2',
'replace' => 'E046',
),
19 =>
array (
'match' => 'E005 0BBF',
'replace' => 'E047',
),
20 =>
array (
'match' => 'E005 0BC1',
'replace' => 'E049',
),
21 =>
array (
'match' => 'E005 0BC2',
'replace' => 'E04A',
),
22 =>
array (
'match' => '((0BAA|0BAF|0B99|0BB5)) 0BC0',
'replace' => '\\1 E00B',
),
23 =>
array (
'match' => '((0BAE|0B9A|0BB9|0B9C|0BB4|0BB1)) 0BBF',
'replace' => '\\1 E006',
),
24 =>
array (
'match' => '((0BB0|0BB3|0BA3|0BA9)) 0BBF',
'replace' => '\\1 E007',
),
25 =>
array (
'match' => '((0B95|0BA4)) 0BBF',
'replace' => '\\1 E008',
),
26 =>
array (
'match' => '((0BAA|0BAF|0B99|0BB5)) 0BBF',
'replace' => '\\1 E009',
),
27 =>
array (
'match' => '((0BA8|0B9E)) 0BBF',
'replace' => '\\1 E00A',
),
28 =>
array (
'match' => '0BA3 200C 0BC8',
'replace' => 'E01F',
),
29 =>
array (
'match' => '0BA9 200C 0BC8',
'replace' => 'E027',
),
30 =>
array (
'match' => '0BB2 200C 0BC8',
'replace' => 'E037',
),
31 =>
array (
'match' => '0BB3 200C 0BC8',
'replace' => 'E03A',
),
32 =>
array (
'match' => '0B9F 0BC0',
'replace' => 'E019',
),
33 =>
array (
'match' => '0BB2 0BC0',
'replace' => 'E034',
),
34 =>
array (
'match' => '0BB7 0BC0',
'replace' => 'E040',
),
35 =>
array (
'match' => '0BB8 0BC0',
'replace' => 'E044',
),
36 =>
array (
'match' => 'E005 0BC0',
'replace' => 'E048',
),
37 =>
array (
'match' => '0B95 0BC1',
'replace' => 'E00E',
),
38 =>
array (
'match' => '0B99 0BC1',
'replace' => 'E010',
),
39 =>
array (
'match' => '0B99 0BC2',
'replace' => 'E011',
),
40 =>
array (
'match' => '0B9A 0BC1',
'replace' => 'E012',
),
41 =>
array (
'match' => '0B9A 0BC2',
'replace' => 'E013',
),
42 =>
array (
'match' => '0B9E 0BC1',
'replace' => 'E016',
),
43 =>
array (
'match' => '0B9E 0BC2',
'replace' => 'E017',
),
44 =>
array (
'match' => '0B9F 0BC1',
'replace' => 'E01A',
),
45 =>
array (
'match' => '0B9F 0BC2',
'replace' => 'E01B',
),
46 =>
array (
'match' => '0BA3 200C 0BBE',
'replace' => 'E01C',
),
47 =>
array (
'match' => '0BA3 0BC1',
'replace' => 'E01D',
),
48 =>
array (
'match' => '0BA3 0BC2',
'replace' => 'E01E',
),
49 =>
array (
'match' => '0BA4 0BC1',
'replace' => 'E020',
),
50 =>
array (
'match' => '0BA4 0BC2',
'replace' => 'E021',
),
51 =>
array (
'match' => '0BA8 0BC1',
'replace' => 'E022',
),
52 =>
array (
'match' => '0BA8 0BC2',
'replace' => 'E023',
),
53 =>
array (
'match' => '0BA9 200C 0BBE',
'replace' => 'E024',
),
54 =>
array (
'match' => '0BA9 0BC1',
'replace' => 'E025',
),
55 =>
array (
'match' => '0BA9 0BC2',
'replace' => 'E026',
),
56 =>
array (
'match' => '0BAA 0BC1',
'replace' => 'E028',
),
57 =>
array (
'match' => '0BAA 0BC2',
'replace' => 'E029',
),
58 =>
array (
'match' => '0BAE 0BC1',
'replace' => 'E02A',
),
59 =>
array (
'match' => '0BAE 0BC2',
'replace' => 'E02B',
),
60 =>
array (
'match' => '0BAF 0BC1',
'replace' => 'E02C',
),
61 =>
array (
'match' => '0BAF 0BC2',
'replace' => 'E02D',
),
62 =>
array (
'match' => '0BB0 0BC1',
'replace' => 'E02E',
),
63 =>
array (
'match' => '0BB0 0BC2',
'replace' => 'E02F',
),
64 =>
array (
'match' => '0BB1 200C 0BBE',
'replace' => 'E030',
),
65 =>
array (
'match' => '0BB1 0BC1',
'replace' => 'E031',
),
66 =>
array (
'match' => '0BB1 0BC2',
'replace' => 'E032',
),
67 =>
array (
'match' => '0BB2 0BC1',
'replace' => 'E035',
),
68 =>
array (
'match' => '0BB2 0BC2',
'replace' => 'E036',
),
69 =>
array (
'match' => '0BB3 0BC1',
'replace' => 'E038',
),
70 =>
array (
'match' => '0BB3 0BC2',
'replace' => 'E039',
),
71 =>
array (
'match' => '0BB4 0BC1',
'replace' => 'E03B',
),
72 =>
array (
'match' => '0BB4 0BC2',
'replace' => 'E03C',
),
73 =>
array (
'match' => '0BB5 0BC1',
'replace' => 'E03D',
),
74 =>
array (
'match' => '0BB5 0BC2',
'replace' => 'E03E',
),
75 =>
array (
'match' => '014B',
'replace' => '0BCD',
),
76 =>
array (
'match' => 'E002',
'replace' => '0BCD',
),
77 =>
array (
'match' => '014A',
'replace' => '0BCD',
),
);
?>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -1,59 +0,0 @@
<?php
$path = '../tmp/';
$tempfilename = $_REQUEST['filename'].'.pdf';
if (strstr($tempfilename,'/') || strstr($tempfilename,'\\')) { die("Filename should not contain \ or / "); }
$opname = $_REQUEST['opname'];
$dest = $_REQUEST['dest'];
if ($tempfilename && file_exists($path.$tempfilename)) {
// mPDF 5.3.17
if ($dest=='I') {
if(PHP_SAPI!='cli') {
header('Content-Type: application/pdf');
header('Content-disposition: inline; filename="'.$name.'"');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: public');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
}
}
else if ($dest=='D') {
header('Content-Description: File Transfer');
if (headers_sent())
$this->Error('Some data has already been output to browser, can\'t send PDF file');
header('Content-Transfer-Encoding: binary');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: public');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream', false);
header('Content-Type: application/download', false);
header('Content-Type: application/pdf', false);
header('Content-disposition: attachment; filename="'.$name.'"');
}
$filesize = filesize($path.$tempfilename);
if (!isset($_SERVER['HTTP_ACCEPT_ENCODING']) OR empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
// don't use length if server using compression
header('Content-Length: '.$filesize);
}
$fd=fopen($path.$tempfilename,'rb');
fpassthru($fd);
fclose($fd);
unlink($path.$tempfilename);
// ====================== DELETE OLD FILES - Housekeeping =========================================
// Clear any files in directory that are >24 hrs old
$interval = 86400;
if ($handle = opendir(dirname($path.'dummy'))) {
while (false !== ($file = readdir($handle))) {
if (((filemtime($path.$file)+$interval) < time()) && ($file != "..") && ($file != ".") && substr($file, -3)=='pdf') {
unlink($path.$file);
}
}
closedir($handle);
}
exit;
}
?>

View File

@ -1,454 +0,0 @@
<?php
$aarr = array(
160 => 160,
161 => 161,
162 => 162,
163 => 163,
164 => 164,
165 => 165,
166 => 166,
167 => 167,
168 => 168,
169 => 169,
170 => 170,
171 => 171,
172 => 172,
173 => 173,
174 => 174,
175 => 175,
176 => 176,
177 => 177,
178 => 178,
179 => 179,
180 => 180,
181 => 181,
182 => 182,
183 => 183,
184 => 184,
185 => 185,
186 => 186,
187 => 187,
188 => 188,
189 => 189,
190 => 190,
191 => 191,
192 => 192,
193 => 193,
194 => 194,
195 => 195,
196 => 196,
197 => 197,
198 => 198,
199 => 199,
200 => 200,
201 => 201,
202 => 202,
203 => 203,
204 => 204,
205 => 205,
206 => 206,
207 => 207,
208 => 208,
209 => 209,
210 => 210,
211 => 211,
212 => 212,
213 => 213,
214 => 214,
215 => 215,
216 => 216,
217 => 217,
218 => 218,
219 => 219,
220 => 220,
221 => 221,
222 => 222,
223 => 223,
224 => 224,
225 => 225,
226 => 226,
227 => 227,
228 => 228,
229 => 229,
230 => 230,
231 => 231,
232 => 232,
233 => 233,
234 => 234,
235 => 235,
236 => 236,
237 => 237,
238 => 238,
239 => 239,
240 => 240,
241 => 241,
242 => 242,
243 => 243,
244 => 244,
245 => 245,
246 => 246,
247 => 247,
248 => 248,
249 => 249,
250 => 250,
251 => 251,
252 => 252,
253 => 253,
254 => 254,
255 => 255,
338 => 140,
339 => 156,
352 => 138,
353 => 154,
376 => 159,
381 => 142,
382 => 158,
402 => 131,
710 => 136,
732 => 152,
8211 => 150,
8212 => 151,
8216 => 145,
8217 => 146,
8218 => 130,
8220 => 147,
8221 => 148,
8222 => 132,
8224 => 134,
8225 => 135,
8226 => 149,
8230 => 133,
8240 => 137,
8249 => 139,
8250 => 155,
8364 => 128,
8482 => 153
);
$zarr = array(
8594 => 213,
8596 => 214,
8597 => 215,
9312 => 172,
9313 => 173,
9314 => 174,
9315 => 175,
9316 => 176,
9317 => 177,
9318 => 178,
9319 => 179,
9320 => 180,
9321 => 181,
9632 => 110,
9650 => 115,
9660 => 116,
9670 => 117,
9679 => 108,
9687 => 119,
9733 => 72,
9742 => 37,
9755 => 42,
9758 => 43,
9824 => 171,
9827 => 168,
9829 => 170,
9830 => 169,
9985 => 33,
9986 => 34,
9987 => 35,
9988 => 36,
9990 => 38,
9991 => 39,
9992 => 40,
9993 => 41,
9996 => 44,
9997 => 45,
9998 => 46,
9999 => 47,
10000 => 48,
10001 => 49,
10002 => 50,
10003 => 51,
10004 => 52,
10005 => 53,
10006 => 54,
10007 => 55,
10008 => 56,
10009 => 57,
10010 => 58,
10011 => 59,
10012 => 60,
10013 => 61,
10014 => 62,
10015 => 63,
10016 => 64,
10017 => 65,
10018 => 66,
10019 => 67,
10020 => 68,
10021 => 69,
10022 => 70,
10023 => 71,
10025 => 73,
10026 => 74,
10027 => 75,
10028 => 76,
10029 => 77,
10030 => 78,
10031 => 79,
10032 => 80,
10033 => 81,
10034 => 82,
10035 => 83,
10036 => 84,
10037 => 85,
10038 => 86,
10039 => 87,
10040 => 88,
10041 => 89,
10042 => 90,
10043 => 91,
10044 => 92,
10045 => 93,
10046 => 94,
10047 => 95,
10048 => 96,
10049 => 97,
10050 => 98,
10051 => 99,
10052 => 100,
10053 => 101,
10054 => 102,
10055 => 103,
10056 => 104,
10057 => 105,
10058 => 106,
10059 => 107,
10061 => 109,
10063 => 111,
10064 => 112,
10065 => 113,
10066 => 114,
10070 => 118,
10072 => 120,
10073 => 121,
10074 => 122,
10075 => 123,
10076 => 124,
10077 => 125,
10078 => 126,
10081 => 161,
10082 => 162,
10083 => 163,
10084 => 164,
10085 => 165,
10086 => 166,
10087 => 167,
10102 => 182,
10103 => 183,
10104 => 184,
10105 => 185,
10106 => 186,
10107 => 187,
10108 => 188,
10109 => 189,
10110 => 190,
10111 => 191,
10112 => 192,
10113 => 193,
10114 => 194,
10115 => 195,
10116 => 196,
10117 => 197,
10118 => 198,
10119 => 199,
10120 => 200,
10121 => 201,
10122 => 202,
10123 => 203,
10124 => 204,
10125 => 205,
10126 => 206,
10127 => 207,
10128 => 208,
10129 => 209,
10130 => 210,
10131 => 211,
10132 => 212,
10136 => 216,
10137 => 217,
10138 => 218,
10139 => 219,
10140 => 220,
10141 => 221,
10142 => 222,
10143 => 223,
10144 => 224,
10145 => 225,
10146 => 226,
10147 => 227,
10148 => 228,
10149 => 229,
10150 => 230,
10151 => 231,
10152 => 232,
10153 => 233,
10154 => 234,
10155 => 235,
10156 => 236,
10157 => 237,
10158 => 238,
10159 => 239,
10161 => 241,
10162 => 242,
10163 => 243,
10164 => 244,
10165 => 245,
10166 => 246,
10167 => 247,
10168 => 248,
10169 => 249,
10170 => 250,
10171 => 251,
10172 => 252,
10173 => 253,
10174 => 254
);
$sarr = array(
169 => 227,
172 => 216,
174 => 226,
176 => 176,
177 => 177,
181 => 109,
215 => 180,
247 => 184,
402 => 166,
913 => 65,
914 => 66,
915 => 71,
916 => 68,
917 => 69,
918 => 90,
919 => 72,
920 => 81,
921 => 73,
922 => 75,
923 => 76,
924 => 77,
925 => 78,
926 => 88,
927 => 79,
928 => 80,
929 => 82,
931 => 83,
932 => 84,
933 => 85,
934 => 70,
935 => 67,
936 => 89,
937 => 87,
945 => 97,
946 => 98,
947 => 103,
948 => 100,
949 => 101,
950 => 122,
951 => 104,
952 => 113,
953 => 105,
954 => 107,
955 => 108,
956 => 109,
957 => 110,
958 => 120,
959 => 111,
960 => 112,
961 => 114,
962 => 86,
963 => 115,
964 => 116,
965 => 117,
966 => 102,
967 => 99,
968 => 121,
969 => 119,
977 => 74,
978 => 161,
981 => 106,
982 => 118,
8226 => 183,
8230 => 188,
8242 => 162,
8243 => 178,
8260 => 164,
8465 => 193,
8472 => 195,
8476 => 194,
8482 => 228,
8486 => 87,
8501 => 192,
8592 => 172,
8593 => 173,
8594 => 174,
8595 => 175,
8596 => 171,
8629 => 191,
8656 => 220,
8657 => 221,
8658 => 222,
8659 => 223,
8660 => 219,
8704 => 34,
8706 => 182,
8707 => 36,
8709 => 198,
8710 => 68,
8711 => 209,
8712 => 206,
8713 => 207,
8715 => 39,
8719 => 213,
8721 => 229,
8722 => 45,
8725 => 164,
8727 => 42,
8730 => 214,
8733 => 181,
8734 => 165,
8736 => 208,
8743 => 217,
8744 => 218,
8745 => 199,
8746 => 200,
8747 => 242,
8756 => 92,
8764 => 126,
8773 => 64,
8776 => 187,
8800 => 185,
8801 => 186,
8804 => 163,
8805 => 179,
8834 => 204,
8835 => 201,
8836 => 203,
8838 => 205,
8839 => 202,
8853 => 197,
8855 => 196,
8869 => 94,
8901 => 215,
8992 => 243,
8993 => 245,
9001 => 225,
9002 => 241,
9674 => 224,
9824 => 170,
9827 => 167,
9829 => 169,
9830 => 168
);
?>

View File

@ -1,308 +0,0 @@
<?php
$subsarray = array (
913 => '<tts>65</tts>',
914 => '<tts>66</tts>',
915 => '<tts>71</tts>',
916 => '<tts>68</tts>',
917 => '<tts>69</tts>',
918 => '<tts>90</tts>',
919 => '<tts>72</tts>',
920 => '<tts>81</tts>',
921 => '<tts>73</tts>',
922 => '<tts>75</tts>',
923 => '<tts>76</tts>',
924 => '<tts>77</tts>',
925 => '<tts>78</tts>',
926 => '<tts>88</tts>',
927 => '<tts>79</tts>',
928 => '<tts>80</tts>',
929 => '<tts>82</tts>',
931 => '<tts>83</tts>',
932 => '<tts>84</tts>',
933 => '<tts>85</tts>',
934 => '<tts>70</tts>',
935 => '<tts>67</tts>',
936 => '<tts>89</tts>',
937 => '<tts>87</tts>',
945 => '<tts>97</tts>',
946 => '<tts>98</tts>',
947 => '<tts>103</tts>',
948 => '<tts>100</tts>',
949 => '<tts>101</tts>',
950 => '<tts>122</tts>',
951 => '<tts>104</tts>',
952 => '<tts>113</tts>',
953 => '<tts>105</tts>',
954 => '<tts>107</tts>',
955 => '<tts>108</tts>',
956 => '<tts>109</tts>',
957 => '<tts>110</tts>',
958 => '<tts>120</tts>',
959 => '<tts>111</tts>',
960 => '<tts>112</tts>',
961 => '<tts>114</tts>',
962 => '<tts>86</tts>',
963 => '<tts>115</tts>',
964 => '<tts>116</tts>',
965 => '<tts>117</tts>',
966 => '<tts>102</tts>',
967 => '<tts>99</tts>',
968 => '<tts>121</tts>',
969 => '<tts>119</tts>',
977 => '<tts>74</tts>',
978 => '<tts>161</tts>',
981 => '<tts>106</tts>',
982 => '<tts>118</tts>',
8242 => '<tts>162</tts>',
8243 => '<tts>178</tts>',
8260 => '<tts>164</tts>',
8465 => '<tts>193</tts>',
8472 => '<tts>195</tts>',
8476 => '<tts>194</tts>',
8486 => '<tts>87</tts>',
8501 => '<tts>192</tts>',
8592 => '<tts>172</tts>',
8593 => '<tts>173</tts>',
8594 => '<tts>174</tts>',
8595 => '<tts>175</tts>',
8596 => '<tts>171</tts>',
8597 => '<ttz>215</ttz>',
8629 => '<tts>191</tts>',
8656 => '<tts>220</tts>',
8657 => '<tts>221</tts>',
8658 => '<tts>222</tts>',
8659 => '<tts>223</tts>',
8660 => '<tts>219</tts>',
8704 => '<tts>34</tts>',
8706 => '<tts>182</tts>',
8707 => '<tts>36</tts>',
8709 => '<tts>198</tts>',
8710 => '<tts>68</tts>',
8711 => '<tts>209</tts>',
8712 => '<tts>206</tts>',
8713 => '<tts>207</tts>',
8715 => '<tts>39</tts>',
8719 => '<tts>213</tts>',
8721 => '<tts>229</tts>',
8722 => '<tts>45</tts>',
8725 => '<tts>164</tts>',
8727 => '<tts>42</tts>',
8730 => '<tts>214</tts>',
8733 => '<tts>181</tts>',
8734 => '<tts>165</tts>',
8736 => '<tts>208</tts>',
8743 => '<tts>217</tts>',
8744 => '<tts>218</tts>',
8745 => '<tts>199</tts>',
8746 => '<tts>200</tts>',
8747 => '<tts>242</tts>',
8756 => '<tts>92</tts>',
8764 => '<tts>126</tts>',
8773 => '<tts>64</tts>',
8776 => '<tts>187</tts>',
8800 => '<tts>185</tts>',
8801 => '<tts>186</tts>',
8804 => '<tts>163</tts>',
8805 => '<tts>179</tts>',
8834 => '<tts>204</tts>',
8835 => '<tts>201</tts>',
8836 => '<tts>203</tts>',
8838 => '<tts>205</tts>',
8839 => '<tts>202</tts>',
8853 => '<tts>197</tts>',
8855 => '<tts>196</tts>',
8869 => '<tts>94</tts>',
8901 => '<tts>215</tts>',
8992 => '<tts>243</tts>',
8993 => '<tts>245</tts>',
9001 => '<tts>225</tts>',
9002 => '<tts>241</tts>',
9312 => '<ttz>172</ttz>',
9313 => '<ttz>173</ttz>',
9314 => '<ttz>174</ttz>',
9315 => '<ttz>175</ttz>',
9316 => '<ttz>176</ttz>',
9317 => '<ttz>177</ttz>',
9318 => '<ttz>178</ttz>',
9319 => '<ttz>179</ttz>',
9320 => '<ttz>180</ttz>',
9321 => '<ttz>181</ttz>',
9632 => '<ttz>110</ttz>',
9650 => '<ttz>115</ttz>',
9660 => '<ttz>116</ttz>',
9670 => '<ttz>117</ttz>',
9674 => '<tts>224</tts>',
9679 => '<ttz>108</ttz>',
9687 => '<ttz>119</ttz>',
9733 => '<ttz>72</ttz>',
9742 => '<ttz>37</ttz>',
9755 => '<ttz>42</ttz>',
9758 => '<ttz>43</ttz>',
9824 => '<tts>170</tts>',
9827 => '<tts>167</tts>',
9829 => '<tts>169</tts>',
9830 => '<tts>168</tts>',
9985 => '<ttz>33</ttz>',
9986 => '<ttz>34</ttz>',
9987 => '<ttz>35</ttz>',
9988 => '<ttz>36</ttz>',
9990 => '<ttz>38</ttz>',
9991 => '<ttz>39</ttz>',
9992 => '<ttz>40</ttz>',
9993 => '<ttz>41</ttz>',
9996 => '<ttz>44</ttz>',
9997 => '<ttz>45</ttz>',
9998 => '<ttz>46</ttz>',
9999 => '<ttz>47</ttz>',
10000 => '<ttz>48</ttz>',
10001 => '<ttz>49</ttz>',
10002 => '<ttz>50</ttz>',
10003 => '<ttz>51</ttz>',
10004 => '<ttz>52</ttz>',
10005 => '<ttz>53</ttz>',
10006 => '<ttz>54</ttz>',
10007 => '<ttz>55</ttz>',
10008 => '<ttz>56</ttz>',
10009 => '<ttz>57</ttz>',
10010 => '<ttz>58</ttz>',
10011 => '<ttz>59</ttz>',
10012 => '<ttz>60</ttz>',
10013 => '<ttz>61</ttz>',
10014 => '<ttz>62</ttz>',
10015 => '<ttz>63</ttz>',
10016 => '<ttz>64</ttz>',
10017 => '<ttz>65</ttz>',
10018 => '<ttz>66</ttz>',
10019 => '<ttz>67</ttz>',
10020 => '<ttz>68</ttz>',
10021 => '<ttz>69</ttz>',
10022 => '<ttz>70</ttz>',
10023 => '<ttz>71</ttz>',
10025 => '<ttz>73</ttz>',
10026 => '<ttz>74</ttz>',
10027 => '<ttz>75</ttz>',
10028 => '<ttz>76</ttz>',
10029 => '<ttz>77</ttz>',
10030 => '<ttz>78</ttz>',
10031 => '<ttz>79</ttz>',
10032 => '<ttz>80</ttz>',
10033 => '<ttz>81</ttz>',
10034 => '<ttz>82</ttz>',
10035 => '<ttz>83</ttz>',
10036 => '<ttz>84</ttz>',
10037 => '<ttz>85</ttz>',
10038 => '<ttz>86</ttz>',
10039 => '<ttz>87</ttz>',
10040 => '<ttz>88</ttz>',
10041 => '<ttz>89</ttz>',
10042 => '<ttz>90</ttz>',
10043 => '<ttz>91</ttz>',
10044 => '<ttz>92</ttz>',
10045 => '<ttz>93</ttz>',
10046 => '<ttz>94</ttz>',
10047 => '<ttz>95</ttz>',
10048 => '<ttz>96</ttz>',
10049 => '<ttz>97</ttz>',
10050 => '<ttz>98</ttz>',
10051 => '<ttz>99</ttz>',
10052 => '<ttz>100</ttz>',
10053 => '<ttz>101</ttz>',
10054 => '<ttz>102</ttz>',
10055 => '<ttz>103</ttz>',
10056 => '<ttz>104</ttz>',
10057 => '<ttz>105</ttz>',
10058 => '<ttz>106</ttz>',
10059 => '<ttz>107</ttz>',
10061 => '<ttz>109</ttz>',
10063 => '<ttz>111</ttz>',
10064 => '<ttz>112</ttz>',
10065 => '<ttz>113</ttz>',
10066 => '<ttz>114</ttz>',
10070 => '<ttz>118</ttz>',
10072 => '<ttz>120</ttz>',
10073 => '<ttz>121</ttz>',
10074 => '<ttz>122</ttz>',
10075 => '<ttz>123</ttz>',
10076 => '<ttz>124</ttz>',
10077 => '<ttz>125</ttz>',
10078 => '<ttz>126</ttz>',
10081 => '<ttz>161</ttz>',
10082 => '<ttz>162</ttz>',
10083 => '<ttz>163</ttz>',
10084 => '<ttz>164</ttz>',
10085 => '<ttz>165</ttz>',
10086 => '<ttz>166</ttz>',
10087 => '<ttz>167</ttz>',
10102 => '<ttz>182</ttz>',
10103 => '<ttz>183</ttz>',
10104 => '<ttz>184</ttz>',
10105 => '<ttz>185</ttz>',
10106 => '<ttz>186</ttz>',
10107 => '<ttz>187</ttz>',
10108 => '<ttz>188</ttz>',
10109 => '<ttz>189</ttz>',
10110 => '<ttz>190</ttz>',
10111 => '<ttz>191</ttz>',
10112 => '<ttz>192</ttz>',
10113 => '<ttz>193</ttz>',
10114 => '<ttz>194</ttz>',
10115 => '<ttz>195</ttz>',
10116 => '<ttz>196</ttz>',
10117 => '<ttz>197</ttz>',
10118 => '<ttz>198</ttz>',
10119 => '<ttz>199</ttz>',
10120 => '<ttz>200</ttz>',
10121 => '<ttz>201</ttz>',
10122 => '<ttz>202</ttz>',
10123 => '<ttz>203</ttz>',
10124 => '<ttz>204</ttz>',
10125 => '<ttz>205</ttz>',
10126 => '<ttz>206</ttz>',
10127 => '<ttz>207</ttz>',
10128 => '<ttz>208</ttz>',
10129 => '<ttz>209</ttz>',
10130 => '<ttz>210</ttz>',
10131 => '<ttz>211</ttz>',
10132 => '<ttz>212</ttz>',
10136 => '<ttz>216</ttz>',
10137 => '<ttz>217</ttz>',
10138 => '<ttz>218</ttz>',
10139 => '<ttz>219</ttz>',
10140 => '<ttz>220</ttz>',
10141 => '<ttz>221</ttz>',
10142 => '<ttz>222</ttz>',
10143 => '<ttz>223</ttz>',
10144 => '<ttz>224</ttz>',
10145 => '<ttz>225</ttz>',
10146 => '<ttz>226</ttz>',
10147 => '<ttz>227</ttz>',
10148 => '<ttz>228</ttz>',
10149 => '<ttz>229</ttz>',
10150 => '<ttz>230</ttz>',
10151 => '<ttz>231</ttz>',
10152 => '<ttz>232</ttz>',
10153 => '<ttz>233</ttz>',
10154 => '<ttz>234</ttz>',
10155 => '<ttz>235</ttz>',
10156 => '<ttz>236</ttz>',
10157 => '<ttz>237</ttz>',
10158 => '<ttz>238</ttz>',
10159 => '<ttz>239</ttz>',
10161 => '<ttz>241</ttz>',
10162 => '<ttz>242</ttz>',
10163 => '<ttz>243</ttz>',
10164 => '<ttz>244</ttz>',
10165 => '<ttz>245</ttz>',
10166 => '<ttz>246</ttz>',
10167 => '<ttz>247</ttz>',
10168 => '<ttz>248</ttz>',
10169 => '<ttz>249</ttz>',
10170 => '<ttz>250</ttz>',
10171 => '<ttz>251</ttz>',
10172 => '<ttz>252</ttz>',
10173 => '<ttz>253</ttz>',
10174 => '<ttz>254</ttz>',
);
?>

View File

@ -1,975 +0,0 @@
<?php
$this->upperCase=array (
97 => 65,
98 => 66,
99 => 67,
100 => 68,
101 => 69,
102 => 70,
103 => 71,
104 => 72,
105 => 73,
106 => 74,
107 => 75,
108 => 76,
109 => 77,
110 => 78,
111 => 79,
112 => 80,
113 => 81,
114 => 82,
115 => 83,
116 => 84,
117 => 85,
118 => 86,
119 => 87,
120 => 88,
121 => 89,
122 => 90,
181 => 924,
224 => 192,
225 => 193,
226 => 194,
227 => 195,
228 => 196,
229 => 197,
230 => 198,
231 => 199,
232 => 200,
233 => 201,
234 => 202,
235 => 203,
236 => 204,
237 => 205,
238 => 206,
239 => 207,
240 => 208,
241 => 209,
242 => 210,
243 => 211,
244 => 212,
245 => 213,
246 => 214,
248 => 216,
249 => 217,
250 => 218,
251 => 219,
252 => 220,
253 => 221,
254 => 222,
255 => 376,
257 => 256,
259 => 258,
261 => 260,
263 => 262,
265 => 264,
267 => 266,
269 => 268,
271 => 270,
273 => 272,
275 => 274,
277 => 276,
279 => 278,
281 => 280,
283 => 282,
285 => 284,
287 => 286,
289 => 288,
291 => 290,
293 => 292,
295 => 294,
297 => 296,
299 => 298,
301 => 300,
303 => 302,
305 => 73,
307 => 306,
309 => 308,
311 => 310,
314 => 313,
316 => 315,
318 => 317,
320 => 319,
322 => 321,
324 => 323,
326 => 325,
328 => 327,
331 => 330,
333 => 332,
335 => 334,
337 => 336,
339 => 338,
341 => 340,
343 => 342,
345 => 344,
347 => 346,
349 => 348,
351 => 350,
353 => 352,
355 => 354,
357 => 356,
359 => 358,
361 => 360,
363 => 362,
365 => 364,
367 => 366,
369 => 368,
371 => 370,
373 => 372,
375 => 374,
378 => 377,
380 => 379,
382 => 381,
383 => 83,
384 => 579,
387 => 386,
389 => 388,
392 => 391,
396 => 395,
402 => 401,
405 => 502,
409 => 408,
410 => 573,
414 => 544,
417 => 416,
419 => 418,
421 => 420,
424 => 423,
429 => 428,
432 => 431,
436 => 435,
438 => 437,
441 => 440,
445 => 444,
447 => 503,
453 => 452,
454 => 452,
456 => 455,
457 => 455,
459 => 458,
460 => 458,
462 => 461,
464 => 463,
466 => 465,
468 => 467,
470 => 469,
472 => 471,
474 => 473,
476 => 475,
477 => 398,
479 => 478,
481 => 480,
483 => 482,
485 => 484,
487 => 486,
489 => 488,
491 => 490,
493 => 492,
495 => 494,
498 => 497,
499 => 497,
501 => 500,
505 => 504,
507 => 506,
509 => 508,
511 => 510,
513 => 512,
515 => 514,
517 => 516,
519 => 518,
521 => 520,
523 => 522,
525 => 524,
527 => 526,
529 => 528,
531 => 530,
533 => 532,
535 => 534,
537 => 536,
539 => 538,
541 => 540,
543 => 542,
547 => 546,
549 => 548,
551 => 550,
553 => 552,
555 => 554,
557 => 556,
559 => 558,
561 => 560,
563 => 562,
572 => 571,
575 => 11390,
576 => 11391,
578 => 577,
583 => 582,
585 => 584,
587 => 586,
589 => 588,
591 => 590,
592 => 11375,
593 => 11373,
594 => 11376,
595 => 385,
596 => 390,
598 => 393,
599 => 394,
601 => 399,
603 => 400,
608 => 403,
611 => 404,
616 => 407,
617 => 406,
619 => 11362,
623 => 412,
625 => 11374,
626 => 413,
629 => 415,
637 => 11364,
640 => 422,
643 => 425,
648 => 430,
649 => 580,
650 => 433,
651 => 434,
652 => 581,
658 => 439,
837 => 921,
881 => 880,
883 => 882,
887 => 886,
891 => 1021,
892 => 1022,
893 => 1023,
940 => 902,
941 => 904,
942 => 905,
943 => 906,
945 => 913,
946 => 914,
947 => 915,
948 => 916,
949 => 917,
950 => 918,
951 => 919,
952 => 920,
953 => 921,
954 => 922,
955 => 923,
956 => 924,
957 => 925,
958 => 926,
959 => 927,
960 => 928,
961 => 929,
962 => 931,
963 => 931,
964 => 932,
965 => 933,
966 => 934,
967 => 935,
968 => 936,
969 => 937,
970 => 938,
971 => 939,
972 => 908,
973 => 910,
974 => 911,
976 => 914,
977 => 920,
981 => 934,
982 => 928,
983 => 975,
985 => 984,
987 => 986,
989 => 988,
991 => 990,
993 => 992,
995 => 994,
997 => 996,
999 => 998,
1001 => 1000,
1003 => 1002,
1005 => 1004,
1007 => 1006,
1008 => 922,
1009 => 929,
1010 => 1017,
1013 => 917,
1016 => 1015,
1019 => 1018,
1072 => 1040,
1073 => 1041,
1074 => 1042,
1075 => 1043,
1076 => 1044,
1077 => 1045,
1078 => 1046,
1079 => 1047,
1080 => 1048,
1081 => 1049,
1082 => 1050,
1083 => 1051,
1084 => 1052,
1085 => 1053,
1086 => 1054,
1087 => 1055,
1088 => 1056,
1089 => 1057,
1090 => 1058,
1091 => 1059,
1092 => 1060,
1093 => 1061,
1094 => 1062,
1095 => 1063,
1096 => 1064,
1097 => 1065,
1098 => 1066,
1099 => 1067,
1100 => 1068,
1101 => 1069,
1102 => 1070,
1103 => 1071,
1104 => 1024,
1105 => 1025,
1106 => 1026,
1107 => 1027,
1108 => 1028,
1109 => 1029,
1110 => 1030,
1111 => 1031,
1112 => 1032,
1113 => 1033,
1114 => 1034,
1115 => 1035,
1116 => 1036,
1117 => 1037,
1118 => 1038,
1119 => 1039,
1121 => 1120,
1123 => 1122,
1125 => 1124,
1127 => 1126,
1129 => 1128,
1131 => 1130,
1133 => 1132,
1135 => 1134,
1137 => 1136,
1139 => 1138,
1141 => 1140,
1143 => 1142,
1145 => 1144,
1147 => 1146,
1149 => 1148,
1151 => 1150,
1153 => 1152,
1163 => 1162,
1165 => 1164,
1167 => 1166,
1169 => 1168,
1171 => 1170,
1173 => 1172,
1175 => 1174,
1177 => 1176,
1179 => 1178,
1181 => 1180,
1183 => 1182,
1185 => 1184,
1187 => 1186,
1189 => 1188,
1191 => 1190,
1193 => 1192,
1195 => 1194,
1197 => 1196,
1199 => 1198,
1201 => 1200,
1203 => 1202,
1205 => 1204,
1207 => 1206,
1209 => 1208,
1211 => 1210,
1213 => 1212,
1215 => 1214,
1218 => 1217,
1220 => 1219,
1222 => 1221,
1224 => 1223,
1226 => 1225,
1228 => 1227,
1230 => 1229,
1231 => 1216,
1233 => 1232,
1235 => 1234,
1237 => 1236,
1239 => 1238,
1241 => 1240,
1243 => 1242,
1245 => 1244,
1247 => 1246,
1249 => 1248,
1251 => 1250,
1253 => 1252,
1255 => 1254,
1257 => 1256,
1259 => 1258,
1261 => 1260,
1263 => 1262,
1265 => 1264,
1267 => 1266,
1269 => 1268,
1271 => 1270,
1273 => 1272,
1275 => 1274,
1277 => 1276,
1279 => 1278,
1281 => 1280,
1283 => 1282,
1285 => 1284,
1287 => 1286,
1289 => 1288,
1291 => 1290,
1293 => 1292,
1295 => 1294,
1297 => 1296,
1299 => 1298,
1301 => 1300,
1303 => 1302,
1305 => 1304,
1307 => 1306,
1309 => 1308,
1311 => 1310,
1313 => 1312,
1315 => 1314,
1317 => 1316,
1377 => 1329,
1378 => 1330,
1379 => 1331,
1380 => 1332,
1381 => 1333,
1382 => 1334,
1383 => 1335,
1384 => 1336,
1385 => 1337,
1386 => 1338,
1387 => 1339,
1388 => 1340,
1389 => 1341,
1390 => 1342,
1391 => 1343,
1392 => 1344,
1393 => 1345,
1394 => 1346,
1395 => 1347,
1396 => 1348,
1397 => 1349,
1398 => 1350,
1399 => 1351,
1400 => 1352,
1401 => 1353,
1402 => 1354,
1403 => 1355,
1404 => 1356,
1405 => 1357,
1406 => 1358,
1407 => 1359,
1408 => 1360,
1409 => 1361,
1410 => 1362,
1411 => 1363,
1412 => 1364,
1413 => 1365,
1414 => 1366,
7545 => 42877,
7549 => 11363,
7681 => 7680,
7683 => 7682,
7685 => 7684,
7687 => 7686,
7689 => 7688,
7691 => 7690,
7693 => 7692,
7695 => 7694,
7697 => 7696,
7699 => 7698,
7701 => 7700,
7703 => 7702,
7705 => 7704,
7707 => 7706,
7709 => 7708,
7711 => 7710,
7713 => 7712,
7715 => 7714,
7717 => 7716,
7719 => 7718,
7721 => 7720,
7723 => 7722,
7725 => 7724,
7727 => 7726,
7729 => 7728,
7731 => 7730,
7733 => 7732,
7735 => 7734,
7737 => 7736,
7739 => 7738,
7741 => 7740,
7743 => 7742,
7745 => 7744,
7747 => 7746,
7749 => 7748,
7751 => 7750,
7753 => 7752,
7755 => 7754,
7757 => 7756,
7759 => 7758,
7761 => 7760,
7763 => 7762,
7765 => 7764,
7767 => 7766,
7769 => 7768,
7771 => 7770,
7773 => 7772,
7775 => 7774,
7777 => 7776,
7779 => 7778,
7781 => 7780,
7783 => 7782,
7785 => 7784,
7787 => 7786,
7789 => 7788,
7791 => 7790,
7793 => 7792,
7795 => 7794,
7797 => 7796,
7799 => 7798,
7801 => 7800,
7803 => 7802,
7805 => 7804,
7807 => 7806,
7809 => 7808,
7811 => 7810,
7813 => 7812,
7815 => 7814,
7817 => 7816,
7819 => 7818,
7821 => 7820,
7823 => 7822,
7825 => 7824,
7827 => 7826,
7829 => 7828,
7835 => 7776,
7841 => 7840,
7843 => 7842,
7845 => 7844,
7847 => 7846,
7849 => 7848,
7851 => 7850,
7853 => 7852,
7855 => 7854,
7857 => 7856,
7859 => 7858,
7861 => 7860,
7863 => 7862,
7865 => 7864,
7867 => 7866,
7869 => 7868,
7871 => 7870,
7873 => 7872,
7875 => 7874,
7877 => 7876,
7879 => 7878,
7881 => 7880,
7883 => 7882,
7885 => 7884,
7887 => 7886,
7889 => 7888,
7891 => 7890,
7893 => 7892,
7895 => 7894,
7897 => 7896,
7899 => 7898,
7901 => 7900,
7903 => 7902,
7905 => 7904,
7907 => 7906,
7909 => 7908,
7911 => 7910,
7913 => 7912,
7915 => 7914,
7917 => 7916,
7919 => 7918,
7921 => 7920,
7923 => 7922,
7925 => 7924,
7927 => 7926,
7929 => 7928,
7931 => 7930,
7933 => 7932,
7935 => 7934,
7936 => 7944,
7937 => 7945,
7938 => 7946,
7939 => 7947,
7940 => 7948,
7941 => 7949,
7942 => 7950,
7943 => 7951,
7952 => 7960,
7953 => 7961,
7954 => 7962,
7955 => 7963,
7956 => 7964,
7957 => 7965,
7968 => 7976,
7969 => 7977,
7970 => 7978,
7971 => 7979,
7972 => 7980,
7973 => 7981,
7974 => 7982,
7975 => 7983,
7984 => 7992,
7985 => 7993,
7986 => 7994,
7987 => 7995,
7988 => 7996,
7989 => 7997,
7990 => 7998,
7991 => 7999,
8000 => 8008,
8001 => 8009,
8002 => 8010,
8003 => 8011,
8004 => 8012,
8005 => 8013,
8017 => 8025,
8019 => 8027,
8021 => 8029,
8023 => 8031,
8032 => 8040,
8033 => 8041,
8034 => 8042,
8035 => 8043,
8036 => 8044,
8037 => 8045,
8038 => 8046,
8039 => 8047,
8048 => 8122,
8049 => 8123,
8050 => 8136,
8051 => 8137,
8052 => 8138,
8053 => 8139,
8054 => 8154,
8055 => 8155,
8056 => 8184,
8057 => 8185,
8058 => 8170,
8059 => 8171,
8060 => 8186,
8061 => 8187,
8064 => 8072,
8065 => 8073,
8066 => 8074,
8067 => 8075,
8068 => 8076,
8069 => 8077,
8070 => 8078,
8071 => 8079,
8080 => 8088,
8081 => 8089,
8082 => 8090,
8083 => 8091,
8084 => 8092,
8085 => 8093,
8086 => 8094,
8087 => 8095,
8096 => 8104,
8097 => 8105,
8098 => 8106,
8099 => 8107,
8100 => 8108,
8101 => 8109,
8102 => 8110,
8103 => 8111,
8112 => 8120,
8113 => 8121,
8115 => 8124,
8126 => 921,
8131 => 8140,
8144 => 8152,
8145 => 8153,
8160 => 8168,
8161 => 8169,
8165 => 8172,
8179 => 8188,
8526 => 8498,
8560 => 8544,
8561 => 8545,
8562 => 8546,
8563 => 8547,
8564 => 8548,
8565 => 8549,
8566 => 8550,
8567 => 8551,
8568 => 8552,
8569 => 8553,
8570 => 8554,
8571 => 8555,
8572 => 8556,
8573 => 8557,
8574 => 8558,
8575 => 8559,
8580 => 8579,
9424 => 9398,
9425 => 9399,
9426 => 9400,
9427 => 9401,
9428 => 9402,
9429 => 9403,
9430 => 9404,
9431 => 9405,
9432 => 9406,
9433 => 9407,
9434 => 9408,
9435 => 9409,
9436 => 9410,
9437 => 9411,
9438 => 9412,
9439 => 9413,
9440 => 9414,
9441 => 9415,
9442 => 9416,
9443 => 9417,
9444 => 9418,
9445 => 9419,
9446 => 9420,
9447 => 9421,
9448 => 9422,
9449 => 9423,
11312 => 11264,
11313 => 11265,
11314 => 11266,
11315 => 11267,
11316 => 11268,
11317 => 11269,
11318 => 11270,
11319 => 11271,
11320 => 11272,
11321 => 11273,
11322 => 11274,
11323 => 11275,
11324 => 11276,
11325 => 11277,
11326 => 11278,
11327 => 11279,
11328 => 11280,
11329 => 11281,
11330 => 11282,
11331 => 11283,
11332 => 11284,
11333 => 11285,
11334 => 11286,
11335 => 11287,
11336 => 11288,
11337 => 11289,
11338 => 11290,
11339 => 11291,
11340 => 11292,
11341 => 11293,
11342 => 11294,
11343 => 11295,
11344 => 11296,
11345 => 11297,
11346 => 11298,
11347 => 11299,
11348 => 11300,
11349 => 11301,
11350 => 11302,
11351 => 11303,
11352 => 11304,
11353 => 11305,
11354 => 11306,
11355 => 11307,
11356 => 11308,
11357 => 11309,
11358 => 11310,
11361 => 11360,
11365 => 570,
11366 => 574,
11368 => 11367,
11370 => 11369,
11372 => 11371,
11379 => 11378,
11382 => 11381,
11393 => 11392,
11395 => 11394,
11397 => 11396,
11399 => 11398,
11401 => 11400,
11403 => 11402,
11405 => 11404,
11407 => 11406,
11409 => 11408,
11411 => 11410,
11413 => 11412,
11415 => 11414,
11417 => 11416,
11419 => 11418,
11421 => 11420,
11423 => 11422,
11425 => 11424,
11427 => 11426,
11429 => 11428,
11431 => 11430,
11433 => 11432,
11435 => 11434,
11437 => 11436,
11439 => 11438,
11441 => 11440,
11443 => 11442,
11445 => 11444,
11447 => 11446,
11449 => 11448,
11451 => 11450,
11453 => 11452,
11455 => 11454,
11457 => 11456,
11459 => 11458,
11461 => 11460,
11463 => 11462,
11465 => 11464,
11467 => 11466,
11469 => 11468,
11471 => 11470,
11473 => 11472,
11475 => 11474,
11477 => 11476,
11479 => 11478,
11481 => 11480,
11483 => 11482,
11485 => 11484,
11487 => 11486,
11489 => 11488,
11491 => 11490,
11500 => 11499,
11502 => 11501,
11520 => 4256,
11521 => 4257,
11522 => 4258,
11523 => 4259,
11524 => 4260,
11525 => 4261,
11526 => 4262,
11527 => 4263,
11528 => 4264,
11529 => 4265,
11530 => 4266,
11531 => 4267,
11532 => 4268,
11533 => 4269,
11534 => 4270,
11535 => 4271,
11536 => 4272,
11537 => 4273,
11538 => 4274,
11539 => 4275,
11540 => 4276,
11541 => 4277,
11542 => 4278,
11543 => 4279,
11544 => 4280,
11545 => 4281,
11546 => 4282,
11547 => 4283,
11548 => 4284,
11549 => 4285,
11550 => 4286,
11551 => 4287,
11552 => 4288,
11553 => 4289,
11554 => 4290,
11555 => 4291,
11556 => 4292,
11557 => 4293,
42561 => 42560,
42563 => 42562,
42565 => 42564,
42567 => 42566,
42569 => 42568,
42571 => 42570,
42573 => 42572,
42575 => 42574,
42577 => 42576,
42579 => 42578,
42581 => 42580,
42583 => 42582,
42585 => 42584,
42587 => 42586,
42589 => 42588,
42591 => 42590,
42595 => 42594,
42597 => 42596,
42599 => 42598,
42601 => 42600,
42603 => 42602,
42605 => 42604,
42625 => 42624,
42627 => 42626,
42629 => 42628,
42631 => 42630,
42633 => 42632,
42635 => 42634,
42637 => 42636,
42639 => 42638,
42641 => 42640,
42643 => 42642,
42645 => 42644,
42647 => 42646,
42787 => 42786,
42789 => 42788,
42791 => 42790,
42793 => 42792,
42795 => 42794,
42797 => 42796,
42799 => 42798,
42803 => 42802,
42805 => 42804,
42807 => 42806,
42809 => 42808,
42811 => 42810,
42813 => 42812,
42815 => 42814,
42817 => 42816,
42819 => 42818,
42821 => 42820,
42823 => 42822,
42825 => 42824,
42827 => 42826,
42829 => 42828,
42831 => 42830,
42833 => 42832,
42835 => 42834,
42837 => 42836,
42839 => 42838,
42841 => 42840,
42843 => 42842,
42845 => 42844,
42847 => 42846,
42849 => 42848,
42851 => 42850,
42853 => 42852,
42855 => 42854,
42857 => 42856,
42859 => 42858,
42861 => 42860,
42863 => 42862,
42874 => 42873,
42876 => 42875,
42879 => 42878,
42881 => 42880,
42883 => 42882,
42885 => 42884,
42887 => 42886,
42892 => 42891,
);
?>

View File

@ -1,20 +0,0 @@
/*
This is a secondary default stylesheet for mPDF
It will only parse element-level CSS here
Remove the comment marks below and edit as required
*/
/*
These values used to be the default prior to mPDF 4.2
Altered to make appearance closer to that of browsers
Uncomment these lines to return to behaviour prior to v4.2
*/
/*
img { margin: 0.83em 0; vertical-align: bottom; }
table { margin: 0.5em; }
textarea { vertical-align: top; }
*/

File diff suppressed because it is too large Load Diff

View File

@ -1,98 +0,0 @@
<?php
//
// FPDI - Version 1.3.1
//
// Copyright 2004-2009 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
if (!defined('ORD_z'))
define('ORD_z',ord('z'));
if (!defined('ORD_exclmark'))
define('ORD_exclmark', ord('!'));
if (!defined('ORD_u'))
define('ORD_u', ord('u'));
if (!defined('ORD_tilde'))
define('ORD_tilde', ord('~'));
class FilterASCII85 {
function error($msg) {
die($msg);
}
function decode($in) {
$out = '';
$state = 0;
$chn = null;
$l = strlen($in);
for ($k = 0; $k < $l; ++$k) {
$ch = ord($in[$k]) & 0xff;
if ($ch == ORD_tilde) {
break;
}
if (preg_match('/^\s$/',chr($ch))) {
continue;
}
if ($ch == ORD_z && $state == 0) {
$out .= chr(0).chr(0).chr(0).chr(0);
continue;
}
if ($ch < ORD_exclmark || $ch > ORD_u) {
$this->error('Illegal character in ASCII85Decode.');
}
$chn[$state++] = $ch - ORD_exclmark;
if ($state == 5) {
$state = 0;
$r = 0;
for ($j = 0; $j < 5; ++$j)
$r = $r * 85 + $chn[$j];
$out .= chr($r >> 24);
$out .= chr($r >> 16);
$out .= chr($r >> 8);
$out .= chr($r);
}
}
$r = 0;
if ($state == 1)
$this->error('Illegal length in ASCII85Decode.');
if ($state == 2) {
$r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1]+1) * 85 * 85 * 85;
$out .= chr($r >> 24);
}
else if ($state == 3) {
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2]+1) * 85 * 85;
$out .= chr($r >> 24);
$out .= chr($r >> 16);
}
else if ($state == 4) {
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3]+1) * 85 ;
$out .= chr($r >> 24);
$out .= chr($r >> 16);
$out .= chr($r >> 8);
}
return $out;
}
function encode($in) {
$this->error("ASCII85 encoding not implemented.");
}
}

View File

@ -1,154 +0,0 @@
<?php
//
// FPDI - Version 1.3.1
//
// Copyright 2004-2009 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
class FilterLZW {
var $sTable = array();
var $data = null;
var $dataLength = 0;
var $tIdx;
var $bitsToGet = 9;
var $bytePointer;
var $bitPointer;
var $nextData = 0;
var $nextBits = 0;
var $andTable = array(511, 1023, 2047, 4095);
function error($msg) {
die($msg);
}
/**
* Method to decode LZW compressed data.
*
* @param string data The compressed data.
*/
function decode($data) {
if($data[0] == 0x00 && $data[1] == 0x01) {
$this->error('LZW flavour not supported.');
}
$this->initsTable();
$this->data = $data;
$this->dataLength = strlen($data);
// Initialize pointers
$this->bytePointer = 0;
$this->bitPointer = 0;
$this->nextData = 0;
$this->nextBits = 0;
$oldCode = 0;
$string = '';
$uncompData = '';
while (($code = $this->getNextCode()) != 257) {
if ($code == 256) {
$this->initsTable();
$code = $this->getNextCode();
if ($code == 257) {
break;
}
$uncompData .= $this->sTable[$code];
$oldCode = $code;
} else {
if ($code < $this->tIdx) {
$string = $this->sTable[$code];
$uncompData .= $string;
$this->addStringToTable($this->sTable[$oldCode], $string[0]);
$oldCode = $code;
} else {
$string = $this->sTable[$oldCode];
$string = $string.$string[0];
$uncompData .= $string;
$this->addStringToTable($string);
$oldCode = $code;
}
}
}
return $uncompData;
}
/**
* Initialize the string table.
*/
function initsTable() {
$this->sTable = array();
for ($i = 0; $i < 256; $i++)
$this->sTable[$i] = chr($i);
$this->tIdx = 258;
$this->bitsToGet = 9;
}
/**
* Add a new string to the string table.
*/
function addStringToTable ($oldString, $newString='') {
$string = $oldString.$newString;
// Add this new String to the table
$this->sTable[$this->tIdx++] = $string;
if ($this->tIdx == 511) {
$this->bitsToGet = 10;
} else if ($this->tIdx == 1023) {
$this->bitsToGet = 11;
} else if ($this->tIdx == 2047) {
$this->bitsToGet = 12;
}
}
// Returns the next 9, 10, 11 or 12 bits
function getNextCode() {
if ($this->bytePointer == $this->dataLength) {
return 257;
}
$this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff);
$this->nextBits += 8;
if ($this->nextBits < $this->bitsToGet) {
$this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff);
$this->nextBits += 8;
}
$code = ($this->nextData >> ($this->nextBits - $this->bitsToGet)) & $this->andTable[$this->bitsToGet-9];
$this->nextBits -= $this->bitsToGet;
return $code;
}
function encode($in) {
$this->error("LZW encoding not implemented.");
}
}

View File

@ -1,363 +0,0 @@
<?php
//
// FPDI - Version 1.2
//
// Copyright 2004-2007 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
class fpdi_pdf_parser extends pdf_parser {
/**
* Pages
* Index beginns at 0
*
* @var array
*/
var $pages;
/**
* Page count
* @var integer
*/
var $page_count;
/**
* actual page number
* @var integer
*/
var $pageno;
/**
* FPDI Reference
* @var object
*/
var $fpdi;
/**
* Available BoxTypes
*
* @var array
*/
var $availableBoxes = array("/MediaBox","/CropBox","/BleedBox","/TrimBox","/ArtBox");
/**
* Constructor
*
* @param string $filename Source-Filename
* @param object $fpdi Object of type fpdi
*/
function fpdi_pdf_parser($filename,&$fpdi) {
$this->fpdi =& $fpdi;
$this->filename = $filename;
parent::pdf_parser($filename);
if ($this->success == false) { return false; }
// resolve Pages-Dictonary
$pages = $this->pdf_resolve_object($this->c, $this->root[1][1]['/Pages']);
if ($this->success == false) { return false; }
// Read pages
$this->read_pages($this->c, $pages, $this->pages);
if ($this->success == false) { return false; }
// count pages;
$this->page_count = count($this->pages);
}
/**
* Get pagecount from sourcefile
*
* @return int
*/
function getPageCount() {
return $this->page_count;
}
/**
* Set pageno
*
* @param int $pageno Pagenumber to use
*/
function setPageno($pageno) {
$pageno = ((int) $pageno) - 1;
if ($pageno < 0 || $pageno >= $this->getPageCount()) {
$this->fpdi->error("Pagenumber is wrong!");
}
$this->pageno = $pageno;
}
/**
* Get page-resources from current page
*
* @return array
*/
function getPageResources() {
return $this->_getPageResources($this->pages[$this->pageno]);
}
/**
* Get page-resources from /Page
*
* @param array $obj Array of pdf-data
*/
function _getPageResources ($obj) { // $obj = /Page
$obj = $this->pdf_resolve_object($this->c, $obj);
// If the current object has a resources
// dictionary associated with it, we use
// it. Otherwise, we move back to its
// parent object.
if (isset ($obj[1][1]['/Resources'])) {
$res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Resources']);
if ($res[0] == PDF_TYPE_OBJECT)
return $res[1];
return $res;
} else {
if (!isset ($obj[1][1]['/Parent'])) {
return false;
} else {
$res = $this->_getPageResources($obj[1][1]['/Parent']);
if ($res[0] == PDF_TYPE_OBJECT)
return $res[1];
return $res;
}
}
}
/**
* Get content of current page
*
* If more /Contents is an array, the streams are concated
*
* @return string
*/
function getContent() {
$buffer = "";
if (isset($this->pages[$this->pageno][1][1]['/Contents'])) {
$contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']);
foreach($contents AS $tmp_content) {
$buffer .= $this->_rebuildContentStream($tmp_content).' ';
}
}
return $buffer;
}
/**
* Resolve all content-objects
*
* @param array $content_ref
* @return array
*/
function _getPageContent($content_ref) {
$contents = array();
if ($content_ref[0] == PDF_TYPE_OBJREF) {
$content = $this->pdf_resolve_object($this->c, $content_ref);
if ($content[1][0] == PDF_TYPE_ARRAY) {
$contents = $this->_getPageContent($content[1]);
} else {
$contents[] = $content;
}
} else if ($content_ref[0] == PDF_TYPE_ARRAY) {
foreach ($content_ref[1] AS $tmp_content_ref) {
$contents = array_merge($contents,$this->_getPageContent($tmp_content_ref));
}
}
return $contents;
}
/**
* Rebuild content-streams
*
* @param array $obj
* @return string
*/
function _rebuildContentStream($obj) {
$filters = array();
if (isset($obj[1][1]['/Filter'])) {
$_filter = $obj[1][1]['/Filter'];
if ($_filter[0] == PDF_TYPE_TOKEN) {
$filters[] = $_filter;
} else if ($_filter[0] == PDF_TYPE_ARRAY) {
$filters = $_filter[1];
}
}
$stream = $obj[2][1];
foreach ($filters AS $_filter) {
switch ($_filter[1]) {
case "/FlateDecode":
if (function_exists('gzuncompress')) {
$stream = (strlen($stream) > 0) ? @gzuncompress($stream) : '';
} else {
$this->fpdi->error(sprintf("To handle %s filter, please compile php with zlib support.",$_filter[1]));
}
if ($stream === false) {
$this->fpdi->error("Error while decompressing stream.");
}
break;
// mPDF 4.2.003
case '/LZWDecode':
include_once(_MPDF_PATH.'mpdfi/filters/FilterLZW.php');
// mPDF 5.0 Removed pass by reference =&
$decoder = new FilterLZW();
$stream = $decoder->decode($stream);
break;
case '/ASCII85Decode':
include_once(_MPDF_PATH.'mpdfi/filters/FilterASCII85.php');
// mPDF 5.0 Removed pass by reference =&
$decoder = new FilterASCII85();
$stream = $decoder->decode($stream);
break;
case null:
$stream = $stream;
break;
default:
$this->fpdi->error(sprintf("Unsupported Filter: %s",$_filter[1]));
}
}
return $stream;
}
/**
* Get a Box from a page
* Arrayformat is same as used by fpdf_tpl
*
* @param array $page a /Page
* @param string $box_index Type of Box @see $availableBoxes
* @return array
*/
function getPageBox($page, $box_index) {
$page = $this->pdf_resolve_object($this->c,$page);
$box = null;
if (isset($page[1][1][$box_index]))
$box =& $page[1][1][$box_index];
if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) {
$tmp_box = $this->pdf_resolve_object($this->c,$box);
$box = $tmp_box[1];
}
if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) {
$b =& $box[1];
return array("x" => $b[0][1]/_MPDFK,
"y" => $b[1][1]/_MPDFK,
"w" => abs($b[0][1]-$b[2][1])/_MPDFK,
"h" => abs($b[1][1]-$b[3][1])/_MPDFK); // mPDF 5.3.90
} else if (!isset ($page[1][1]['/Parent'])) {
return false;
} else {
return $this->getPageBox($this->pdf_resolve_object($this->c, $page[1][1]['/Parent']), $box_index);
}
}
function getPageBoxes($pageno) {
return $this->_getPageBoxes($this->pages[$pageno-1]);
}
/**
* Get all Boxes from /Page
*
* @param array a /Page
* @return array
*/
function _getPageBoxes($page) {
$boxes = array();
foreach($this->availableBoxes AS $box) {
if ($_box = $this->getPageBox($page,$box)) {
$boxes[$box] = $_box;
}
}
return $boxes;
}
function getPageRotation($pageno) {
return $this->_getPageRotation($this->pages[$pageno-1]);
}
function _getPageRotation ($obj) { // $obj = /Page
$obj = $this->pdf_resolve_object($this->c, $obj);
if (isset ($obj[1][1]['/Rotate'])) {
$res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Rotate']);
if ($res[0] == PDF_TYPE_OBJECT)
return $res[1];
return $res;
} else {
if (!isset ($obj[1][1]['/Parent'])) {
return false;
} else {
$res = $this->_getPageRotation($obj[1][1]['/Parent']);
if ($res[0] == PDF_TYPE_OBJECT)
return $res[1];
return $res;
}
}
}
/**
* Read all /Page(es)
*
* @param object pdf_context
* @param array /Pages
* @param array the result-array
*/
function read_pages (&$c, &$pages, &$result) {
// Get the kids dictionary
$kids = $this->pdf_resolve_object ($c, $pages[1][1]['/Kids']);
if (!is_array($kids)) {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Cannot find /Kids in current /Page-Dictionary");
return false;
}
foreach ($kids[1] as $v) {
$pg = $this->pdf_resolve_object ($c, $v);
if ($pg[1][1]['/Type'][1] === '/Pages') {
// If one of the kids is an embedded
// /Pages array, resolve it as well.
$this->read_pages ($c, $pg, $result);
} else {
$result[] = $pg;
}
}
}
}
?>

View File

@ -1,78 +0,0 @@
<?php
//
// FPDI - Version 1.2
//
// Copyright 2004-2007 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
class pdf_context {
var $file;
var $buffer;
var $offset;
var $length;
var $stack;
// Constructor
function pdf_context($f) {
$this->file = $f;
$this->reset();
}
// Optionally move the file
// pointer to a new location
// and reset the buffered data
function reset($pos = null, $l = 100) {
if (!is_null ($pos)) {
fseek ($this->file, $pos);
}
$this->buffer = $l > 0 ? fread($this->file, $l) : '';
$this->offset = 0;
$this->length = strlen($this->buffer);
$this->stack = array();
}
// Make sure that there is at least one
// character beyond the current offset in
// the buffer to prevent the tokenizer
// from attempting to access data that does
// not exist
function ensure_content() {
if ($this->offset >= $this->length - 1) {
return $this->increase_length();
} else {
return true;
}
}
// Forcefully read more data into the buffer
function increase_length($l=100) {
if (feof($this->file)) {
return false;
} else {
$this->buffer .= fread($this->file, $l);
$this->length = strlen($this->buffer);
return true;
}
}
}
?>

View File

@ -1,690 +0,0 @@
<?php
//
// FPDI - Version 1.2
//
// Copyright 2004-2007 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
if (!defined ('PDF_TYPE_NULL'))
define ('PDF_TYPE_NULL', 0);
if (!defined ('PDF_TYPE_NUMERIC'))
define ('PDF_TYPE_NUMERIC', 1);
if (!defined ('PDF_TYPE_TOKEN'))
define ('PDF_TYPE_TOKEN', 2);
if (!defined ('PDF_TYPE_HEX'))
define ('PDF_TYPE_HEX', 3);
if (!defined ('PDF_TYPE_STRING'))
define ('PDF_TYPE_STRING', 4);
if (!defined ('PDF_TYPE_DICTIONARY'))
define ('PDF_TYPE_DICTIONARY', 5);
if (!defined ('PDF_TYPE_ARRAY'))
define ('PDF_TYPE_ARRAY', 6);
if (!defined ('PDF_TYPE_OBJDEC'))
define ('PDF_TYPE_OBJDEC', 7);
if (!defined ('PDF_TYPE_OBJREF'))
define ('PDF_TYPE_OBJREF', 8);
if (!defined ('PDF_TYPE_OBJECT'))
define ('PDF_TYPE_OBJECT', 9);
if (!defined ('PDF_TYPE_STREAM'))
define ('PDF_TYPE_STREAM', 10);
class pdf_parser {
/**
* Filename
* @var string
*/
var $filename;
/**
* File resource
* @var resource
*/
var $f;
/**
* PDF Context
* @var object pdf_context-Instance
*/
var $c;
/**
* xref-Data
* @var array
*/
var $xref;
/**
* root-Object
* @var array
*/
var $root;
// mPDF 4.0 Added flag to show success on loading file
var $success;
var $errormsg;
/**
* Constructor
*
* @param string $filename Source-Filename
*/
function pdf_parser($filename) {
$this->filename = $filename;
// mPDF 4.0
$this->success = true;
$this->f = @fopen($this->filename, "rb");
if (!$this->f) {
$this->success = false;
$this->errormsg = sprintf("Cannot open %s !", $filename);
return false;
}
// mPDF 5.0 Removed pass by reference =&
$this->c = new pdf_context($this->f);
// Read xref-Data
$offset = $this->pdf_find_xref();
if ($offset===false) {
$this->success = false;
$this->errormsg = sprintf("Cannot open %s !", $filename);
return false;
}
$this->pdf_read_xref($this->xref, $offset);
if ($this->success == false) { return false; }
// Check for Encryption
$this->getEncryption();
if ($this->success == false) { return false; }
// Read root
$this->pdf_read_root();
if ($this->success == false) { return false; }
}
/**
* Close the opened file
*/
function closeFile() {
if (isset($this->f)) {
fclose($this->f);
unset($this->f);
}
}
/**
* Print Error and die
*
* @param string $msg Error-Message
*/
function error($msg) {
die("<b>PDF-Parser Error:</b> ".$msg);
}
/**
* Check Trailer for Encryption
*/
function getEncryption() {
if (isset($this->xref['trailer'][1]['/Encrypt'])) {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("File is encrypted!");
return false;
}
}
/**
* Find/Return /Root
*
* @return array
*/
function pdf_find_root() {
if ($this->xref['trailer'][1]['/Root'][0] != PDF_TYPE_OBJREF) {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Wrong Type of Root-Element! Must be an indirect reference");
return false;
}
return $this->xref['trailer'][1]['/Root'];
}
/**
* Read the /Root
*/
function pdf_read_root() {
// read root
$root = $this->pdf_find_root();
if ($root ===false) {
$this->success = false;
return false;
}
$this->root = $this->pdf_resolve_object($this->c, $root);
}
/**
* Find the xref-Table
*/
function pdf_find_xref() {
fseek ($this->f, -min(filesize($this->filename),1500), SEEK_END);
$data = fread($this->f, 1500);
$pos = strlen($data) - strpos(strrev($data), strrev('startxref'));
$data = substr($data, $pos);
if (!preg_match('/\s*(\d+).*$/s', $data, $matches)) {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Unable to find pointer to xref table");
return false;
}
return (int) $matches[1];
}
/**
* Read xref-table
*
* @param array $result Array of xref-table
* @param integer $offset of xref-table
* @param integer $start start-position in xref-table
* @param integer $end end-position in xref-table
*/
function pdf_read_xref(&$result, $offset, $start = null, $end = null) {
if (is_null ($start) || is_null ($end)) {
fseek($this->f, $o_pos = $offset);
$data = trim(fgets($this->f,1024));
if (strlen($data) == 0)
$data = trim(fgets($this->f,1024));
if ($data !== 'xref') {
fseek($this->f, $o_pos);
$data = trim(_fgets($this->f, true));
if ($data !== 'xref') {
if (preg_match('/(.*xref)(.*)/m', $data, $m)) { // xref 0 128 - in one line
fseek($this->f, $o_pos+strlen($m[1]));
} elseif (preg_match('/(x|r|e|f)+/', $data, $m)) { // correct invalid xref-pointer
$tmpOffset = $offset-4+strlen($m[0]);
$this->pdf_read_xref($result, $tmpOffset, $start, $end);
return;
} else {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Unable to find xref table - Maybe a Problem with 'auto_detect_line_endings'");
return;
}
}
}
$o_pos = ftell($this->f);
$data = explode(' ', trim(fgets($this->f,1024)));
if (count($data) != 2) {
fseek($this->f, $o_pos);
$data = explode(' ', trim(_fgets($this->f, true)));
if (count($data) != 2) {
if (count($data) > 2) { // no lineending
$n_pos = $o_pos+strlen($data[0])+strlen($data[1])+2;
fseek($this->f, $n_pos);
} else {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Unexpected header in xref table");
return;
}
}
}
$start = $data[0];
$end = $start + $data[1];
}
if (!isset($result['xref_location'])) {
$result['xref_location'] = $offset;
}
if (!isset($result['max_object']) || $end > $result['max_object']) {
$result['max_object'] = $end;
}
for (; $start < $end; $start++) {
$data = ltrim(fread($this->f, 20)); // Spezifications says: 20 bytes including newlines
$offset = substr($data, 0, 10);
$generation = substr($data, 11, 5);
if (!isset ($result['xref'][$start][(int) $generation])) {
$result['xref'][$start][(int) $generation] = (int) $offset;
}
}
$o_pos = ftell($this->f);
$data = fgets($this->f,1024);
if (strlen(trim($data)) == 0)
$data = fgets($this->f, 1024);
if (preg_match("/trailer/",$data)) {
if (preg_match("/(.*trailer[ \n\r]*)/",$data,$m)) {
fseek($this->f, $o_pos+strlen($m[1]));
}
// mPDF 5.0 Removed pass by reference =&
$c = new pdf_context($this->f);
$trailer = $this->pdf_read_value($c);
if (isset($trailer[1]['/Prev'])) {
$this->pdf_read_xref($result, $trailer[1]['/Prev'][1]);
$result['trailer'][1] = array_merge($result['trailer'][1], $trailer[1]);
} else {
$result['trailer'] = $trailer;
}
} else {
$data = explode(' ', trim($data));
if (count($data) != 2) {
fseek($this->f, $o_pos);
$data = explode(' ', trim (_fgets ($this->f, true)));
if (count($data) != 2) {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Unexpected data in xref table");
return;
}
}
$this->pdf_read_xref($result, null, (int) $data[0], (int) $data[0] + (int) $data[1]);
}
}
/**
* Reads an Value
*
* @param object $c pdf_context
* @param string $token a Token
* @return mixed
*/
function pdf_read_value(&$c, $token = null) {
if (is_null($token)) {
$token = $this->pdf_read_token($c);
}
if ($token === false) {
return false;
}
switch ($token) {
case '<':
// This is a hex string.
// Read the value, then the terminator
$pos = $c->offset;
while(1) {
$match = strpos ($c->buffer, '>', $pos);
// If you can't find it, try
// reading more data from the stream
if ($match === false) {
if (!$c->increase_length()) {
return false;
} else {
continue;
}
}
$result = substr ($c->buffer, $c->offset, $match - $c->offset);
$c->offset = $match+1;
return array (PDF_TYPE_HEX, $result);
}
break;
case '<<':
// This is a dictionary.
$result = array();
// Recurse into this function until we reach
// the end of the dictionary.
while (($key = $this->pdf_read_token($c)) !== '>>') {
if ($key === false) {
return false;
}
if (($value = $this->pdf_read_value($c)) === false) {
return false;
}
$result[$key] = $value;
}
return array (PDF_TYPE_DICTIONARY, $result);
case '[':
// This is an array.
$result = array();
// Recurse into this function until we reach
// the end of the array.
while (($token = $this->pdf_read_token($c)) !== ']') {
if ($token === false) {
return false;
}
if (($value = $this->pdf_read_value($c, $token)) === false) {
return false;
}
$result[] = $value;
}
return array (PDF_TYPE_ARRAY, $result);
case '(' :
// This is a string
$pos = $c->offset;
while(1) {
// Start by finding the next closed
// parenthesis
$match = strpos ($c->buffer, ')', $pos);
// If you can't find it, try
// reading more data from the stream
if ($match === false) {
if (!$c->increase_length()) {
return false;
} else {
continue;
}
}
// Make sure that there is no backslash
// before the parenthesis. If there is,
// move on. Otherwise, return the string.
$esc = preg_match('/([\\\\]+)$/', $tmpresult = substr($c->buffer, $c->offset, $match - $c->offset), $m);
if ($esc === 0 || strlen($m[1]) % 2 == 0) {
$result = $tmpresult;
$c->offset = $match + 1;
return array (PDF_TYPE_STRING, $result);
} else {
$pos = $match + 1;
if ($pos > $c->offset + $c->length) {
$c->increase_length();
}
}
}
case "stream":
$o_pos = ftell($c->file)-strlen($c->buffer);
$o_offset = $c->offset;
$c->reset($startpos = $o_pos + $o_offset);
$e = 0; // ensure line breaks in front of the stream
if ($c->buffer[0] == chr(10) || $c->buffer[0] == chr(13))
$e++;
if ($c->buffer[1] == chr(10) && $c->buffer[0] != chr(10))
$e++;
if ($this->actual_obj[1][1]['/Length'][0] == PDF_TYPE_OBJREF) {
// mPDF 5.0 Removed pass by reference =&
$tmp_c = new pdf_context($this->f);
$tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']);
$length = $tmp_length[1][1];
} else {
$length = $this->actual_obj[1][1]['/Length'][1];
}
if ($length > 0) {
$c->reset($startpos+$e,$length);
$v = $c->buffer;
} else {
$v = '';
}
$c->reset($startpos+$e+$length+9); // 9 = strlen("endstream")
return array(PDF_TYPE_STREAM, $v);
default :
if (is_numeric ($token)) {
// A numeric token. Make sure that
// it is not part of something else.
if (($tok2 = $this->pdf_read_token ($c)) !== false) {
if (is_numeric ($tok2)) {
// Two numeric tokens in a row.
// In this case, we're probably in
// front of either an object reference
// or an object specification.
// Determine the case and return the data
if (($tok3 = $this->pdf_read_token ($c)) !== false) {
switch ($tok3) {
case 'obj' :
return array (PDF_TYPE_OBJDEC, (int) $token, (int) $tok2);
case 'R' :
return array (PDF_TYPE_OBJREF, (int) $token, (int) $tok2);
}
// If we get to this point, that numeric value up
// there was just a numeric value. Push the extra
// tokens back into the stack and return the value.
array_push ($c->stack, $tok3);
}
}
array_push ($c->stack, $tok2);
}
return array (PDF_TYPE_NUMERIC, $token);
} else {
// Just a token. Return it.
return array (PDF_TYPE_TOKEN, $token);
}
}
}
/**
* Resolve an object
*
* @param object $c pdf_context
* @param array $obj_spec The object-data
* @param boolean $encapsulate Must set to true, cause the parsing and fpdi use this method only without this para
*/
function pdf_resolve_object(&$c, $obj_spec, $encapsulate = true) {
// Exit if we get invalid data
if (!is_array($obj_spec)) {
return false;
}
if ($obj_spec[0] == PDF_TYPE_OBJREF) {
// This is a reference, resolve it
if (isset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]])) {
// Save current file position
// This is needed if you want to resolve
// references while you're reading another object
// (e.g.: if you need to determine the length
// of a stream)
$old_pos = ftell($c->file);
// Reposition the file pointer and
// load the object header.
$c->reset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]]);
$header = $this->pdf_read_value($c,null,true);
if ($header[0] != PDF_TYPE_OBJDEC || $header[1] != $obj_spec[1] || $header[2] != $obj_spec[2]) {
// mPDF 4.0
$this->success = false;
$this->errormsg = sprintf("Unable to find object ({$obj_spec[1]}, {$obj_spec[2]}) at expected location");
return false;
}
// If we're being asked to store all the information
// about the object, we add the object ID and generation
// number for later use
$this->actual_obj =& $result;
if ($encapsulate) {
$result = array (
PDF_TYPE_OBJECT,
'obj' => $obj_spec[1],
'gen' => $obj_spec[2]
);
} else {
$result = array();
}
// Now simply read the object data until
// we encounter an end-of-object marker
while(1) {
$value = $this->pdf_read_value($c);
if ($value === false || count($result) > 4) {
// in this case the parser coudn't find an endobj so we break here
break;
}
if ($value[0] == PDF_TYPE_TOKEN && $value[1] === 'endobj') {
break;
}
$result[] = $value;
}
$c->reset($old_pos);
if (isset($result[2][0]) && $result[2][0] == PDF_TYPE_STREAM) {
$result[0] = PDF_TYPE_STREAM;
}
return $result;
}
} else {
return $obj_spec;
}
}
/**
* Reads a token from the file
*
* @param object $c pdf_context
* @return mixed
*/
function pdf_read_token(&$c)
{
// If there is a token available
// on the stack, pop it out and
// return it.
if (count($c->stack)) {
return array_pop($c->stack);
}
// Strip away any whitespace
do {
if (!$c->ensure_content()) {
return false;
}
$c->offset += _strspn($c->buffer, " \n\r\t", $c->offset);
} while ($c->offset >= $c->length - 1);
// Get the first character in the stream
$char = $c->buffer[$c->offset++];
switch ($char) {
case '[' :
case ']' :
case '(' :
case ')' :
// This is either an array or literal string
// delimiter, Return it
return $char;
case '<' :
case '>' :
// This could either be a hex string or
// dictionary delimiter. Determine the
// appropriate case and return the token
if ($c->buffer[$c->offset] == $char) {
if (!$c->ensure_content()) {
return false;
}
$c->offset++;
return $char . $char;
} else {
return $char;
}
default :
// This is "another" type of token (probably
// a dictionary entry or a numeric value)
// Find the end and return it.
if (!$c->ensure_content()) {
return false;
}
while(1) {
// Determine the length of the token
$pos = _strcspn($c->buffer, " []<>()\r\n\t/", $c->offset);
if ($c->offset + $pos <= $c->length - 1) {
break;
} else {
// If the script reaches this point,
// the token may span beyond the end
// of the current buffer. Therefore,
// we increase the size of the buffer
// and try again--just to be safe.
$c->increase_length();
}
}
$result = substr($c->buffer, $c->offset - 1, $pos + 1);
$c->offset += $pos;
return $result;
}
}
}
?>

View File

@ -1,5 +0,0 @@
Alternative sources of Hyphenation programs or TEX files:
OpenOffice: http://wiki.services.openoffice.org/wiki/Dictionaries
Hyphenator4PHP- alternative PHP hyphenator scripts: http://apps.sourceforge.net/trac/hyphenator4php/

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
dis/es/tab/lish/men/tar/i/an/ism

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
<?php
/*
Adapted from Hyphenator 1.0.2
http://code.google.com/p/hyphenator/
*/
$patterns="1ba 1be 1bi 1bo 1bu 1by 1da 1de 1di 1do 1du 1dy 1d\xc3\xa4 1d\xc3\xb6 1fa 1fe 1fi 1fo 1fu 1fy 1ga 1ge 1gi 1go 1gu 1gy 1g\xc3\xa4 1g\xc3\xb6 1ha 1he 1hi 1ho 1hu 1hy 1h\xc3\xa4 1h\xc3\xb6 1ja 1je 1ji 1jo 1ju 1jy 1j\xc3\xa4 1j\xc3\xb6 1ka 1ke 1ki 1ko 1ku 1ky 1k\xc3\xa4 1k\xc3\xb6 1la 1le 1li 1lo 1lu 1ly 1l\xc3\xa4 1l\xc3\xb6 1ma 1me 1mi 1mo 1mu 1my 1m\xc3\xa4 1m\xc3\xb6 1na 1ne 1ni 1no 1nu 1ny 1n\xc3\xa4 1n\xc3\xb6 1pa 1pe 1pi 1po 1pu 1py 1p\xc3\xa4 1p\xc3\xb6 1ra 1re 1ri 1ro 1ru 1ry 1r\xc3\xa4 1r\xc3\xb6 1sa 1se 1si 1so 1su 1sy 1s\xc3\xa4 1s\xc3\xb6 1ta 1te 1ti 1to 1tu 1ty 1t\xc3\xa4 1t\xc3\xb6 1va 1ve 1vi 1vo 1vu 1vy 1v\xc3\xa4 1v\xc3\xb6 1st2r \xc3\xa42y y1a2 y1o2 o1y \xc3\xb62y u1y2 y1u2 \xc3\xb63a2 \xc3\xb63o2 \xc3\xa43a2 \xc3\xa43o2 \xc3\xa41u2 \xc3\xb61u2 a1\xc3\xa4 a1\xc3\xb6 o1\xc3\xa4 o1\xc3\xb6 u1\xc3\xa42 u1\xc3\xb62 \xc3\xa42\xc3\xa4 \xc3\xb62\xc3\xb6 \xc3\xa42\xc3\xb6 \xc3\xb62\xc3\xa4 aa1i2 aa1e2 aa1o2 aa1u2 ee1a2 ee1i2 ee1u2 ee1y2 ii1a2 ii1e2 ii1o2 uu1a2 uu1e2 uu1o2 uu1i2 e1aa i1aa o1aa u1aa u1ee a1uu i1uu e1uu o1uu \xc3\xa4\xc3\xa41i \xc3\xa4\xc3\xa41e \xc3\xa4\xc3\xa43y i1\xc3\xa4\xc3\xa4 e1\xc3\xa4\xc3\xa4 y1\xc3\xa4\xc3\xa4 i1\xc3\xb6\xc3\xb6 a1ei a1oi e1ai i1au y1ei ai1a ai1e ai1o ai1u au1a au1e eu1a ie1a ie1o ie1y io1a2 io1e2 iu1a iu1e iu1o oi1a oi1e oi1o oi1u o1ui ou1e ou1o ue1a ui1e uo1a uo1u e1\xc3\xb62 \xc3\xb61e2 _\xc3\xa42 u2s yli1o2p ali1a2v 1sp2li alous1 keus1 rtaus1 2s1ohje 2s1a2sia 1a2sian 1a2siat 1a2sioi r2as l2as 2s1o2pisk 2n1o2pet 2s1a2loi 2n1o2pist 2s1o2pist 2s1o2sa 2n1o2sa alkei2s1 perus1 2s1i2dea_ 2s1i2dean 2s1e2sity 2n1e2dus 2s1ajatu 2s1ase 2s1apu 2s1y2rit _ydi2n1 _suu2r1a2 2s1y2hti 2n1otto 2n1oton 2n1anto 2n1anno 2n1a2jan 2n1aika 2n1o2mai 2n1y2lit 2s1a2len 2n1a2len 1a2siaka2s1 ulo2s1 2n1a2jo 2s1a2jo b2l 1b2lo bib3li b2r 1b2ri 1b2ro 1b2ru d2r 1d2ra f2l 1f2la f2r 1f2ra 1f2re g2l 1g2lo g2r 1g2ra k2l 1k2ra 1k2re 1k2ri 1k2v 1k2va p2l p2r 1p2ro c2l q2v 1q2vi sc2h ts2h ch2r";
?>

File diff suppressed because one or more lines are too long

View File

@ -1,11 +0,0 @@
<?php
/*
Adapted from Hyphenator 1.0.2
http://code.google.com/p/hyphenator/
Retrieved from http://www.ctan.org/tex-archive/language/hyphenation/ithyph.tex
*/
$patterns="_a3p2n _anti1 _anti3m2n _bio1 _ca4p3s _circu2m1 _contro1 _di2s3cine _e2x1eu _fran2k3 _free3 _li3p2sa _narco1 _opto1 _orto3p2 _para1 _poli3p2 _pre1 _p2s _re1i2scr _sha2re3 _tran2s3c _tran2s3d _tran2s3l _tran2s3n _tran2s3p _tran2s3r _tran2s3t _su2b3lu _su2b3r _wa2g3n _wel2t1 2'2 a1ia a1ie a1io a1iu a1uo a1ya 2at_ e1iu e2w o1ia o1ie o1io o1iu 1b 2bb 2bc 2bd 2bf 2bm 2bn 2bp 2bs 2bt 2bv b2l b2r 2b_ 2b' 1c 2cb 2cc 2cd 2cf 2ck 2cm 2cn 2cq 2cs 2ct 2cz 2chh c2h 2chb ch2r 2chn c2l c2r 2c_ 2c' _c2 1d 2db 2dd 2dg 2dl 2dm 2dn 2dp d2r 2ds 2dt 2dv 2dw 2d_ 2d' _d2 1f 2fb 2fg 2ff 2fn f2l f2r 2fs 2ft 2f_ 2f' 1g 2gb 2gd 2gf 2gg g2h g2l 2gm g2n 2gp g2r 2gs 2gt 2gv 2gw 2gz 2gh2t 2g_ 2g' 1h 2hb 2hd 2hh hi3p2n h2l 2hm 2hn 2hr 2hv 2h_ 2h' 1j 2j_ 2j' 1k 2kg 2kf k2h 2kk k2l 2km k2r 2ks 2kt 2k_ 2k' 1l 2lb 2lc 2ld 2l3f2 2lg l2h 2lk 2ll 2lm 2ln 2lp 2lq 2lr 2ls 2lt 2lv 2lw 2lz 2l_ 2l'_ 2l'' 1m 2mb 2mc 2mf 2ml 2mm 2mn 2mp 2mq 2mr 2ms 2mt 2mv 2mw 2m_ 2m' 1n 2nb 2nc 2nd 2nf 2ng 2nk 2nl 2nm 2nn 2np 2nq 2nr 2ns n2s3fer 2nt 2nv 2nz n2g3n 2nheit 2n_ 2n' 1p 2pd p2h p2l 2pn 3p2ne 2pp p2r 2ps 3p2sic 2pt 2pz 2p_ 2p' 1q 2qq 2q_ 2q' 1r 2rb 2rc 2rd 2rf r2h 2rg 2rk 2rl 2rm 2rn 2rp 2rq 2rr 2rs 2rt r2t2s3 2rv 2rx 2rw 2rz 2r_ 2r' 1s2 2shm 2sh_ 2sh' 2s3s s4s3m 2s3p2n 2stb 2stc 2std 2stf 2stg 2stm 2stn 2stp 2sts 2stt 2stv 2sz 4s_ 4s'_ 4s'' 1t 2tb 2tc 2td 2tf 2tg t2h t2l 2tm 2tn 2tp t2r t2s 3t2sch 2tt t2t3s 2tv 2tw t2z 2tzk tz2s 2t_ 2t'_ 2t'' 1v 2vc v2l v2r 2vv 2v_ 2v'_ 2v'' 1w w2h wa2r 2w1y 2w_ 2w' 1x 2xb 2xc 2xf 2xh 2xm 2xp 2xt 2xw 2x_ 2x' y1ou y1i 1z 2zb 2zd 2zl 2zn 2zp 2zt 2zs 2zv 2zz 2z_ 2z'_ 2z'' _z2";
?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,66 +0,0 @@
body {
margin : 0 auto;
width:100%;
font-family: "Verdana";
color: #40454b;
font-size: 12px;
text-align:center;
}
.main {
width:540px;
margin: 0 auto;
text-align:left;
}
.heading {
font-size:14px;
font-weight:bold;
color:#CC0000;
padding:5px;
margin-left:10px;
border-bottom:solid;
border-bottom-width:1px;
border-bottom-color:#333333;
/* Use this to suppress the horizontal line under the heading */
/* border-bottom: 0px solid #000000; */
}
table {
font-family: "Verdana";
color: #40454b;
font-size: 12px;
}
.demo {
margin : 0 auto;
width:100%;
margin:20px;
/* Use this to suppress all the bars and text */
/* display: none; */
}
td {
vertical-align: top;
padding: 0 0.5em 0 0;
}
.code {
font-family: "Courier New", Courier, monospace;
font-size: 10px;
}
.code2 {
font-family: "Courier New", Courier, monospace;
font-size: 11px; font-weight: bold; color: red;
}
.barheading {
color:#006600;
font-weight:bold;
}
.progressBar {
border: 1px solid #000000;
background-color: #EEEEEE;
width: 200px;
font-size: 6px;
}
.innerBar {
background-color:#00CC00;
width: 0%;
}
#box3 {
font-weight: bold;
}

View File

@ -1,2 +0,0 @@
This is just a placeholder file so that the folder is created on install.
It can be deleted once installed.

View File

@ -1,2 +0,0 @@
This is just a placeholder file so that the folder is created on install.
It can be deleted once installed.

File diff suppressed because it is too large Load Diff

View File

@ -1,218 +0,0 @@
<?php
/////////////////
$unicode_ranges = array(
array('starthex'=> '0000', 'endhex'=>'007E', 'startdec'=> 0, 'enddec'=>126 , 'range'=>'Basic Latin'),
array('starthex'=> '00A0', 'endhex'=>'00FF', 'startdec'=> 160, 'enddec'=>255 , 'range'=>'Latin-1 Supplement'),
array('starthex'=> '0100', 'endhex'=>'017F', 'startdec'=> 256, 'enddec'=>383 , 'range'=>'Latin Extended-A'),
array('starthex'=> '0180', 'endhex'=>'024F', 'startdec'=> 384, 'enddec'=>591 , 'range'=>'Latin Extended-B'),
array('starthex'=> '0250', 'endhex'=>'02AF', 'startdec'=> 592, 'enddec'=>687 , 'range'=>'IPA Extensions'),
array('starthex'=> '02B0', 'endhex'=>'02FF', 'startdec'=> 688, 'enddec'=>767 , 'range'=>'Spacing Modifier Letters'),
array('starthex'=> '0300', 'endhex'=>'036F', 'startdec'=> 768, 'enddec'=>879 , 'range'=>'Combining Diacritical Marks', 'combining'=>true),
array('starthex'=> '0370', 'endhex'=>'03FF', 'startdec'=> 880, 'enddec'=>1023 , 'range'=>'Greek'),
array('starthex'=> '0400', 'endhex'=>'04FF', 'startdec'=> 1024, 'enddec'=>1279 , 'range'=>'Cyrillic'),
array('starthex'=> '0500', 'endhex'=>'052F', 'startdec'=> 1280, 'enddec'=>1327 , 'range'=>'Cyrillic Supplement'),
array('starthex'=> '0530', 'endhex'=>'058F', 'startdec'=> 1328, 'enddec'=>1423 , 'range'=>'Armenian'),
array('starthex'=> '0590', 'endhex'=>'05FF', 'startdec'=> 1424, 'enddec'=>1535 , 'range'=>'Hebrew', 'rtl'=>true, 'special'=>true),
array('starthex'=> '0600', 'endhex'=>'06FF', 'startdec'=> 1536, 'enddec'=>1791 , 'range'=>'Arabic', 'rtl'=>true, 'special'=>true),
array('starthex'=> '0700', 'endhex'=>'074F', 'startdec'=> 1792, 'enddec'=>1871 , 'range'=>'Syriac', 'rtl'=>true, 'special'=>true),
array('starthex'=> '0750', 'endhex'=>'077F', 'startdec'=> 1872, 'enddec'=>1919 , 'range'=>'Arabic Supplement', 'rtl'=>true, 'special'=>true),
array('starthex'=> '0780', 'endhex'=>'07BF', 'startdec'=> 1920, 'enddec'=>1983 , 'range'=>'Thaana', 'rtl'=>true, 'special'=>true),
array('starthex'=> '07C0', 'endhex'=>'07FF', 'startdec'=> 1984, 'enddec'=>2047 , 'range'=>'N\'Ko (Mandenkan)', 'rtl'=>true),
array('starthex'=> '0800', 'endhex'=>'083E', 'startdec'=> 2048, 'enddec'=> 2110, 'range'=>'Samaritan', 'rtl'=>true),
array('starthex'=> '0900', 'endhex'=>'097F', 'startdec'=> 2304, 'enddec'=>2431 , 'range'=>'Devanagari', 'indic'=>true, 'special'=>true),
array('starthex'=> '0980', 'endhex'=>'09FF', 'startdec'=> 2432, 'enddec'=>2559 , 'range'=>'Bengali', 'indic'=>true, 'special'=>true),
array('starthex'=> '0A00', 'endhex'=>'0A7F', 'startdec'=> 2560, 'enddec'=>2687 , 'range'=>'Gurmukhi', 'indic'=>true, 'special'=>true),
array('starthex'=> '0A80', 'endhex'=>'0AFF', 'startdec'=> 2688, 'enddec'=>2815 , 'range'=>'Gujarati', 'indic'=>true, 'special'=>true),
array('starthex'=> '0B00', 'endhex'=>'0B7F', 'startdec'=> 2816, 'enddec'=>2943 , 'range'=>'Oriya', 'indic'=>true, 'special'=>true),
array('starthex'=> '0B80', 'endhex'=>'0BFF', 'startdec'=> 2944, 'enddec'=>3071 , 'range'=>'Tamil', 'indic'=>true, 'special'=>true),
array('starthex'=> '0C00', 'endhex'=>'0C7F', 'startdec'=> 3072, 'enddec'=>3199 , 'range'=>'Telugu', 'indic'=>true, 'special'=>true),
array('starthex'=> '0C80', 'endhex'=>'0CFF', 'startdec'=> 3200, 'enddec'=>3327 , 'range'=>'Kannada', 'indic'=>true, 'special'=>true),
array('starthex'=> '0D00', 'endhex'=>'0D7F', 'startdec'=> 3328, 'enddec'=>3455 , 'range'=>'Malayalam', 'indic'=>true, 'special'=>true),
array('starthex'=> '0D80', 'endhex'=>'0DFF', 'startdec'=> 3456, 'enddec'=>3583 , 'range'=>'Sinhala', 'special'=>true),
array('starthex'=> '0E00', 'endhex'=>'0E7F', 'startdec'=> 3584, 'enddec'=>3711 , 'range'=>'Thai'),
array('starthex'=> '0E80', 'endhex'=>'0EFF', 'startdec'=> 3712, 'enddec'=>3839 , 'range'=>'Lao'),
array('starthex'=> '0F00', 'endhex'=>'0FFF', 'startdec'=> 3840, 'enddec'=>4095 , 'range'=>'Tibetan', 'special'=>true),
array('starthex'=> '1000', 'endhex'=>'109F', 'startdec'=> 4096, 'enddec'=>4255 , 'range'=>'Myanmar', 'special'=>true),
array('starthex'=> '10A0', 'endhex'=>'10FF', 'startdec'=> 4256, 'enddec'=>4351 , 'range'=>'Georgian'),
array('starthex'=> '1100', 'endhex'=>'11FF', 'startdec'=> 4352, 'enddec'=>4607 , 'range'=>'Hangul Jamo', 'cjk'=>true),
array('starthex'=> '1200', 'endhex'=>'137F', 'startdec'=> 4608, 'enddec'=>4991 , 'range'=>'Ethiopic'),
array('starthex'=> '1380', 'endhex'=>'139F', 'startdec'=> 4992, 'enddec'=>5023 , 'range'=>'Ethiopic Supplement'),
array('starthex'=> '13A0', 'endhex'=>'13FF', 'startdec'=> 5024, 'enddec'=>5119 , 'range'=>'Cherokee'),
array('starthex'=> '1400', 'endhex'=>'167F', 'startdec'=> 5120, 'enddec'=>5759 , 'range'=>'Unified Canadian Aboriginal Syllabics'),
array('starthex'=> '1680', 'endhex'=>'169F', 'startdec'=> 5760, 'enddec'=>5791 , 'range'=>'Ogham'),
array('starthex'=> '16A0', 'endhex'=>'16FF', 'startdec'=> 5792, 'enddec'=>5887 , 'range'=>'Runic'),
array('starthex'=> '1700', 'endhex'=>'171F', 'startdec'=> 5888, 'enddec'=> 5919, 'range'=>'Tagalog (Philippine)'),
array('starthex'=> '1720', 'endhex'=>'173F', 'startdec'=> 5920, 'enddec'=> 5951, 'range'=>'Hanunoo (Philippine)'),
array('starthex'=> '1740', 'endhex'=>'175F', 'startdec'=> 5952, 'enddec'=> 5983, 'range'=>'Buhid (Philippine)'),
array('starthex'=> '1760', 'endhex'=>'177F', 'startdec'=> 5984, 'enddec'=> 6015, 'range'=>'Tagbanwa (Philippine)'),
array('starthex'=> '1780', 'endhex'=>'17FF', 'startdec'=> 6016, 'enddec'=>6143 , 'range'=>'Khmer', 'special'=>true),
array('starthex'=> '1800', 'endhex'=>'18AF', 'startdec'=> 6144, 'enddec'=>6319 , 'range'=>'Mongolian', 'vertical'=>true),
array('starthex'=> '18B0', 'endhex'=>'18F5', 'startdec'=> 6320, 'enddec'=>6389 , 'range'=>'Canadian Syllabics'),
array('starthex'=> '1900', 'endhex'=>'194F', 'startdec'=> 6400, 'enddec'=> 6479, 'range'=>'Limbu'),
array('starthex'=> '1950', 'endhex'=>'197F', 'startdec'=> 6480, 'enddec'=> 6527, 'range'=>'Tai Le'),
array('starthex'=> '1980', 'endhex'=>'19DF', 'startdec'=> 6528, 'enddec'=> 6623, 'range'=>'New Tai Lue'),
array('starthex'=> '19E0', 'endhex'=>'19FF', 'startdec'=> 6624, 'enddec'=> 6655, 'range'=>'Khmer Symbols', 'special'=>true),
array('starthex'=> '1A00', 'endhex'=>'1A1F', 'startdec'=> 6656, 'enddec'=> 6687, 'range'=>'Buginese'),
array('starthex'=> '1A20', 'endhex'=>'1AAF', 'startdec'=> 6688, 'enddec'=> 6831, 'range'=>'Tai Tham'),
array('starthex'=> '1B00', 'endhex'=>'1B7F', 'startdec'=> 6912, 'enddec'=> 7039, 'range'=>'Balinese', 'special'=>true),
array('starthex'=> '1B80', 'endhex'=>'1BBF', 'startdec'=> 7040, 'enddec'=> 7103, 'range'=>'Sundanese'),
array('starthex'=> '1C00', 'endhex'=>'1C4F', 'startdec'=> 7168, 'enddec'=> 7247, 'range'=>'Lepcha (Rong)'),
array('starthex'=> '1C50', 'endhex'=>'1C7F', 'startdec'=> 7248, 'enddec'=> 7295, 'range'=>'Ol Chiki (Santali / Ol Cemet)'),
array('starthex'=> '1CD0', 'endhex'=>'1CFF', 'startdec'=> 7376, 'enddec'=> 7423, 'range'=>'Vedic Extensions'),
array('starthex'=> '1D00', 'endhex'=>'1D7F', 'startdec'=> 7424, 'enddec'=> 7551, 'range'=>'Phonetic Extensions'),
array('starthex'=> '1D80', 'endhex'=>'1DBF', 'startdec'=> 7552, 'enddec'=> 7615, 'range'=>'Phonetic Extensions Supplement'),
array('starthex'=> '1DC0', 'endhex'=>'1DFF', 'startdec'=> 7616, 'enddec'=> 7679, 'range'=>'Combining Diacritical Marks Supplement', 'combining'=>true),
array('starthex'=> '1E00', 'endhex'=>'1EFF', 'startdec'=> 7680, 'enddec'=>7935 , 'range'=>'Latin Extended Additional'),
array('starthex'=> '1F00', 'endhex'=>'1FFF', 'startdec'=> 7936, 'enddec'=>8191 , 'range'=>'Greek Extended'),
array('starthex'=> '2000', 'endhex'=>'206F', 'startdec'=> 8192, 'enddec'=>8303 , 'range'=>'General Punctuation'),
array('starthex'=> '2070', 'endhex'=>'209F', 'startdec'=> 8304, 'enddec'=>8351 , 'range'=>'Superscripts and Subscripts'),
array('starthex'=> '20A0', 'endhex'=>'20CF', 'startdec'=> 8352, 'enddec'=>8399 , 'range'=>'Currency Symbols'),
array('starthex'=> '20D0', 'endhex'=>'20FF', 'startdec'=> 8400, 'enddec'=>8447 , 'range'=>'Combining Marks for Symbols', 'combining'=>true),
array('starthex'=> '2100', 'endhex'=>'214F', 'startdec'=> 8448, 'enddec'=>8527 , 'range'=>'Letterlike Symbols'),
array('starthex'=> '2150', 'endhex'=>'218F', 'startdec'=> 8528, 'enddec'=>8591 , 'range'=>'Number Forms'),
array('starthex'=> '2190', 'endhex'=>'21FF', 'startdec'=> 8592, 'enddec'=>8703 , 'range'=>'Arrows'),
array('starthex'=> '2200', 'endhex'=>'22FF', 'startdec'=> 8704, 'enddec'=>8959 , 'range'=>'Mathematical Operators'),
array('starthex'=> '2300', 'endhex'=>'23FF', 'startdec'=> 8960, 'enddec'=>9215 , 'range'=>'Miscellaneous Technical'),
array('starthex'=> '2400', 'endhex'=>'243F', 'startdec'=> 9216, 'enddec'=>9279 , 'range'=>'Control Pictures'),
array('starthex'=> '2440', 'endhex'=>'245F', 'startdec'=> 9280, 'enddec'=>9311 , 'range'=>'Optical Character Recognition'),
array('starthex'=> '2460', 'endhex'=>'24FF', 'startdec'=> 9312, 'enddec'=>9471 , 'range'=>'Enclosed Alphanumerics'),
array('starthex'=> '2500', 'endhex'=>'257F', 'startdec'=> 9472, 'enddec'=>9599 , 'range'=>'Box Drawing'),
array('starthex'=> '2580', 'endhex'=>'259F', 'startdec'=> 9600, 'enddec'=>9631 , 'range'=>'Block Elements'),
array('starthex'=> '25A0', 'endhex'=>'25FF', 'startdec'=> 9632, 'enddec'=>9727 , 'range'=>'Geometric Shapes'),
array('starthex'=> '2600', 'endhex'=>'26FF', 'startdec'=> 9728, 'enddec'=>9983 , 'range'=>'Miscellaneous Symbols'),
array('starthex'=> '2700', 'endhex'=>'27BF', 'startdec'=> 9984, 'enddec'=>10175 , 'range'=>'Dingbats'),
array('starthex'=> '27C0', 'endhex'=>'27EF', 'startdec'=> 10176, 'enddec'=> 10223, 'range'=>'Miscellaneous Mathematical Symbols-A'),
array('starthex'=> '27F0', 'endhex'=>'27FF', 'startdec'=> 10224, 'enddec'=> 10239, 'range'=>'Supplemental Arrows-A'),
array('starthex'=> '2800', 'endhex'=>'28FF', 'startdec'=> 10240, 'enddec'=>10495 , 'range'=>'Braille Patterns'),
array('starthex'=> '2900', 'endhex'=>'297F', 'startdec'=> 10496, 'enddec'=> 10623, 'range'=>'Supplemental Arrows-B'),
array('starthex'=> '2980', 'endhex'=>'29FF', 'startdec'=> 10624, 'enddec'=> 10751, 'range'=>'Miscellaneous Mathematical Symbols-B'),
array('starthex'=> '2A00', 'endhex'=>'2AFF', 'startdec'=> 10752, 'enddec'=> 11007, 'range'=>'Supplemental Mathematical Operators'),
array('starthex'=> '2B00', 'endhex'=>'2BFF', 'startdec'=> 11008, 'enddec'=> 11263, 'range'=>'Miscellaneous Symbols and Arrows'),
array('starthex'=> '2C00', 'endhex'=>'2C5F', 'startdec'=> 11264, 'enddec'=> 11359, 'range'=>'Glagolitic'),
array('starthex'=> '2C60', 'endhex'=>'2C7F', 'startdec'=> 11360, 'enddec'=> 11391, 'range'=>'Latin Extended-C'),
array('starthex'=> '2C80', 'endhex'=>'2CFF', 'startdec'=> 11392, 'enddec'=> 11519, 'range'=>'Coptic'),
array('starthex'=> '2D00', 'endhex'=>'2D2F', 'startdec'=> 11520, 'enddec'=> 11567, 'range'=>'Georgian Supplement'),
array('starthex'=> '2D30', 'endhex'=>'2D7F', 'startdec'=> 11568, 'enddec'=> 11647, 'range'=>'Tifinagh'),
array('starthex'=> '2D80', 'endhex'=>'2DDF', 'startdec'=> 11648, 'enddec'=> 11743, 'range'=>'Ethiopic Extended'),
array('starthex'=> '2DE0', 'endhex'=>'2DFF', 'startdec'=> 11744, 'enddec'=> 11775, 'range'=>'Cyrillic Extended-A'),
array('starthex'=> '2E00', 'endhex'=>'2E7F', 'startdec'=> 11776, 'enddec'=> 11903, 'range'=>'Supplemental Punctuation'),
array('starthex'=> '2E80', 'endhex'=>'2EFF', 'startdec'=> 11904, 'enddec'=>12031 , 'range'=>'CJK Radicals Supplement', 'cjk'=>true),
array('starthex'=> '2F00', 'endhex'=>'2FDF', 'startdec'=> 12032, 'enddec'=>12255 , 'range'=>'Kangxi Radicals', 'cjk'=>true),
array('starthex'=> '2FF0', 'endhex'=>'2FFF', 'startdec'=> 12272, 'enddec'=>12287 , 'range'=>'Ideographic Description Characters', 'cjk'=>true),
array('starthex'=> '3000', 'endhex'=>'303F', 'startdec'=> 12288, 'enddec'=>12351 , 'range'=>'CJK Symbols and Punctuation', 'cjk'=>true),
array('starthex'=> '3040', 'endhex'=>'309F', 'startdec'=> 12352, 'enddec'=>12447 , 'range'=>'Hiragana', 'cjk'=>true),
array('starthex'=> '30A0', 'endhex'=>'30FF', 'startdec'=> 12448, 'enddec'=>12543 , 'range'=>'Katakana', 'cjk'=>true),
array('starthex'=> '3100', 'endhex'=>'312F', 'startdec'=> 12544, 'enddec'=>12591 , 'range'=>'Bopomofo', 'cjk'=>true),
array('starthex'=> '3130', 'endhex'=>'318F', 'startdec'=> 12592, 'enddec'=>12687 , 'range'=>'Hangul Compatibility Jamo', 'cjk'=>true),
array('starthex'=> '3190', 'endhex'=>'319F', 'startdec'=> 12688, 'enddec'=>12703 , 'range'=>'Kanbun', 'cjk'=>true),
array('starthex'=> '31A0', 'endhex'=>'31BF', 'startdec'=> 12704, 'enddec'=>12735 , 'range'=>'Bopomofo Extended', 'cjk'=>true),
array('starthex'=> '31C0', 'endhex'=>'31EF', 'startdec'=> 12736, 'enddec'=> 12783, 'range'=>'CJK Strokes', 'cjk'=>true),
array('starthex'=> '31F0', 'endhex'=>'31FF', 'startdec'=> 12784, 'enddec'=> 12799, 'range'=>'Katakana Phonetic Extensions', 'cjk'=>true),
array('starthex'=> '3200', 'endhex'=>'32FF', 'startdec'=> 12800, 'enddec'=>13055 , 'range'=>'Enclosed CJK Letters and Months', 'cjk'=>true),
array('starthex'=> '3300', 'endhex'=>'33FF', 'startdec'=> 13056, 'enddec'=>13311 , 'range'=>'CJK Compatibility', 'cjk'=>true),
array('starthex'=> '3400', 'endhex'=>'4DB5', 'startdec'=> 13312, 'enddec'=>19893 , 'range'=>'CJK Unified Ideographs Extension A', 'cjk'=>true),
array('starthex'=> '4DC0', 'endhex'=>'4DFF', 'startdec'=> 19904, 'enddec'=> 19967, 'range'=>'Yijing Hexagram Symbols', 'cjk'=>true),
array('starthex'=> '4E00', 'endhex'=>'9FFF', 'startdec'=> 19968, 'enddec'=>40959 , 'range'=>'CJK Unified Ideographs', 'cjk'=>true),
array('starthex'=> 'A000', 'endhex'=>'A48F', 'startdec'=> 40960, 'enddec'=>42127 , 'range'=>'Yi Syllables', 'cjk'=>true),
array('starthex'=> 'A490', 'endhex'=>'A4CF', 'startdec'=> 42128, 'enddec'=> 42191, 'range'=>'Yi Radicals', 'cjk'=>true),
array('starthex'=> 'A4D0', 'endhex'=>'A4FF', 'startdec'=> 42192, 'enddec'=> 42239, 'range'=>'Lisu'),
array('starthex'=> 'A500', 'endhex'=>'A63F', 'startdec'=> 42240, 'enddec'=> 42559, 'range'=>'Vai'),
array('starthex'=> 'A640', 'endhex'=>'A69F', 'startdec'=> 42560, 'enddec'=> 42655, 'range'=>'Cyrillic Extended-B'),
array('starthex'=> 'A6A0', 'endhex'=>'A6FF', 'startdec'=> 42656, 'enddec'=> 42751, 'range'=>'Bamum'),
array('starthex'=> 'A700', 'endhex'=>'A71F', 'startdec'=> 42752, 'enddec'=> 42783, 'range'=>'Modifier Tone Letters'),
array('starthex'=> 'A720', 'endhex'=>'A7FF', 'startdec'=> 42784, 'enddec'=> 43007, 'range'=>'Latin Extended-D'),
array('starthex'=> 'A800', 'endhex'=>'A82F', 'startdec'=> 43008, 'enddec'=> 43055, 'range'=>'Syloti Nagri'),
array('starthex'=> 'A840', 'endhex'=>'A87F', 'startdec'=> 43072, 'enddec'=> 43135, 'range'=>'Phags-pa', 'vertical'=>true),
array('starthex'=> 'A880', 'endhex'=>'A8DF', 'startdec'=> 43136, 'enddec'=> 43231, 'range'=>'Saurashtra'),
array('starthex'=> 'A900', 'endhex'=>'A92F', 'startdec'=> 43264, 'enddec'=> 43311, 'range'=>'Kayah Li'),
array('starthex'=> 'A930', 'endhex'=>'A95F', 'startdec'=> 43312, 'enddec'=> 43359, 'range'=>'Rejang'),
array('starthex'=> 'A960', 'endhex'=>'A97F', 'startdec'=> 43360, 'enddec'=> 43391, 'range'=>'Hangul Choseong', 'cjk'=>true),
array('starthex'=> 'A980', 'endhex'=>'A9DF', 'startdec'=> 43392, 'enddec'=> 43487, 'range'=>'Javanese'),
array('starthex'=> 'AA00', 'endhex'=>'AA5F', 'startdec'=> 43520, 'enddec'=> 43615, 'range'=>'Cham'),
array('starthex'=> 'AA60', 'endhex'=>'AA7B', 'startdec'=> 43616, 'enddec'=> 43647, 'range'=>'Myanmar', 'special'=>true),
array('starthex'=> 'AA80', 'endhex'=>'AADF', 'startdec'=> 43648, 'enddec'=> 43743, 'range'=>'Tai Viet'),
array('starthex'=> 'ABC0', 'endhex'=>'ABF9', 'startdec'=> 43968, 'enddec'=> 44025, 'range'=>'Meetei Mayek'),
array('starthex'=> 'AC00', 'endhex'=>'D7FF', 'startdec'=> 44032, 'enddec'=>55295 , 'range'=>'Hangul Syllables', 'cjk'=>true),
/*
array('starthex'=> 'D800', 'endhex'=>'DB7F', 'startdec'=> 55296, 'enddec'=>56191 , 'range'=>'High Surrogates', 'reserved'=>true),
array('starthex'=> 'DB80', 'endhex'=>'DBFF', 'startdec'=> 56192, 'enddec'=>56319 , 'range'=>'High Private Use Surrogates', 'reserved'=>true),
array('starthex'=> 'DC00', 'endhex'=>'DFFF', 'startdec'=> 56320, 'enddec'=>57343 , 'range'=>'Low Surrogates', 'reserved'=>true),
*/
array('starthex'=> 'E000', 'endhex'=>'F8FF', 'startdec'=> 57344, 'enddec'=>63743 , 'range'=>'Private Use', 'pua'=>true),
array('starthex'=> 'F900', 'endhex'=>'FAFF', 'startdec'=> 63744, 'enddec'=>64255 , 'range'=>'CJK Compatibility Ideographs', 'cjk'=>true),
array('starthex'=> 'FB00', 'endhex'=>'FB4F', 'startdec'=> 64256, 'enddec'=>64335 , 'range'=>'Alphabetic Presentation Forms'),
array('starthex'=> 'FB50', 'endhex'=>'FDFF', 'startdec'=> 64336, 'enddec'=>65023 , 'range'=>'Arabic Presentation Forms-A', 'rtl'=>true),
array('starthex'=> 'FE00', 'endhex'=>'FE0F', 'startdec'=> 65024, 'enddec'=> 65039, 'range'=>'Variation Selectors'),
array('starthex'=> 'FE10', 'endhex'=>'FE1F', 'startdec'=> 65040, 'enddec'=> 65055, 'range'=>'Vertical Forms'),
array('starthex'=> 'FE20', 'endhex'=>'FE2F', 'startdec'=> 65056, 'enddec'=>65071 , 'range'=>'Combining Half Marks', 'combining'=>true),
array('starthex'=> 'FE30', 'endhex'=>'FE4F', 'startdec'=> 65072, 'enddec'=>65103 , 'range'=>'CJK Compatibility Forms', 'cjk'=>true),
array('starthex'=> 'FE50', 'endhex'=>'FE6F', 'startdec'=> 65104, 'enddec'=>65135 , 'range'=>'Small Form Variants', 'cjk'=>true),
array('starthex'=> 'FE70', 'endhex'=>'FEFE', 'startdec'=> 65136, 'enddec'=>65278 , 'range'=>'Arabic Presentation Forms-B', 'rtl'=>true),
array('starthex'=> 'FEFF', 'endhex'=>'FEFF', 'startdec'=> 65279, 'enddec'=>65279 , 'range'=>'Specials'),
array('starthex'=> 'FF00', 'endhex'=>'FFEF', 'startdec'=> 65280, 'enddec'=>65519 , 'range'=>'Halfwidth and Fullwidth Forms', 'cjk'=>true),
array('starthex'=> 'FFF0', 'endhex'=>'FFFD', 'startdec'=> 65520, 'enddec'=>65533 , 'range'=>'Specials'),
/* PLANE 1 */
array('starthex'=> '10000', 'endhex'=>'1007F', 'startdec'=> 65536 , 'enddec'=> 65663, 'range'=>'Linear B Syllabary'),
array('starthex'=> '10080', 'endhex'=>'100FF', 'startdec'=> 65664 , 'enddec'=> 65791, 'range'=>'Linear B Ideograms'),
array('starthex'=> '10100', 'endhex'=>'1013F', 'startdec'=> 65792 , 'enddec'=> 65855, 'range'=>'Aegean Numbers'),
array('starthex'=> '10140', 'endhex'=>'1018F', 'startdec'=> 65856 , 'enddec'=> 65935, 'range'=>'Ancient Greek Numbers'),
array('starthex'=> '10190', 'endhex'=>'101CF', 'startdec'=> 65936 , 'enddec'=> 65999, 'range'=>'Ancient Symbols'),
array('starthex'=> '101D0', 'endhex'=>'101FF', 'startdec'=> 66000 , 'enddec'=> 66047, 'range'=>'Phaistos Disc'),
array('starthex'=> '10280', 'endhex'=>'1029F', 'startdec'=> 66176 , 'enddec'=> 66207, 'range'=>'Lycian'),
array('starthex'=> '102A0', 'endhex'=>'102DF', 'startdec'=> 66208 , 'enddec'=> 66271, 'range'=>'Carian'),
array('starthex'=> '10300', 'endhex'=>'1032F', 'startdec'=> 66304 , 'enddec'=> 66351, 'range'=>'Old Italic'),
array('starthex'=> '10330', 'endhex'=>'1034F', 'startdec'=> 66352 , 'enddec'=> 66383, 'range'=>'Gothic'),
array('starthex'=> '10380', 'endhex'=>'1039F', 'startdec'=> 66432 , 'enddec'=> 66463, 'range'=>'Ugaritic'),
array('starthex'=> '103A0', 'endhex'=>'103DF', 'startdec'=> 66464 , 'enddec'=> 66527, 'range'=>'Old Persian'),
array('starthex'=> '10400', 'endhex'=>'1044F', 'startdec'=> 66560 , 'enddec'=> 66639, 'range'=>'Deseret'),
array('starthex'=> '10450', 'endhex'=>'1047F', 'startdec'=> 66640 , 'enddec'=> 66687, 'range'=>'Shavian'),
array('starthex'=> '10480', 'endhex'=>'104AF', 'startdec'=> 66688 , 'enddec'=> 66735, 'range'=>'Osmanya'),
array('starthex'=> '10800', 'endhex'=>'1083F', 'startdec'=> 67584 , 'enddec'=> 67647, 'range'=>'Cypriot Syllabary'),
array('starthex'=> '10900', 'endhex'=>'1091F', 'startdec'=> 67840 , 'enddec'=> 67871, 'range'=>'Phoenician'),
array('starthex'=> '10920', 'endhex'=>'1093F', 'startdec'=> 67872 , 'enddec'=> 67903, 'range'=>'Lydian'),
array('starthex'=> '10A00', 'endhex'=>'10A5F', 'startdec'=> 68096 , 'enddec'=> 68191, 'range'=>'Kharoshthi'),
array('starthex'=> '11080', 'endhex'=>'110CF', 'startdec'=> 69760 , 'enddec'=> 69839, 'range'=>'Kaithi'),
array('starthex'=> '12000', 'endhex'=>'123FF', 'startdec'=> 73728 , 'enddec'=> 74751, 'range'=>'Cuneiform (Sumero-Akkadian)'),
array('starthex'=> '12400', 'endhex'=>'1247F', 'startdec'=> 74752 , 'enddec'=> 74879, 'range'=>'Cuneiform Numbers and Punctuation'),
array('starthex'=> '13000', 'endhex'=>'1342F', 'startdec'=> 77824 , 'enddec'=> 78895, 'range'=>'Egyptian Hieroglyphs'),
array('starthex'=> '1D000', 'endhex'=>'1D0FF', 'startdec'=> 118784 , 'enddec'=> 119039, 'range'=>'Byzantine Musical Symbols'),
array('starthex'=> '1D100', 'endhex'=>'1D1FF', 'startdec'=> 119040 , 'enddec'=> 119295, 'range'=>'Musical Symbols'),
array('starthex'=> '1D200', 'endhex'=>'1D24F', 'startdec'=> 119296 , 'enddec'=> 119375, 'range'=>'Ancient Greek Musical Notation'),
array('starthex'=> '1D300', 'endhex'=>'1D35F', 'startdec'=> 119552 , 'enddec'=> 119647, 'range'=>'Tai Xuan Jing Symbols'),
array('starthex'=> '1D360', 'endhex'=>'1D37F', 'startdec'=> 119648 , 'enddec'=> 119679, 'range'=>'Counting Rod Numerals'),
array('starthex'=> '1D400', 'endhex'=>'1D7FF', 'startdec'=> 119808 , 'enddec'=> 120831, 'range'=>'Mathematical Alphanumeric Symbols'),
array('starthex'=> '1F000', 'endhex'=>'1F02F', 'startdec'=> 126976 , 'enddec'=> 127023, 'range'=>'Mahjong Tiles'),
array('starthex'=> '1F030', 'endhex'=>'1F09F', 'startdec'=> 127024 , 'enddec'=> 127135, 'range'=>'Domino Tiles'),
/* PLANE 2 */
array('starthex'=> '20000', 'endhex'=>'2A6DF', 'startdec'=> 131072 , 'enddec'=> 173791, 'range'=>'CJK Unified Ideographs Extension B'),
array('starthex'=> '2A700', 'endhex'=>'2B734', 'startdec'=> 173824 , 'enddec'=> 177972, 'range'=>'CJK Unified Ideographs Extension C'),
array('starthex'=> '2F800', 'endhex'=>'2FA1F', 'startdec'=> 194560 , 'enddec'=> 195103, 'range'=>'CJK Compatibility Ideographs Supplement'),
);
?>

View File

@ -1,72 +0,0 @@
<?php
/* This script prints out details of any TrueType collection font files
in your font directory. Files ending wih .otc are examined.
Point your browser to
http://your.domain/your_path_to _mpdf/utils/font_collections.php
By default this will examine the folder /ttfonts/ (or the default font
directory defined by _MPDF_TTFONTPATH.
You can optionally define an alternative folder to examine by setting
the variable below (must be a relative path, or filesystem path):
*/
$checkdir = '';
//////////////////////////////////
//////////////////////////////////
//////////////////////////////////
ini_set("memory_limit","256M");
define('_MPDF_PATH','../');
include("../mpdf.php");
$mpdf=new mPDF('');
if ($checkdir) {
$ttfdir = $checkdir;
}
else { $ttfdir = _MPDF_TTFONTPATH; }
$mqr=ini_get("magic_quotes_runtime");
if ($mqr) { set_magic_quotes_runtime(0); }
if (!class_exists('TTFontFile_Analysis', false)) { include(_MPDF_PATH .'classes/ttfontsuni_analysis.php'); }
$ttf = new TTFontFile_Analysis();
$ff = scandir($ttfdir);
echo '<h3>Font collection files found in '.$ttfdir.' directory</h3>';
foreach($ff AS $f) {
$ret = array();
if (strtolower(substr($f,-4,4))=='.ttc' || strtolower(substr($f,-4,4))=='.ttcf') { // Mac ttcf
$ttf->getTTCFonts($ttfdir.$f);
$nf = $ttf->numTTCFonts;
echo '<p>Font collection file ('.$f.') contains the following fonts:</p>';
for ($i=1; $i<=$nf; $i++) {
$ret = $ttf->extractCoreInfo($ttfdir.$f, $i);
$tfname = $ret[0];
$bold = $ret[1];
$italic = $ret[2];
$fname = strtolower($tfname );
$fname = preg_replace('/[ ()]/','',$fname );
$style = '';
if ($bold) { $style .= 'Bold'; }
if ($italic) { $style .= 'Italic'; }
if (!$style) { $style = 'Regular'; }
echo '<div>['.$i.'] '.$tfname.' ('.$fname.') '.$style.'</div>';
}
echo '<hr />';
}
}
exit;
?>

View File

@ -1,255 +0,0 @@
<?php
/* This script prints out the Unicode coverage of all TrueType font files
in your font directory.
Point your browser to
http://your.domain/your_path_to _mpdf/utils/font_coverage.php
By default this will examine the folder /ttfonts/ (or the default font
directory defined by _MPDF_TTFONTPATH.
You can optionally define an alternative folder to examine by setting
the variable below (must be a relative path, or filesystem path):
*/
$checkdir = '';
//////////////////////////////////
//////////////////////////////////
//////////////////////////////////
set_time_limit(600);
ini_set("memory_limit","256M");
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('','A4-L','','',10,10,10,10);
$mpdf->SetDisplayMode('fullpage');
$mpdf->useSubstitutions = true;
$mpdf->debug = true;
$mpdf->simpleTables = true;
if ($checkdir) {
$ttfdir = $checkdir;
}
else { $ttfdir = _MPDF_TTFONTPATH; }
$mqr=ini_get("magic_quotes_runtime");
if ($mqr) { set_magic_quotes_runtime(0); }
if (!class_exists('TTFontFile_Analysis', false)) { include(_MPDF_PATH .'classes/ttfontsuni_analysis.php'); }
//==============================================================
$smp = true;
$maxt = 131071;
//==============================================================
//==============================================================
$unifile = file('UnicodeData.txt');
$unichars = array();
foreach($unifile AS $line) {
if (preg_match('/<control>/',$line,$m)) {
$rangename = '';
continue;
}
else if (preg_match('/^([12]{0,1}[0-9A-Za-z]{4});<(.*?), Last>/',$line,$m)) {
if ($rangename && $rangename == $m[2]) {
$endrange = hexdec($m[1]);
for ($i=$startrange;$i<=$endrange; $i++) {
$unichars[$i] = $i;
}
}
$rangename = '';
}
else if (preg_match('/^([12]{0,1}[0-9A-Za-z]{4});<(.*?), First>/',$line,$m)) {
$startrange = hexdec($m[1]);
$rangename = $m[2];
}
else if (preg_match('/^([12]{0,1}[0-9A-Za-z]{4});/',$line,$m)) {
$unichars[hexdec($m[1])] = hexdec($m[1]);
$rangename = '';
}
}
// loads array $unicode_ranges
include('UnicodeRanges.php');
//==============================================================
$html = '<html><head><style>td { border: 0.1mm solid #555555; }
body { font-weight: normal; font-family: helvetica;font-size:8pt; }
td { font-family: helvetica;font-size:8pt; vertical-align: top;}
</style></head><body>';
//==============================================================
$ff = scandir($ttfdir);
$tempfontdata = array();
foreach($ff AS $f) {
$ttf = new TTFontFile_Analysis();
$ret = array();
$isTTC = false;
if (strtolower(substr($f,-4,4))=='.ttf' || strtolower(substr($f,-4,4))=='.otf') {
$ret[] = $ttf->extractCoreInfo($ttfdir.$f);
}
for ($i=0; $i<count($ret); $i++) {
if (is_array($ret[$i])) {
$tfname = $ret[$i][0];
$bold = $ret[$i][1];
$italic = $ret[$i][2];
$fname = strtolower($tfname );
$fname = preg_replace('/[ ()]/','',$fname );
//$tempfonttrans[$tfname] = $fname;
$style = '';
if ($bold) { $style .= 'B'; }
if ($italic) { $style .= 'I'; }
if (!$style) {
$tempfontdata[$fname]['file'] = $f;
if ($isTTC) {
$tempfontdata[$fname]['TTCfontID'] = $ret[$i][4];
}
}
}
}
unset($ttf);
}
$fullcovers = array();
$nearlycovers = array();
ksort($tempfontdata);
$ningroup = 14;
$nofgroups = ceil(count($unicode_ranges)/$ningroup);
//==============================================================
for ($urgp = 0; $urgp < $nofgroups; $urgp++) {
$html .= '<table cellpadding="2" cellspacing="0" style="page-break-inside:avoid; text-align:center; border-collapse: collapse; ">';
$html .= '<thead><tr><td></td>';
foreach($unicode_ranges AS $urk => $ur) {
if ($urk >= ($urgp*$ningroup) && $urk < (($urgp+1)*$ningroup)) {
$rangekey = $urk;
$range = $ur['range'];
$rangestart = $ur['starthex'];
$rangeend = $ur['endhex'];
$html .= '<td style="font-family:helvetica;font-size:8pt;font-weight:bold;">'.strtoupper($range).' (U+'.$rangestart .'-U+'.$rangeend.')</td>';
}
}
$html .= '</tr></thead>';
foreach ($tempfontdata AS $fname => $v) {
$cw = '';
if (file_exists((_MPDF_TTFONTDATAPATH.$fname.'.cw.dat'))) { $cw = file_get_contents(_MPDF_TTFONTDATAPATH.$fname.'.cw.dat'); }
else {
$mpdf->fontdata[$fname]['R'] = $tempfontdata[$fname]['file'];
$mpdf->AddFont($fname);
$cw = file_get_contents(_MPDF_TTFONTDATAPATH.$fname.'.cw.dat');
}
if (!$cw) {
continue;
die("Font data not available for $fname");
}
$counter=0;
$max = $maxt;
// create HTML content
$html .= '<tr>';
$html .= '<td>'.$fname.'</td>';
foreach($unicode_ranges AS $urk => $ur) {
if ($urk >= ($urgp*$ningroup) && $urk < (($urgp+1)*$ningroup)) {
if ($ur['pua'] || $ur['reserved'] || $ur['control']) {
$html .= '<td style="background-color: #000000;"></td>';
}
else {
$rangekey = $urk;
$range = $ur['range'];
$rangestart = $ur['starthex'];
$rangeend = $ur['endhex'];
$rangestartdec = $ur['startdec'];
$rangeenddec = $ur['enddec'];
$uniinrange = 0;
$fontinrange = 0;
for ($i=$rangestartdec; $i<=$rangeenddec; $i++) {
//if (isset($cw[$i])) { $fontinrange++; }
if ($mpdf->_charDefined($cw, $i)) { $fontinrange++; }
if (isset($unichars[$i])) { $uniinrange++; }
}
if ($uniinrange) {
if ($fontinrange) {
$pc = ($fontinrange/$uniinrange);
$str = '('.$fontinrange.'/'.$uniinrange.')';
if ($pc==1) {
$fullcovers[$urk][] = $fname;
$html .= '<td style="background-color: #00FF00;"></td>';
}
else if ($pc>1) {
$fullcovers[$urk][] = $fname;
$html .= '<td style="background-color: #00FF00;">'.$str.'</td>';
}
else if ($pc>=0.9) {
$html .= '<td style="background-color: #AAFFAA;">'.$str.'</td>';
$nearlycovers[$urk][] = $fname;
}
else if ($pc>0.75) { $html .= '<td style="background-color: #00FFAA;">'.$str.'</td>'; }
else if ($pc>0.5) { $html .= '<td style="background-color: #AAAAFF;">'.$str.'</td>'; }
else if ($pc>0.25) { $html .= '<td style="background-color: #FFFFAA;">'.$str.'</td>'; }
else { $html .= '<td style="background-color: #FFAAAA;">'.$str.'</td>'; }
}
else { $html .= '<td style="background-color: #555555;">(0/0)</td>'; }
}
else { $html .= '<td style="background-color: #000000;"></td>'; }
}
}
}
$html .= '</tr>';
}
//==============================================================
$html .= '</table><pagebreak />';
}
$html .= '<h4>Fonts with full coverage of Unicode Ranges</h4>';
$html .= '<table>';
//$html .= '<tr><td></td><td></td></tr>';
foreach($unicode_ranges AS $urk => $ur) {
if ($ur['pua'] || $ur['reserved'] || $ur['control']) { continue; }
$rangekey = $urk;
$range = $ur['range'];
$rangestart = $ur['starthex'];
$rangeend = $ur['endhex'];
$ext = $ext2 = '';
if ($ur['combining']) { $ext = 'background-color:#DDDDFF;'; $ext2 = '<br /><span style="color:#AA0000">Special positioning required</span>'; }
if ($ur['vertical']) { $ext = 'background-color:#FFDDDD;'; $ext2 = '<br /><span style="color:#AA0000">Vertical positioning required</span>'; }
if ($ur['special']) { $ext = 'background-color:#FFDDDD;'; $ext2 = '<br /><span style="color:#AA0000">Special processing required</span>'; }
$html .= '<tr><td style="font-family:helvetica;font-size:8pt;font-weight:bold;'.$ext.'">'.strtoupper($range).' (U+'.$rangestart .'-U+'.$rangeend.')'.$ext2.'</td>';
$arr = $fullcovers[$urk];
$narr = $nearlycovers[$urk];
if (is_array($arr)) { $html .= '<td>'. implode(', ',$arr). '</td></tr>'; }
else if (is_array($narr)) { $html .= '<td style="background-color: #AAAAAA;">'. implode(', ',$narr). ' (>90%)</td></tr>'; }
else { $html .= '<td style="background-color: #555555;"> </td></tr>'; }
}
$html.= '</table>';
//==============================================================
echo $html;
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View File

@ -1,222 +0,0 @@
<?php
/*
This script prints out all characters in a TrueType font file
to a PDF document. Point your browser to
http://your.domain/your_path_to _mpdf/utils/font_dump.php
The font file must be located in /ttfonts/ (or the default font
directory defined by _MPDF_TTFONTPATH.
By default this will examine the font dejavusanscondensed.
You can optionally define an alternative font file to examine by setting
the variable below (must be a relative path, or filesystem path):
*/
$font = 'dejavusanscondensed'; // Use internal mPDF font-name
$showmissing = true; // Show all missing unicode blocks / characters
//////////////////////////////////
//////////////////////////////////
//////////////////////////////////
set_time_limit(600);
ini_set("memory_limit","256M");
//==============================================================
//==============================================================
define('_MPDF_URI', '../');
include("../mpdf.php");
$mpdf=new mPDF('');
$mpdf->StartProgressBarOutput(2);
$mpdf->SetDisplayMode('fullpage');
$mpdf->useSubstitutions = true;
$mpdf->debug = true;
$mpdf->simpleTables = true;
// force fonts to be embedded whole i.e. NOT susbet
$mpdf->percentSubset = 0;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
// This generates a .mtx.php file if not already generated
$mpdf->WriteHTML('<style>td { border: 0.1mm solid #555555; } body { font-weight: normal; }</style>');
$mpdf->WriteHTML('<h3 style="font-family:'.$font.'">'.strtoupper($font).'</h3>'); // Separate Paragraphs defined by font
$html = '';
//==============================================================
//==============================================================
//==============================================================
//==============================================================
$unifile = file('UnicodeData.txt');
$unichars = array();
foreach($unifile AS $line) {
if ($smp && preg_match('/^(1[0-9A-Za-z]{4});/',$line,$m)) {
$unichars[hexdec($m[1])] = hexdec($m[1]);
}
else if (preg_match('/^([0-9A-Za-z]{4});/',$line,$m)) {
$unichars[hexdec($m[1])] = hexdec($m[1]);
}
}
// loads array $unicode_ranges
include('UnicodeRanges.php');
//==============================================================
//==============================================================
$cw = file_get_contents(_MPDF_TTFONTDATAPATH.$font.'.cw.dat');
if (!$cw) { die("Error - Must be able to read font metrics file: "._MPDF_TTFONTDATAPATH.$font.'.cw.dat'); }
$counter=0;
include(_MPDF_TTFONTDATAPATH.$font.'.mtx.php');
if ($smp) {
$max = 131071;
}
else {
$max = 65535;
}
$justfinishedblank = false;
$justfinishedblankinvalid = false;
foreach($unicode_ranges AS $urk => $ur) {
if (0 >= $ur['startdec'] && 0 <= $ur['enddec']) {
$rangekey = $urk;
$range = $ur['range'];
$rangestart = $ur['starthex'];
$rangeend = $ur['endhex'];
break;
}
}
$lastrange = $range ;
// create HTML content
$html .= '<table cellpadding="2" cellspacing="0" style="font-family:'.$font.';text-align:center; border-collapse: collapse; ">';
$html .= '<tr><td colspan="18" style="font-family:helvetica;font-weight:bold">'.strtoupper($font).'</td></tr>';
$html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart .'-U+'.$rangeend.')</td></tr>';
$html .= '<tr><td></td>';
$html .= '<td></td>';
for ($i = 0; $i < 16; $i++) {
$html .= '<td><b>-'.sprintf('%X', $i).'</b></td>';
}
// print each character
for ($i = 32; $i < $max; ++$i) {
if (($i > 0) AND (($i % 16) == 0)) {
$notthisline = true;
while($notthisline) {
for ($j = 0; $j < 16; $j++) {
if ($mpdf->_charDefined($cw, ($i + $j))) {
//if (isset($cw[($i+$j)])) {
$notthisline = false;
}
}
if ($notthisline) {
if ($showmissing) {
$range = '';
foreach($unicode_ranges AS $urk => $ur) {
if ($i >= $ur['startdec'] && $i <= $ur['enddec']) {
$rangekey = $urk;
$range = $ur['range'];
$rangestart = $ur['starthex'];
$rangeend = $ur['endhex'];
break;
}
}
$anyvalid = false;
for ($j = 0; $j < 16; $j++) {
if (isset($unichars[$i+$j])) { $anyvalid = true; break; }
}
if ($range && $range == $lastrange) {
if (!$anyvalid) {
if (!$justfinishedblankinvalid) {
$html .= '<tr><td colspan="18" style="background-color:#555555; font-size: 4pt;">&nbsp;</td></tr>';
}
$justfinishedblankinvalid = true;
}
else if (!$justfinishedblank ) {
$html .= '<tr><td colspan="18" style="background-color:#FFAAAA; font-size: 4pt;">&nbsp;</td></tr>';
$justfinishedblank = true;
}
}
else if($range) {
$html .= '</tr></table><br />';
$mpdf->WriteHTML($html); $html = '';
$html .= '<table cellpadding="2" cellspacing="0" style="font-family:'.$font.';text-align:center; border-collapse: collapse; ">';
$html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart.'-U+'.$rangeend.')</td></tr>';
$html .= '<tr><td></td>';
$html .= '<td></td>';
for ($k = 0; $k < 16; $k++) {
$html .= '<td><b>-'.sprintf('%X', $k).'</b></td>';
}
$justfinishedblank = false;
$justfinishedblankinvalid = false;
}
$lastrange = $range ;
}
$i +=16;
if ($i > $max) { break 2; }
}
}
foreach($unicode_ranges AS $urk => $ur) {
if ($i >= $ur['startdec'] && $i <= $ur['enddec']) {
$rangekey = $urk;
$range = $ur['range'];
$rangestart = $ur['starthex'];
$rangeend = $ur['endhex'];
break;
}
}
if ($i > 0 && ($i % 16) == 0 && ($range != $lastrange)) {
$html .= '</tr></table><br />';
$mpdf->WriteHTML($html); $html = '';
$html .= '<table cellpadding="2" cellspacing="0" style="font-family:'.$font.';text-align:center; border-collapse: collapse; ">';
$html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart.'-U+'.$rangeend.')</td></tr>';
$html .= '<tr><td></td>';
$html .= '<td></td>';
for ($k = 0; $k < 16; $k++) {
$html .= '<td><b>-'.sprintf('%X', $k).'</b></td>';
}
}
$lastrange = $range ;
$justfinishedblank = false;
$justfinishedblankinvalid = false;
$html .= '</tr><tr><td><i>'.(floor($i / 16)*16).'</i></td>';
$html .= '<td><b>'.sprintf('%03X', floor($i / 16)).'-</b></td>';
}
if ($mpdf->_charDefined($cw, $i)) { $html .= '<td>&#'.$i.';</td>'; $counter++; }
else if (isset($unichars[$i])) { $html .= '<td style="background-color: #FFAAAA;"></td>'; }
else { $html .= '<td style="background-color: #555555;"></td>'; }
}
if (($i % 16) > 0) {
for ($j = ($i % 16); $j < 16; ++$j) { $html .= '<td style="background-color: #555555;"></td>'; }
}
$html .= '</tr></table><br />';
//==============================================================
//==============================================================
$mpdf->WriteHTML($html); // Separate Paragraphs defined by font
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View File

@ -1,200 +0,0 @@
<?php
/* This script examines your font directory.
Point your browser to
http://your.domain/your_path_to _mpdf/utils/font_names.php
By default this will examine the folder /ttfonts/ (or the default font
directory defined by _MPDF_TTFONTPATH.
You can optionally define an alternative folder to examine by setting
the variable checkdir below (must be a relative path, or filesystem path).
You can optionally output just the font samples as a PDF file by setting $pdf=true.
*/
$checkdir = '';
$pdf = false;
//////////////////////////////////
//////////////////////////////////
//////////////////////////////////
ini_set("memory_limit","256M");
define('_MPDF_PATH','../');
include("../mpdf.php");
$mpdf=new mPDF('s');
$mpdf->useSubstitutions = true;
if ($checkdir) {
$ttfdir = $checkdir;
}
else { $ttfdir = _MPDF_TTFONTPATH; }
$mqr=ini_get("magic_quotes_runtime");
if ($mqr) { set_magic_quotes_runtime(0); }
if (!class_exists('TTFontFile', false)) { include(_MPDF_PATH .'classes/ttfontsuni.php'); }
$ttf = new TTFontFile();
$tempfontdata = array();
$tempsansfonts = array();
$tempseriffonts = array();
$tempmonofonts = array();
$tempfonttrans = array();
$ff = scandir($ttfdir);
foreach($ff AS $f) {
$ret = array();
$isTTC = false;
if (strtolower(substr($f,-4,4))=='.ttc' || strtolower(substr($f,-5,5))=='.ttcf') { // Mac ttcf
$isTTC = true;
$ttf->getTTCFonts($ttfdir.$f);
$nf = $ttf->numTTCFonts;
for ($i=1; $i<=$nf; $i++) {
$ret[] = $ttf->extractCoreInfo($ttfdir.$f, $i);
}
}
else if (strtolower(substr($f,-4,4))=='.ttf' || strtolower(substr($f,-4,4))=='.otf' ) {
$ret[] = $ttf->extractCoreInfo($ttfdir.$f);
}
for ($i=0; $i<count($ret); $i++) {
if (!is_array($ret[$i])) {
if (!$pdf) echo $ret[$i].'<br />';
}
else {
$tfname = $ret[$i][0];
$bold = $ret[$i][1];
$italic = $ret[$i][2];
$fname = strtolower($tfname );
$fname = preg_replace('/[ ()]/','',$fname );
$tempfonttrans[$tfname] = $fname;
$style = '';
if ($bold) { $style .= 'B'; }
if ($italic) { $style .= 'I'; }
if (!$style) { $style = 'R'; }
$tempfontdata[$fname][$style] = $f;
if ($isTTC) {
$tempfontdata[$fname]['TTCfontID'][$style] = $ret[$i][4];
}
//if ($ret[$i][5]) { $tempfontdata[$fname]['rtl'] = true; }
//if ($ret[$i][7]) { $tempfontdata[$fname]['cjk'] = true; }
if ($ret[$i][8]) { $tempfontdata[$fname]['sip'] = true; }
if ($ret[$i][9]) { $tempfontdata[$fname]['smp'] = true; }
$ftype = $ret[$i][3]; // mono, sans or serif
if ($ftype=='sans') { $tempsansfonts[] = $fname; }
else if ($ftype=='serif') { $tempseriffonts[] = $fname; }
else if ($ftype=='mono') { $tempmonofonts[] = $fname; }
}
}
}
$tempsansfonts = array_unique($tempsansfonts);
$tempseriffonts = array_unique($tempseriffonts );
$tempmonofonts = array_unique($tempmonofonts );
$tempfonttrans = array_unique($tempfonttrans);
if (!$pdf) {
echo '<h3>Information</h3>';
}
foreach ($tempfontdata AS $fname => $v) {
if (!isset($tempfontdata[$fname]['R']) || !$tempfontdata[$fname]['R']) {
if (!$pdf) echo 'WARNING - Font file for '.$fname.' may be an italic cursive script, or extra-bold etc.<br />';
if (isset($tempfontdata[$fname]['I']) && $tempfontdata[$fname]['I']) {
$tempfontdata[$fname]['R'] = $tempfontdata[$fname]['I'];
}
else if (isset($tempfontdata[$fname]['B']) && $tempfontdata[$fname]['B']) {
$tempfontdata[$fname]['R'] = $tempfontdata[$fname]['B'];
}
else if (isset($tempfontdata[$fname]['BI']) && $tempfontdata[$fname]['BI']) {
$tempfontdata[$fname]['R'] = $tempfontdata[$fname]['BI'];
}
}
if (isset($tempfontdata[$fname]['smp']) && $tempfontdata[$fname]['smp']) {
if (!$pdf) echo 'INFO - Font file '.$fname.' contains characters in Unicode Plane 1 SMP<br />';
$tempfontdata[$fname]['smp'] = false;
}
if (isset($tempfontdata[$fname]['sip']) && $tempfontdata[$fname]['sip']) {
if (!$pdf) echo 'INFO - Font file '.$fname.' contains characters in Unicode Plane 2 SIP<br />';
if (preg_match('/^(.*)-extb/',$fname, $fm)) {
if (isset($tempfontdata[($fm[1])]) && $tempfontdata[($fm[1])]) {
$tempfontdata[($fm[1])]['sip-ext'] = $fname;
if (!$pdf) echo 'INFO - Font file '.$fname.' has been defined as a CJK ext-B for '.($fm[1]).'<br />';
}
else if (isset($tempfontdata[($fm[1].'-exta')]) && $tempfontdata[($fm[1].'-exta')]) {
$tempfontdata[($fm[1].'-exta')]['sip-ext'] = $fname;
if (!$pdf) echo 'INFO - Font file '.$fname.' has been defined as a CJK ext-B for '.($fm[1].'-exta').'<br />';
}
}
// else { unset($tempfontdata[$fname]['sip']); }
}
unset($tempfontdata[$fname]['sip']);
unset($tempfontdata[$fname]['smp']);
}
$mpdf->fontdata = array_merge($tempfontdata ,$mpdf->fontdata);
$mpdf->available_unifonts = array();
foreach ($mpdf->fontdata AS $f => $fs) {
if (isset($fs['R']) && $fs['R']) { $mpdf->available_unifonts[] = $f; }
if (isset($fs['B']) && $fs['B']) { $mpdf->available_unifonts[] = $f.'B'; }
if (isset($fs['I']) && $fs['I']) { $mpdf->available_unifonts[] = $f.'I'; }
if (isset($fs['BI']) && $fs['BI']) { $mpdf->available_unifonts[] = $f.'BI'; }
}
$mpdf->default_available_fonts = $mpdf->available_unifonts;
if (!$pdf) {
echo '<hr />';
echo '<h3>Font names as parsed by mPDF</h3>';
}
ksort($tempfonttrans);
$html = '';
foreach($tempfonttrans AS $on=>$mn) {
if (!file_exists($ttfdir.$mpdf->fontdata[$mn]['R'])) { continue; }
$ond = '"'.$on.'"';
$html .= '<p style="font-family:'.$on.';">'.$ond.' font is available as '.$mn;
if (isset($mpdf->fontdata[$mn]['sip-ext']) && $mpdf->fontdata[$mn]['sip-ext']) {
$html .= '; CJK ExtB: '.$mpdf->fontdata[$mn]['sip-ext'];
}
$html .= '</p>';
}
if ($pdf) {
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
}
foreach($tempfonttrans AS $on=>$mn) {
$ond = '"'.$on.'"';
echo '<div style="font-family:\''.$on.'\';">'.$ond.' font is available as '.$mn;
if (isset($mpdf->fontdata[$mn]['sip-ext']) && $mpdf->fontdata[$mn]['sip-ext']) {
echo '; CJK ExtB: '.$mpdf->fontdata[$mn]['sip-ext'];
}
echo '</div>';
}
echo '<hr />';
echo '<h3>Sample config_fonts.php file</h3>';
echo '<div>Remember to edit the following arrays to place your preferred default first in order:</div>';
echo '<pre>';
ksort($tempfontdata);
echo '$this->fontdata = '.var_export($tempfontdata,true).";\n";
sort($tempsansfonts);
echo '$this->sans_fonts = array(\''.implode("', '", $tempsansfonts)."');\n";
sort($tempseriffonts);
echo '$this->serif_fonts = array(\''.implode("', '", $tempseriffonts)."');\n";
sort($tempmonofonts);
echo '$this->mono_fonts = array(\''.implode("', '", $tempmonofonts)."');\n";
echo '</pre>';
exit;
?>

View File

@ -1,26 +0,0 @@
<html>
<head>
</head>
<body bgcolor=#FFFFFF text=#001C66>
<h2>mPDF Font Utility scripts for Version 5.0</h2>
<p>
<a href="font_dump.php">Dump all characters from a font (font_dump.php)</a>
</p>
<p>
<a href="font_names.php">Show a list of all font names available (font_names.php)</a>
</p>
<p>
<a href="font_collections.php">Show fonts in Collections .ttc (font_collections.php)</a>
</p>
<p>
<a href="font_coverage.php">Show coverage of characters from all fonts (font_coverage.php)</a>
</p>
<p>Edit the scripts to change the font folder if you wish - this is set by default to /ttfonts/</p>
</body>
</html>

2860
inc/3rdparty/libraries/tcpdf/CHANGELOG.TXT vendored Normal file

File diff suppressed because it is too large Load Diff

858
inc/3rdparty/libraries/tcpdf/LICENSE.TXT vendored Normal file
View File

@ -0,0 +1,858 @@
**********************************************************************
* TCPDF LICENSE
**********************************************************************
TCPDF is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
**********************************************************************
**********************************************************************
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
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.
**********************************************************************
**********************************************************************
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
**********************************************************************
**********************************************************************

115
inc/3rdparty/libraries/tcpdf/README.TXT vendored Normal file
View File

@ -0,0 +1,115 @@
TCPDF - README
============================================================
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
PLEASE MAKE A DONATION:
http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 6.0.093
Release date: 2014-09-02
Author: Nicola Asuni
Copyright (c) 2002-2014:
Nicola Asuni
Tecnick.com LTD
www.tecnick.com
URLs:
http://www.tcpdf.org
http://www.sourceforge.net/projects/tcpdf
Description:
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
This library includes also a class to extract data from existing PDF documents and
classes to generate 1D and 2D barcodes in various formats.
Main Features:
* no external libraries are required for the basic functions;
* all standard page formats, custom page formats, custom margins and units of measure;
* UTF-8 Unicode and Right-To-Left languages;
* TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts;
* font subsetting;
* methods to publish some XHTML + CSS code, Javascript and Forms;
* images, graphic (geometric figures) and transformation methods;
* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http: www.imagemagick.org/www/formats.html)
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
* automatic page header and footer management;
* document encryption up to 256 bit and digital signature certifications;
* transactions to UNDO commands;
* PDF annotations, including links, text and file attachments;
* text rendering modes (fill, stroke and clipping);
* multiple columns mode;
* no-write page regions;
* bookmarks, named destinations and table of content;
* text hyphenation;
* text stretching and spacing (tracking);
* automatic page break, line break and text alignments including justification;
* automatic page numbering and page groups;
* move and delete pages;
* page compression (requires php-zlib extension);
* XOBject Templates;
* Layers and object visibility.
* PDF/A-1b support.
Installation (full instructions on http: www.tcpdf.org):
1. copy the folder on your Web server
2. set your installation path and other parameters on the config/tcpdf_config.php
3. call the examples/example_001.php page with your browser to see an example
Source Code Documentation:
http://www.tcpdf.org
Additional Documentation:
http://www.tcpdf.org
License:
Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD
TCPDF is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
TCPDF is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the License
along with TCPDF. If not, see
<http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>.
See LICENSE.TXT file for more information.
Third party fonts:
This library may include third party font files released with different licenses.
All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3),
they do not contain any binary data but just a description of the general properties of a particular font.
These files can be also generated on the fly using the font utilities and TCPDF methods.
All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).
The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3).
The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license.
For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503
Link : http://www.gnu.org/software/freefont/
The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection.
For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33
Link : http://dejavu-fonts.org
The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2).
Link : http://projects.arabeyes.org/
ICC profile:
TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package:
https://packages.debian.org/source/stable/icc-profiles-free
============================================================

View File

@ -0,0 +1,40 @@
{
"name": "tecnick.com/tcpdf",
"version": "6.0.093",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
"keywords": ["PDF","tcpdf","PDFD32000-2008","qrcode","datamatrix","pdf417","barcodes"],
"license": "LGPLv3",
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"classmap": [
"fonts",
"config",
"include",
"tcpdf.php",
"tcpdf_parser.php",
"tcpdf_import.php",
"tcpdf_barcodes_1d.php",
"tcpdf_barcodes_2d.php",
"include/tcpdf_colors.php",
"include/tcpdf_filters.php",
"include/tcpdf_font_data.php",
"include/tcpdf_fonts.php",
"include/tcpdf_images.php",
"include/tcpdf_static.php",
"include/barcodes/datamatrix.php",
"include/barcodes/pdf417.php",
"include/barcodes/qrcode.php"
]
}
}

View File

@ -0,0 +1,227 @@
<?php
//============================================================+
// File name : tcpdf_config.php
// Begin : 2004-06-11
// Last Update : 2014-09-02
//
// Description : Configuration file for TCPDF.
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2004-2014 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
// TCPDF is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// TCPDF is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
//============================================================+
/**
* Configuration file for TCPDF.
* @author Nicola Asuni
* @package com.tecnick.tcpdf
* @version 4.9.005
* @since 2004-10-27
*/
// IMPORTANT:
// If you define the constant K_TCPDF_EXTERNAL_CONFIG, all the following settings will be ignored.
// If you use the tcpdf_autoconfig.php, then you can overwrite some values here.
/**
* Installation path (/var/www/tcpdf/).
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
*/
//define ('K_PATH_MAIN', '');
/**
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
* By default it is automatically set but you can also set it as a fixed string to improve performances.
*/
//define ('K_PATH_URL', '');
/**
* Path for PDF fonts.
* By default it is automatically set but you can also set it as a fixed string to improve performances.
*/
//define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
/**
* Default images directory.
* By default it is automatically set but you can also set it as a fixed string to improve performances.
*/
//define ('K_PATH_IMAGES', '');
/**
* Deafult image logo used be the default Header() method.
* Please set here your own logo or an empty string to disable it.
*/
//define ('PDF_HEADER_LOGO', '');
/**
* Header logo image width in user units.
*/
//define ('PDF_HEADER_LOGO_WIDTH', 0);
/**
* Cache directory for temporary files (full path).
*/
//define ('K_PATH_CACHE', '/tmp/');
/**
* Generic name for a blank image.
*/
define ('K_BLANK_IMAGE', '_blank.png');
/**
* Page format.
*/
define ('PDF_PAGE_FORMAT', 'A4');
/**
* Page orientation (P=portrait, L=landscape).
*/
define ('PDF_PAGE_ORIENTATION', 'P');
/**
* Document creator.
*/
define ('PDF_CREATOR', 'TCPDF');
/**
* Document author.
*/
define ('PDF_AUTHOR', 'TCPDF');
/**
* Header title.
*/
define ('PDF_HEADER_TITLE', 'TCPDF Example');
/**
* Header description string.
*/
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
/**
* Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
*/
define ('PDF_UNIT', 'mm');
/**
* Header margin.
*/
define ('PDF_MARGIN_HEADER', 5);
/**
* Footer margin.
*/
define ('PDF_MARGIN_FOOTER', 10);
/**
* Top margin.
*/
define ('PDF_MARGIN_TOP', 27);
/**
* Bottom margin.
*/
define ('PDF_MARGIN_BOTTOM', 25);
/**
* Left margin.
*/
define ('PDF_MARGIN_LEFT', 15);
/**
* Right margin.
*/
define ('PDF_MARGIN_RIGHT', 15);
/**
* Default main font name.
*/
define ('PDF_FONT_NAME_MAIN', 'helvetica');
/**
* Default main font size.
*/
define ('PDF_FONT_SIZE_MAIN', 10);
/**
* Default data font name.
*/
define ('PDF_FONT_NAME_DATA', 'helvetica');
/**
* Default data font size.
*/
define ('PDF_FONT_SIZE_DATA', 8);
/**
* Default monospaced font name.
*/
define ('PDF_FONT_MONOSPACED', 'courier');
/**
* Ratio used to adjust the conversion of pixels to user units.
*/
define ('PDF_IMAGE_SCALE_RATIO', 1.25);
/**
* Magnification factor for titles.
*/
define('HEAD_MAGNIFICATION', 1.1);
/**
* Height of cell respect font height.
*/
define('K_CELL_HEIGHT_RATIO', 1.25);
/**
* Title magnification respect main font size.
*/
define('K_TITLE_MAGNIFICATION', 1.3);
/**
* Reduction factor for small font.
*/
define('K_SMALL_RATIO', 2/3);
/**
* Set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language.
*/
define('K_THAI_TOPCHARS', true);
/**
* If true allows to call TCPDF methods using HTML syntax
* IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
*/
define('K_TCPDF_CALLS_IN_HTML', true);
/**
* If true and PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
*/
define('K_TCPDF_THROW_EXCEPTION_ERROR', false);
/**
* Default timezone for datetime functions
*/
define('K_TIMEZONE', 'UTC');
//============================================================+
// END OF FILE
//============================================================+

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Courier';
$up=-100;
$ut=50;
$dw=600;
$diff='';
$enc='';
$desc=array('Flags'=>33,'FontBBox'=>'[-23 -250 715 805]','ItalicAngle'=>0,'Ascent'=>805,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>426,'StemV'=>51,'StemH'=>51,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600);
$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Courier-Bold';
$up=-100;
$ut=50;
$dw=600;
$diff='';
$enc='';
$desc=array('Flags'=>33,'FontBBox'=>'[-113 -250 749 801]','ItalicAngle'=>0,'Ascent'=>801,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>439,'StemV'=>106,'StemH'=>84,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600);
$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Courier-BoldOblique';
$up=-100;
$ut=50;
$dw=600;
$diff='';
$enc='';
$desc=array('Flags'=>97,'FontBBox'=>'[-57 -250 869 801]','ItalicAngle'=>-12,'Ascent'=>801,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>439,'StemV'=>106,'StemH'=>84,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600);
$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Courier-Oblique';
$up=-100;
$ut=50;
$dw=600;
$diff='';
$enc='';
$desc=array('Flags'=>97,'FontBBox'=>'[-27 -250 849 805]','ItalicAngle'=>-12,'Ascent'=>805,'Descent'=>-250,'Leading'=>0,'CapHeight'=>562,'XHeight'=>426,'StemV'=>51,'StemH'=>51,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600);
$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600);
// --- EOF ---

View File

@ -0,0 +1,13 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Helvetica';
$up=-100;
$ut=50;
$dw=513;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-166 -225 1000 931]','ItalicAngle'=>0,'Ascent'=>931,'Descent'=>-225,'Leading'=>0,'CapHeight'=>718,'XHeight'=>523,'StemV'=>88,'StemH'=>76,'AvgWidth'=>513,'MaxWidth'=>1015,'MissingWidth'=>513);
$cw=array(0=>500,1=>500,2=>500,3=>500,4=>500,5=>500,6=>500,7=>500,8=>500,9=>500,10=>500,11=>500,12=>500,13=>500,14=>500,15=>500,16=>500,17=>500,18=>500,19=>500,20=>500,21=>500,22=>500,23=>500,24=>500,25=>500,26=>500,27=>500,28=>500,29=>500,30=>500,31=>500,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>277,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>500,128=>655,129=>500,130=>222,131=>278,132=>333,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>250,140=>1000,141=>500,142=>611,143=>500,144=>500,145=>222,146=>221,147=>333,148=>333,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>500,155=>250,156=>938,157=>500,158=>500,159=>667,160=>278,161=>278,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>448,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,178=>350,179=>350,180=>333,181=>556,182=>537,183=>278,184=>333,185=>350,186=>365,187=>448,188=>869,189=>869,190=>879,191=>556,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>666,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>896,231=>500,232=>556,233=>556,234=>556,235=>556,236=>251,237=>251,238=>251,239=>251,240=>556,241=>556,242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>555,255=>500);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Helvetica-Bold';
$up=-100;
$ut=50;
$dw=535;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-170 -228 1003 962]','ItalicAngle'=>0,'Ascent'=>962,'Descent'=>-228,'Leading'=>0,'CapHeight'=>718,'XHeight'=>532,'StemV'=>140,'StemH'=>118,'AvgWidth'=>535,'MaxWidth'=>1000,'MissingWidth'=>535);
$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>238,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>350,128=>556,129=>350,130=>278,131=>556,132=>500,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>278,146=>278,147=>500,148=>500,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>556,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>611,182=>556,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>556,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Helvetica-BoldOblique';
$up=-100;
$ut=50;
$dw=535;
$diff='';
$enc='';
$desc=array('Flags'=>96,'FontBBox'=>'[-174 -228 1114 962]','ItalicAngle'=>-12,'Ascent'=>962,'Descent'=>-228,'Leading'=>0,'CapHeight'=>718,'XHeight'=>532,'StemV'=>140,'StemH'=>118,'AvgWidth'=>535,'MaxWidth'=>1000,'MissingWidth'=>535);
$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>238,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>350,128=>556,129=>350,130=>278,131=>556,132=>500,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>278,146=>278,147=>500,148=>500,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>556,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>611,182=>556,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>556,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Helvetica-Oblique';
$up=-100;
$ut=50;
$dw=513;
$diff='';
$enc='';
$desc=array('Flags'=>96,'FontBBox'=>'[-170 -225 1116 931]','ItalicAngle'=>-12,'Ascent'=>931,'Descent'=>-225,'Leading'=>0,'CapHeight'=>718,'XHeight'=>523,'StemV'=>88,'StemH'=>76,'AvgWidth'=>513,'MaxWidth'=>1015,'MissingWidth'=>513);
$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>350,128=>556,129=>350,130=>222,131=>556,132=>333,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>222,146=>222,147=>333,148=>333,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>500,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>556,182=>537,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>500,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>556,241=>556,242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Symbol';
$up=-100;
$ut=50;
$dw=587;
$diff='';
$enc='';
$desc=array('Flags'=>4,'FontBBox'=>'[-180 -293 1090 1010]','ItalicAngle'=>0,'Ascent'=>1010,'Descent'=>-293,'Leading'=>0,'CapHeight'=>1010,'StemV'=>85,'StemH'=>92,'AvgWidth'=>587,'MaxWidth'=>1042,'MissingWidth'=>587);
$cw=array(0=>587,1=>587,2=>587,3=>587,4=>587,5=>587,6=>587,7=>587,8=>587,9=>587,10=>587,11=>587,12=>587,13=>587,14=>587,15=>587,16=>587,17=>587,18=>587,19=>587,20=>587,21=>587,22=>587,23=>587,24=>587,25=>587,26=>587,27=>587,28=>587,29=>587,30=>587,31=>587,32=>250,33=>333,34=>713,35=>500,36=>549,37=>833,38=>778,39=>439,40=>333,41=>333,42=>500,43=>549,44=>250,45=>549,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>278,59=>278,60=>549,61=>549,62=>549,63=>444,64=>549,65=>722,66=>667,67=>722,68=>612,69=>611,70=>763,71=>603,72=>722,73=>333,74=>631,75=>722,76=>686,77=>889,78=>722,79=>722,80=>768,81=>741,82=>556,83=>592,84=>611,85=>690,86=>439,87=>768,88=>645,89=>795,90=>611,91=>333,92=>863,93=>333,94=>658,95=>500,96=>500,97=>631,98=>549,99=>549,100=>494,101=>439,102=>521,103=>411,104=>603,105=>329,106=>603,107=>549,108=>549,109=>576,110=>521,111=>549,112=>549,113=>521,114=>549,115=>603,116=>439,117=>576,118=>713,119=>686,120=>493,121=>686,122=>494,123=>480,124=>200,125=>480,126=>549,127=>587,128=>587,129=>587,130=>587,131=>587,132=>587,133=>587,134=>587,135=>587,136=>587,137=>587,138=>587,139=>587,140=>587,141=>587,142=>587,143=>587,144=>587,145=>587,146=>587,147=>587,148=>587,149=>587,150=>587,151=>587,152=>587,153=>587,154=>587,155=>587,156=>587,157=>587,158=>587,159=>587,160=>750,161=>620,162=>247,163=>549,164=>167,165=>713,166=>500,167=>753,168=>753,169=>753,170=>753,171=>1042,172=>987,173=>603,174=>987,175=>603,176=>400,177=>549,178=>411,179=>549,180=>549,181=>713,182=>494,183=>460,184=>549,185=>549,186=>549,187=>549,188=>1000,189=>603,190=>1000,191=>658,192=>823,193=>686,194=>795,195=>987,196=>768,197=>768,198=>823,199=>768,200=>768,201=>713,202=>713,203=>713,204=>713,205=>713,206=>713,207=>713,208=>768,209=>713,210=>790,211=>790,212=>890,213=>823,214=>549,215=>250,216=>713,217=>603,218=>603,219=>1042,220=>987,221=>603,222=>987,223=>603,224=>494,225=>329,226=>790,227=>790,228=>786,229=>713,230=>384,231=>384,232=>384,233=>384,234=>384,235=>384,236=>494,237=>494,238=>494,239=>494,240=>587,241=>329,242=>274,243=>686,244=>686,245=>686,246=>384,247=>384,248=>384,249=>384,250=>384,251=>384,252=>494,253=>494,254=>494,255=>587);
// --- EOF ---

View File

@ -0,0 +1,12 @@
<?php
// TCPDF FONT FILE DESCRIPTION
$type='core';
$name='Times-Roman';
$up=-100;
$ut=50;
$dw=495;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-168 -218 1000 898]','ItalicAngle'=>0,'Ascent'=>898,'Descent'=>-218,'Leading'=>0,'CapHeight'=>662,'XHeight'=>450,'StemV'=>84,'StemH'=>28,'AvgWidth'=>495,'MaxWidth'=>1000,'MissingWidth'=>495);
$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>408,35=>500,36=>500,37=>833,38=>778,39=>180,40=>333,41=>333,42=>500,43=>564,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>278,59=>278,60=>564,61=>564,62=>564,63=>444,64=>921,65=>722,66=>667,67=>667,68=>722,69=>611,70=>556,71=>722,72=>722,73=>333,74=>389,75=>722,76=>611,77=>889,78=>722,79=>722,80=>556,81=>722,82=>667,83=>556,84=>611,85=>722,86=>722,87=>944,88=>722,89=>722,90=>611,91=>333,92=>278,93=>333,94=>469,95=>500,96=>333,97=>444,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>500,105=>278,106=>278,107=>500,108=>278,109=>778,110=>500,111=>500,112=>500,113=>500,114=>333,115=>389,116=>278,117=>500,118=>500,119=>722,120=>500,121=>500,122=>444,123=>480,124=>200,125=>480,126=>541,127=>350,128=>500,129=>350,130=>333,131=>500,132=>444,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>889,141=>350,142=>611,143=>350,144=>350,145=>333,146=>333,147=>444,148=>444,149=>350,150=>500,151=>1000,152=>333,153=>980,154=>389,155=>333,156=>722,157=>350,158=>444,159=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>200,167=>500,168=>333,169=>760,170=>276,171=>500,172=>564,173=>333,174=>760,175=>333,176=>400,177=>564,178=>300,179=>300,180=>333,181=>500,182=>453,183=>250,184=>333,185=>300,186=>310,187=>500,188=>750,189=>750,190=>750,191=>444,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>564,216=>722,217=>722,218=>722,219=>722,220=>722,221=>722,222=>556,223=>500,224=>444,225=>444,226=>444,227=>444,228=>444,229=>444,230=>667,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>564,248=>500,249=>500,250=>500,251=>500,252=>500,253=>500,254=>500,255=>500);
// --- EOF ---

Some files were not shown because too many files have changed in this diff Show More