add pdf and mobi libraries

This commit is contained in:
tcit 2014-07-24 15:49:36 +02:00
parent 2b58426b2d
commit 4188f38ad5
297 changed files with 126557 additions and 7 deletions

2895
inc/3rdparty/libraries/mpdf/CHANGELOG.txt vendored Normal file

File diff suppressed because it is too large Load diff

92
inc/3rdparty/libraries/mpdf/CREDITS.txt vendored Normal file
View file

@ -0,0 +1,92 @@
/*******************************************************************************
* 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

@ -0,0 +1,164 @@
=================
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,
),
),

340
inc/3rdparty/libraries/mpdf/LICENSE.txt vendored Normal file
View file

@ -0,0 +1,340 @@
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.

148
inc/3rdparty/libraries/mpdf/README.txt vendored Normal file
View file

@ -0,0 +1,148 @@
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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,248 @@
<?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

@ -0,0 +1,408 @@
<?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

@ -0,0 +1,700 @@
<?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

@ -0,0 +1,723 @@
<?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

@ -0,0 +1,433 @@
<?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

@ -0,0 +1,224 @@
<?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

@ -0,0 +1,468 @@
<?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'.date('jY').')/', "\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

@ -0,0 +1,463 @@
<?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

@ -0,0 +1,236 @@
<?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]);
}
}
?>

172
inc/3rdparty/libraries/mpdf/compress.php vendored Normal file
View file

@ -0,0 +1,172 @@
<?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;
?>

572
inc/3rdparty/libraries/mpdf/config.php vendored Normal file
View file

@ -0,0 +1,572 @@
<?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

@ -0,0 +1,153 @@
<?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

@ -0,0 +1,304 @@
<?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'
);
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View file

@ -0,0 +1,187 @@
<?php
$html = '
<h1><a name="top"></a>mPDF</h1>
<h2>Basic HTML Example</h2>
This file demonstrates most of the HTML elements.
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<hr />
<div><img src="tiger.wmf" style="float:right;">DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<div><img src="klematis.jpg" style="opacity: 0.5; float: left;" />DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote>
<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address>
<pre>PRE: Cum sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis
dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras
sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor.
Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem,
ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui.</pre>
<div><a href="#top">Hyperlink (&lt;a&gt;)</a></div>
<div><a href="http://www.pallcare.info">Hyperlink (&lt;a&gt;)</a></div>
<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br>
<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font>
</div>
<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p>
<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3>
<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p>
<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p>
<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p>
<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p>
<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p>
<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p>
<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p>
<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p>
<ol>
<li>Item <b><u>1</u></b></li>
<li>Item 2<sup>32</sup></li>
<li><small>Item</small> 3</li>
<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.
<ul>
<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. </li>
<li>Subitem 2
<ul>
<li>
Level 3 subitem
</li>
</ul>
</li>
</ul>
</li>
<li>Item 5</li>
</ol>
<dl>
<dt>Definition list</dt>
<dd>List defined by DL, DD and DT tags</dd>
</dl>
<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p>
<table border="1">
<thead>
<tr>
<th>Data</th>
<td>Data</td>
<td>Data</td>
<td>Data<br />2nd line</td>
</tr>
</thead>
<tbody>
<tr>
<th>More Data</th>
<td>More Data</td>
<td>More Data</td>
<td>Data<br />2nd line</td>
</tr>
<tr>
<th>Data</th>
<td>Data</td>
<td>Data</td>
<td>Data<br />2nd line</td>
</tr>
<tr>
<th>Data</th>
<td>Data</td>
<td>Data</td>
<td>Data<br />2nd line</td>
</tr>
</tbody>
</table>
<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p>
<form>
<b>Textarea</b>
<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea>
<br /><br />
<b>Select</b>
<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text
<br /><br />
<b>Input Radio</b>
<input type="radio" name="pre_publication" value="0" checked="checked" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="pre_publication" value="1" > Yes
<br /><br />
<b>Input Radio</b>
<input type="radio" name="recommended" value="0" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="1" > Keep &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="2" checked="checked" > Choice
<br /><br />
<b>Input Text</b>
<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211">
<br /><br />
<b>Input Password</b>
<input type="password" size="40" name="password" value="secret">
<br /><br />
<input type="checkbox" name="QPC" value="ON" > Checkboxes<br>
<input type="checkbox" name="QPA" value="ON" > Not selected<br>
<input type="checkbox" name="QLY" value="ON" checked="checked" > Selected<br>
<input type="checkbox" name="QLY" value="ON" disabled="disabled" > Disabled
<br /><br />
<input type="submit" name="submit" value="Submit" />
<input type="image" name="submit" src="goto.gif" />
<input type="button" name="submit" value="Button" />
<input type="reset" name="submit" value="Reset" />
</form>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,41 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Basic Example Using CSS Styles</h2>
<p class="breadcrumb">Chapter &raquo; Topic</p>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<h4>Heading using Small-Caps - supported from mPDF version 5</h4>
<p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->SetDisplayMode('fullpage');
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyleA4.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,138 @@
<?php
$html = '
<style>
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
}
.radialgradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: radial #00FFFF #FFFF00 0.5 0.5 0.5 0.5 0.65;
margin: auto;
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
border-radius: 2mm;
background-clip: border-box;
}
h4 {
font-family: sans;
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.5em;
}
div {
padding:1em;
margin-bottom: 1em;
text-align:justify;
}
.example pre {
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
}
pre { text-align:left }
pre.code { font-family: monospace }
</style>
<body style="background-gradient: linear #88FFFF #FFFF44 0 0.5 1 0.5;">
<h1>mPDF</h1>
<h2>Backgrounds & Borders</h2>
<div style="border:0.1mm solid #220044; padding:1em 2em; background-color:#ffffcc; ">
<h4>Page background</h4>
<div class="gradient">
The background colour can be set by CSS styles on the &lt;body&gt; tag. This will set the background for the whole page. In this document, the background has been set as a gradient (see below).
</div>
<h4>Background Gradients</h4>
<div class="gradient">
Background can be set as a linear or radial gradient between two colours. The background has been set on this &lt;div&gt; element to a linear gradient. CSS style used here is:<br />
<span style="font-family: mono; font-size: 9pt;">background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;</span><br />
The four numbers are coordinates in the form (x1, y1, x2, y2) which defines the gradient vector. x and y are values from 0 to 1, where 1 represents the height or width of the box as it is printed.
<br />
<br />
Background gradients can be set on all block elements e.g. P, DIV, H1-H6, as well as on BODY.
</div>
<div class="radialgradient">
The background has been set on this &lt;div&gt; element to a radial gradient. CSS style used here is:<br />
<span style="font-family: mono; font-size: 9pt;">background-gradient: radial #00FFFF #FFFF00 0.5 0.5 0.5 0.5 0.65;</span><br />
The five numbers are coordinates in the form (x1, y1, x2, y2, r) where (x1, y1) is the starting point of the gradient with color1,
(x2, y2) is the center of the circle with color2, and r is the radius of the circle.
(x1, y1) should be inside the circle, otherwise some areas will not be defined.
<br />
<br />
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec mattis lacus ac purus feugiat semper. Donec aliquet nunc odio, vitae pellentesque diam. Pellentesque sed velit lacus. Duis quis dui quis sem consectetur sollicitudin. Cras dolor quam, dapibus et pretium sit amet, elementum vel arcu. Duis rhoncus facilisis erat nec mattis. In hac habitasse platea dictumst. Vivamus hendrerit sem in justo aliquet a pellentesque lorem scelerisque. Suspendisse a augue sed urna rhoncus elementum. Aliquam erat volutpat.
</div>
<h4>Background Images</h4>
<div style="border:0.1mm solid #880000; background: transparent url(bg.jpg) repeat fixed right top; background-color:#ccffff; ">
The CSS properties background-image, background-position, and background-repeat are supported as defined in CSS2, as well as the shorthand form "background".
<br />
The background has been set on this &lt;div&gt; element to:<br />
<span style="font-family: mono; font-size: 9pt;">background: transparent url(\'bg.jpg\') repeat fixed right top;</span><br />
Background gradients can be set on all block elements e.g. P, DIV, H1-H6, as well as on BODY.
</div>
<h4>Rounded Borders</h4>
<div class="rounded">
Rounded corners to borders can be added using border-radius as defined in the draft spec. of <a href="http://www.w3.org/TR/2008/WD-css3-background-20080910/#layering">CSS3</a>. <br />
The two length values of the border-*-radius properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge.
The first value is the horizontal radius. <br />
<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 55pt 25pt;</span> 55pt is radius of curve from top end of left border starting to go round to the top.<br />
If the second length is omitted it is equal to the first (and the corner is thus a quarter circle). If either length is zero, the corner is square, not rounded.<br />
The border-radius shorthand sets all four border-*-radius properties. If values are given before and after a slash, then the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, then the values set both radii equally. The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left.
</div>
<div class="rounded">
<span style="font-family: mono; font-size: 9pt;">border-radius: 4em;</span><br />
would be equivalent to<br />
<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 4em;<br />
border-top-right-radius: 4em;<br />
border-bottom-right-radius: 4em;<br />
border-bottom-left-radius: 4em;</span><br />
<br />
and<br />
<span style="font-family: mono; font-size: 9pt;">border-radius: 2em 1em 4em / 0.5em 3em;</span><br />
would be equivalent to<br />
<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 2em 0.5em;<br />
border-top-right-radius: 1em 3em;<br />
border-bottom-right-radius: 4em 0.5em;<br />
border-bottom-left-radius: 1em 3em;</span>
</div>
</div>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,207 @@
<?php
$html = '
<style>
table { border-collapse: collapse; margin-top: 0; text-align: center; }
td { padding: 0.5em; }
h1 { margin-bottom: 0; }z
</style>
<h1>mPDF Images</h1>
<table>
<tr>
<td>GIF</td>
<td>JPG</td>
<td>JPG (CMYK)</td>
<td>PNG</td>
<td>BMP</td>
<td>WMF</td>
<td>SVG</td>
</tr>
<tr>
<td><img style="vertical-align: top" src="tiger.gif" width="80" /></td>
<td><img style="vertical-align: top" src="tiger.jpg" width="80" /></td>
<td><img style="vertical-align: top" src="tigercmyk.jpg" width="80" /></td>
<td><img style="vertical-align: top" src="tiger.png" width="80" /></td>
<td><img style="vertical-align: top" src="tiger.bmp" width="80" /></td>
<td><img style="vertical-align: top" src="tiger2.wmf" width="80" /></td>
<td><img style="vertical-align: top" src="tiger.svg" width="80" /></td>
</tr>
</tr>
<tr>
<td colspan="7" style="text-align: left" ><h4>Opacity 50%</h4></td>
</tr>
<tr>
<tr>
<td><img style="vertical-align: top; opacity: 0.5" src="tiger.gif" width="80" /></td>
<td><img style="vertical-align: top; opacity: 0.5" src="tiger.jpg" width="80" /></td>
<td><img style="vertical-align: top; opacity: 0.5" src="tigercmyk.jpg" width="80" /></td>
<td><img style="vertical-align: top; opacity: 0.5" src="tiger.png" width="80" /></td>
<td><img style="vertical-align: top; opacity: 0.5" src="tiger.bmp" width="80" /></td>
<td><img style="vertical-align: top; opacity: 0.5" src="tiger2.wmf" width="80" /></td>
<td><img style="vertical-align: top; opacity: 0.5" src="tiger.svg" width="80" /></td>
</tr>
</table>
<h4>Alpha channel</h4>
<table>
<tr>
<td>PNG</td>
<td><img style="vertical-align: top" src="alpha.png" width="85" /></td>
<td style="background-color:#FFCCFF; "><img style="vertical-align: top" src="alpha.png" width="85" /></td>
<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="alpha.png" width="85" /></td>
<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="alpha.png" width="85" /></td>
<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="alpha.png" width="85" /></td>
</tr>
</table>
<h4>Transparency</h4>
<table><tr>
<td>PNG</td>
<td style="background-color:#FFCCFF; "><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td>
<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td>
<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td>
<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td>
</tr><tr>
<td>GIF</td>
<td style="background-color:#FFCCFF;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td>
<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td>
<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td>
<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td>
</tr><tr>
<td>WMF</td>
<td style="background-color:#FFCCFF;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td>
<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td>
<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td>
<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td>
</tr><tr>
<td>SVG</td>
<td style="background-color:#FFCCFF;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td>
<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td>
<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td>
<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td>
</tr></table>
Images returned from tiger.php
<div>
GIF <img style="vertical-align: top" src="tiger.php?t=gif" width="85" />
JPG <img style="vertical-align: top" src="tiger.php?t=jpg" width="85" />
PNG <img style="vertical-align: top" src="tiger.php?t=png" width="85" />
WMF <img style="vertical-align: top" src="tiger.php?t=wmf" width="85" />
SVG <img style="vertical-align: top" src="tiger.php?t=svg" width="85" />
</div>
<pagebreak />
<h3>Image Alignment</h3>
<div>From mPDF version 4.2 onwards, in-line images can be individually aligned (vertically). Most of the values for "vertical-align" are supported: top, bottom, middle, baseline, text-top, and text-bottom. The default value for vertical alignment has been changed to baseline, and the default padding to 0, consistent with most browsers.
</div>
<br />
<div style="background-color:#CCFFFF;">
These images <img src="img1.png" style="vertical-align: top;" />
are <img src="img2.png" style="vertical-align: top;" />
<b>top</b> <img src="img3.png" style="vertical-align: top;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<br />
<div style="background-color:#CCFFFF;">
These images <img src="img1.png" style="vertical-align: text-top;" />
are <img src="img2.png" style="vertical-align: text-top;" />
<b>text-top</b> <img src="img3.png" style="vertical-align: text-top;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<br />
<div style="background-color:#CCFFFF;">
These images <img src="img1.png" style="vertical-align: bottom;" />
are <img src="img2.png" style="vertical-align: bottom;" />
<b>bottom</b> <img src="img3.png" style="vertical-align: bottom;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<br />
<div style="background-color:#CCFFFF;">
These images <img src="img1.png" style="vertical-align: text-bottom;" />
are <img src="img2.png" style="vertical-align: text-bottom;" />
<b>text-bottom</b> <img src="img3.png" style="vertical-align: text-bottom;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<br />
<div style="background-color:#CCFFFF;">
These images <img src="img1.png" style="vertical-align: baseline;" />
are <img src="img2.png" style="vertical-align: baseline;" />
<b>baseline</b> <img src="img3.png" style="vertical-align: baseline;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<br />
<div style="background-color:#CCFFFF;">
These images <img src="img1.png" style="vertical-align: middle;" />
are <img src="img2.png" style="vertical-align: middle;" />
<b>middle</b> <img src="img3.png" style="vertical-align: middle;" />
aligned <img src="img5.png" style="vertical-align: bottom;" />
</div>
<br />
<h4>Mixed alignment</h4>
<div style="background-color:#CCFFFF;">
baseline: <img src="sunset.jpg" width="50" style="vertical-align: baseline;" />
text-bottom: <img src="sunset.jpg" width="30" style="vertical-align: text-bottom;" />
middle: <img src="sunset.jpg" width="30" style="vertical-align: middle;" />
bottom: <img src="sunset.jpg" width="80" style="vertical-align: bottom;" />
text-top: <img src="sunset.jpg" width="50" style="vertical-align: text-top;" />
top: <img src="sunset.jpg" width="100" style="vertical-align: top;" />
</div>
<h3>Image Border and padding</h3>
From mPDF v4.2, Image padding is supported as well as border and margin.
<img src="sunset.jpg" width="100" style="border:3px solid #44FF44; padding: 1em;" />
<h3>Rotated Images</h3>
<img src="tiger.png" width="100" />
<img src="tiger.png" rotate="90" width="100" />
<img src="tiger.png" rotate="180" width="100" />
<img src="tiger.png" rotate="-90" width="100" />
<br />
<img src="tiger.jpg" width="100" />
<img src="tiger.jpg" rotate="90" width="100" />
<img src="tiger.jpg" rotate="180" width="100" />
<img src="tiger.jpg" rotate="-90" width="100" />
<br />
<img src="tiger2.wmf" width="80" /> &nbsp; &nbsp; &nbsp;
<img src="tiger2.wmf" rotate="90" width="80" /> &nbsp; &nbsp; &nbsp;
<img src="tiger2.wmf" rotate="180" width="80" /> &nbsp; &nbsp; &nbsp;
<img src="tiger2.wmf" rotate="-90" width="80" />
<br />
<img src="tiger.svg" width="100" />&nbsp;
<img src="tiger.svg" rotate="90" width="85" />&nbsp;
<img src="tiger.svg" rotate="180" width="100" />&nbsp;
<img src="tiger.svg" rotate="-90" width="85" />
<br />
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,532 @@
<?php
$html = '
<head>
<style>
table {
border-collapse: separate;
border: 4px solid #880000;
padding: 3px;
margin: 0px 20px 0px 20px;
empty-cells: hide;
background-color:#FFFFCC;
}
table.outer2 {
border-collapse: separate;
border: 4px solid #088000;
padding: 3px;
margin: 10px 0px;
empty-cells: hide;
background-color: yellow;
}
table.outer2 td {
font-family: Times;
}
table.inner {
border-collapse: collapse;
border: 2px solid #000088;
padding: 3px;
margin: 5px;
empty-cells: show;
background-color:#FFCCFF;
}
td {
border: 1px solid #008800;
padding: 0px;
background-color:#ECFFDF;
}
table.inner td {
border: 1px solid #000088;
padding: 0px;
font-family: monospace;
font-style: italic;
font-weight: bold;
color: #880000;
background-color:#FFECDF;
}
table.collapsed {
border-collapse: collapse;
}
table.collapsed td {
background-color:#EDFCFF;
}
</style>
</head>
<body>
<h1>mPDF</h1>
<h2>Tables - Nested</h2>
<div style="border: 2px solid #000088; background-color: #DDDDFF; padding: 2mm;">
Text before table
<div style="border: 2px solid #008888; background-color: #DCAFCF; padding: 2mm;">
<table cellSpacing="2" rotate="-90" align="center" autosize="1.5">
<tbody>
<tr>
<td>This is data</td>
<td>This is data</td>
<td>
<table cellSpacing="2">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td>B3</td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id <a href="http://www.dummy.com">euismod auctor</a>, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td>This is data</td>
</tr>
<tr>
<td>This is data</td>
<td>This is data</td>
<td>
<table cellSpacing="2">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td>B3</td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td style="background: transparent url(\'bg.jpg\') repeat scroll right top;" >Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td>This is data</td>
</tr>
<tr>
<td>This is data</td>
<td>This is data</td>
<td>
<table cellSpacing="2">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td>B3</td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td>This is data</td>
</tr>
<tr>
<td>This is data</td>
<td>This is data</td>
<td>
<table cellSpacing="2">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td>B3</td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td>This is data</td>
</tr>
<tr>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
</tr>
<tr>
<td>This is data</td>
<td></td>
<td>This is data</td>
<td>This is data</td>
</tr>
<tr>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
</tr>
</tbody></table>
</div>
<p>Text before table</p>
<table cellSpacing="2" class="outer2" autosize="3" style="page-break-inside:avoid">
<tbody>
<tr>
<td>Row 1</td>
<td>This is data</td>
<td style="text-align: right;">
Text before table
<table cellSpacing="2" class="inner" width="80%">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td>B3</td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>C3</td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
<p>Text after table</p>
</td>
<td>This is data</td>
</tr>
<tr>
<td>Row 2</td>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
</tr>
<tr>
<td>Row 3</td>
<td style="text-align: center; vertical-align: middle;">
<table cellSpacing="2" class="inner" width="80%">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>
<table cellSpacing="2">
<tbody>
<tr>
<td>F1</td>
<td>F2</td>
</tr>
<tr>
<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td>
<td>G2</td>
</tr>
</tbody></table>
</td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td style="vertical-align: bottom; ">
<table cellSpacing="2" class="inner" align="right">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td>B3</td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>C3</td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td>This is data</td>
</tr>
<tr>
<td>Row 4</td>
<td>This is data</td>
<td><table cellSpacing="2" class="inner">
<tbody>
<tr>
<td>Row A</td>
<td>A2</td>
<td>A3</td>
<td>A4</td>
</tr>
<tr>
<td>Row B</td>
<td>B2</td>
<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td>
<td>B4</td>
</tr>
<tr>
<td>Row C</td>
<td>C2</td>
<td>
<table cellSpacing="2">
<tbody>
<tr>
<td>F1</td>
<td>F2</td>
</tr>
<tr>
<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td>
<td>G2</td>
</tr>
</tbody></table>
</td>
<td>C4</td>
</tr>
<tr>
<td>Row D</td>
<td>D2</td>
<td>D3</td>
<td>D4</td>
</tr>
</tbody></table>
</td>
<td>This is data</td>
</tr>
</tbody></table>
</div>
<p>&nbsp;</p>
<div style="border: 1px solid #000088; background-color: #DDDDFF; padding: 5mm;">
Text before table
<table cellSpacing="2" class="separate">
<tbody>
<tr>
<td style="background-color:#FFCCFF;">Row 1</td>
<td>This is data</td>
<td>
NO NESTING </td>
<td>This is data</td>
</tr>
<tr>
<td>Row 2</td>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
</tr>
<tr>
<td>Row 3</td>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
</tr>
<tr>
<td>Row 4</td>
<td>This is data</td>
<td>This is data</td>
<td>This is data</td>
</tr>
</tbody></table>
</div>
</body>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
$mpdf->SetDisplayMode('fullpage');
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,500 @@
<?php
$html = '
<html><head>
<style>
table {
font-family: sans-serif;
border: 7mm solid aqua;
border-collapse: collapse;
}
table.table2 {
border: 2mm solid aqua;
border-collapse: collapse;
}
table.layout {
border: 0mm solid black;
border-collapse: collapse;
}
td.layout {
text-align: center;
border: 0mm solid black;
}
td {
padding: 3mm;
border: 2mm solid blue;
vertical-align: middle;
}
td.redcell {
border: 3mm solid red;
}
td.redcell2 {
border: 2mm solid red;
}
</style>
</head>
<body>
<h1>mPDF</h1>
<h2>Tables - Borders</h2>
<h4>mPDF</h4>
Border conflict resolution in tables with border-collapse set to "collapse". mPDF follows the rules set by CSS as well as possible, but as you can see, there is some difference in interpretation of the rules:
<table class="layout">
<tr>
<td class="layout">mPDF</td>
<td class="layout">Internet Explorer<br />IE 7</td>
<td class="layout">Firefox<br />v 3.0.3</td>
</tr>
<tr>
<td class="layout">
<table>
<tr>
<td style="border:5mm solid green">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td rowspan="2" class="redcell" style="border:5mm solid teal">1</td>
<td style="border:3mm solid pink">1</td>
<td style="border:5mm solid purple">1</td>
</tr>
<tr>
<td style="border:2mm solid gray">1</td>
<td>1</td>
</tr>
<tr>
<td class="redcell">1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
</td>
<td class="layout" rowspan="3"><img src="bordersIE.jpg" /></td>
<td class="layout" rowspan="3"><img src="bordersFF.jpg" /></td>
</tr>
<tr>
<td class="layout" style="text-align: left">
<table style="border: 2.5mm solid aqua">
<tr>
<td class="redcell">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td rowspan="2" class="redcell" style="border:5mm solid green">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td class="redcell">1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="layout">
<table>
<tr>
<td class="redcell">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td rowspan="2" >1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td style="border:5mm solid yellow">1</td>
<td>1</td>
</tr>
<tr>
<td class="redcell">1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
</td>
</tr>
</table>
<pagebreak />
<table class="layout">
<tr>
<td class="layout">mPDF</td>
<td class="layout">mPDF &lt; v3</td>
<td class="layout">Internet Explorer<br />IE 7</td>
<td class="layout">Firefox<br />v 3.0.3</td>
</tr>
<tr>
<td class="layout">
<table class="table2">
<tr>
<td style="border:2mm solid green">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td rowspan="2" class="redcell2" style="border:2mm solid teal">1</td>
<td style="border:2mm solid pink">1</td>
<td style="border:2mm solid purple">1</td>
</tr>
<tr>
<td style="border:2mm solid gray">1</td>
<td>1</td>
</tr>
<tr>
<td class="redcell2">1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
</td>
<td class="layout" rowspan="3"><img src="bordersMPDF2.jpg" /></td>
<td class="layout" rowspan="3"><img src="borders2IE.jpg" /></td>
<td class="layout" rowspan="3"><img src="borders2FF.jpg" /></td>
</tr>
<tr>
<td class="layout" style="text-align: left">
<table style="border: 2mm solid aqua" class="table2">
<tr>
<td class="redcell2">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td rowspan="2" class="redcell2" style="border:2mm solid green">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td class="redcell2">1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="layout">
<table class="table2">
<tr>
<td class="redcell2">1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td rowspan="2" >1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td style="border:2mm solid yellow">1</td>
<td>1</td>
</tr>
<tr>
<td class="redcell2">1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
</td>
</tr>
</table>
<pagebreak />
<h4>mPDF</h4>
<table style="border: 10px solid orange">
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px double red">double red</td>
<td style="border: 10px dashed yellow">dashed yellow</td>
<td style="border: 10px dotted green">dotted green</td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px hidden orange">hidden </td>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px none orange">none</td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px ridge blue">ridge blue</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px groove pink">groove pink</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px none orange">none </td>
<td style="border: 10px inset gray">inset gray</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px outset purple">outset purple</td>
<td style="border: 10px none orange">none </td>
</tr>
</table>
<h4>Firefox</h4>
<img src="borders3FF.jpg" />
<br />
<h4>IE 7</h4>
<img src="borders3IE.jpg" />
<pagebreak />
<div>mPDF</div>
<table style="border: 10px solid orange; border-collapse: separate;">
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px double red">double red</td>
<td style="border: 10px dashed yellow">dashed yellow</td>
<td style="border: 10px dotted green">dotted green</td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px hidden orange">hidden </td>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px none orange">none</td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px ridge blue">ridge blue</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px solid orange">Data</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px groove pink">groove pink</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px solid orange">Data</td>
</tr>
<tr>
<td style="border: 10px none orange">none </td>
<td style="border: 10px inset gray">inset gray</td>
<td style="border: 10px none orange">none </td>
<td style="border: 10px outset purple">outset purple</td>
<td style="border: 10px none orange">none </td>
</tr>
</table>
<div>Firefox</div>
<img style="margin:0;" src="borders4FF.jpg" />
<div>IE 7</div>
<img style="margin:0;" src="borders4IE.jpg" />
<pagebreak />
<table style="border: 5px inset teal">
<tr>
<td style="border: 5px solid orange">solid orange</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px double red">double red</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px inset gray">inset gray</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px outset purple">outset purple</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px groove pink">groove pink</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px ridge blue">ridge blue</td>
</tr>
</table>
<table style="border: 5px inset gray; border-collapse: separate;">
<tr>
<td style="border: 5px solid orange">solid orange</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px double red">double red</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px inset gray">inset gray</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px outset purple">outset purple</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px groove pink">groove pink</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px ridge blue">ridge blue</td>
</tr>
</table>
<table style="border: 5px outset purple; border-collapse: separate;">
<tr>
<td style="border: 5px solid orange">solid orange</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px double red">double red</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px inset gray">inset gray</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px outset purple">outset purple</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px groove pink">groove pink</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px ridge blue">ridge blue</td>
</tr>
</table>
<table style="border: 5px groove pink; border-collapse: separate;">
<tr>
<td style="border: 5px solid orange">solid orange</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px double red">double red</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px inset gray">inset gray</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px outset purple">outset purple</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px groove pink">groove pink</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px ridge blue">ridge blue</td>
</tr>
</table>
<table style="border: 5px ridge blue; border-collapse: separate;">
<tr>
<td style="border: 5px solid orange">solid orange</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px double red">double red</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px inset gray">inset gray</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px outset purple">outset purple</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px groove pink">groove pink</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px ridge blue">ridge blue</td>
</tr>
</table>
<table style="border: 5px double red; border-collapse: separate;">
<tr>
<td style="border: 5px solid orange">solid orange</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px double red">double red</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px inset gray">inset gray</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px outset purple">outset purple</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px groove pink">groove pink</td>
<td style="border: 0px none black">none</td>
<td style="border: 5px ridge blue">ridge blue</td>
</tr>
</table>
</body>
</html>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('en-GB-x','A4','','',10,10,10,10,6,3);
$mpdf->SetDisplayMode('fullpage');
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,137 @@
<?php
$html = '
<style>
ol, ul { text-align: justify;
}
.lista { list-style-type: upper-roman; }
.listb{ list-style-type: decimal; font-family: sans-serif; color: blue; font-weight: bold; font-style: italic; font-size: 19pt; }
.listc{ list-style-type: upper-alpha; text-indent: 25mm; }
.listd{ list-style-type: lower-alpha; color: teal; line-height: 2; }
.liste{ list-style-type: disc; }
</style>
<h1>mPDF</h1>
<h2>Lists</h2>
<div style="background-color:#ddccff; padding:0pt; border: 1px solid #555555;">
<ol class="lista">
<li>Text here lorem ipsum ibisque totum.</li>
<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.
<ol class="listb">
<li>Text here lorem ipsum ibisque totum.</li>
<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.
<ol class="listc">
<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.
</li>
<li>Text here lorem ipsum ibisque totum.
<ol class="listd">
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.
<ol class="liste">
<li>Text here lorem ipsum ibisque totum.</li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.
<ol class="listc">
<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.
<ol class="listd">
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.
<ol class="liste">
<li>Text here lorem ipsum ibisque totum.</li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.
<ol>
<li>No class specified. Text here lorem ipsum ibisque totum.</li>
<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
<li>Text here lorem ipsum ibisque totum.</li>
</ol>
</div>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($html);
$mpdf->list_align_style = 'L'; // Determines alignment of numbers in numbered lists
$mpdf->list_number_suffix = ')';
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,204 @@
<?php
define('_MPDF_PATH','../');
include("../mpdf.php");
$html = '
<form>
<b>Textarea</b>
<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea>
<br /><br />
<b>Select</b>
<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text
<br /><br />
<b>Input Radio</b>
<input type="radio" name="pre_publication" value="0" checked="checked" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="pre_publication" value="1" > Yes
<br /><br />
<b>Input Radio</b>
<input type="radio" name="recommended" value="0" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="1" > Keep &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="2" checked="checked" > Choice
<br /><br />
<b>Input Text</b>
<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211">
<br /><br />
<b>Input Password</b>
<input type="password" size="40" name="password" value="secret">
<br /><br />
<input type="checkbox" name="QPC" value="ON" /> Checkboxes<br>
<input type="checkbox" name="QPA" value="ON" disabled="disabled" /> Disabled<br>
<input type="checkbox" name="QLY" value="ON" checked="checked" /> Selected
<br /><br />
<input type="submit" name="submit" value="Submit" /><br /><br />
</form>
<hr style="width:80%;" />
<div>
<form>
<b>Textarea</b>
<textarea name="authors" rows="5" cols="50" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea>
<br /><br />
<b>Select</b>
<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select>
<br /><br />
<b>Input Radio</b>
<input type="radio" name="pre_publication" value="0" checked="checked" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="pre_publication" value="1" > Yes
<br /><br />
<b>Input Radio</b>
<input type="radio" name="recommended" value="0" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="1" > Keep &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="2" checked="checked" > Choice
<br /><br />
<b>Input Text</b>
<input type="text" size="40" name="doi" value="10.1258/jrsm.100.5.211" />
<br />
<b>Input Password</b>
<input type="password" size="40" name="password" value="secret">
<br /><br />
<input type="checkbox" name="QPC" value="ON" /> Checkboxes<br>
<input type="checkbox" name="QPA" value="ON" disabled="disabled" /> Disabled<br>
<input type="checkbox" name="QLY" value="ON" checked="checked" /> Selected
<br /><br />
<input type="submit" name="submit" value="Submit" /><br /><br />
</form>
</div>
<hr style="width:100%;" />
<form>
<table border="1" style="padding:2px;" >
<tr><td valign="top" align="right"><b>Textarea</b></td><td><textarea name="title" rows="5" cols="50" wrap="virtual">TEXTINTABLE Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea></td></tr>
<tr><td valign="top" align="right"><b>Select</b></td><td><select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> <input type="hidden" name="old_status" value="A" /> </td></tr>
<tr><td valign="bottom" align="right"><b>Input Radio</b></td><td><input type="radio" name="pre_publication" value="0" checked > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="pre_publication" value="1" > Yes </td></tr>
<tr><td valign="top" align="right"><b>Input Radio</b></td><td><input type="radio" name="recommended" value="0" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="1" > Keep &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="2" checked="checked" > Choice </td></tr>
<tr><td valign="top" align="right"><b>Input Text</b></td><td><input type="text" size="40" name="doi" value="10.1258/jrsm.100.5.211"> </td>
</tr>
</table>
<br />
<table border="1" style="padding:8px;">
<tr><td valign="top" align="right"><b>Checkbox</b></td><td></td></tr>
<tr><td><input type="checkbox" name="QPC" value="ON" > Checkboxes<br></td><td><input type="checkbox" name="QSC" value="ON" > Gardening</td></tr>
<tr><td><input type="checkbox" name="QPA" value="ON" > Holidays<br></td><td><input type="checkbox" name="QPD" value="ON" > Motoring<br></td></tr>
<tr><td><input type="checkbox" name="QLY" value="ON" checked="checked" > Books</td><td><input type="checkbox" name="QCA" value="ON" > Theatre</td></tr>
<tr><td><input type="checkbox" name="QNU" value="ON" checked="checked" > Selected option</td><td><input type="checkbox" name="QET" value="ON" > Musicals</td></tr><tr><td><input type="checkbox" name="QBE" value="ON" > Eating out</td><td><input type="checkbox" name="QPY" value="ON" > Events</td></tr>
<tr><td>
<input type="submit" name="submit" value="Submit" /><br />
</td><td></td></tr></table>
</form>
<form>
<b>Input Radio</b>
<input type="radio" name="pre_publication" value="0" checked="checked" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="pre_publication" value="1" > Yes
<br /><br />
<input type="hidden" name="doi" value="10.1258/jrsm.100.5.211" />
<b>Input Radio</b>
<input type="radio" name="recommended" value="0" > No &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="1" > Keep &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio" name="recommended" value="2" checked="checked" > Choice
<br /><br />
<b>Input Text</b><br />
Input text: <input type="text" size="40" name="doi" value="10.1258/jrsm.100.5.211" /> <br />
Password: <input type="password" size="40" name="doi" value="pallcare" />
<br /><br />
Checkboxes: <br />
<input type="checkbox" name="QPC" value="ON" /> Checkboxes<br>
<input type="checkbox" name="QPA" value="ON" disabled="disabled" /> Disabled<br>
<input type="checkbox" name="QLY" value="ON" checked="checked" /> Selected
<br /><br />
<input type="image" name="submit" src="goto.gif" />
<input type="button" name="submit" value="Button" />
<input type="reset" name="submit" value="Reset" />
<input type="submit" name="submit" value="Submit" />
</form>
';
//==============================================================
//==============================================================
//==============================================================
if (isset($_REQUEST['html'])) { echo '<html><head><style>'.file_get_contents('mpdfstyletables.css').'</style></head><body>'.$html.'</body></html>'; exit; }
if (isset($_REQUEST['source'])) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
//==============================================================
//==============================================================
$mpdf=new mPDF('c');
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->SetColumns(2,'J');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,103 @@
<?php
$html = '
<style>
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
}
h4 {
font-family: sans;
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.5em;
}
div {
padding:1em;
margin-bottom: 1em;
text-align:justify;
}
.myfixed1 { position: absolute;
overflow: visible;
left: 0;
bottom: 0;
border: 1px solid #880000;
background-color: #FFEEDD;
background-gradient: linear #dec7cd #fff0f2 0 1 0 0.5;
padding: 1.5em;
font-family:sans;
margin: 0;
}
.myfixed2 { position: fixed;
overflow: auto;
right: 0;
bottom: 0mm;
width: 65mm;
border: 1px solid #880000;
background-color: #FFEEDD;
background-gradient: linear #dec7cd #fff0f2 0 1 0 0.5;
padding: 0.5em;
font-family:sans;
margin: 0;
rotate: 90;
}
</style>
<body>
<h1>mPDF</h1>
<h2>Floating & Fixed Position elements</h2>
<h4>CSS "Float"</h4>
<div class="gradient">
Block elements can be positioned alongside each other using the CSS property float: left or right. The clear property can also be used, set as left|right|both. Float is only supported on block elements (i.e. not SPAN etc.) and is not fully compliant with the CSS specification.
Float only works properly if a width is set for the float, otherwise the width is set to the maximum available (full width, or less if floats already set).
<br />
Margin-right can still be set for a float:right and vice-versa.
<br />
A block element next to a float has the padding adjusted so that content fits in the remaining width. Text next to a float should wrap correctly, but backgrounds and borders will overlap and/or lie under the floats in a mess.
<br />
NB The width that is set defines the width of the content-box. So if you have two floats with width=50% and either of them has padding, margin or border, they will not fit together on the page.
</div>
<div class="gradient" style="float: right; width: 28%; margin-bottom: 0pt; ">
<img src="tiger.wmf" style="float:right" width="70" />This is text in a &lt;div&gt; element that is set to float:right and width:28%. It also has an image with float:right inside. With this exception, you cannot nest elements with the float property set inside one another.
</div>
<div class="gradient" style="float: left; width: 54%; margin-bottom: 0pt; ">
This is text in a &lt;div&gt; element that is set to float:left and width:54%.
</div>
<div style="clear: both; margin: 0pt; padding: 0pt; "></div>
This is text that follows a &lt;div&gt; element that is set to clear:both.
<h4>CSS "Position"</h4>
At the bottom of the page are two DIV elements with position:fixed and position:absolute set
<div class="myfixed1">1 Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>
<div class="myfixed2">2 Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,81 @@
<?php
$html = '
<div style="position:fixed; left: 0; right: 0; bottom: 0; top: 0;">
<h1>mPDF</h1>
<h4>Fixed-position block element with Autofit</h4>
<div>Using the CSS properties position and overflow:auto it is possible to fit text to a single page:</div>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<div><img src="tiger.wmf" style="float:right;">DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<div><img src="klematis.jpg" style="opacity: 0.5; float: left;" />DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote>
<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address>
<div><a href="dummy'.time().'">Hyperlink (&lt;a&gt;)</a></div>
<div><a href="#top">Hyperlink (&lt;a&gt;)</a></div>
<div><a href="http://www.pallcare.info">Hyperlink (&lt;a&gt;)</a></div>
<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br>
<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font>
</div>
<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p>
<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3>
<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p>
<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p>
<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p>
<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p>
<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p>
<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p>
<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p>
<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p>
<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p>
<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p>
</div>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,92 @@
<?php
$html = '
<pageheader name="myHeaderNoNum" content-left="My Book Title" content-center="myHeader1" content-right="" header-style="font-family:sans-serif; font-size:8pt; color:#880000;" header-style-right="font-size:12pt; font-weight:bold; font-style:italic; color:#088000;" line="on" />
<pageheader name="myHeaderNoNumEven" content-left="" content-center="myHeader1Even" content-right="{DATE j-m-Y}" header-style="font-family:sans-serif; font-size:8pt; color:#000088;" header-style-left="font-weight:bold; " line="on" />
<pageheader name="myHeader1" content-left="My Book Title" content-center="myHeader1" content-right="{PAGENO}" header-style="font-family:sans-serif; font-size:8pt; color:#880000;" header-style-right="font-size:12pt; font-weight:bold; font-style:italic; color:#088000;" line="on" />
<pageheader name="myHeader1Even" content-left="{PAGENO}" content-center="myHeader1Even" content-right="{DATE j-m-Y}" header-style="font-family:sans-serif; font-size:8pt; color:#000088;" header-style-left="font-weight:bold; " line="on" />
<htmlpageheader name="myHTMLHeader1" style="display:none">
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td>
</tr></table>
</htmlpageheader>
<htmlpageheader name="myHTMLHeader1Even" style="display:none">
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%"><span style="font-weight: bold;">Outer header</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
</htmlpageheader>
<pagefooter name="myFooter1" content-left="My Book Title" content-center="myFooter1" content-right="{PAGENO}" footer-style="font-family:sans-serif; font-size:8pt; font-weight:bold; color:#008800;" footer-style-left="" line="on" />
<pagefooter name="myFooter1Even" content-left="{PAGENO}" content-center="myFooter1Even" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#000880;" footer-style-left="font-weight:bold; " line="on" />
<setpageheader name="myHeaderNoNum" page="O" value="on" show-this-page="1" />
<setpageheader name="myHeaderNoNumEven" page="E" value="on" />
<h1 style="margin-collapse: none; margin-top: 35mm">Introduction</h1>
<div>Introduction</div>
<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. <!--Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. -->Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
<tocpagebreak toc-orientation="landscape" font="mono" font-size="12" indent="5" paging="on" links="on" resetpagenum="1" suppress="off" pagenumstyle="1" orientation="portrait" margin-top="55mm" odd-header-name="myHeader1" odd-header-value="1" even-header-name="html_myHTMLHeader1Even" even-header-value="1" odd-footer-name="myFooter1" odd-footer-value="1" even-footer-name="myFooter1Even" even-footer-value="1" toc-odd-header-name="myHeaderNoNum" toc-odd-header-value="1" toc-even-header-name="myHeaderNoNumEven" toc-even-header-value="1" toc-odd-footer-name="" toc-odd-footer-value="-1" toc-even-footer-name="" toc-even-footer-value="-1" />
<h1>Section 2<tocentry content="Section 2" /></h1>
<div>Section 2</div>
<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
<pagebreak type="NEXT-ODD" margin-left="60mm" margin-right="40mm" margin-top="55mm" margin-bottom="30mm" margin-header="12mm" margin-footer="12mm" odd-header-name="html_myHTMLHeader1" odd-header-value="1" even-header-name="myHeader1Even" even-header-value="1" odd-footer-name="myFooter1" odd-footer-value="1" even-footer-name="myFooter1Even" even-footer-value="1" />
<h1>Section 3<tocentry content="Section 3" /></h1>
<div>Section 3</div>
<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
<pagebreak orientation="landscape" type="NEXT-ODD" margin-left="60mm" margin-right="40mm" margin-top="55mm" margin-bottom="30mm" margin-header="12mm" margin-footer="12mm" />
<h1>Section 4<tocentry content="Section 4" /></h1>
<div>Section 4</div>
<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
<pagebreak orientation="portrait" type="NEXT-ODD" margin-left="40mm" margin-right="20mm" odd-header-name="myHeader1" odd-header-value="1" even-header-name="myHeader1Even" even-header-value="1" odd-footer-name="myFooter1" odd-footer-value="1" even-footer-name="myFooter1Even" even-footer-value="1" suppress="off" />
<h1>Section 5<tocentry content="Section 5" /></h1>
<div>Section 5</div>
<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->mirrorMargins = true;
$mpdf->SetDisplayMode('fullpage','two');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,94 @@
<?php
$html = '
<htmlpageheader name="myHTMLHeaderOdd" style="display:none">
<div style="background-color:#BBEEFF" align="center"><b>{PAGENO}</b></div>
</htmlpageheader>
<htmlpageheader name="myHTMLHeaderEven" style="display:none">
<div style="background-color:#EFFBBE" align="center"><b><i>{PAGENO}</i></b></div>
</htmlpageheader>
<htmlpagefooter name="myHTMLFooterOdd" style="display:none">
<div style="background-color:#CFFFFC" align="center"><b>{PAGENO}</b></div>
</htmlpagefooter>
<htmlpagefooter name="myHTMLFooterEven" style="display:none">
<div style="background-color:#FFCCFF" align="center"><b><i>{PAGENO}</i></b></div>
</htmlpagefooter>
<pageheader name="myHeader2Odd" content-left="My Book Title" content-center="myHeader2Odd" content-right="{PAGENO}" header-style="font-family:sans-serif; font-size:8pt; font-weight:bold; color:#008800;" header-style-left="" line="on" />
<pagefooter name="myFooter2Even" content-left="{PAGENO}" content-center="myFooter2Even" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#000880;" footer-style-left="font-weight:bold; " line="on" />
<h1 class="heading1">mPDF 1</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<h1 class="heading2">mPDF 2</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<h1 class="heading3">mPDF 3</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<h1 class="heading4">mPDF 4</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<h1 class="heading5">mPDF 5</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<h1 class="heading6">mPDF 6</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<h1 class="heading7">mPDF 7</h1>
<h2>Paged Media using CSS</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',5,5,5,5,0,0);
$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins (1 or 0)
$mpdf->SetDisplayMode('fullpage','two');
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstylePaged.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,148 @@
<?php
//==============================================================
$lorem = "<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>";
//==============================================================
//==============================================================
//==============================================================
$html = '
<!-- defines the headers/footers -->
<!--mpdf
<htmlpageheader name="myHTMLHeader">
<div style="text-align: right; border-bottom: 1px solid #000000; font-family: serif; font-size: 8pt;">Odd Header</div>
</htmlpageheader>
<htmlpageheader name="myHTMLHeaderEven">
<div style="text-align: left; border-bottom: 1px solid #000000; font-family: serif; font-size: 8pt;">Even Header</div>
</htmlpageheader>
<htmlpagefooter name="myHTMLFooter">
<table width="100%" style="border-top: 1px solid #000000; vertical-align: top; font-family: sans; font-size: 8pt;"><tr>
<td width="33%">{DATE Y-m-d}</td>
<td width="33%" align="center"><span style="font-size:12pt;">{PAGENO}</span></td>
<td width="33%" style="text-align: right;">Odd Footer</td>
</tr></table>
</htmlpagefooter>
<htmlpagefooter name="myHTMLFooterEven">
<table width="100%" style="border-top: 1px solid #000000; vertical-align: top; font-family: sans; font-size: 8pt;"><tr>
<td width="33%">Even Footer</td>
<td width="33%" align="center"><span style="font-size:12pt;">{PAGENO}</span></td>
<td width="33%" style="text-align: right;">{DATE Y-m-d}</td>
</tr></table>
</htmlpagefooter>
<htmlpageheader name="tocHTMLHeader">
<div style="text-align: right; border-bottom: 1px solid #000000; font-family: serif; font-size: 8pt;">ToC Odd Header</div>
</htmlpageheader>
<htmlpageheader name="tocHTMLHeaderEven">
<div style="text-align: left; border-bottom: 1px solid #000000; font-family: serif; font-size: 8pt;">ToC Even Header</div>
</htmlpageheader>
<htmlpagefooter name="tocHTMLFooter">
<table width="100%" style="border-top: 1px solid #000000; vertical-align: top; font-family: sans; font-size: 8pt;"><tr>
<td width="33%">{DATE Y-m-d}</td>
<td width="33%" align="center"><span style="font-size:12pt;">{PAGENO}</span></td>
<td width="33%" style="text-align: right;">ToC Odd Footer</td>
</tr></table>
</htmlpagefooter>
<htmlpagefooter name="tocHTMLFooterEven">
<table width="100%" style="border-top: 1px solid #000000; vertical-align: top; font-family: sans; font-size: 8pt;"><tr>
<td width="33%">ToC Even Footer</td>
<td width="33%" align="center"><span style="font-size:12pt;">{PAGENO}</span></td>
<td width="33%" style="text-align: right;">{DATE Y-m-d}</td>
</tr></table>
</htmlpagefooter>
mpdf-->
<h1>mPDF</h1>
<h2>Table of Contents & Bookmarks</h2>
<!-- set the headers/footers - they will occur from here on in the document -->
<tocpagebreak paging="on" links="on" toc-odd-header-name="html_tocHTMLHeader" toc-even-header-name="html_tocHTMLHeaderEven" toc-odd-footer-name="html_tocHTMLFooter" toc-even-footer-name="html_tocHTMLFooterEven" toc-odd-header-value="on" toc-even-header-value="on" toc-odd-footer-value="on" toc-even-footer-value="on" toc-preHTML="&lt;h2&gt;Contents&lt;/h2&gt;" toc-bookmarkText="Content list" resetpagenum="1" pagenumstyle="A" odd-header-name="html_myHTMLHeader" odd-header-value="on" even-header-name="html_myHTMLHeaderEven" even-header-value="ON" odd-footer-name="html_myHTMLFooter" odd-footer-value="on" even-footer-name="html_myHTMLFooterEven" even-footer-value="on" outdent="2em" />
';
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
$mpdf->mirrorMargins = 1;
$mpdf->SetDisplayMode('fullpage','two');
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyleA4.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
// Alternative ways to mark ToC entries and Bookmarks
// This will automatically generate entries from the <h4> tag
$mpdf->h2toc = array('H4'=>0);
$mpdf->h2bookmarks = array('H4'=>0);
//==============================================================
// CONTENT
for ($j = 1; $j<7; $j++) {
if ($j==2) $mpdf->WriteHTML('<pagebreak resetpagenum="0" pagenumstyle="a" />',2);
if ($j==3) $mpdf->WriteHTML('<pagebreak resetpagenum="1" pagenumstyle="I" />',2);
if ($j==4) $mpdf->WriteHTML('<pagebreak resetpagenum="0" pagenumstyle="i" />',2);
if ($j==5) $mpdf->WriteHTML('<pagebreak resetpagenum="0" pagenumstyle="1" />',2);
if ($j==6) $mpdf->WriteHTML('<pagebreak resetpagenum="1" pagenumstyle="A" type="NEXT-ODD" /><div style="color:#AA0000">ODD</div>',2);
for ($x = 1; $x<7; $x++) {
// Alternative way to mark ToC entries and Bookmarks manually
// $mpdf->WriteHTML('<h4>Section '.$j.'.'.$x.'<bookmark content="Section '.$j.'.'.$x.'" level="0" /><tocentry content="Section '.$j.'.'.$x.'" level="0" /></h4>',2);
// Using Automatic generation from <h4> tag
$mpdf->WriteHTML('<h4>Section '.$j.'.'.$x.'</h4>',2);
$html = '';
// Split $lorem into words
$words = preg_split('/([\s,\.]+)/',$lorem,-1,PREG_SPLIT_DELIM_CAPTURE);
foreach($words as $i => $e) {
if($i%2==0) {
$y = rand(1,10); // every tenth word
if (preg_match('/^[a-zA-Z]{4,99}$/',$e) && ($y > 8)) {
// If it is just a word use it as an index entry
$content = ucfirst(trim($e));
$html .= '<indexentry content="'.$content.'" />';
$html .= '<i>'.$e . '</i>';
}
else { $html .= $e; }
}
else { $html .= $e; }
}
$mpdf->WriteHTML($html);
}
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// INDEX
$html = '<pagebreak type="next-odd" />
<h2>Index</h2>
<indexinsert cols="2" offset="5" usedivletters="on" div-font-size="15" gap="5" font="Trebuchet" div-font="sans-serif" links="on" />
';
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,60 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins
$mpdf->defaultheaderfontsize = 10; /* in pts */
$mpdf->defaultheaderfontstyle = B; /* blank, B, I, or BI */
$mpdf->defaultheaderline = 1; /* 1 to include line below header/above footer */
$mpdf->defaultfooterfontsize = 12; /* in pts */
$mpdf->defaultfooterfontstyle = B; /* blank, B, I, or BI */
$mpdf->defaultfooterline = 1; /* 1 to include line below header/above footer */
$mpdf->SetHeader('{DATE j-m-Y}|{PAGENO}/{nb}|My document');
$mpdf->SetFooter('{PAGENO}'); /* defines footer for Odd and Even Pages - placed at Outer margin */
$mpdf->SetFooter(array(
'L' => array(
'content' => 'Text to go on the left',
'font-family' => 'sans-serif',
'font-style' => 'B', /* blank, B, I, or BI */
'font-size' => '10', /* in pts */
),
'C' => array(
'content' => '- {PAGENO} -',
'font-family' => 'serif',
'font-style' => 'BI',
'font-size' => '18', /* gives default */
),
'R' => array(
'content' => 'Printed @ {DATE j-m-Y H:m}',
'font-family' => 'monospace',
'font-style' => '',
'font-size' => '10',
),
'line' => 1, /* 1 to include line below header/above footer */
), 'E' /* defines footer for Even Pages */
);
$html = '
<h1>mPDF</h1>
<h2>Headers & Footers Method 1</h2>
<h3>Odd / Right page</h3>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<pagebreak />
<h3>Even / Left page</h3>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
';
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,49 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,47,47,10,10);
$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins
$header = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td>
</tr></table>
';
$headerE = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%"><span style="font-weight: bold;">Outer header</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
';
$footer = '<div align="center">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a></div>';
$footerE = '<div align="center">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a></div>';
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLHeader($headerE,'E');
$mpdf->SetHTMLFooter($footer);
$mpdf->SetHTMLFooter($footerE,'E');
$html = '
<h1>mPDF</h1>
<h2>Headers & Footers Method 2</h2>
<h3>Odd / Right page</h3>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<pagebreak />
<h3>Even / Left page</h3>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
';
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,58 @@
<?php
$html = '
<!-- defines the headers/footers - this must occur before the headers/footers are set -->
<!--mpdf
<pageheader name="odds" content-right="My document" header-style-right="color: #880000; font-style: italic;" line="1" />
<pageheader name="evens" content-right="{DATE j-m-Y}" content-center="{PAGENO}/{nb}" header-style="color: #880000; font-style: italic;" />
<pagefooter name="odds" content-right="Odd Footer" footer-style-right="color: #880000; font-style: italic;" line="1" />
<pagefooter name="evens" content-right="{DATE j-m-Y}" content-center="{PAGENO}/{nb}" footer-style="color: #880000; font-style: italic;" />
<pageheader name="display" content-center="New header called Display" header-style="color: #000088; font-weight: bold;" />
mpdf-->
<!-- set the headers/footers - they will occur from here on in the document -->
<!--mpdf
<setpageheader name="odds" page="odd" value="on" show-this-page="1" />
<setpageheader name="evens" page="even" value="1" />
<setpagefooter name="odds" page="O" value="on" />
<setpagefooter name="evens" page="E" value="1" />
mpdf-->
<h1>mPDF</h1>
<h2>Headers & Footers Method 3</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<pagebreak />
<h2>Headers & Footers Method 3</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<pagebreak odd-header-name="display" odd-header-value="1" even-header-name="display" even-header-value="1" />
<h2>Headers & Footers</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,84 @@
<?php
$html = '
<!-- defines the headers/footers - this must occur before the headers/footers are set -->
<!--mpdf
<htmlpageheader name="myHTMLHeader1">
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">myHTMLHeader1</span></td>
</tr></table>
</htmlpageheader>
<htmlpageheader name="myHTMLHeader1Even">
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%"><span style="font-weight: bold;">myHTMLHeader1Even</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
</htmlpageheader>
<htmlpageheader name="myHTMLHeader2">
<table width="100%" style="border-bottom: 1px solid #880000; vertical-align: bottom; font-family: sans; font-size: 9pt; color: #880000;"><tr>
<td width="33%">myHTMLHeader2 p.<span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">myHTMLHeader2</span></td>
</tr></table>
</htmlpageheader>
<htmlpageheader name="myHTMLHeader2Even">
<table width="100%" style="border-bottom: 1px solid #880000; vertical-align: bottom; font-family: sans; font-size: 9pt; color: #880000;"><tr>
<td width="33%"><span style="font-weight: bold;">myHTMLHeader2Even</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
</htmlpageheader>
mpdf-->
<!-- set the headers/footers - they will occur from here on in the document -->
<!--mpdf
<sethtmlpageheader name="myHTMLHeader1" page="O" value="on" show-this-page="1" />
<sethtmlpageheader name="myHTMLHeader1Even" page="E" value="on" />
mpdf-->
<h1>mPDF</h1>
<h2>Headers & Footers Method 4</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<pagebreak />
<h2>Headers & Footers Method 4</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<!-- Note the html_ prefix when referencing an HTML header using one of the pagebreaks -->
<pagebreak odd-header-name="html_myHTMLHeader2" odd-header-value="1" even-header-name="html_myHTMLHeader2Even" even-header-value="1" />
<h2>Headers & Footers Method 4</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,47,47,10,10);
$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,59 @@
<?php
$hhtml = '
<htmlpageheader name="myHTMLHeaderOdd" style="display:none">
<div style="background-color:#BBEEFF" align="center"><b>&nbsp;{PAGENO}&nbsp;</b></div>
</htmlpageheader>
<htmlpagefooter name="myHTMLFooterOdd" style="display:none">
<div style="background-color:#CFFFFC" align="center"><b>&nbsp;{PAGENO}&nbsp;</b></div>
</htmlpagefooter>
<sethtmlpageheader name="myHTMLHeaderOdd" page="O" value="on" show-this-page="1" />
<sethtmlpagefooter name="myHTMLFooterOdd" page="O" value="on" show-this-page="1" />
';
//==============================================================
$html = '
<h1>mPDF Page Sizes</h1>
<h3>Changing page (sheet) sizes within the document</h3>
';
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4');
$mpdf->WriteHTML($hhtml);
$mpdf->WriteHTML($html);
$mpdf->WriteHTML('<p>This should print on an A4 (portrait) sheet</p>');
$mpdf->WriteHTML('<tocpagebreak sheet-size="A4-L" toc-sheet-size="A5" toc-preHTML="This ToC should print on an A5 sheet" />');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML('<tocentry content="A4 landscape" /><p>This page appears just after the ToC and should print on an A4 (landscape) sheet</p>');
$mpdf->WriteHTML('<pagebreak sheet-size="A5-L" />');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML('<tocentry content="A5 landscape" /><p>This should print on an A5 (landscape) sheet</p>');
$mpdf->WriteHTML('<pagebreak sheet-size="Letter" />');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML('<tocentry content="Letter portrait" /><p>This should print on an Letter sheet</p>');
$mpdf->WriteHTML('<pagebreak sheet-size="150mm 150mm" />');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML('<tocentry content="150mm square" /><p>This should print on a sheet 150mm x 150mm</p>');
$mpdf->WriteHTML('<pagebreak sheet-size="11.69in 8.27in" />');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML('<tocentry content="A4 landscape (ins)" /><p>This should print on a sheet 11.69in x 8.27in = A4 landscape</p>');
$mpdf->Output();
exit;
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,130 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Justification</h2>
<h4>Tables</h4>
<p>Text can be justified in table cells using in-line or stylesheet CSS. (Note that &lt;p&gt; tags are removed within cells along with any style definition or attributes.)</p>
<table class="bpmTopnTailC"><thead>
<tr class="headerrow"><th>Col/Row Header</th>
<td>
<p>Second column header p</p>
</td>
<td>Third column header</td>
</tr>
</thead><tbody>
<tr class="oddrow"><th>Row header 1</th>
<td>This is data</td>
<td>This is data</td>
</tr>
<tr class="evenrow"><th>Row header 2</th>
<td>
<p>This is data p</p>
</td>
<td>
<p>This is data</p>
</td>
</tr>
<tr class="oddrow"><th>
<p>Row header 3</p>
</th>
<td>
<p>This is long data</p>
</td>
<td>This is data</td>
</tr>
<tr class="evenrow"><th>
<p>Row header 4</p>
<p>&lt;th&gt; cell acting as header</p>
</th>
<td style="text-align:justify;"><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p></td>
<td>
<p>This is data</p>
</td>
</tr>
<tr class="oddrow"><th>Row header 5</th>
<td>Also data</td>
<td>Also data</td>
</tr>
<tr class="evenrow"><th>Row header 6</th>
<td>Also data</td>
<td>Also data</td>
</tr>
<tr class="oddrow"><th>Row header 7</th>
<td>Also data</td>
<td>Also data</td>
</tr>
<tr class="evenrow"><th>Row header 8</th>
<td>Also data</td>
<td>Also data</td>
</tr>
</tbody></table>
<p>&nbsp;</p>
<h4>Testing Justification with Long Words</h4>
<p>http://www-950.ibm.com/software/globalization/icu/demo/converters?s=ALL&amp;snd=4356&amp;dnd=4356</p>
<h5>Should not split</h5>
<p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplit</i> neque sit amet erat</p>
<p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend et <i>verylongwordthatwontsplit</i> neque sit amet erat</p>
<h5>Non-breaking Space &amp;nbsp;</h5><p>The next example has a non-breaking space between <i>eleifend</i> and the very long word.</p><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend&nbsp;verylongwordthatwontsplitanywhere neque sit amet erat</p><p>Nbsp will only work in fonts that have a glyph to represent the character i.e. not in the CJK languages nor some Unicode fonts.</p>
<h4>Testing Justification with mixed Styles</h4>
<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s> and then more text.
</p>
<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big>
</p>
<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small>
</p>
<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s> then more text.
</p>
<p></p>
<p style="font-size:7pt;">
<big>Repeated in BIG: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big>
</p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
$mpdf->SetDisplayMode('fullpage');
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
// SPACING
$mpdf->WriteHTML("<h4>Spacing</h4><p>mPDF uses both letter- and word-spacing for text justification. The default is a mixture of both, set by the configurable values jSWord and jSmaxChar. (Only word spacing is used when cursive languages such as Arabic or Indic are detected.) </p>");
$mpdf->jSWord = 0; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
$mpdf->jSmaxChar = 0; // Maximum spacing to allocate to character spacing. (0 = no maximum)
$mpdf->WriteHTML("<h5>Character spacing</h5><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>");
// Back to default settings
$mpdf->jSWord = 0.4;
$mpdf->jSmaxChar = 2;
$mpdf->WriteHTML("<h5>Word spacing</h5><p style=\"letter-spacing:0\">Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>");
$mpdf->WriteHTML("<h5>Mixed Character and Word spacing</h5><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>");
$mpdf->Output();
exit;
?>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,80 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Columns</h2>
';
//==============================================================
$loremH = "<h4>Lectus facilisis</h4>
<p>Sed auctor viverra diam. In lacinia lectus.</p>
<p>Praesent tincidunt massa in dolor. Morbi viverra leo quis ipsum.&nbsp;In vitae velit. In aliquam nulla nec mi. Sed accumsan, justo id congue fringilla, diam mauris volutpat ligula, sed aliquet elit diam at felis. Quisque et velit sed eros convallis posuere.</p>
<h5>Nunc tincidunt</h5>
<p>Nunc diam ipsum, consectetuer nec, hendrerit vitae, malesuada a, ante. Nulla ornare aliquet ante. Maecenas in lectus. Morbi porttitor mauris. Praesent ut.</p>
<p>Pede quis ante tincidunt <a href=\"http://www.stlucia.org\">blandit</a>. Maecenas bibendum erat. Curabitur sit amet ante quis velit ultricies facilisis. Ut hendrerit dolor commodo magna. In nec ligula a purus tincidunt adipiscing. Etiam non ante. </p><div>Suspendisse potenti. <indexentry content=\"Inline indexentry &lt;B&gt;\" />Suspendisse accumsan euismod lectus. Nunc commodo pede et turpis. Pellentesque porta mauris sed lorem. Ut nec augue vitae elit eleifend eleifend.Quisque ornare feugiat diam. Duis nulla metus, tempus sit amet, scelerisque a, rutrum at, nisl. Nulla facilisi. Duis metus turpis, molestie nec, laoreet tincidunt, ultrices et, purus. Nullam faucibus aliquam nisi.</div><a href=\"http://www.stlucia.org\"><img src=\"sunset.jpg\" /></a><p>Ut leo. Etiam tempus interdum tortor. Donec porta, arcu vel tincidunt placerat, lacus lorem iaculis diam, id sagittis sapien metus eu nunc. Morbi vitae nunc.<br />Mauris sapien. Phasellus elementum velit sed sapien. Nullam ante diam, consectetuer commodo, dignissim vitae, tempor vel, magna. Donec dictum. <i>Nullam</i> ultrices leo volutpat magna. Mauris blandit purus nec turpis. <a href=\"http://www.stlucia.org\">Curabitur</a> nunc. Aliquam condimentum eleifend<sup>32</sup> lectus. Praesent vitae nibh <b>et libero ullamcorper</b> scelerisque. Nullam auctor. Mauris ipsum nulla, malesuada id, aliquet at, feugiat vitae, eros.</p>
<div style=\"background-color:#DDDDBB; text-align:center; padding:3px; border:1px solid #880000; \">Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede.
<div style=\"background-color:#ADDBBF; text-align:center; padding:3px; border:1px solid #880000; \">Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
";
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
$mpdf->SetDisplayMode('fullpage');
$stylesheet = file_get_contents('mpdfstyleA4.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
// Bullets in columns are probably best not indented
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
$mpdf->max_colH_correction = 1.1;
$mpdf->WriteHTML($html,2);
$mpdf->WriteHTML($loremH,2);
// consider reducing lineheight when using columns - especially if vAligned justify
$mpdf->SetDefaultBodyCSS('line-height', 1.2);
$mpdf->SetColumns(3,'J');
$mpdf->WriteHTML($loremH,2);
$mpdf->SetColumns(0);
$mpdf->WriteHTML('<hr />');
$mpdf->SetColumns(2,'J');
$mpdf->WriteHTML($loremH,2);
$mpdf->WriteHTML('<hr />');
$mpdf->SetColumns(0);
$mpdf->WriteHTML('<hr />');
$mpdf->SetColumns(3,'J');
$mpdf->WriteHTML($loremH,2);
$mpdf->SetColumns(0);
$mpdf->WriteHTML('<hr />');
$mpdf->SetColumns(2,'J');
$mpdf->WriteHTML($loremH,2);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,132 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Page Orientation</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<p style="color:red; font-family:serif;">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p>
<p style="color:orange; font-family:serif;">Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p>
<p style="color:green; font-family:serif;">Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
<hr />
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',42,15,67,67,20,15);
$mpdf->SetDisplayMode('fullpage','two');
$mpdf->mirrorMargins = 1;
$header = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td>
</tr></table>
';
$headerE = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%"><span style="font-weight: bold;">Outer header</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
';
$longfooter = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">Left footer p <span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right footer</span></td>
</tr></table>
';
$longfooterE = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%"><span style="font-weight: bold;">Outer footer</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner footer p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
';
$footer = '<div align="center" style="color:blue;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} &raquo; {PAGENO} &raquo; My document</div>';
$footerE = '<div align="center" style="color:green;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">Even page footer - {PAGENO} -</div>';
$shortheader = '<div align="center" style="color:blue;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} &raquo; {PAGENO} &raquo; My document</div>';
$shortheaderE = '<div align="center" style="color:green;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">Even page header - {PAGENO} -</div>';
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLHeader($headerE,'E');
$mpdf->setFooter('{PAGENO} of {nbpg} pages||{PAGENO} of {nbpg} pages') ;
$mpdf->WriteHTML($html);
$mpdf->setHeader(); // Clear headers before adding page
$mpdf->AddPage('L','','','','',25,25,55,45,18,12);
$mpdf->SetHTMLHeader($shortheader,'',true); // New parameter in v1.4 to add the header to the new page
$mpdf->SetHTMLHeader($shortheaderE,'E',true);
$mpdf->SetHTMLFooter($longfooter);
$mpdf->SetHTMLFooter($longfooterE,'E');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->setHeader('{PAGENO} of {nbpg} pages||{PAGENO} of {nbpg} pages') ;
$mpdf->SetHTMLFooter($footer);
$mpdf->SetHTMLFooter($footerE,'E');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->setHeader(); // Clear headers before adding page
$mpdf->AddPage('','','','','',42,15,67,67,20,15); // Default is Portrait (because that was the document default)
$mpdf->SetHTMLHeader($shortheader,'',true); // New parameter in v1.4 to add the header to the new page
$mpdf->SetHTMLHeader($shortheaderE,'E',true);
$mpdf->SetHTMLFooter($longfooter);
$mpdf->SetHTMLFooter($longfooterE,'E');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLHeader($headerE,'E');
$mpdf->SetHTMLFooter($footer);
$mpdf->SetHTMLFooter($footerE,'E');
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->Output('mpdf.pdf','I');
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,200 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Page Orientation</h2>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<p style="color:red; font-family:serif;">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p>
<p style="color:orange; font-family:serif;">Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p>
<p style="color:green; font-family:serif;">Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p>
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
';
$htmlL = '
<h6>Table in Landscape</h6>
<table class="bpmTopic">
<thead>
<tr style="text-rotate:45;">
<td>Type</td>
<td>Details</td>
<td>Notes</td>
</thead>
<tbody>
<tr>
<td>Causes</td>
<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br />
Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br />
Suspendisse potenti. Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Mechanisms</td>
<td>Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td>
<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br />
Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Causes</td>
<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br />
Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br />
Suspendisse potenti. Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Mechanisms</td>
<td>Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td>
<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br />
Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Causes</td>
<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br />
Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br />
Suspendisse potenti. Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Mechanisms</td>
<td>Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td>
<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br />
Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Causes</td>
<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br />
Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br />
Suspendisse potenti. Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Mechanisms</td>
<td>Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td>
<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br />
Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Causes</td>
<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br />
Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br />
Suspendisse potenti. Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
<tr>
<td>Mechanisms</td>
<td>Fusce eleifend neque sit amet erat.<br />
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td>
<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br />
Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td>
</tr>
</tbody></table>
';
//==============================================================
$loremH = "<h4>Lectus facilisis</h4>
<p>Sed auctor viverra diam. In lacinia lectus.</p>
<p>Praesent tincidunt massa in dolor. Morbi viverra leo quis ipsum.&nbsp;In vitae velit. In aliquam nulla nec mi. Sed accumsan, justo id congue fringilla, diam mauris volutpat ligula, sed aliquet elit diam at felis. Quisque et velit sed eros convallis posuere.</p>
<h5>Nunc tincidunt</h5>
<p>Nunc diam ipsum, consectetuer nec, hendrerit vitae, malesuada a, ante. Nulla ornare aliquet ante. Maecenas in lectus. Morbi porttitor mauris. Praesent ut.</p>
<p>Pede quis ante tincidunt <a href=\"http://www.stlucia.org\">blandit</a>. Maecenas bibendum erat. Curabitur sit amet ante quis velit ultricies facilisis. Ut hendrerit dolor commodo magna. In nec ligula a purus tincidunt adipiscing. Etiam non ante. </p><div>Suspendisse potenti. <indexentry content=\"Inline indexentry &lt;B&gt;\" />Suspendisse accumsan euismod lectus. Nunc commodo pede et turpis. Pellentesque porta mauris sed lorem. Ut nec augue vitae elit eleifend eleifend. Quisque ornare feugiat diam. Duis nulla metus, tempus sit amet, scelerisque a, rutrum at, nisl. Nulla facilisi. Duis metus turpis, molestie nec, laoreet tincidunt, ultrices et, purus. Nullam faucibus aliquam nisi.</div><a href=\"http://www.stlucia.org\"><img zsrc=\"sunset.jpg\" /></a><p>Ut leo. Etiam tempus interdum tortor. Donec porta, arcu vel tincidunt placerat, lacus lorem iaculis diam, id sagittis sapien metus eu nunc. Morbi vitae nunc.<br />Mauris sapien. Phasellus elementum velit sed sapien. Nullam ante diam, consectetuer commodo, dignissim vitae, tempor vel, magna. Donec dictum. <i>Nullam</i> ultrices leo volutpat magna. Mauris blandit purus nec turpis. <a href=\"http://www.stlucia.org\">Curabitur</a> nunc. Aliquam condimentum eleifend<sup>32</sup> lectus. Praesent vitae nibh <b>et libero ullamcorper</b> scelerisque. Nullam auctor. Mauris ipsum nulla, malesuada id, aliquet at, feugiat vitae, eros.</p>
<div style=\"background-color:#DDDDBB; text-align:center; padding:3px; border:1px solid #880000; \">Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>
";
//==============================================================
$header = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td>
</tr></table>
';
$headerE = '
<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr>
<td width="33%"><span style="font-weight: bold;">Outer header</span></td>
<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td>
<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td>
</tr></table>
';
$header = '<div align="center" style="background-color: #f0f2ff;background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} &raquo; {PAGENO} &raquo; My document<br />My document<br />See <a href="http://mpdf1.com/manual/index.php">documentation manual</a><br />My document</div>';
$headerE = '<div align="center" style="background-color: #f0f2ff;background: transparent url(\'bg.jpg\') repeat scroll left top;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">Even page footer - {PAGENO} -<br />My document<br />My document<br />My document</div>';
$footer = '<div align="center" style="background-color: #f0f2ff;background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} &raquo; {PAGENO} &raquo; My document<br />My document<br />See <a href="http://mpdf1.com/manual/index.php">documentation manual</a><br />My document</div>';
$footerE = '<div align="center" style="background-color: #f0f2ff;background: transparent url(\'bg.jpg\') repeat scroll right bottom;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">Even page footer - {PAGENO} -<br />My document<br />My document<br />My document</div>';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c','A4','','',42,15,57,57,20,17);
$mpdf->displayDefaultOrientation = true;
$mpdf->forcePortraitHeaders = true;
$mpdf->forcePortraitMargins = true;
$mpdf->SetDisplayMode('fullpage','two');
$mpdf->mirrorMargins = 1;
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1);
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLHeader($headerE,'E');
$mpdf->SetHTMLFooter($footer);
$mpdf->SetHTMLFooter($footerE,'E');
$mpdf->WriteHTML($html);
$mpdf->AddPage('L');
$mpdf->WriteHTML($htmlL);
$mpdf->WriteHTML($htmlL);
// Columns
$mpdf->AddPage('L');
$mpdf->SetColumns(3,'J');
$mpdf->WriteHTML($loremH);
$mpdf->SetColumns(0);
$mpdf->WriteHTML('<hr />');
$mpdf->SetColumns(2,'J');
$mpdf->WriteHTML($loremH);
$mpdf->WriteHTML('<hr />');
$mpdf->SetColumns(0);
$mpdf->AddPage('L');
$mpdf->WriteHTML($htmlL);
$mpdf->WriteHTML($htmlL);
$mpdf->AddPage();
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,316 @@
<?php
$html = "
<h1>mPDF</h1>
<h2>RTL Languages</h2>
<h4>English</h4>
<p>Please note that I do not understand any of the scripts below. The texts are borrowed from News websites, and I have used words and bits of phrases just to demonstrate the program.</p>
<h4>Hebrew (pangram)</h4>
<p lang=\"he\">\xd7\x93\xd7\x92 \xd7\xa1\xd7\xa7\xd7\xa8\xd7\x9f \xd7\xa9\xd7\x98 \xd7\x91\xd7\x99\xd7\x9d \xd7\x9e\xd7\x90\xd7\x95\xd7\x9b\xd7\x96\xd7\x91 \xd7\x95\xd7\x9c\xd7\xa4\xd7\xaa\xd7\xa2 \xd7\x9e\xd7\xa6\xd7\x90 \xd7\x97\xd7\x91\xd7\xa8\xd7\x94 </p>
<p lang=\"he\">\xd7\x90\xd7\x95 \xd7\x94\xd7\xa0\xd7\xa1\xd7\x94 \xd7\x90\xd7\x9c\xd7\x94\xd7\x99\xd7\x9d, \xd7\x9c\xd7\x91\xd7\x95\xd7\x90 \xd7\x9c\xd7\xa7\xd7\x97\xd7\xaa \xd7\x9c\xd7\x95 \xd7\x92\xd7\x95\xd7\x99 \xd7\x9e\xd7\xa7\xd7\xa8\xd7\x91 \xd7\x92\xd7\x95\xd7\x99, \xd7\x91\xd7\x9e\xd7\xa1\xd7\xaa \xd7\x91\xd7\x90\xd7\xaa\xd7\xaa \xd7\x95\xd7\x91\xd7\x9e\xd7\x95\xd7\xa4\xd7\xaa\xd7\x99\xd7\x9d \xd7\x95\xd7\x91\xd7\x9e\xd7\x9c\xd7\x97\xd7\x9e\xd7\x94 \xd7\x95\xd7\x91\xd7\x99\xd7\x93 \xd7\x97\xd7\x96\xd7\xa7\xd7\x94 \xd7\x95\xd7\x91\xd7\x96\xd7\xa8\xd7\x95\xd7\xa2 \xd7\xa0\xd7\x98\xd7\x95\xd7\x99\xd7\x94, \xd7\x95\xd7\x91\xd7\x9e\xd7\x95\xd7\xa8\xd7\x90\xd7\x99\xd7\x9d \xd7\x92\xd7\x93\xd7\x9c\xd7\x99\xd7\x9d: \xd7\x9b\xd7\x9b\xd7\x9c \xd7\x90\xd7\xa9\xd7\xa8-\xd7\xa2\xd7\xa9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\xaa \xd7\x92\xd7\x96\xd7\xa8 \xd7\x91\xd7\x98\xd7\xa2\xd7\x9d \xd7\x97\xd7\xa1\xd7\x94, \xd7\x95\xd7\x93\xd7\x99. </p>
<h4>Arabic</h4>
<p>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2<annotation content=\"\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" subject=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" icon=\"Comment\" color=\"#FE88EF\" author=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" />
\xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9 \xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7 \xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82.</p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\xda\x93\xd9\x87 \xd8\xa8\xd8\xaf\xd8\xa8\xd9\x8a\xd9\x86\xd9\x87 \xd8\xaf\xd9\x8a \xd8\xa7\xd9\x88 \xd8\xaf \xd8\xa8\xdb\x90 \xd8\xa8\xd8\xa7\xd9\x88\xd8\xb1\xd9\x8a \xd8\xa7\xd8\xad\xd8\xb3\xd8\xa7\xd8\xb3 \xda\xa9\xd9\x88\xd9\x8a\xd8\x8c \xd8\xae\xd9\x88 \xd8\xae\xd9\xbe\xd9\x84 \xd9\x87\xd9\x8a\xd9\x88\xd8\xa7\xd8\xaf \xd9\x8a\xd9\x88\xd9\x85\xd9\x88\xd9\xbc\xd9\x89 \xd8\xba\xd9\x88\xd8\xa7\xda\x93\xd9\x8a.</p>
<h4>Symbols</h4>
<p>\xc2\xa9\xc2\xae\xe2\x84\xa2\xc2\xb5\xe2\x80\xa2\xe2\x80\xa6\xe2\x80\xb2\xe2\x80\xb3\xc2\xa7&lt;&gt;\xe2\x89\xa4\xe2\x89\xa5\xc2\xb0\xe2\x88\x92\xc2\xb1\xc3\xb7\xe2\x81\x84\xc3\x97\xc6\x92\xe2\x88\xab\xe2\x88\x91\xe2\x88\x9e\xe2\x88\x9a\xe2\x89\x88\xe2\x89\xa0\xe2\x89\xa1\xe2\x88\x8f\xc2\xac\xe2\x88\xa9\xe2\x88\x82</p>
<p>\xce\x92\xce\x93\xce\x94\xce\x95\xce\x96\xce\x97\xce\x98\xce\x99\xce\x9a\xce\x9b\xce\x9c\xce\x9d\xce\x9e\xce\x9f\xce\xa0\xce\xa1\xce\xa3\xce\xa4\xce\xa5\xce\xa6\xce\xa7\xce\xa8\xce\xa9</p>
<p>\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xce\xb5\xce\xb6\xce\xb7\xce\xb8\xce\xb9\xce\xba\xce\xbb\xce\xbc\xce\xbd\xce\xbe\xce\xbf\xcf\x80\xcf\x81\xcf\x82\xcf\x83\xcf\x84\xcf\x85\xcf\x86\xcf\x87\xcf\x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xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf</p>
<h3>Bidirectional text</h3>
<p>Text alignment, unless specified, is neutral and therefore dictated by the 'direction' of the paragraph.</p>
<p>All text is analysed chunk by chunk (between tags) and at the end of every block (div, p, td). If the text contains RTL characters, those characters and words are reversed.</p>
<p>\xd9\x88\xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa8\xd9\x8a\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa7\xd8\xa8\xd9\x8a\xd8\xb6 &quot;\xd8\xa8\xd8\xb4\xd8\xaf\xd8\xa9&quot; \xd8\xaa\xd9\x81\xd8\xac\xd9\x8a\xd8\xb1 with some english in the middle \xd8\xa7\xd9\x8a\xd9\x84\xd8\xa7\xd8\xaa \xd9\x81\xd9\x8a\xd9\x85\xd8\xa7 \xd8\xa7\xd8\xb9\xd8\xb1\xd8\xa8\xd8\xaa \xd9\x88\xd8\xb2\xd8\xa7\xd8\xb1\xd8\xa9</p>
<p>To set the 'directionality' of the whole document e.g. to reverse default alignment, tables, lists etc. you can set the dir attribute or the direction CSS property on the HTML or BODY tag to 'rtl' e.g.</p>
<p>&lt;body style=\"direction: rtl\"&gt;</p>
<p>&lt;body dir=\"rtl\"&gt;</p>
<p style=\"text-align: right\">or you can use \$mpdf->SetDirectionality('rtl');</p>
<pre style=\"direction: ltr; background-color: #DDFFFF; page-break-inside: avoid;\">
- the document now has a baseline direction; this determines the
- behaviour of blocks for which text-align has not been specifically set
- layout of mirrored page-margins, columns, ToC and Indexes, headers and footers
- base direction can be set by any of:
- \$mpdf-&gt;SetDirectionality('rtl');
- &lt;html dir=\"rtl\" or style=\"direction: rtl;\"&gt;
- &lt;body dir=\"rtl\" or style=\"direction: rtl;\"&gt;
- base direction is an inherited CSS property, so will affect all content, unless...
- direction can be set for all HTML block elements e.g. &lt;DIV&gt;&lt;P&gt;&lt;TABLE&gt;&lt;UL&gt; etc using
- CSS property &lt; style=\"direction: rtl;\"&gt;
- direction can only be set on the top-level element of nested lists
- direction can only be set on &lt;TABLE&gt;, NOT on THEAD, TBODY, TD etc.
- nested tables CAN have different directions
- NOTE that block/table margins/paddings are NOT reversed by direction
NB mPDF &lt;5.1 reversed the margins/paddings for blocks when RTL set.
- language (either CSS \"lang\", using Autofont, or through initial set-up e.g. \$mpdf = new mPDF('ar') )
no longer affects direction in any way.
NB config_cp.php has been changed as a result; any values of \"dir\" set here are now ineffective
- default text-align is now as per CSS spec: \"a nameless value which is dependent on direction\"
NB default text-align removed in default stylesheet in config.php
- once text-align is specified, it is respected and inherited
NB mPDF &lt;5.1 reversed the text-align property for all blocks when RTL set.
- the configurable value $rtlcss is depracated, as it is no longer required
- improved algorithm for dtermining text direction
- english word blocks are handled in text reversal as one block i.e. dir=\"rtl\"
[arabic text] this will not be reversed [arabic text]
- arabic numerals 0-9 handled correctly
Although the control of direction for block elements is now more configurable, the control of
text direction (RTL arabic characters) remains fully automatic and unconfigurable.
&lt;BDO&gt; etc has no effect. Enclosing text in silent tags can sometimes help e.g.
content&lt;span&gt;[arabic text]&lt;/span&gt;content
</pre>
<pagebreak />
<h3>Tables</h3>
<p>Tables are automatically transposed when the direction is rtl:</p>
<table class=\"bpmTopicC\"><thead>
<tr class=\"headerrow\"><th>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</th>
<td>
<p>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</p>
</td>
<td>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</td>
</tr>
</thead><tbody>
<tr class=\"oddrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
</tr>
<tr class=\"evenrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th>
<td>
<p>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2</p>
</td>
<td>
<p>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2</p>
</td>
</tr>
<tr class=\"oddrow\"><th>
<p>\xd9\x82\xd8\xa7\xd9\x84</p>
</th>
<td>
<p>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</p>
</td>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
</tr>
<tr class=\"evenrow\"><th>
<p>\xd9\x82\xd8\xa7\xd9\x84</p>
<p>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</p>
</th>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
<td>
<p>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</p>
</td>
</tr>
<tr class=\"oddrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
</tr>
<tr class=\"evenrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
</tr>
<tr class=\"oddrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
</tr>
<tr class=\"evenrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td>
</tr>
</tbody></table>
<p>&nbsp;</p>
<h3>Lists</h3>
<p>Lists will automatically reverse as well (note the use of list-style to set numbering):</p>
<div style=\"background-color:#ddccff; padding:5pt;\">
<ol style=\"list-style-type: arabic-indic;\">
<li>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</li>
<li>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a
<ul><li>\xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac </li>
<li>\xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2
<ul>
<li>\xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9</li>
<li>\xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</li>
</ul>
</li>
</ul></li>
<li>\xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7</li>
<li>\xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82</li>
</ol>
</div>
";
//==============================================================
// Set Header and Footer
$h = array (
'odd' =>
array (
'R' =>
array (
'content' => '{PAGENO}',
'font-size' => 8,
'font-style' => 'B',
),
'L' =>
array (
'content' => "\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
'font-size' => 8,
'font-style' => 'B',
),
'line' => 1,
),
'even' =>
array (
'L' =>
array (
'content' => '{PAGENO}',
'font-size' => 8,
'font-style' => 'B',
),
'R' =>
array (
'content' => "\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
'font-size' => 8,
'font-style' => 'B',
),
'line' => 1,
),
);
$f = array (
'odd' =>
array (
'L' =>
array (
'content' => '{DATE Y-m-d}',
'font-size' => 8,
'font-style' => 'BI',
),
'C' =>
array (
'content' => '- {PAGENO} -',
'font-size' => 8,
),
'R' =>
array (
'content' => "\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
'font-size' => 8,
),
'line' => 1,
),
'even' =>
array (
'L' =>
array (
'content' => "\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
'font-size' => 8,
'font-style' => 'B',
),
'C' =>
array (
'content' => '- {PAGENO} -',
'font-size' => 8,
),
'R' =>
array (
'content' => '{DATE Y-m-d}',
'font-size' => 8,
'font-style' => 'BI',
),
'line' => 1,
),
);
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('ar','A4','','',32,25,27,25,16,13);
// From mPDF 5.1 onwards you must set:
$mpdf->SetDirectionality('rtl');
$mpdf->mirrorMargins = true;
$mpdf->SetDisplayMode('fullpage','two');
$mpdf->setHeader($h);
$mpdf->setFooter($f);
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->AddPage();
$mpdf->SetColumns(2,'J');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,91 @@
<?php
ini_set("memory_limit","256M");
$html = "
<style>
p { text-align: justify; }
td { text-align: justify; }
</style>
<h1>mPDF</h1>
<h2>CJK Languages</h2>
<bookmark content=\"\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1\">
<h4>Japanese (pangrams)</h4>
<h5>Iroha Uta </h5>
<p style=\"font-family: SJIS\">\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80\xe3\x81\xa1\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe3\x82\x8f\xe3\x81\x8b\xe3\x82\x88\xe3\x81\x9f\xe3\x82\x8c\xe3\x81\x9d\xe3\x80\x80\xe3\x81\xa4\xe3\x81\xad\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe3\x81\x86\xe3\x82\x90\xe3\x81\xae\xe3\x81\x8a\xe3\x81\x8f\xe3\x82\x84\xe3\x81\xbe\xe3\x80\x80\xe3\x81\x91\xe3\x81\xb5\xe3\x81\x93\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x81\x8d\xe3\x82\x86\xe3\x82\x81\xe3\x81\xbf\xe3\x81\x97\xe3\x80\x80\xe3\x82\x91\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x99 </p>
<p lang=\"ja\">\xe8\x89\xb2\xe3\x81\xaf\xe5\x8c\x82\xe3\x81\xb8\xe3\x81\xa9\xe3\x80\x80\xe6\x95\xa3\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe6\x88\x91\xe3\x81\x8c\xe4\xb8\x96\xe8\xaa\xb0\xe3\x81\x9e\xe3\x80\x80\xe5\xb8\xb8\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe6\x9c\x89\xe7\x82\xba\xe3\x81\xae\xe5\xa5\xa5\xe5\xb1\xb1\xe3\x80\x80\xe4\xbb\x8a\xe6\x97\xa5\xe8\xb6\x8a\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb5\x85\xe3\x81\x8d\xe5\xa4\xa2\xe8\xa6\x8b\xe3\x81\x98\xe3\x80\x80\xe9\x85\x94\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x9a\xef\xbc\x88\xe3\x82\x93\xef\xbc\x89 </p>
<h5>Tori Naku Uta </h5>
<p style=\"font-family: SJIS\">\xe3\x81\xa8\xe3\x82\x8a\xe3\x81\xaa\xe3\x81\x8f\xe3\x81\x93\xe3\x82\x91\xe3\x81\x99\xe3\x80\x80\xe3\x82\x86\xe3\x82\x81\xe3\x81\x95\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe3\x81\xbf\xe3\x82\x88\xe3\x81\x82\xe3\x81\x91\xe3\x82\x8f\xe3\x81\x9f\xe3\x82\x8b\xe3\x80\x80\xe3\x81\xb2\xe3\x82\x93\xe3\x81\x8b\xe3\x81\x97\xe3\x82\x92\xe3\x80\x80\xe3\x81\x9d\xe3\x82\x89\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x8a\xe3\x81\x8d\xe3\x81\xa4\xe3\x81\xb8\xe3\x81\xab\xe3\x80\x80\xe3\x81\xbb\xe3\x81\xb5\xe3\x81\xad\xe3\x82\x80\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe3\x82\x82\xe3\x82\x84\xe3\x81\xae\xe3\x81\x86\xe3\x81\xa1 </p>
<p lang=\"ja\">\xe9\xb3\xa5\xe5\x95\xbc\xe3\x81\x8f\xe5\xa3\xb0\xe3\x81\x99\xe3\x80\x80\xe5\xa4\xa2\xe8\xa6\x9a\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe8\xa6\x8b\xe3\x82\x88\xe6\x98\x8e\xe3\x81\x91\xe6\xb8\xa1\xe3\x82\x8b\xe3\x80\x80\xe6\x9d\xb1\xe3\x82\x92\xe3\x80\x80\xe7\xa9\xba\xe8\x89\xb2\xe6\xa0\x84\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb2\x96\xe3\x81\xa4\xe8\xbe\xba\xe3\x81\xab\xe3\x80\x80\xe5\xb8\x86\xe8\x88\xb9\xe7\xbe\xa4\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe9\x9d\x84\xe3\x81\xae\xe4\xb8\xad </p>
<h5>Ametsuchi No Uta </h5>
<p style=\"font-family: SJIS\">\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1 \xe3\x81\xbb\xe3\x81\x97 \xe3\x81\x9d\xe3\x82\x89 / \xe3\x82\x84\xe3\x81\xbe \xe3\x81\x8b\xe3\x81\xaf \xe3\x81\xbf\xe3\x81\xad \xe3\x81\x9f\xe3\x81\xab / \xe3\x81\x8f\xe3\x82\x82 \xe3\x81\x8d\xe3\x82\x8a \xe3\x82\x80\xe3\x82\x8d \xe3\x81\x93\xe3\x81\x91 / \xe3\x81\xb2\xe3\x81\xa8 \xe3\x81\x84\xe3\x81\xac \xe3\x81\x86\xe3\x81\xb8 \xe3\x81\x99\xe3\x82\x91 / \xe3\x82\x86\xe3\x82\x8f \xe3\x81\x95\xe3\x82\x8b \xe3\x81\x8a\xe3\x81\xb5 \xe3\x81\x9b\xe3\x82\x88 / \xe3\x81\x88\xe3\x81\xae\xe3\x81\x88*\xe3\x82\x92 \xe3\x81\xaa\xe3\x82\x8c \xe3\x82\x90\xe3\x81\xa6 </p>
<p lang=\"ja\">\xe5\xa4\xa9 \xe5\x9c\xb0 \xe6\x98\x9f \xe7\xa9\xba / \xe5\xb1\xb1 \xe5\xb7\x9d \xe5\xb3\xb0 \xe8\xb0\xb7 / \xe9\x9b\xb2 \xe9\x9c\xa7 \xe5\xae\xa4 \xe8\x8b\x94 / \xe4\xba\xba \xe7\x8a\xac \xe4\xb8\x8a \xe6\x9c\xab / \xe7\xa1\xab\xe9\xbb\x84 \xe7\x8c\xbf \xe7\x94\x9f\xe3\x81\xb5 \xe7\x82\xba\xe3\x82\x88 / \xe6\xa6\x8e\xe3\x81\xae \xe6\x9e\x9d\xe3\x82\x92 \xe9\xa6\xb4\xe3\x82\x8c \xe5\xb1\x85\xe3\x81\xa6 </p>
<h5>Taini no Uta </h5>
<p style=\"font-family: SJIS\">\xe3\x81\x9f\xe3\x82\x90\xe3\x81\xab\xe3\x81\x84\xe3\x81\xa6\xe3\x80\x80\xe3\x81\xaa\xe3\x81\xa4\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9d\xe3\x80\x80\xe3\x81\x8d\xe3\x81\xbf\xe3\x82\x81\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x82\x8a\xe3\x81\x8a\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe3\x82\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x82\x8d\xe3\x81\xae\xe3\x80\x80\xe3\x81\x86\xe3\x81\xa1\xe3\x82\x91\xe3\x81\xb8\xe3\x82\x8b\xe3\x81\x93\xe3\x82\x89\xe3\x80\x80\xe3\x82\x82\xe3\x81\xaf\xe3\x81\xbb\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe3\x81\xb5\xe3\x81\xad\xe3\x81\x8b\xe3\x81\x91\xe3\x81\xac </p>
<p lang=\"ja\">\xe7\x94\xb0\xe5\xb1\x85\xe3\x81\xab\xe5\x87\xba\xe3\x81\xa7\xe3\x80\x80\xe8\x8f\x9c\xe6\x91\x98\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9e\xe3\x80\x80\xe5\x90\x9b\xe5\x8f\xac\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe6\xb1\x82\xe9\xa3\x9f\xe3\x82\x8a\xe8\xbf\xbd\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe5\xb1\xb1\xe5\x9f\x8e\xe3\x81\xae\xe3\x80\x80\xe6\x89\x93\xe9\x85\x94\xe3\x81\xb8\xe3\x82\x8b\xe5\xad\x90\xe3\x82\x89\xe3\x80\x80\xe8\x97\xbb\xe8\x91\x89\xe5\xb9\xb2\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe8\x88\x9f\xe7\xb9\x8b\xe3\x81\x91\xe3\x81\xac </p>
<bookmark content=\"\xe7\xbe\x8e\xe5\x9b\xbd\xe8\x88\xaa\xe7\xa9\xba\xe4\xb8\x9a\xe5\xb7\xa8\">
<h4>Chinese (simplified) GB2312</h4>
<p style=\"font-family: GB\">\xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac\xe5\xae\xa4\xe7\x9a\x84\xe6\xb6\x88\xe6\x81\xaf\xe7\xa7\xb0\xef\xbc\x8c\xe4\xb8\xad\xe6\x96\xb9\xe5\x85\x8d\xe9\x99\xa4\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x84\xe6\x89\x80\xe6\x9c\x89\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x8f\x8a\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x94\xbf\xe5\xba\x9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xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\">
<h4>Chinese (Traditional - Hong Kong)</h4>
<p lang=\"zh-HK\">\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\xe6\x95\x99\xe8\x82\xb2\xe7\xb6\xb2\xe7\xab\x99\xef\xbc\x8c\xe5\xae\x83\xe6\x88\x90\xe5\x8a\x9f\xe7\xb5\x90\xe5\x90\x88\xe4\xba\x86\xe9\xa6\x99\xe6\xb8\xaf\xe8\xb3\xbd\xe9\xa6\xac\xe6\x9c\x83\xe9\x98\xb2\xe6\xad\xa2\xe8\x87\xaa\xe6\xae\xba\xe7\xa0\x94\xe7\xa9\xb6\xe4\xb8\xad\xe5\xbf\x83\xe5\x90\x84\xe6\x96\xb9\xe9\x9d\xa2\xe7\x9a\x84\xe5\xb0\x88\xe6\x89\x8d\xef\xbc\x8c\xe7\x82\xba\xe9\x9d\x92\xe5\xb0\x91\xe5\xb9\xb4\xe4\xba\xba\xe6\x8f\x90\xe4\xbe\x9b\xe7\xb2\xbe\xe7\xa5\x9e\xe5\x81\xa5\xe5\xba\xb7\xe7\x9a\x84\xe8\xa8\x8a\xe6\x81\xaf\xef\xbc\x8c\xe5\xb0\x8d\xe6\x99\xae\xe5\x8f\x8a\xe6\x8a\x91\xe9\xac\xb1\xe7\x97\x87\xe7\x9f\xa5\xe8\xad\x98\xe7\x9a\x84\xe8\xb2\xa2\xe7\x8d\xbb\xe8\x89\xaf\xe5\xa4\x9a\xe3\x80\x82\xe5\x9c\xa8\xe9\xa6\x99\xe6\xb8\xaf\xef\xbc\x8c\xe5\xae\x83\xe6\x9b\xbe\xe7\x8d\xb2\xe9\x81\xb8\xe7\x82\xba\xe3\x80\x8c2004\xe5\xb9\xb4\xe5\x8d\x81\xe5\xa4\xa7\xe5\x81\xa5\xe5\xba\xb7\xe7\xb6\xb2\xe7\xab\x99\xe3\x80\x8d\xe4\xb9\x8b\xe4\xb8\x80\xef\xbc\x8c\xe8\xa9\xb2\xe9\xa0\x85\xe9\x81\xb8\xe8\x88\x89\xe8\x87\xaa2005\xe5\xb9\xb4\xe8\xb5\xb7\xe6\x94\xb9\xe5\x90\x8d\xe7\x8f\xbe\xe6\x99\x82\xe7\x9a\x84\xe3\x80\x8c\xe5\x84\xaa\xe7\xa7\x80\xe7\xb6\xb2\xe7\xab\x99\xe9\x81\xb8\xe8\x88\x89\xe3\x80\x8d\xe3\x80\x82\xe5\x85\xb6\xe8\xb2\xa2\xe7\x8d\xbb\xe5\x9c\xa8\xe5\x9c\x8b\xe9\x9a\x9b\xe9\x96\x93\xe4\xba\xa6\xe5\x82\x99\xe5\x8f\x97\xe8\x82\xaf\xe5\xae\x9a\xef\xbc\x8c2005\xe5\xb9\xb4\xef\xbc\x8c\xe8\xa9\xb2\xe7\xb6\xb2\xe7\xab\x99\xe6\xa6\xae\xe7\x8d\xb2\xe7\xac\xac\xe5\x85\xab\xe5\xb1\x86\xe3\x80\x8c\xe4\xba\x9e\xe6\xb4\xb2\xe5\x89\xb5\xe6\x96\xb0\xe5\xa4\xa7\xe7\x8d\x8e\xe3\x80\x8d\xe9\x8a\x80\xe7\x8d\x8e\xe3\x80\x82</p>
<bookmark content=\"\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98\">
<h4>Korean</h4>
<p style=\"font-family: UHC\">\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98 \xea\xb3\xa0\xec\x9c\xa0\xec\xa1\xb0\xea\xb1\xb4\xec\x9d\x80 \xec\x9e\x85\xec\x88\xa0\xeb\x81\xbc\xeb\xa6\xac \xeb\xa7\x8c\xeb\x82\x98\xec\x95\xbc \xed\x95\x98\xea\xb3\xa0 \xed\x8a\xb9\xeb\xb3\x84\xed\x95\x9c \xea\xb8\xb0\xec\x88\xa0\xec\x9d\x80 \xed\x95\x84\xec\x9a\x94\xec\xb9\x98 \xec\x95\x8a\xeb\x8b\xa4. </p>
</div>
";
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('+aCJK','A4','','',32,25,27,25,16,13);
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetTitle($utxt['zh-CN']);
$mpdf->SetAuthor($utxt['zh-CN']);
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyleA4.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,89 @@
<?php
ini_set("memory_limit","256M");
$html = "
<style>
p { text-align: justify; }
td { text-align: justify; }
</style>
<h1>mPDF</h1>
<h2>CJK Languages</h2>
<bookmark content=\"\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1\">
<h4>Japanese (pangrams)</h4>
<h5>Iroha Uta </h5>
<p style=\"font-family: IPAMinchoP\">\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80\xe3\x81\xa1\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe3\x82\x8f\xe3\x81\x8b\xe3\x82\x88\xe3\x81\x9f\xe3\x82\x8c\xe3\x81\x9d\xe3\x80\x80\xe3\x81\xa4\xe3\x81\xad\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe3\x81\x86\xe3\x82\x90\xe3\x81\xae\xe3\x81\x8a\xe3\x81\x8f\xe3\x82\x84\xe3\x81\xbe\xe3\x80\x80\xe3\x81\x91\xe3\x81\xb5\xe3\x81\x93\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x81\x8d\xe3\x82\x86\xe3\x82\x81\xe3\x81\xbf\xe3\x81\x97\xe3\x80\x80\xe3\x82\x91\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x99 </p>
<p lang=\"ja\">\xe8\x89\xb2\xe3\x81\xaf\xe5\x8c\x82\xe3\x81\xb8\xe3\x81\xa9\xe3\x80\x80\xe6\x95\xa3\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe6\x88\x91\xe3\x81\x8c\xe4\xb8\x96\xe8\xaa\xb0\xe3\x81\x9e\xe3\x80\x80\xe5\xb8\xb8\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe6\x9c\x89\xe7\x82\xba\xe3\x81\xae\xe5\xa5\xa5\xe5\xb1\xb1\xe3\x80\x80\xe4\xbb\x8a\xe6\x97\xa5\xe8\xb6\x8a\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb5\x85\xe3\x81\x8d\xe5\xa4\xa2\xe8\xa6\x8b\xe3\x81\x98\xe3\x80\x80\xe9\x85\x94\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x9a\xef\xbc\x88\xe3\x82\x93\xef\xbc\x89 </p>
<h5>Tori Naku Uta </h5>
<p style=\"font-family: IPAGothicP\">\xe3\x81\xa8\xe3\x82\x8a\xe3\x81\xaa\xe3\x81\x8f\xe3\x81\x93\xe3\x82\x91\xe3\x81\x99\xe3\x80\x80\xe3\x82\x86\xe3\x82\x81\xe3\x81\x95\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe3\x81\xbf\xe3\x82\x88\xe3\x81\x82\xe3\x81\x91\xe3\x82\x8f\xe3\x81\x9f\xe3\x82\x8b\xe3\x80\x80\xe3\x81\xb2\xe3\x82\x93\xe3\x81\x8b\xe3\x81\x97\xe3\x82\x92\xe3\x80\x80\xe3\x81\x9d\xe3\x82\x89\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x8a\xe3\x81\x8d\xe3\x81\xa4\xe3\x81\xb8\xe3\x81\xab\xe3\x80\x80\xe3\x81\xbb\xe3\x81\xb5\xe3\x81\xad\xe3\x82\x80\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe3\x82\x82\xe3\x82\x84\xe3\x81\xae\xe3\x81\x86\xe3\x81\xa1 </p>
<p lang=\"ja\">\xe9\xb3\xa5\xe5\x95\xbc\xe3\x81\x8f\xe5\xa3\xb0\xe3\x81\x99\xe3\x80\x80\xe5\xa4\xa2\xe8\xa6\x9a\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe8\xa6\x8b\xe3\x82\x88\xe6\x98\x8e\xe3\x81\x91\xe6\xb8\xa1\xe3\x82\x8b\xe3\x80\x80\xe6\x9d\xb1\xe3\x82\x92\xe3\x80\x80\xe7\xa9\xba\xe8\x89\xb2\xe6\xa0\x84\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb2\x96\xe3\x81\xa4\xe8\xbe\xba\xe3\x81\xab\xe3\x80\x80\xe5\xb8\x86\xe8\x88\xb9\xe7\xbe\xa4\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe9\x9d\x84\xe3\x81\xae\xe4\xb8\xad </p>
<h5>Ametsuchi No Uta </h5>
<p style=\"font-family: IPAGothicP\">\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1 \xe3\x81\xbb\xe3\x81\x97 \xe3\x81\x9d\xe3\x82\x89 / \xe3\x82\x84\xe3\x81\xbe \xe3\x81\x8b\xe3\x81\xaf \xe3\x81\xbf\xe3\x81\xad \xe3\x81\x9f\xe3\x81\xab / \xe3\x81\x8f\xe3\x82\x82 \xe3\x81\x8d\xe3\x82\x8a \xe3\x82\x80\xe3\x82\x8d \xe3\x81\x93\xe3\x81\x91 / \xe3\x81\xb2\xe3\x81\xa8 \xe3\x81\x84\xe3\x81\xac \xe3\x81\x86\xe3\x81\xb8 \xe3\x81\x99\xe3\x82\x91 / \xe3\x82\x86\xe3\x82\x8f \xe3\x81\x95\xe3\x82\x8b \xe3\x81\x8a\xe3\x81\xb5 \xe3\x81\x9b\xe3\x82\x88 / \xe3\x81\x88\xe3\x81\xae\xe3\x81\x88*\xe3\x82\x92 \xe3\x81\xaa\xe3\x82\x8c \xe3\x82\x90\xe3\x81\xa6 </p>
<p lang=\"ja\">\xe5\xa4\xa9 \xe5\x9c\xb0 \xe6\x98\x9f \xe7\xa9\xba / \xe5\xb1\xb1 \xe5\xb7\x9d \xe5\xb3\xb0 \xe8\xb0\xb7 / \xe9\x9b\xb2 \xe9\x9c\xa7 \xe5\xae\xa4 \xe8\x8b\x94 / \xe4\xba\xba \xe7\x8a\xac \xe4\xb8\x8a \xe6\x9c\xab / \xe7\xa1\xab\xe9\xbb\x84 \xe7\x8c\xbf \xe7\x94\x9f\xe3\x81\xb5 \xe7\x82\xba\xe3\x82\x88 / \xe6\xa6\x8e\xe3\x81\xae \xe6\x9e\x9d\xe3\x82\x92 \xe9\xa6\xb4\xe3\x82\x8c \xe5\xb1\x85\xe3\x81\xa6 </p>
<h5>Taini no Uta </h5>
<p style=\"font-family: hannoma\">\xe3\x81\x9f\xe3\x82\x90\xe3\x81\xab\xe3\x81\x84\xe3\x81\xa6\xe3\x80\x80\xe3\x81\xaa\xe3\x81\xa4\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9d\xe3\x80\x80\xe3\x81\x8d\xe3\x81\xbf\xe3\x82\x81\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x82\x8a\xe3\x81\x8a\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe3\x82\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x82\x8d\xe3\x81\xae\xe3\x80\x80\xe3\x81\x86\xe3\x81\xa1\xe3\x82\x91\xe3\x81\xb8\xe3\x82\x8b\xe3\x81\x93\xe3\x82\x89\xe3\x80\x80\xe3\x82\x82\xe3\x81\xaf\xe3\x81\xbb\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe3\x81\xb5\xe3\x81\xad\xe3\x81\x8b\xe3\x81\x91\xe3\x81\xac </p>
<p lang=\"ja\">\xe7\x94\xb0\xe5\xb1\x85\xe3\x81\xab\xe5\x87\xba\xe3\x81\xa7\xe3\x80\x80\xe8\x8f\x9c\xe6\x91\x98\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9e\xe3\x80\x80\xe5\x90\x9b\xe5\x8f\xac\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe6\xb1\x82\xe9\xa3\x9f\xe3\x82\x8a\xe8\xbf\xbd\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe5\xb1\xb1\xe5\x9f\x8e\xe3\x81\xae\xe3\x80\x80\xe6\x89\x93\xe9\x85\x94\xe3\x81\xb8\xe3\x82\x8b\xe5\xad\x90\xe3\x82\x89\xe3\x80\x80\xe8\x97\xbb\xe8\x91\x89\xe5\xb9\xb2\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe8\x88\x9f\xe7\xb9\x8b\xe3\x81\x91\xe3\x81\xac </p>
<bookmark content=\"\xe7\xbe\x8e\xe5\x9b\xbd\xe8\x88\xaa\xe7\xa9\xba\xe4\xb8\x9a\xe5\xb7\xa8\">
<h4>Chinese (simplified) GB2312</h4>
<p style=\"font-family: sun-exta\">\xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac\xe5\xae\xa4\xe7\x9a\x84\xe6\xb6\x88\xe6\x81\xaf\xe7\xa7\xb0\xef\xbc\x8c\xe4\xb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a4\xe5\x85\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95168\xe7\xac\x94\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x8b\x9f\xe4\xba\x8e2007\xe5\xb9\xb4\xe5\xba\x95\xe5\x89\x8d\xe4\xb8\x8e\xe5\x8f\x97\xe6\x8f\xb4\xe5\x9b\xbd\xe5\x8a\x9e\xe7\x90\x86\xe5\xae\x8c\xe5\x85\x8d\xe5\x80\xba\xe5\x8d\x8f\xe8\xae\xae\xe3\x80\x82</p>
<bookmark content=\"\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\">
<h4>Chinese (Traditional - Hong Kong)</h4>
<p lang=\"zh-HK\">\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\xe6\x95\x99\xe8\x82\xb2\xe7\xb6\xb2\xe7\xab\x99\xef\xbc\x8c\xe5\xae\x83\xe6\x88\x90\xe5\x8a\x9f\xe7\xb5\x90\xe5\x90\x88\xe4\xba\x86\xe9\xa6\x99\xe6\xb8\xaf\xe8\xb3\xbd\xe9\xa6\xac\xe6\x9c\x83\xe9\x98\xb2\xe6\xad\xa2\xe8\x87\xaa\xe6\xae\xba\xe7\xa0\x94\xe7\xa9\xb6\xe4\xb8\xad\xe5\xbf\x83\xe5\x90\x84\xe6\x96\xb9\xe9\x9d\xa2\xe7\x9a\x84\xe5\xb0\x88\xe6\x89\x8d\xef\xbc\x8c\xe7\x82\xba\xe9\x9d\x92\xe5\xb0\x91\xe5\xb9\xb4\xe4\xba\xba\xe6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b4\xb2\xe5\x89\xb5\xe6\x96\xb0\xe5\xa4\xa7\xe7\x8d\x8e\xe3\x80\x8d\xe9\x8a\x80\xe7\x8d\x8e\xe3\x80\x82</p>
<bookmark content=\"\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98\">
<h4>Korean</h4>
<p style=\"font-family: unbatang_0613\">\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98 \xea\xb3\xa0\xec\x9c\xa0\xec\xa1\xb0\xea\xb1\xb4\xec\x9d\x80 \xec\x9e\x85\xec\x88\xa0\xeb\x81\xbc\xeb\xa6\xac \xeb\xa7\x8c\xeb\x82\x98\xec\x95\xbc \xed\x95\x98\xea\xb3\xa0 \xed\x8a\xb9\xeb\xb3\x84\xed\x95\x9c \xea\xb8\xb0\xec\x88\xa0\xec\x9d\x80 \xed\x95\x84\xec\x9a\x94\xec\xb9\x98 \xec\x95\x8a\xeb\x8b\xa4. </p>
</div>
";
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('-aCJK','A4','','',32,25,27,25,16,13);
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetTitle($utxt['zh-CN']);
$mpdf->SetAuthor($utxt['zh-CN']);
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyleA4.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,400 @@
<?php
//
$timeo_start = microtime(true);
ini_set("memory_limit","128M");
//
$html = "
<style>
body { font-family: sans; text-align: justify; }
p { font-family: sans; }
div { font-family: sans; }
</style>
<p>This document includes many languages. Selection of appropriate fonts is done automatically by using <b>AutoFont</b>. </p>
<h3>Pangrams - (from Wikipedia) </h3>
<p>The quick brown fox jumps over a lazy dog</p>
<h4>Bulgarian</h4>
<p>\xd0\x96\xd1\x8a\xd0\xbb\xd1\x82\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xb4\xd1\x8e\xd0\xbb\xd1\x8f \xd0\xb1\xd0\xb5\xd1\x88\xd0\xb5 \xd1\x89\xd0\xb0\xd1\x81\xd1\x82\xd0\xbb\xd0\xb8\xd0\xb2\xd0\xb0, \xd1\x87\xd0\xb5 \xd0\xbf\xd1\x83\xd1\x85\xd1\x8a\xd1\x82, \xd0\xba\xd0\xbe\xd0\xb9\xd1\x82\xd0\xbe \xd1\x86\xd1\x8a\xd1\x84\xd0\xbd\xd0\xb0, \xd0\xb7\xd0\xb0\xd0\xbc\xd1\x80\xd1\x8a\xd0\xb7\xd0\xbd\xd0\xb0 \xd0\xba\xd0\xb0\xd1\x82\xd0\xbe \xd0\xb3\xd1\x8c\xd0\xbe\xd0\xbd.</p>
<p>\xd0\x97\xd0\xb0 \xd0\xbc\xd0\xb8\xd0\xb3 \xd0\xb1\xd1\x8f\xd1\x85 \xd0\xb2 \xd1\x87\xd1\x83\xd0\xb6\xd0\xb4 \xd0\xbf\xd0\xbb\xd1\x8e\xd1\x88\xd0\xb5\xd0\xbd \xd1\x81\xd0\xba\xd1\x8a\xd1\x80\xd1\x86\xd0\xb0\xd1\x89 \xd1\x84\xd0\xbe\xd1\x82\xd1\x8c\xd0\xbe\xd0\xb9\xd0\xbb. </p>
<h4>Catalan</h4>
<p>Jove xef, porti whisky amb quinze gla\xc3\xa7ons d'hidrogen, coi! </p>
<p>Aqueix betzol, Jan, comprava whisky de figa </p>
<h4>Czech</h4>
<p>P\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88 \xc3\xbap\xc4\x9bl \xc4\x8f\xc3\xa1belsk\xc3\xa9 \xc3\xb3dy </p>
<h4>Danish</h4>
<p>H\xc3\xb8j bly gom vandt fr\xc3\xa6k sexquiz p\xc3\xa5 wc </p>
<h4>Dutch</h4>
<p>Doch Bep, flink sexy qua vorm, zwijgt </p>
<p>Pa's wijze lynx bezag vroom het fikse aquaduct </p>
<h4>Finnish</h4>
<p>T\xc3\xb6rkylempij\xc3\xa4 vongahdus </p>
<h4>French</h4>
<p>Portez ce vieux whisky au juge blond qui fume </p>
<p>B\xc3\xa2chez la queue du wagon-taxi avec les pyjamas du fakir </p>
<p>Voyez le brick g\xc3\xa9ant que j'examine pr\xc3\xa8s du wharf </p>
<h4>German</h4>
<p>Victor jagt zw\xc3\xb6lf Boxk\xc3\xa4mpfer quer \xc3\xbcber den gro\xc3\x9fen Sylter Deich </p>
<p>\"Fix, Schwyz!\" qu\xc3\xa4kt J\xc3\xbcrgen bl\xc3\xb6d vom Pa\xc3\x9f </p>
<p>\"Falsches \xc3\x9cben von Xylophonmusik qu\xc3\xa4lt jeden gr\xc3\xb6\xc3\x9feren Zwerg\"</p>
<h4>Hungarian</h4>
<p>Egy h\xc5\xb1tlen vej\xc3\xa9t f\xc3\xbcl\xc3\xb6ncs\xc3\xadp\xc5\x91, d\xc3\xbch\xc3\xb6s mexik\xc3\xb3i \xc3\xbar Wessel\xc3\xa9nyin\xc3\xa9l m\xc3\xa1zol Quit\xc3\xb3ban. </p>
<h4>Icelandic</h4>
<p>K\xc3\xa6mi n\xc3\xbd \xc3\xb6xi h\xc3\xa9r ykist \xc3\xbej\xc3\xb3fum n\xc3\xba b\xc3\xa6\xc3\xb0i v\xc3\xadl og \xc3\xa1drepa </p>
<h4>Irish</h4>
<p>D'fhuascail \xc3\x8dosa \xc3\x9armhac na h\xc3\x93ighe Beannaithe p\xc3\xb3r \xc3\x89ava agus \xc3\x81dhaimh </p>
<p>D'\xe1\xb8\x9fuascail \xc3\x8dosa \xc3\x9ar\xe1\xb9\x81ac na h\xc3\x93i\xc4\xa1e Beannai\xe1\xb9\xabe p\xc3\xb3r \xc3\x89a\xe1\xb8\x83a agus \xc3\x81\xe1\xb8\x8bai\xe1\xb9\x81 </p>
<h4>Italian</h4>
<p>\"Quel fez sghembo copre davanti\" </p>
<p>\"Ma la volpe col suo balzo ha raggiunto il quieto Fido\" </p>
<p>\"Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja!\" </p>
<h4>Lithuanian</h4>
<p>\xc4\xaelinkdama fechtuotojo \xc5\xa1paga sublyk\xc4\x8diojusi pragr\xc4\x99\xc5\xbe\xc4\x97 apval\xc5\xb3 arb\xc5\xabz\xc4\x85 </p>
<h4>Norwegian</h4>
<p>V\xc3\xa5r s\xc3\xa6re Zulu fra bade\xc3\xb8ya spilte jo whist og quickstep i min taxi. </p>
<p>H\xc3\xb8vdingens kj\xc3\xa6re squaw f\xc3\xa5r litt pizza i Mexico by </p>
<h4>Polish</h4>
<p>P\xc3\xb3jd\xc5\xba\xc5\xbce, ki\xc5\x84 t\xc4\x99 chmurno\xc5\x9b\xc4\x87 w g\xc5\x82\xc4\x85b flaszy! </p>
<p>Pchn\xc4\x85\xc4\x87 w t\xc4\x99 \xc5\x82\xc3\xb3d\xc5\xba je\xc5\xbca lub o\xc5\x9bm skrzy\xc5\x84 fig. </p>
<p>M\xc4\x99\xc5\xbcny b\xc4\x85d\xc5\xba, chro\xc5\x84 pu\xc5\x82k tw\xc3\xb3j i sze\xc5\x9b\xc4\x87 flag. </p>
<h4>Portuguese</h4>
<p>Blitz prende ex-vesgo com cheque fajuto. </p>
<p>Gazeta publica hoje no jornal uma breve nota de faxina na quermesse. </p>
<p>\xc3\x80 noite, vov\xc3\xb4 Kowalsky v\xc3\xaa o \xc3\xadm\xc3\xa3 cair no p\xc3\xa9 do ping\xc3\xbcim queixoso e vov\xc3\xb3 p\xc3\xb5e a\xc3\xa7\xc3\xbacar no ch\xc3\xa1 de t\xc3\xa2maras do jabuti feliz. </p>
<p>Lu\xc3\xads arg\xc3\xbcia \xc3\xa0 J\xc3\xbalia que \xc2\xabbra\xc3\xa7\xc3\xb5es, f\xc3\xa9, ch\xc3\xa1, \xc3\xb3xido, p\xc3\xb4r, z\xc3\xa2ng\xc3\xa3o\xc2\xbb eram palavras do portugu\xc3\xaas. </p>
<h4>Romanian</h4>
<p>Gheorghe, obezul, a reu\xc5\x9fit s\xc4\x83 ob\xc5\xa3in\xc4\x83 juc\xc3\xa2ndu-se un flux \xc3\xaen Quebec de o mie kilowa\xc5\xa3ior\xc4\x83. </p>
<h4>Russian</h4>
<p>\xd0\x92 \xd1\x87\xd0\xb0\xd1\x89\xd0\xb0\xd1\x85 \xd1\x8e\xd0\xb3\xd0\xb0 \xd0\xb6\xd0\xb8\xd0\xbb \xd0\xb1\xd1\x8b \xd1\x86\xd0\xb8\xd1\x82\xd1\x80\xd1\x83\xd1\x81? \xd0\x94\xd0\xb0, \xd0\xbd\xd0\xbe \xd1\x84\xd0\xb0\xd0\xbb\xd1\x8c\xd1\x88\xd0\xb8\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x8d\xd0\xba\xd0\xb7\xd0\xb5\xd0\xbc\xd0\xbf\xd0\xbb\xd1\x8f\xd1\x80! </p>
<p>(Using quasiobsolete spelling for last word to include \xd1\x8a) \xd0\x92 \xd1\x87\xd0\xb0\xd1\x89\xd0\xb0\xd1\x85 \xd1\x8e\xd0\xb3\xd0\xb0 \xd0\xb6\xd0\xb8\xd0\xbb \xd0\xb1\xd1\x8b \xd1\x86\xd0\xb8\xd1\x82\xd1\x80\xd1\x83\xd1\x81? \xd0\x94\xd0\xb0, \xd0\xbd\xd0\xbe \xd1\x84\xd0\xb0\xd0\xbb\xd1\x8c\xd1\x88\xd0\xb8\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x8d\xd0\xba\xd0\xb7\xd0\xb5\xd0\xbc\xd0\xbf\xd0\xbb\xd1\x8f\xd1\x80\xd1\x8a! </p>
<p>\xd0\xad\xd1\x85, \xd1\x87\xd1\x83\xd0\xb6\xd0\xb0\xd0\xba! \xd0\x9e\xd0\xb1\xd1\x89\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x8a\xd1\x91\xd0\xbc \xd1\x86\xd0\xb5\xd0\xbd \xd1\x88\xd0\xbb\xd1\x8f\xd0\xbf (\xd1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c\xd0\xbe\xd1\x89\xd0\xbd\xd1\x8b\xd0\xb9 \xd1\x82\xd0\xbe\xd0\xbb\xd1\x87\xd0\xbe\xd0\xba \xd0\xbf\xd0\xbe\xd0\xb4\xd1\x8a\xd1\x91\xd0\xbc\xd1\x83 \xd1\x81\xd0\xb5\xd0\xbb\xd1\x8c\xd1\x81\xd0\xba\xd0\xbe\xd0\xb3\xd0\xbe \xd1\x85\xd0\xbe\xd0\xb7\xd1\x8f\xd0\xb9\xd1\x81\xd1\x82\xd0\xb2\xd0\xb0. </p>
<h4>Serbian</h4>
<p>\xd0\x89\xd1\x83\xd0\xb1\xd0\xb0\xd0\xb7\xd0\xbd\xd0\xb8 \xd1\x84\xd0\xb5\xd1\x9a\xd0\xb5\xd1\x80\xd1\x9f\xd0\xb8\xd1\x98\xd0\xb0 \xd1\x87\xd0\xb0\xd1\x92\xd0\xb0\xd0\xb2\xd0\xbe\xd0\xb3 \xd0\xbb\xd0\xb8\xd1\x86\xd0\xb0 \xd1\x85\xd0\xbe\xd1\x9b\xd0\xb5 \xd0\xb4\xd0\xb0 \xd0\xbc\xd0\xb8 \xd0\xbf\xd0\xbe\xd0\xba\xd0\xb0\xd0\xb6\xd0\xb5 \xd1\x88\xd1\x82\xd0\xbe\xd1\x81. </p>
<p>Ljubazni fenjerd\xc5\xbeija \xc4\x8da\xc4\x91avog lica ho\xc4\x87e da mi poka\xc5\xbee \xc5\xa1tos. </p>
<h4>Slovene</h4>
<p>\xc5\xa0erif bo za vajo spet kuhal doma\xc4\x8de \xc5\xbegance </p>
<p>Pi\xc5\xa1kur mol\xc4\x8de grabi fi\xc5\xbeol z dna cezijeve hoste </p>
<h4>Spanish</h4>
<p>El veloz murci\xc3\xa9lago hind\xc3\xba com\xc3\xada feliz cardillo y kiwi. La cig\xc3\xbce\xc3\xb1a tocaba el saxof\xc3\xb3n detr\xc3\xa1s del palenque de paja. </p>
<p>El ping\xc3\xbcino Wenceslao hizo kil\xc3\xb3metros bajo exhaustiva lluvia y fr\xc3\xado, a\xc3\xb1oraba a su querido cachorro. </p>
<p>Jovencillo emponzo\xc3\xb1ado de whisky: \xc2\xa1qu\xc3\xa9 figurota exhibe! </p>
<p>Ese libro explica en su ep\xc3\xadgrafe las haza\xc3\xb1as y aventuras de Don Quijote de la Mancha en Kuwait. </p>
<p>Queda gazpacho, fibra, l\xc3\xa1tex, jam\xc3\xb3n, kiwi y vi\xc3\xb1as. </p>
<p>Whisky bueno: \xc2\xa1excitad mi fr\xc3\xa1gil peque\xc3\xb1a vejez! </p>
<h4>Swedish</h4>
<p>Flygande b\xc3\xa4ckasiner s\xc3\xb6ka hwila p\xc3\xa5 mjuka tuvor. </p>
<p>Yxskaftbud, ge v\xc3\xa5r wczonm\xc3\xb6 iqhj\xc3\xa4lp. </p>
<h4>Ukrainian</h4>
<p>\xd0\xa7\xd1\x83\xd1\x94\xd1\x88 \xd1\x97\xd1\x85, \xd0\xb4\xd0\xbe\xd1\x86\xd1\x8e, \xd0\xb3\xd0\xb0? \xd0\x9a\xd1\x83\xd0\xbc\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb0 \xd0\xb6 \xd1\x82\xd0\xb8, \xd0\xbf\xd1\x80\xd0\xbe\xd1\x89\xd0\xb0\xd0\xb9\xd1\x81\xd1\x8f \xd0\xb1\xd0\xb5\xd0\xb7 \xd2\x91\xd0\xbe\xd0\xbb\xd1\x8c\xd1\x84\xd1\x96\xd0\xb2! </p>
<p>\xd0\x96\xd0\xb5\xd0\xb1\xd1\x80\xd0\xb0\xd0\xba\xd1\x83\xd1\x8e\xd1\x82\xd1\x8c \xd1\x84\xd1\x96\xd0\xbb\xd0\xbe\xd1\x81\xd0\xbe\xd1\x84\xd0\xb8 \xd0\xbf\xd1\x80\xd0\xb8 \xd2\x91\xd0\xb0\xd0\xbd\xd0\xba\xd1\x83 \xd1\x86\xd0\xb5\xd1\x80\xd0\xba\xd0\xb2\xd0\xb8 \xd0\xb2 \xd0\x93\xd0\xb0\xd0\xb4\xd1\x8f\xd1\x87\xd1\x96, \xd1\x89\xd0\xb5 \xd0\xb9 \xd1\x88\xd0\xb0\xd1\x82\xd1\x80\xd0\xbe \xd1\x97\xd1\x85\xd0\xbd\xd1\x94 \xd0\xbf'\xd1\x8f\xd0\xbd\xd0\xb5 \xd0\xb7\xd0\xbd\xd0\xb0\xd1\x94\xd0\xbc\xd0\xbe. </p>
<h4>Turkish (pangram)</h4>
<p>Pijamal\xc4\xb1 hasta ya\xc4\x9f\xc4\xb1z \xc5\x9fof\xc3\xb6re \xc3\xa7abucak g\xc3\xbcvendi. </p>
<h4>Greek</h4>
<h5>Monotonic</h5>
<p>\xce\xa0\xce\xac\xcf\x84\xce\xb5\xcf\x81 \xce\xb7\xce\xbc\xcf\x8e\xce\xbd \xce\xbf \xce\xb5\xce\xbd \xcf\x84\xce\xbf\xce\xb9\xcf\x82 \xce\xbf\xcf\x85\xcf\x81\xce\xb1\xce\xbd\xce\xbf\xce\xaf\xcf\x82 \xce\xb1\xce\xb3\xce\xb9\xce\xb1\xcf\x83\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xce\xbf \xcf\x8c\xce\xbd\xce\xbf\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xce\xb5\xce\xbb\xce\xb8\xce\xad\xcf\x84\xcf\x89 \xce\xb7 \xce\xb2\xce\xb1\xcf\x83\xce\xb9\xce\xbb\xce\xb5\xce\xaf\xce\xb1 \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xce\xb3\xce\xb5\xce\xbd\xce\xb7\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xce\xbf \xce\xb8\xce\xad\xce\xbb\xce\xb7\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85, \xcf\x89\xcf\x82 \xce\xb5\xce\xbd \xce\xbf\xcf\x85\xcf\x81\xce\xb1\xce\xbd\xcf\x8e \xce\xba\xce\xb1\xce\xb9 \xce\xb5\xcf\x80\xce\xaf \xcf\x84\xce\xb7\xcf\x82 \xce\xb3\xce\xb7\xcf\x82\xc2\xb7 \xcf\x84\xce\xbf\xce\xbd \xce\xac\xcf\x81\xcf\x84\xce\xbf\xce\xbd \xce\xb7\xce\xbc\xcf\x8e\xce\xbd \xcf\x84\xce\xbf\xce\xbd \xce\xb5\xcf\x80\xce\xb9\xce\xbf\xcf\x8d\xcf\x83\xce\xb9\xce\xbf\xce\xbd \xce\xb4\xce\xbf\xcf\x82 \xce\xb7\xce\xbc\xce\xaf\xce\xbd \xcf\x83\xce\xae\xce\xbc\xce\xb5\xcf\x81\xce\xbf\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xce\xb9 \xce\xac\xcf\x86\xce\xb5\xcf\x82 \xce\xb7\xce\xbc\xce\xaf\xce\xbd \xcf\x84\xce\xb1 \xce\xbf\xcf\x86\xce\xb5\xce\xbb\xce\xae\xce\xbc\xce\xb1\xcf\x84\xce\xb1 \xce\xb7\xce\xbc\xcf\x8e\xce\xbd, \xcf\x89\xcf\x82 \xce\xba\xce\xb1\xce\xb9 \xce\xb7\xce\xbc\xce\xb5\xce\xaf\xcf\x82 \xce\xb1\xcf\x86\xce\xaf\xce\xb5\xce\xbc\xce\xb5\xce\xbd \xcf\x84\xce\xbf\xce\xb9\xcf\x82 \xce\xbf\xcf\x86\xce\xb5\xce\xb9\xce\xbb\xce\xad\xcf\x84\xce\xb1\xce\xb9\xcf\x82 \xce\xb7\xce\xbc\xcf\x8e\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xce\xb9 \xce\xbc\xce\xb7 \xce\xb5\xce\xb9\xcf\x83\xce\xb5\xce\xbd\xce\xad\xce\xb3\xce\xba\xce\xb7\xcf\x82 \xce\xb7\xce\xbc\xce\xac\xcf\x82 \xce\xb5\xce\xb9\xcf\x82 \xcf\x80\xce\xb5\xce\xb9\xcf\x81\xce\xb1\xcf\x83\xce\xbc\xcf\x8c\xce\xbd, \xce\xb1\xce\xbb\xce\xbb\xce\xac \xcf\x81\xcf\x8d\xcf\x83\xce\xb1\xce\xb9 \xce\xb7\xce\xbc\xce\xac\xcf\x82 \xce\xb1\xcf\x80\xcf\x8c \xcf\x84\xce\xbf\xcf\x85 \xcf\x80\xce\xbf\xce\xbd\xce\xb7\xcf\x81\xce\xbf\xcf\x8d. \xce\xb1\xce\xbc\xce\xae\xce\xbd. </p>
<h5>Polytonic</h5>
<p>\xce\xa0\xce\xac\xcf\x84\xce\xb5\xcf\x81 \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd \xe1\xbd\x81 \xe1\xbc\x90\xce\xbd \xcf\x84\xce\xbf\xe1\xbf\x96\xcf\x82 \xce\xbf\xe1\xbd\x90\xcf\x81\xce\xb1\xce\xbd\xce\xbf\xe1\xbf\x96\xcf\x82 \xe1\xbc\x81\xce\xb3\xce\xb9\xce\xb1\xcf\x83\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xe1\xbd\xb8 \xe1\xbd\x84\xce\xbd\xce\xbf\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xe1\xbc\x90\xce\xbb\xce\xb8\xce\xad\xcf\x84\xcf\x89 \xe1\xbc\xa1 \xce\xb2\xce\xb1\xcf\x83\xce\xb9\xce\xbb\xce\xb5\xce\xaf\xce\xb1 \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xce\xb3\xce\xb5\xce\xbd\xce\xb7\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xe1\xbd\xb8 \xce\xb8\xce\xad\xce\xbb\xce\xb7\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85, \xe1\xbd\xa1\xcf\x82 \xe1\xbc\x90\xce\xbd \xce\xbf\xe1\xbd\x90\xcf\x81\xce\xb1\xce\xbd\xe1\xbf\xb7 \xce\xba\xce\xb1\xe1\xbd\xb6 \xe1\xbc\x90\xcf\x80\xe1\xbd\xb6 \xcf\x84\xe1\xbf\x86\xcf\x82 \xce\xb3\xe1\xbf\x86\xcf\x82\xc2\xb7 \xcf\x84\xe1\xbd\xb8\xce\xbd \xe1\xbc\x84\xcf\x81\xcf\x84\xce\xbf\xce\xbd \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd \xcf\x84\xe1\xbd\xb8\xce\xbd \xe1\xbc\x90\xcf\x80\xce\xb9\xce\xbf\xcf\x8d\xcf\x83\xce\xb9\xce\xbf\xce\xbd \xce\xb4\xe1\xbd\xb8\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbf\x96\xce\xbd \xcf\x83\xce\xae\xce\xbc\xce\xb5\xcf\x81\xce\xbf\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xe1\xbd\xb6 \xe1\xbc\x84\xcf\x86\xce\xb5\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbf\x96\xce\xbd \xcf\x84\xe1\xbd\xb0 \xe1\xbd\x80\xcf\x86\xce\xb5\xce\xbb\xce\xae\xce\xbc\xce\xb1\xcf\x84\xce\xb1 \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd, \xe1\xbd\xa1\xcf\x82 \xce\xba\xce\xb1\xe1\xbd\xb6 \xe1\xbc\xa1\xce\xbc\xce\xb5\xe1\xbf\x96\xcf\x82 \xe1\xbc\x80\xcf\x86\xce\xaf\xce\xb5\xce\xbc\xce\xb5\xce\xbd \xcf\x84\xce\xbf\xe1\xbf\x96\xcf\x82 \xe1\xbd\x80\xcf\x86\xce\xb5\xce\xb9\xce\xbb\xce\xad\xcf\x84\xce\xb1\xce\xb9\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xe1\xbd\xb6 \xce\xbc\xe1\xbd\xb4 \xce\xb5\xe1\xbc\xb0\xcf\x83\xce\xb5\xce\xbd\xce\xad\xce\xb3\xce\xba\xe1\xbf\x83\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbe\xb6\xcf\x82 \xce\xb5\xe1\xbc\xb0\xcf\x82 \xcf\x80\xce\xb5\xce\xb9\xcf\x81\xce\xb1\xcf\x83\xce\xbc\xcf\x8c\xce\xbd, \xe1\xbc\x80\xce\xbb\xce\xbb\xe1\xbd\xb0 \xcf\x81\xe1\xbf\xa6\xcf\x83\xce\xb1\xce\xb9 \xe1\xbc\xa1\xce\xbc\xe1\xbe\xb6\xcf\x82 \xe1\xbc\x80\xcf\x80\xe1\xbd\xb8 \xcf\x84\xce\xbf\xe1\xbf\xa6 \xcf\x80\xce\xbf\xce\xbd\xce\xb7\xcf\x81\xce\xbf\xe1\xbf\xa6. \xe1\xbc\x80\xce\xbc\xce\xae\xce\xbd. </p>
<h3>Languages</h3>
<p>(The following are used for demonstration purposes only. Some of the following excerpts are taken from web pages from the BBC Foreign News just to show the script - I have no idea what they actually say!!)</p>
<h4>Latvian</h4>
<p>Latvijas instit\xc5\xabts veic konsultat\xc4\xabvi koordin\xc4\x93jo\xc5\xa1as funkcijas Latvijas starptautisk\xc4\x81s atpaz\xc4\xabstam\xc4\xabbas jom\xc4\x81;
gatavo un izplata pla\xc5\xa1ai sabiedr\xc4\xabbai pieejamu, svar\xc4\xabgu pamatinform\xc4\x81ciju saturo\xc5\xa1u, viegli izprotamu un iegaum\xc4\x93jamu, k\xc4\x81 ar\xc4\xab pozit\xc4\xabvu iespaidu izraiso\xc5\xa1u visp\xc4\x81r\xc4\x93ju pamatinform\xc4\x81ciju par Latviju, Latvijas dabu, sabiedr\xc4\xabbu, kult\xc5\xabru un v\xc4\x93sturi;</p>
<h4>Azeri (az)</h4>
<p>Qaz k\xc9\x99m\xc9\x99rinin a\xc3\xa7\xc4\xb1l\xc4\xb1\xc5\x9f\xc4\xb1nda \xc4\xb0ran v\xc9\x99 Erm\xc9\x99nistan\xc4\xb1n prezidentl\xc9\x99ri i\xc5\x9ftirak edibl\xc9\x99r.</p>
<p>\xc4\xb0ran qaz\xc4\xb1n\xc4\xb1 Erm\xc9\x99nistana n\xc9\x99ql ed\xc9\x99c\xc9\x99k bu k\xc9\x99m\xc9\x99r Yerevan \xc3\xbc\xc3\xa7\xc3\xbcn x\xc3\xbcsusi \xc3\xb6n\xc9\x99m da\xc5\x9f\xc4\xb1y\xc4\xb1r, bel\xc9\x99 ki, b\xc3\xb6y\xc3\xbck etnik az\xc9\x99rbaycanl\xc4\xb1 toplumuna malik \xc4\xb0ran t\xc9\x99lat\xc3\xbcml\xc3\xbc regionda \xc3\xb6z maraqlar\xc4\xb1n\xc4\xb1 qorumaq \xc3\xbc\xc3\xa7\xc3\xbcn \xc3\xa7ox vaxt Erm\xc9\x99nistan\xc4\xb1n m\xc3\xbctt\xc9\x99fiqi kimi g\xc3\xb6r\xc3\xbcn\xc3\xbcb.</p>
<h4>Bulgarian</h4>
<p>\xd0\x9f\xd0\xbe\xd1\x81\xd0\xbb\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb4\xd0\xbe\xd0\xbd\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x80\xd0\xbd\xd0\xb8\xd1\x86\xd0\xb8 \xd0\xb2 \xd0\xb1\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd1\x81\xd0\xba\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xb0\xd1\x80\xd0\xbc\xd0\xb8\xd1\x8f \xd1\x89\xd0\xb5 \xd1\x81\xd0\xbb\xd1\x83\xd0\xb6\xd0\xb0\xd1\x82 9 \xd0\xbc\xd0\xb5\xd1\x81\xd0\xb5\xd1\x86\xd0\xb0, \xd0\xba\xd0\xb0\xd0\xba\xd1\x82\xd0\xbe \xd0\xbf\xd0\xbe\xd1\x81\xd1\x82\xd0\xb0\xd0\xbd\xd0\xbe\xd0\xb2\xd1\x8f\xd0\xb2\xd0\xb0 \xd0\xb7\xd0\xb0\xd0\xba\xd0\xbe\xd0\xbd\xd0\xb0 6 \xd0\xbc\xd0\xb5\xd1\x81\xd0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1\x8d\xd0\xbb\xd2\xaf\xd2\xaf \xd1\x87\xd0\xb0\xd0\xba\xd1\x82\xd1\x8b \xd0\xba\xd0\xb8\xd1\x88\xd0\xb8 \xd0\xb0\xd1\x80\xd0\xb0\xd0\xbb\xd0\xb0\xd1\x88\xd0\xba\xd0\xb0\xd0\xbd.</p>
<h4>Albanian (sq)</h4>
<p>Nj\xc3\xab anket\xc3\xab sugjeron se irakian\xc3\xabt kan\xc3\xab nj\xc3\xab pesimiz\xc3\xabm n\xc3\xab rritje p\xc3\xabr t\xc3\xab ardhmen e vendit t\xc3\xab tyre.</p>
<p>Presidenti shqiptar Alfred Moisiu dekretoi t\xc3\xab h\xc3\xabn\xc3\xabn ndryshimet e propozuara nga kryeministri Sali Berisha n\xc3\xab kabinetin e tij, pas zgjedhjeve lokale.</p>
<h4>Vietnamese (vi)</h4>
<p>M\xc3\xb4\xcc\xa3t kha\xcc\x89o sa\xcc\x81t m\xc6\xa1\xcc\x81i cho bi\xc3\xaa\xcc\x81t ng\xc6\xb0\xc6\xa1\xcc\x80i d\xc3\xa2n Iraq nga\xcc\x80y ca\xcc\x80ng ca\xcc\x89m th\xc3\xa2\xcc\x81y bi quan va\xcc\x80 kh\xc3\xb4ng tin t\xc6\xb0\xc6\xa1\xcc\x89ng va\xcc\x80o chi\xcc\x81nh phu\xcc\x89 cu\xcc\x83ng nh\xc6\xb0 li\xc3\xaan qu\xc3\xa2n</p>
<p>Nga \xc4\x91ang th\xc6\xb0\xcc\xa3c hi\xc3\xaa\xcc\xa3n chi\xc3\xaa\xcc\x81n di\xcc\xa3ch c\xc6\xb0\xcc\x81u h\xc3\xb4\xcc\xa3 sau khi co\xcc\x81 vu\xcc\xa3 n\xc3\xb4\xcc\x89 khi\xcc\x81 methane ta\xcc\xa3i m\xc3\xb4\xcc\xa3t mo\xcc\x89 than \xc6\xa1\xcc\x89 Siberia la\xcc\x80m i\xcc\x81t nh\xc3\xa2\xcc\x81t 61 ng\xc6\xb0\xc6\xa1\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; &#x648; &#x639;&#x632;&#x62a; &#x6a9;&#x6d2; &#x627;&#x639;&#x62a;&#x628;&#x627;&#x631; &#x633;&#x6d2; &#x628;&#x631;&#x627;&#x628;&#x631; &#x67e;&#x6cc;&#x62f;&#x627; &#x6c1;&#x648;&#x6d3; &#x6c1;&#x6cc;&#x6ba;&#x6d4; &#x627;&#x646;&#x6c1;&#x6cc;&#x6ba; &#x636;&#x645;&#x6cc;&#x631; &#x627;&#x648;&#x631; &#x639;&#x642;&#x644; &#x648;&#x62f;&#x6cc;&#x639;&#x62a; &#x6c1;&#x648;&#x626;&#x6cc; &#x6c1;&#x6cc;&#x6d4; &#x627;&#x633;&#x644;&#x6d3; &#x627;&#x646;&#x6c1;&#x6cc;&#x6ba; &#x627;&#x6cc;&#x6a9; &#x62f;&#x648;&#x633;&#x631;&#x6d2; &#x6a9;&#x6d2; &#x633;&#x627;&#x62a;&#x6be; &#x628;&#x6be;&#x627;&#x626;&#x6cc; &#x686;&#x627;&#x631;&#x6d2; &#x6a9;&#x627; &#x633;&#x644;&#x648;&#x6a9; &#x6a9;&#x631;&#x646;&#x627; &#x686;&#x627;&#x6c1;&#x6cc;&#x6d3;&#x6d4;
</p>
<h4>Pashto (ps)</h4>
<p>\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a.
</p>
<h4>Sindhi (sd)</h4>
<p>
&#x648;&#x627;&#x634;&#x646;&#x6af;&#x67d;&#x646; (&#x645; &#x68a;) &#x622;&#x645;&#x631;&#x64a;&#x6aa;&#x627; &#x686;&#x64a;&#x648; &#x622;&#x647;&#x64a; &#x62a;&#x647; &#x6aa;&#x64a;&#x631;&#x64a; &#x644;&#x648;&#x6af;&#x631;&#x628;&#x644; &#x62a;&#x64a; &#x67e;&#x627;&#x6aa; &#x641;&#x648;&#x62c; &#x62c;&#x64a; &#x62a;&#x62d;&#x641;&#x638;&#x627;&#x62a; &#x633;&#x627;&#x646; &#x67e;&#x627;&#x6aa;&#x633;&#x62a;&#x627;&#x646; &#x6fe; &#x62c;&#x645;&#x647;&#x648;&#x631;&#x64a; &#x637;&#x648;&#x631; &#x622;&#x64a;&#x644; &#x632;&#x631;&#x62f;&#x627;&#x631;&#x64a; &#x62c;&#x64a; &#x62d;&#x6aa;&#x648;&#x645;&#x62a; &#x6a9;&#x64a; &#x6aa;&#x648;&#x628;&#x647; &#x62e;&#x637;&#x631;&#x648; &#x646;&#x627;&#x647;&#x64a;&#x60c; &#x627;&#x646; &#x633;&#x648;&#x627;&#x644; &#x62a;&#x64a; &#x62a;&#x64a; &#x6aa;&#x64a;&#x631;&#x64a; &#x644;&#x648;&#x6af;&#x631;&#x628;&#x644; &#x6fe; &#x67e;&#x627;&#x6aa;&#x633;&#x62a;&#x627;&#x646; &#x6a9;&#x64a; &#x63a;&#x64a;&#x631; &#x645;&#x634;&#x631;&#x648;&#x637; &#x627;&#x645;&#x62f;&#x627;&#x62f; &#x68f;&#x64a;&#x6bb; &#x62c;&#x64a; &#x6b3;&#x627;&#x644;&#x647;&#x647; &#x6aa;&#x626;&#x64a; &#x648;&#x626;&#x64a; &#x622;&#x647;&#x64a;&#x60c; &#x62c;&#x68f;&#x647;&#x646; &#x62a;&#x647; &#x641;&#x648;&#x62c;&#x64a; &#x627;&#x645;&#x62f;&#x627;&#x62f; &#x62a;&#x64a; &#x634;&#x631;&#x637; &#x644;&#x627;&#x6b3;&#x648; &#x6aa;&#x64a;&#x627;
</p>
</div>
<!-- END RTL LANGUAGES -->
<h3>Indic Scripts</h3>
<h4>
Malayalam
</h4>
<p>&#xd38;&#xd02;&#xd38;&#xd4d;&#xd25;&#xd3e;&#xd28;&#xd24;&#xd4d;&#xd24;&#xd4d; &#xd30;&#xd3e;&#xd37;&#xd4d;&#xd1f;&#xd4d;&#xd30;&#xd40;&#xd2f; &#xd2a;&#xd41;&#xd15;&#xd2e;&#xd31; &#xd38;&#xd43;&#xd37;&#xd4d;&#xd1f;&#xd3f;&#xd15;&#xd4d;&#xd15;&#xd3e;&#xd28;&#xd3e;&#xd23;&#xd4d; &#xd35;&#xd4b;&#xd1f;&#xd4d;&#xd1f;&#xd30;&#xd4d;&#x200d;&#xd2a;&#xd1f;&#xd4d;&#xd1f;&#xd3f;&#xd15; &#xd35;&#xd3f;&#xd35;&#xd3e;&#xd26;&#xd24;&#xd4d;&#xd24;&#xd3f;&#xd32;&#xd42;&#xd1f;&#xd46; &#xd15;&#xd4b;&#xd23;&#xd4d;&#x200d;&#xd17;&#xd4d;&#xd30;&#xd38;&#xd4d; &#xd36;&#xd4d;&#xd30;&#xd2e;&#xd3f;&#xd15;&#xd4d;&#xd15;&#xd41;&#xd28;&#xd4d;&#xd28;&#xd24;&#xd46;&#xd28;&#xd4d;&#xd28;&#xd4d; &#xd38;&#xd3f;&#xd2a;&#xd3f;&#x200c;&#xd0e;&#xd02; &#xd38;&#xd02;&#xd38;&#xd4d;&#xd25;&#xd3e;&#xd28; &#xd38;&#xd46;&#xd15;&#xd4d;&#xd30;&#xd1f;&#xd4d;&#xd1f;&#xd31;&#xd3f; &#xd2a;&#xd3f;&#xd23;&#xd31;&#xd3e;&#xd2f;&#xd3f; &#xd35;&#xd3f;&#xd1c;&#xd2f;&#xd28;&#xd4d;&#x200d; &#xd15;&#xd41;&#xd31;&#xd4d;&#xd31;&#xd2a;&#xd4d;&#xd2a;&#xd46;&#xd1f;&#xd41;&#xd24;&#xd4d;&#xd24;&#xd3f;. &#xd09;&#xd26;&#xd4d;&#xd2f;&#xd4b;&#xd17;&#xd38;&#xd4d;&#xd25;&#xd30;&#xd46; &#xd2d;&#xd40;&#xd37;&#xd23;&#xd3f;&#xd2a;&#xd4d;&#xd2a;&#xd46;&#xd1f;&#xd41;&#xd24;&#xd4d;&#xd24;&#xd3f; &#xd35;&#xd30;&#xd41;&#xd24;&#xd3f;&#xd2f;&#xd3f;&#xd32;&#xd4d;&#x200d; &#xd28;&#xd3f;&#xd30;&#xd4d;&#x200d;&#xd24;&#xd4d;&#xd24;&#xd3e;&#xd28;&#xd3e;&#xd23;&#xd4d; &#xd35;&#xd2f;&#xd32;&#xd3e;&#xd30;&#xd4d;&#x200d; &#xd30;&#xd35;&#xd3f; &#xd09;&#xd33;&#xd4d;&#x200d;&#xd2a;&#xd4d;&#xd2a;&#xd46;&#xd1f;&#xd46;&#xd2f;&#xd41;&#xd33;&#xd4d;&#xd33;&#xd35;&#xd30;&#xd4d;&#x200d; &#xd36;&#xd4d;&#xd30;&#xd2e;&#xd3f;&#xd15;&#xd4d;&#xd15;&#xd41;&#xd28;&#xd4d;&#xd28;&#xd24;&#xd46;&#xd28;&#xd4d;&#xd28;&#xd41;&#xd02; &#xd2a;&#xd3f;&#xd23;&#xd31;&#xd3e;&#x200d;&#xd2f;&#xd3f; &#xd2a;&#xd4d;&#xd30;&#xd38;&#xd4d;&#xd24;&#xd3e;&#xd35;&#xd28;&#xd2f;&#xd3f;&#xd32;&#xd4d;&#x200d; &#xd06;&#xd30;&#xd4b;&#xd2a;&#xd3f;&#xd1a;&#xd4d;&#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06;&#xc17;&#xc4d;&#xc28;&#xc47;&#xc2f; &#xc07;&#xc30;&#xc3e;&#xc28;&#xc4d;&#x200c;&#xc32;&#xc4b; &#xc06;&#xc26;&#xc3f;&#xc35;&#xc3e;&#xc30;&#xc02; &#xc28;&#xc3e;&#xc21;&#xc41; &#xc13; &#xc06;&#xc24;&#xc4d;&#xc2e;&#xc3e;&#xc39;&#xc41;&#xc24;&#xc3f; &#xc26;&#xc3e;&#xc21;&#xc3f; &#xc1c;&#xc30;&#xc17;&#xc21;&#xc02;&#xc24;&#xc4b; &#xc07;&#xc30;&#xc35;&#xc48; &#xc2e;&#xc02;&#xc26;&#xc3f; &#xc2e;&#xc43;&#xc24;&#xc3f; &#xc1a;&#xc46;&#xc02;&#xc26;&#xc3e;&#xc30;&#xc41;.
<br />
&#xc06;&#xc17;&#xc4d;&#xc28;&#xc47;&#xc2f; &#xc07;&#xc30;&#xc3e;&#xc28;&#xc4d;&#x200c;&#xc32;&#xc4b; &#xc06;&#xc24;&#xc4d;&#xc2e;&#xc3e;&#xc39;&#xc41;&#xc24;&#xc3f; &#xc26;&#xc3e;&#xc21;&#xc3f; &#xc1c;&#xc30;&#xc17;&#xc21;&#xc02;&#xc24;&#xc4b; &#xc10;&#xc26;&#xc41;&#xc17;&#xc41;&#xc30;&#xc41; &#xc0e;&#xc32;&#xc3f;&#xc1f;&#xc4d; &#xc30;&#xc46;&#xc35;&#xc32;&#xc4d;&#xc2f;&#xc42;&#xc37;&#xc28;&#xc30;&#xc40; &#xc17;&#xc3e;&#xc30;&#xc4d;&#xc21;&#xc4d;&#x200c;&#xc32;&#xc24;&#xc4b; &#xc38;&#xc39;&#xc3e; &#xc2a;&#xc4d;&#xc30;&#xc2e;&#xc41;&#xc16; &#xc15;&#xc2e;&#xc3e;&#xc02;&#xc21;&#xc30;&#xc4d;&#x200c;&#xc32;&#xc24;&#xc4b;&#xc38;&#xc39;&#xc3e; &#xc2e;&#xc4a;&#xc24;&#xc4d;&#xc24;&#xc02; &#xc07;&#xc30;&#xc35;&#xc48; &#xc2e;&#xc02;&#xc26;&#xc3f; &#xc2e;&#xc43;&#xc24;&#xc3f; &#xc1a;&#xc46;&#xc02;&#xc26;&#xc3f;&#xc28;&#xc1f;&#xc4d;&#xc32;&#xc41; &#xc07;&#xc30;&#xc3e;&#xc28;&#xc4d; &#xc32;&#xc4b;&#xc15;&#xc4d;&#x200c;&#xc38;&#xc2d; &#xc38;&#xc4d;&#xc2a;&#xc40;&#xc15;&#xc30;&#xc4d; &#xc05;&#xc32;&#xc40; &#xc32;&#xc3e;&#xc30;&#xc3f;&#xc1c;&#xc3e;&#xc28;&#xc40; &#xc24;&#xc46;&#xc32;&#xc3f;&#xc2a;&#xc3e;&#xc30;&#xc41;.
</p>
<h4>Tamil (ta)</h4>
<p>\xe0\xae\x87\xe0\xae\xb0\xe0\xae\xbe\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xaf \xe0\xae\xae\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d \xe0\xae\x85\xe0\xae\xb5\xe0\xae\xa8\xe0\xae\xae\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xaf\x88\xe0\xae\xaf\xe0\xaf\x81\xe0\xae\x9f\xe0\xae\xa9\xe0\xaf\x8d \xe0\xae\x87\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xa4\xe0\xae\xbe\xe0\xae\x95\xe0\xae\xb5\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d, \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe \xe0\xae\xae\xe0\xae\xb1\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\x9a\xe0\xaf\x81\x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.</p>
<h4>Oriya</h4>
<p>&#xb13;&#xb21;&#xb3c;&#xb3f;&#xb06; &#xb09;&#xb07;&#xb15;&#xb3f;&#xb2a;&#xb47;&#xb21;&#xb3f;&#xb06; &#xb06;&#xb2a;&#xb23;&#xb19;&#xb4d;&#xb15;&#xb41; &#xb38;&#xb4d;&#xb2c;&#xb3e;&#xb17;&#xb24; &#xb15;&#xb30;&#xb41;&#xb1b;&#xb3f;&#x964; &#xb0f;&#xb39;&#xb3f; &#xb09;&#xb28;&#xb4d;&#xb2e;&#xb41;&#xb15;&#xb4d;&#xb24; &#xb1c;&#xb4d;&#xb1e;&#xb3e;&#xb28;&#xb15;&#xb4b;&#xb37;&#xb1f;&#xb3f; &#xb07;&#xb23;&#xb4d;&#xb1f;&#xb30;&#xb28;&#xb47;&#xb1f; &#xb09;&#xb2a;&#xb30;&#xb47; &#xb06;&#xb27;&#xb3e;&#xb30;&#xb3f;&#xb24; &#xb0f;&#xb2c;&#xb02; &#xb0f;&#xb39;&#xb3e; &#xb2c;&#xb3f;&#xb36;&#xb4d;&#xb2c;&#xb30; &#xb6b;&#xb66;&#xb1f;&#xb3f; &#xb2d;&#xb3e;&#xb37;&#xb3e;&#xb30;&#xb47; &#xb09;&#xb2a;&#xb32;&#xb2c;&#xb4d;&#xb27; &#x964; &#xb0f;&#xb39;&#xb3e;&#xb15;&#xb41; &#xb06;&#xb2a;&#xb23; &#xb2e;&#xb27;&#xb4d;&#xb5f; &#xb2c;&#xb30;&#xb4d;&#xb26;&#xb4d;&#xb27;&#xb3f;&#xb24; &#xb13; &#xb2a;&#xb30;&#xb3f;&#xb2c;&#xb30;&#xb4d;&#xb24;&#xb3f;&#xb24; &#xb15;&#xb30;&#xb3f;&#xb2a;&#xb3e;&#xb30;&#xb3f;&#xb2c;&#xb47; &#xb0f;&#xb2c;&#xb02; &#xb0f;&#xb39;&#xb3e;&#xb15;&#xb41; &#xb09;&#xb28;&#xb4d;&#xb28;&#xb24; &#xb15;&#xb30;&#xb3f;&#xb2c;&#xb3e; &#xb2a;&#xb3e;&#xb07;&#xb01; &#xb28;&#xb3f;&#xb1c;&#xb30; &#xb05;&#xb2c;&#xb26;&#xb3e;&#xb28; &#xb26;&#xb47;&#xb07; &#xb2a;&#xb3e;&#xb30;&#xb3f;&#xb2c;&#xb47; &#x964; &#xb06;&#xb2a;&#xb23;&#xb19;&#xb4d;&#xb15; &#xb2a;&#xb38;&#xb28;&#xb4d;&#xb26;&#xb30; &#xb2c;&#xb3f;&#xb37;&#xb5f; &#xb17;&#xb41;&#xb21;&#xb3f;&#xb15;&#xb41; &#xb06;&#xb2a;&#xb23; &#xb28;&#xb42;&#xb24;&#xb28; &#xb2d;&#xb3e;&#xb2c;&#xb47;&#xb30;&#xb47; &#xb2f;&#xb4b;&#xb17; &#xb15;&#xb30;&#xb3f;&#xb2a;&#xb3e;&#xb30;&#xb3f;&#xb2c;&#xb47; &#xb15;&#xb3f;&#xb2e;&#xb4d;&#xb2c;&#xb3e; &#xb0f;&#xb39;&#xb3f; &#xb2a;&#xb43;&#xb37;&#xb4d;&#xb20;&#xb3e;&#xb15;&#xb41; &#xb38;&#xb2e;&#xb4d;&#xb2a;&#xb3e;&#xb26;&#xb28; &#xb15;&#xb30;&#xb3f; &#xb0f;&#xb39;&#xb3e; &#xb38;&#xb39;&#xb3f;&#xb24; &#xb2f;&#xb4b;&#xb17; &#xb15;&#xb30;&#xb3f;&#xb2a;&#xb3e;&#xb30;&#xb3f;&#xb2c; &#x964; &#xb38;&#xb2e;&#xb38;&#xb4d;&#xb24; &#xb2a;&#xb3e;&#xb20; &#xb17;&#xb41;&#xb21;&#xb3f;&#xb15; GNU &#xb2e;&#xb41;&#xb15;&#xb4d;&#xb24; &#xb26;&#xb32;&#xb3f;&#xb32;&#xb15;&#xb30;&#xb23; &#xb32;&#xb3e;&#xb07;&#xb38;&#xb47;&#xb28;&#xb4d;&#xb38;&#xb30; &#xb38;&#xb30;&#xb4d;&#xb24;&#xb4d;&#xb24; &#xb05;&#xb27;&#xb40;&#xb28;&#xb30;&#xb47; &#xb09;&#xb2a;&#xb32;&#xb2c;&#xb4d;&#xb27; &#x964; &#xb24;&#xb25;&#xb3e;&#xb2a;&#xb3f;, &#xb06;&#xb2a;&#xb23; &#xb0f;&#xb39;&#xb3e;&#xb15;&#xb41; &#xb2e;&#xb41;&#xb15;&#xb4d;&#xb24; &#xb2d;&#xb3e;&#xb2c;&#xb47;&#xb30; &#xb07;&#xb32;&#xb47;&#xb15;&#xb4d;&#xb1f;&#xb4d;&#xb30;&#xb4b;&#xb28;&#xb3f;&#xb15;&#xb4d;&#xb38; &#xb2a;&#xb4d;&#xb30;&#xb3f;&#xb23;&#xb4d;&#xb1f;&#xb4d; &#xb15;&#xb3f;&#xb2e;&#xb4d;&#xb2c;&#xb3e; &#xb05;&#xb28;&#xb4d;&#xb5f;&#xb3e;&#xb28;&#xb4d;&#xb5f; &#xb2a;&#xb4d;&#xb30;&#xb3f;&#xb23;&#xb4d;&#xb1f;&#xb30; &#xb2e;&#xb3e;&#xb27;&#xb4d;&#xb5f;&#xb2e;&#xb30;&#xb47; &#xb2c;&#xb4d;&#xb5f;&#xb2c;&#xb39;&#xb3e;&#xb30; &#xb15;&#xb30;&#xb3f;&#xb2a;&#xb3e;&#xb30;&#xb3f;&#xb2c; &#x964;
</p>
<h4>Punjabi</h4>
<p>&#xa15;&#xa47;&#xa02;&#xa26;&#xa30;&#xa40; &#xa17;&#xa4d;&#xa30;&#xa39;&#xa3f;&#xa2e;&#xa70;&#xa24;&#xa30;&#xa40; &#xa2a;&#xa40;.&#xa1a;&#xa3f;&#xa26;&#xa70;&#xa2c;&#xa30;&#xa2e; &#xa28;&#xa47; &#xa10;&#xa24;&#xa35;&#xa3e;&#xa30; &#xa28;&#xa42;&#xa70; &#xa24;&#xa2e;&#xa3f;&#xa32;&#xa28;&#xa3e;&#xa22;&#xa42; &#xa26;&#xa47; &#xa2e;&#xa41;&#xa71;&#xa16;&#xa2e;&#xa70;&#xa24;&#xa30;&#xa40; &#xa10;&#xa2e;.&#xa15;&#xa30;&#xa41;&#xa23;&#xa3e;&#xa28;&#xa3f;&#xa27;&#xa40; &#xa28;&#xa3e;&#xa32; &#xa2e;&#xa41;&#xa32;&#xa3e;&#xa15;&#xa3e;&#xa24; &#xa15;&#xa40;&#xa24;&#xa40;&#x964;&#xa09;&#xa28;&#xa4d;&#xa39;&#xa3e; &#xa28;&#xa47; &#xa36;&#xa4d;&#xa30;&#xa40;&#xa32;&#xa70;&#xa15;&#xa3e; '&#xa1a; &#xa32;&#xa3f;&#xa71;&#xa1f;&#xa47; &#xa26;&#xa47; &#xa16;&#xa3f;&#xa32;&#xa3e;&#xa5e; &#xa2f;&#xa41;&#xa71;&#xa27; &#xa26;&#xa4c;&#xa30;&#xa3e;&#xa28; &#xa09;&#xa71;&#xa1d;&#xa5c;&#xa47; &#xa39;&#xa4b;&#xa0f; &#xa32;&#xa71;&#xa17;&#xa2d;&#xa17; &#xa22;&#xa3e;&#xa08; &#xa32;&#xa71;&#xa16; &#xa24;&#xa2e;&#xa3f;&#xa32;&#xa3e;&#xa02; &#xa26;&#xa40; &#xa2e;&#xa41;&#xa5c; &#xa30;&#xa3f;&#xa39;&#xa3e;&#xa07;&#xa36; '&#xa24;&#xa47; &#xa1a;&#xa30;&#xa1a;&#xa3e; &#xa15;&#xa40;&#xa24;&#xa40;&#x964;
</p>
<h4>Gujarati (gu)</h4>
<p>
&#xa86; &#xab5;&#xabe;&#xaa4; &#xab9;&#xa9c;&#xabe;&#xab0; &#xab5;&#xabe;&#xab0; &#xa95;&#xab9;&#xac7;&#xab5;&#xabe;&#xaae;&#xabe;&#xa82; &#xa86;&#xab5;&#xac0; &#xa9b;&#xac7; &#xa95;&#xac7; &#xaab;&#xabf;&#xab2;&#xacd;&#xaae; &#xaac;&#xaa8;&#xabe;&#xab5;&#xaa4;&#xac0; &#xab5;&#xa96;&#xac7;&#xaa4; &#xab9;&#xa82;&#xaae;&#xac7;&#xab6;&#xabe; &#xab8;&#xacc;&#xaa5;&#xac0; &#xab5;&#xaa7;&#xac1; &#xaa7;&#xacd;&#xaaf;&#xabe;&#xaa8; &#xab5;&#xabe;&#xab0;&#xacd;&#xaa4;&#xabe; &#xa85;&#xaa8;&#xac7; &#xab8;&#xacd;&#xa95;&#xacd;&#xab0;&#xac0;&#xaa8;&#xaaa;&#xacd;&#xab2;&#xac7; &#xaaa;&#xab0; &#xa86;&#xaaa;&#xab5;&#xac1; &#xa9c;&#xacb;&#xa88;&#xa8f;. &#xa95;&#xabe;&#xab0;&#xaa3; &#xa95;&#xac7; &#xa86; &#xa95;&#xacb;&#xa88; &#xaaa;&#xaa3; &#xaab;&#xabf;&#xab2;&#xacd;&#xaae;&#xaa8;&#xac0; &#xab8;&#xaab;&#xab3;&#xaa4;&#xabe;&#xaa8;&#xacb; &#xaae;&#xac1;&#xa96;&#xacd;&#xaaf; &#xa86;&#xaa7;&#xabe;&#xab0; &#xab9;&#xacb;&#xaaf; &#xa9b;&#xac7;.
<br />
&#xaae;&#xacb;&#xa9f;&#xabe; &#xaab;&#xabf;&#xab2;&#xacd;&#xaae; &#xab8;&#xacd;&#xa9f;&#xabe;&#xab0;&#xacd;&#xab8; &#xab8;&#xabe;&#xa88;&#xaa8; &#xa95;&#xab0;&#xab5;&#xabe;&#xaa5;&#xac0;, &#xab8;&#xacd;&#xa9f;&#xa82;&#xa9f; &#xa85;&#xaa8;&#xac7; &#xa97;&#xac0;&#xaa4;&#xacb;&#xaa5;&#xac0; &#xaaa;&#xabe;&#xaa3;&#xac0;&#xaa8;&#xac0; &#xa85;&#xa82;&#xaa6;&#xab0; &#xa95;&#xac7; &#xa86;&#xa95;&#xabe;&#xab6;&#xaae;&#xabe;&#xa82; &#xa95;&#xab0;&#xacb;&#xaa1;&#xacb; &#xab0;&#xac2;&#xaaa;&#xabf;&#xaaf;&#xabe; &#xa96;&#xab0;&#xacd;&#xa9a; &#xa95;&#xab0;&#xac0; &#xaab;&#xabf;&#xab2;&#x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x99c;&#x9a8;&#x9c7;&#x9b0; &#x9b8;&#x982;&#x996;&#x9cd;&#x9af;&#x9be; &#x986;&#x9b0;&#x993; &#x9ac;&#x9be;&#x9dc;&#x9b2;&#x9c7; &#x9b8;&#x9cd;&#x9ac;&#x9ad;&#x9be;&#x9ac;&#x9a4;&#x987; &#x9b8;&#x999;&#x9cd;&#x995;&#x99f; &#x986;&#x9b0;&#x993; &#x99c;&#x99f;&#x9bf;&#x9b2; &#x9b9;&#x9df;&#x9c7; &#x989;&#x9a0;&#x9ac;&#x9c7;
</p>
<h4>Assamese</h4>
<p>&#x985;&#x9b8;&#x9ae;&#x9c0;&#x9af;&#x9bc;&#x9be; &#x9f1;&#x9bf;&#x995;&#x9bf;&#x9aa;&#x9bf;&#x9a1;&#x9bf;&#x9af;&#x9bc;&#x9be;&#x9f0; &#x989;&#x9a6;&#x9cd;&#x9a6;&#x9c7;&#x9b6;&#x9cd;&#x9af; &#x9b9;'&#x9b2; &#x9b8;&#x9ae;&#x9cd;&#x9aa;&#x9c2;&#x9f0;&#x9cd;&#x9a3; &#x985;&#x9b8;&#x9ae;&#x9c0;&#x9af;&#x9bc;&#x9be; &#x9ad;&#x9be;&#x9b7;&#x9be;&#x9a4; &#x98f;&#x996;&#x9a8;&#x9bf; &#x9ac;&#x9bf;&#x9b6;&#x9cd;&#x9ac;&#x995;&#x9cb;&#x9b7; &#x9aa;&#x9cd;&#x9f0;&#x9a3;&#x9af;&#x9bc;&#x9a8; &#x995;&#x9f0;&#x9be;&#x964; &#x985;&#x9a8;&#x9cd;&#x9af; &#x995;&#x9cb;&#x9a8;&#x9cb; &#x9ad;&#x9be;&#x9b7;&#x9be;&#x9f0; &#x9aa;&#x9cd;&#x9f0;&#x9ac;&#x9a8;&#x9cd;&#x9a7; &#x98f;&#x987; &#x9ac;&#x9bf;&#x9b6;&#x9cd;&#x9ac;&#x995;&#x9cb;&#x9b7;&#x9f0; &#x9ac;&#x9be;&#x9ac;&#x9c7; &#x997;&#x9c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;&#x9be;&#x9b9;&#x9bf;&#x9a4;&#x9cd;&#x9af;&#x9bf;&#x995;&#x9b8;&#x995;&#x9b2; &#x98f;&#x9a4;&#x9bf;&#x9af;&#x9bc;&#x9be;&#x993; &#x990;&#x995;&#x9cd;&#x9af;&#x9ae;&#x9a4;&#x9a4; &#x989;&#x9aa;&#x9a8;&#x9c0;&#x9a4; &#x9b9;'&#x9ac; &#x9aa;&#x9f0;&#x9be; &#x9a8;&#x9be;&#x987;, &#x9f1;&#x9bf;&#x995;&#x9bf;&#x9aa;&#x9bf;&#x9a1;&#x9bf;&#x9af;&#x9bc;&#x9be;&#x9a4; &#x9ac;&#x9bf;&#x9a6;&#x9c7;&#x9b6;&#x9c0; &#x9b6;&#x9ac;&#x9cd;&#x9a6;&#x9f0; &#x9af;&#x9bf;&#x995;&#x9cb;&#x9a8;&#x9cb; &#x9a7;&#x9f0;&#x9a8;&#x9f0; &#x985;&#x9b8;&#x9ae;&#x9c0;&#x9af;&#x9bc;&#x9be; &#x9f0;&#x9c2;&#x9aa; &#x997;&#x9cd;&#x9f0;&#x9be;&#x9b9;&#x9cd;&#x9af; &#x995;&#x9f0;&#x9be; &#x9b9;'&#x9ac;&#x964;
</p>
<h4>Japanese (pangrams)</h4>
<h5>Iroha Uta SJIS</h5>
<p>\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80\xe3\x81\xa1\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe3\x82\x8f\xe3\x81\x8b\xe3\x82\x88\xe3\x81\x9f\xe3\x82\x8c\xe3\x81\x9d\xe3\x80\x80\xe3\x81\xa4\xe3\x81\xad\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe3\x81\x86\xe3\x82\x90\xe3\x81\xae\xe3\x81\x8a\xe3\x81\x8f\xe3\x82\x84\xe3\x81\xbe\xe3\x80\x80\xe3\x81\x91\xe3\x81\xb5\xe3\x81\x93\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x81\x8d\xe3\x82\x86\xe3\x82\x81\xe3\x81\xbf\xe3\x81\x97\xe3\x80\x80\xe3\x82\x91\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x99 </p>
<h5>Tori Naku Uta </h5>
<p>\xe3\x81\xa8\xe3\x82\x8a\xe3\x81\xaa\xe3\x81\x8f\xe3\x81\x93\xe3\x82\x91\xe3\x81\x99\xe3\x80\x80\xe3\x82\x86\xe3\x82\x81\xe3\x81\x95\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe3\x81\xbf\xe3\x82\x88\xe3\x81\x82\xe3\x81\x91\xe3\x82\x8f\xe3\x81\x9f\xe3\x82\x8b\xe3\x80\x80\xe3\x81\xb2\xe3\x82\x93\xe3\x81\x8b\xe3\x81\x97\xe3\x82\x92\xe3\x80\x80\xe3\x81\x9d\xe3\x82\x89\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x8a\xe3\x81\x8d\xe3\x81\xa4\xe3\x81\xb8\xe3\x81\xab\xe3\x80\x80\xe3\x81\xbb\xe3\x81\xb5\xe3\x81\xad\xe3\x82\x80\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe3\x82\x82\xe3\x82\x84\xe3\x81\xae\xe3\x81\x86\xe3\x81\xa1 </p>
<h5>Ametsuchi No Uta </h5>
<p>\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1 \xe3\x81\xbb\xe3\x81\x97 \xe3\x81\x9d\xe3\x82\x89 / \xe3\x82\x84\xe3\x81\xbe \xe3\x81\x8b\xe3\x81\xaf \xe3\x81\xbf\xe3\x81\xad \xe3\x81\x9f\xe3\x81\xab / \xe3\x81\x8f\xe3\x82\x82 \xe3\x81\x8d\xe3\x82\x8a \xe3\x82\x80\xe3\x82\x8d \xe3\x81\x93\xe3\x81\x91 / \xe3\x81\xb2\xe3\x81\xa8 \xe3\x81\x84\xe3\x81\xac \xe3\x81\x86\xe3\x81\xb8 \xe3\x81\x99\xe3\x82\x91 / \xe3\x82\x86\xe3\x82\x8f \xe3\x81\x95\xe3\x82\x8b \xe3\x81\x8a\xe3\x81\xb5 \xe3\x81\x9b\xe3\x82\x88 / \xe3\x81\x88\xe3\x81\xae\xe3\x81\x88*\xe3\x82\x92 \xe3\x81\xaa\xe3\x82\x8c \xe3\x82\x90\xe3\x81\xa6 </p>
<h5>Taini no Uta </h5>
<p>\xe3\x81\x9f\xe3\x82\x90\xe3\x81\xab\xe3\x81\x84\xe3\x81\xa6\xe3\x80\x80\xe3\x81\xaa\xe3\x81\xa4\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9d\xe3\x80\x80\xe3\x81\x8d\xe3\x81\xbf\xe3\x82\x81\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x82\x8a\xe3\x81\x8a\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe3\x82\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x82\x8d\xe3\x81\xae\xe3\x80\x80\xe3\x81\x86\xe3\x81\xa1\xe3\x82\x91\xe3\x81\xb8\xe3\x82\x8b\xe3\x81\x93\xe3\x82\x89\xe3\x80\x80\xe3\x82\x82\xe3\x81\xaf\xe3\x81\xbb\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe3\x81\xb5\xe3\x81\xad\xe3\x81\x8b\xe3\x81\x91\xe3\x81\xac </p>
<h4>Chinese (simplified) GB2312 GB</h4>
<p>\xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9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x8c\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xef\xbc\x8c\xe5\x85\x8d\xe9\x99\xa4\xe5\x85\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95168\xe7\xac\x94\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x8b\x9f\xe4\xba\x8e2007\xe5\xb9\xb4\xe5\xba\x95\xe5\x89\x8d\xe4\xb8\x8e\xe5\x8f\x97\xe6\x8f\xb4\xe5\x9b\xbd\xe5\x8a\x9e\xe7\x90\x86\xe5\xae\x8c\xe5\x85\x8d\xe5\x80\xba\xe5\x8d\x8f\xe8\xae\xae\xe3\x80\x82</p>
<h4>Chinese (Traditional - Hong Kong) Big5</h4>
<p>\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\xe6\x95\x99\xe8\x82\xb2\xe7\xb6\xb2\xe7\xab\x99\xef\xbc\x8c\xe5\xae\x83\xe6\x88\x90\xe5\x8a\x9f\xe7\xb5\x90\xe5\x90\x88\xe4\xba\x86\xe9\xa6\x99\xe6\xb8\xaf\xe8\xb3\xbd\xe9\xa6\xac\xe6\x9c\x83\xe9\x98\xb2\xe6\xad\xa2\xe8\x87\xaa\xe6\xae\xba\xe7\xa0\x94\xe7\xa9\xb6\xe4\xb8\xad\xe5\xbf\x83\xe5\x90\x84\xe6\x96\xb9\xe9\x9d\xa2\xe7\x9a\x84\xe5\xb0\x88\xe6\x89\x8d\xef\xbc\x8c\xe7\x82\xba\xe9\x9d\x92\xe5\xb0\x91\xe5\xb9\xb4\xe4\xba\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\xe6\xb4\xb2\xe5\x89\xb5\xe6\x96\xb0\xe5\xa4\xa7\xe7\x8d\x8e\xe3\x80\x8d\xe9\x8a\x80\xe7\x8d\x8e\xe3\x80\x82</p>
<h4>Korean UHC</h4>
<p>\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98 \xea\xb3\xa0\xec\x9c\xa0\xec\xa1\xb0\xea\xb1\xb4\xec\x9d\x80 \xec\x9e\x85\xec\x88\xa0\xeb\x81\xbc\xeb\xa6\xac \xeb\xa7\x8c\xeb\x82\x98\xec\x95\xbc \xed\x95\x98\xea\xb3\xa0 \xed\x8a\xb9\xeb\xb3\x84\xed\x95\x9c \xea\xb8\xb0\xec\x88\xa0\xec\x9d\x80 \xed\x95\x84\xec\x9a\x94\xec\xb9\x98 \xec\x95\x8a\xeb\x8b\xa4. </p>
<h4>Mixed</h4>
<p style=\"font-family: 'trebuchet ms';\">Distinguishes multiple languages enclosed in same element (tags): Arabic \xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3
English Cat sat on the large mat
Tamil \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe
Hindi \xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4 \xe0\xa4\x94\xe0\xa4\xb0
Japanese \xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80
Chinese \xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac
Thai \xe0\xb9\x80\xe0\xb8\x9b\xe0\xb9\x87\xe0\xb8\x99\xe0\xb8\xa1\xe0\xb8\x99\xe0\xb8\xb8\xe0\xb8\xa9\xe0\xb8\xa2
Viet M\xc3\xb4\xcc\xa3t kha\xcc\x89o sa\xcc\x81t m\xc6\xa1\xcc\x81i cho bi\xc3\xaa\xcc\x81t ng\xc6\xb0\xc6\xa1\xcc\x80i d\xc3\xa2n
Tamil \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe
Chinese \xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac
English Cat sat on the large mat
</p>
<h4>Unicode Plane 2</h4>
<div>
Unicode Plane 0 (BMP U+0000 - U+FFFF):
\xe9\xbc\x82 \xe9\xbc\x88 \xe9\xbc\x97 \xe9\xbc\xa6 \xe9\xbc\xa7 \xe9\xbc\xb9 \xe9\xbd\x84 \xe9\xbd\x85 \xe9\xbd\x90 \xe9\xbd\x93 \xe9\xbd\x9a \xe9\xbd\xa2 \xe9\xbd\xa9 \xe9\xbd\xbf \xe9\xbe\x8e \xe9\xbe\x99 \xe9\xbe\x9f \xe9\xbe\xa5
-------
Unicode Plane 2 (SIP characters > U+20000):
\xf0\xa0\x80\xa1 \xf0\xa0\x80\xbe \xf0\xa0\x81\x86 \xf0\xa0\x81\x8e \xf0\xa0\x81\xa8 \xf0\xa0\x82\x86 \xf0\xa0\x82\x87 \xf0\xa0\x82\x8a \xf0\xa0\x82\x94 \xf0\xa0\x83\x8a \xf0\xa0\x83\x8b \xf0\xa0\x83\x8c \xf0\xa0\x83\x8d \xf0\xa0\x83\x91 \xf0\xa0\x83\xae \xf0\xa0\x84\x8c \xf0\xa0\x84\x8e \xf0\xa0\x84\x98 \xf0\xa0\x86\xa4 \xf0\xa0\x86\xa9 \xf0\xa0\x86\xab \xf0\xa0\x87\x81 \xf0\xa0\x87\x94 \xf0\xa0\x87\xb2 \xf0\xa0\x88\x84 \xf0\xa0\x88\x8c \xf0\xa0\x88\x94 \xf0\xa0\x88\xb9 \xf0\xa0\x89\x9b \xf0\xa0\x89\xb4 \xf0\xa0\x89\xb5 \xf0\xa0\x8a\x99 \xf0\xa0\x8a\x9e \xf0\xa0\x8a\xa0 \xf0\xa0\x8a\xb7 \xf0\xa0\x8a\xbf \xf0\xa0\x8b\x80 \xf0\xa0\x8b\xa5 \xf0\xa0\x8c\x8a
-------
Unicode Plane 0 (BMPU+0000 - U+FFFF):
\xe9\xbc\x82 \xe9\xbc\x88 \xe9\xbc\x97 \xe9\xbc\xa6 \xe9\xbc\xa7 \xe9\xbc\xb9 \xe9\xbd\x84 \xe9\xbd\x85 \xe9\xbd\x90 \xe9\xbd\x93 \xe9\xbd\x9a \xe9\xbd\xa2 \xe9\xbd\xa9 \xe9\xbd\xbf \xe9\xbe\x8e \xe9\xbe\x99 \xe9\xbe\x9f \xe9\xbe\xa5 <br />
</div>
";
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->useAdobeCJK = true; // Default setting in config.php
// You can set this to false if you have defined other CJK fonts
$mpdf->SetAutoFont(AUTOFONT_ALL); // AUTOFONT_CJK | AUTOFONT_THAIVIET | AUTOFONT_RTL | AUTOFONT_INDIC // AUTOFONT_ALL
// () = default ALL, 0 turns OFF (default initially)
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,384 @@
<?php
$html = "
<style>
body, p { direction: rtl; font-family: 'XB Zar'; font-size: 15pt; }
</style>
<h1>Arabic Languages and Fonts</h1>
<!-- Koranic
<p style=\"font-family: sans;\">Koranic<br />
&#x627;&#x644;&#x62d;&#x645;&#x62f; &#x644;&#x644;&#x647; &#x631;&#x628; &#x627;&#x644;&#x639;&#x627;&#x644;&#x645;&#x64a;&#x646; &#x648;&#x627;&#x644;&#x635;&#x644;&#x627;&#x629; &#x648;&#x627;&#x644;&#x633;&#x644;&#x627;&#x645; &#x639;&#x644;&#x649; &#x633;&#x64a;&#x62f; &#x627;&#x644;&#x645;&#x631;&#x633;&#x644;&#x64a;&#x646; &#x633;&#x64a;&#x62f;&#x646;&#x627; &#x648;&#x645;&#x648;&#x644;&#x627;&#x646;&#x627; &#x645;&#x62d;&#x645;&#x62f; &#x648;&#x639;&#x644;&#x649; &#x622;&#x644;&#x647; &#x648;&#x635;&#x62d;&#x628;&#x647; &#x635;&#x644;&#x627;&#x629; &#x648;&#x633;&#x644;&#x627;&#x645;&#x627;&#x64b; &#x62f;&#x627;&#x626;&#x645;&#x64a;&#x646; &#x625;&#x644;&#x649; &#x64a;&#x648;&#x645; &#x627;&#x644;&#x62f;&#x64a;&#x646;.
<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
<br />
!\"#$%&'()*+,-./0123456789:;<=>?<br />
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br />
`abcdefghijklmnopqrstuvwxyz{|}~
</p>
-->
<p style=\"font-family: 'XB Zar';\">Arabic<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
<br />
!\"#$%&'()*+,-./0123456789:;<=>?<br />
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br />
`abcdefghijklmnopqrstuvwxyz{|}~
<br />
\xc2\xa2\xe2\x82\xac\xc2\xa9\xc2\xae\xe2\x84\xa2\xe2\x80\xb0\xc2\xb5\xc2\xb7\xe2\x80\xa2\xe2\x80\xa6\xc2\xa7\xc3\x9f\xe2\x80\xb9\xe2\x80\xba\xc2\xab\xc2\xbb\xe2\x80\x98\xe2\x80\x99\xe2\x80\x9c\xe2\x80\x9d\xe2\x80\x9a\xe2\x80\x9e&lt;&gt;\xe2\x80\x93\xe2\x80\x94\xcb\x86\xcb\x9c
\xc2\xb0\xc2\xb1\xc3\xb7\xc3\x97\xc2\xbc\xc2\xbd\xc2\xbe\xc6\x92\xc2\xac\xe2\x80\xa0\xe2\x80\xa1
<br />
\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc5\x92\xc5\xa0\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc5\xb8
<br />
\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc5\x93\xc5\xa1\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf
<br />
&#x627;&#x644;&#x62d;&#x645;&#x62f; &#x644;&#x644;&#x647; &#x631;&#x628; &#x627;&#x644;&#x639;&#x627;&#x644;&#x645;&#x64a;&#x646; &#x648;&#x627;&#x644;&#x635;&#x644;&#x627;&#x629; &#x648;&#x627;&#x644;&#x633;&#x644;&#x627;&#x645; &#x639;&#x644;&#x649; &#x633;&#x64a;&#x62f; &#x627;&#x644;&#x645;&#x631;&#x633;&#x644;&#x64a;&#x646; &#x633;&#x64a;&#x62f;&#x646;&#x627; &#x648;&#x645;&#x648;&#x644;&#x627;&#x646;&#x627; &#x645;&#x62d;&#x645;&#x62f; &#x648;&#x639;&#x644;&#x649; &#x622;&#x644;&#x647; &#x648;&#x635;&#x62d;&#x628;&#x647; &#x635;&#x644;&#x627;&#x629; &#x648;&#x633;&#x644;&#x627;&#x645;&#x627;&#x64b; &#x62f;&#x627;&#x626;&#x645;&#x64a;&#x646; &#x625;&#x644;&#x649; &#x64a;&#x648;&#x645; &#x627;&#x644;&#x62f;&#x64a;&#x646;.
<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
</p>
<p style=\"font-family: 'XB Riyaz';\">Arabic<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
<br />
!\"#$%&'()*+,-./0123456789:;<=>?<br />
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br />
`abcdefghijklmnopqrstuvwxyz{|}~
<br />
\xc2\xa2\xe2\x82\xac\xc2\xa9\xc2\xae\xe2\x84\xa2\xe2\x80\xb0\xc2\xb5\xc2\xb7\xe2\x80\xa2\xe2\x80\xa6\xc2\xa7\xc3\x9f\xe2\x80\xb9\xe2\x80\xba\xc2\xab\xc2\xbb\xe2\x80\x98\xe2\x80\x99\xe2\x80\x9c\xe2\x80\x9d\xe2\x80\x9a\xe2\x80\x9e&lt;&gt;\xe2\x80\x93\xe2\x80\x94\xcb\x86\xcb\x9c
\xc2\xb0\xc2\xb1\xc3\xb7\xc3\x97\xc2\xbc\xc2\xbd\xc2\xbe\xc6\x92\xc2\xac\xe2\x80\xa0\xe2\x80\xa1
<br />
\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc5\x92\xc5\xa0\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc5\xb8
<br />
\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc5\x93\xc5\xa1\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf
<br />
&#x627;&#x644;&#x62d;&#x645;&#x62f; &#x644;&#x644;&#x647; &#x631;&#x628; &#x627;&#x644;&#x639;&#x627;&#x644;&#x645;&#x64a;&#x646; &#x648;&#x627;&#x644;&#x635;&#x644;&#x627;&#x629; &#x648;&#x627;&#x644;&#x633;&#x644;&#x627;&#x645; &#x639;&#x644;&#x649; &#x633;&#x64a;&#x62f; &#x627;&#x644;&#x645;&#x631;&#x633;&#x644;&#x64a;&#x646; &#x633;&#x64a;&#x62f;&#x646;&#x627; &#x648;&#x645;&#x648;&#x644;&#x627;&#x646;&#x627; &#x645;&#x62d;&#x645;&#x62f; &#x648;&#x639;&#x644;&#x649; &#x622;&#x644;&#x647; &#x648;&#x635;&#x62d;&#x628;&#x647; &#x635;&#x644;&#x627;&#x629; &#x648;&#x633;&#x644;&#x627;&#x645;&#x627;&#x64b; &#x62f;&#x627;&#x626;&#x645;&#x64a;&#x646; &#x625;&#x644;&#x649; &#x64a;&#x648;&#x645; &#x627;&#x644;&#x62f;&#x64a;&#x646;.
<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
</p>
<p style=\"font-family: 'XB Zar';\">Farsi<br />
&#x647;&#x645;&#x647;&#x654; &#x627;&#x641;&#x631;&#x627;&#x62f; &#x628;&#x634;&#x631; &#x622;&#x632;&#x627;&#x62f; &#x628;&#x647; &#x62f;&#x646;&#x6cc;&#x627; &#x645;&#x6cc;&#x200c;&#x622;&#x6cc;&#x646;&#x62f; &#x648; &#x627;&#x632; &#x62f;&#x6cc;&#x62f; &#x62d;&#x6cc;&#x62b;&#x6cc;&#x62a; &#x648; &#x62d;&#x642;&#x648;&#x642; &#x628;&#x627; &#x647;&#x645; &#x628;&#x631;&#x627;&#x628;&#x631;&#x646;&#x62f;&#x60c; &#x647;&#x645;&#x647; &#x62f;&#x627;&#x631;&#x627;&#x6cc; &#x627;&#x646;&#x62f;&#x6cc;&#x634;&#x647; &#x648; &#x648;&#x62c;&#x62f;&#x627;&#x646; &#x647;&#x633;&#x62a;&#x646;&#x62f; &#x648; &#x628;&#x627;&#x6cc;&#x62f; &#x62f;&#x631; &#x628;&#x631;&#x627;&#x628;&#x631; &#x6cc;&#x6a9;&#x62f;&#x6cc;&#x6af;&#x631; &#x628;&#x627; &#x631;&#x648;&#x62d; &#x628;&#x631;&#x627;&#x62f;&#x631;&#x6cc; &#x631;&#x641;&#x62a;&#x627;&#x631; &#x6a9;&#x646;&#x646;&#x62f;.
<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
</p>
<p style=\"font-family: 'XB Zar';\">Urdu<br />
\xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xd8\xa7\xd9\x81\xd8\xaa\xd8\xae\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x8c \xd8\xac\xd8\xa8\xd8\xb1\xdb\x8c \xd8\xb1\xd8\xae\xd8\xb5\xd8\xaa \xd9\xbe\xd8\xb1 \xd9\x84\xd8\xa7\xdb\x81\xd9\x88\xd8\xb1\xdb\x81\xd8\xa7\xd8\xa6\xdb\x8c \xda\xa9\xd9\x88\xd8\xb1\xd9\xb9 \xda\xa9\xdb\x92 \xd8\xa7\xdb\x8c\xda\xa9 \xd8\xa7\xd9\x88\xd8\xb1 \xd8\xb3\xd9\x86\xd8\xaf\xda\xbe \xd9\x85\xdb\x8c\xda\xba \xda\xa9\xd8\xa6\xdb\x8c \xd8\xb3\xd9\x88\xd9\x84 \xd8\xac\xd8\xac \xd9\x85\xd8\xb3\xd8\xaa\xd8\xb9\xd9\x81\xdb\x8c \xdb\x81\xd9\x88\xda\xaf\xd8\xa6\xdb\x92 \xdb\x81\xdb\x8c\xda\xba\xdb\x94
<br />
\xda\x86\xdb\x8c\xd9\x81 \xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xda\xa9\xdb\x8c \xd8\xb3\xd8\xb1\xda\xaf\xd8\xb1\xd9\x85\xdb\x8c\xd8\xa7\xda\xba \xd9\x85\xd8\xad\xd8\xaf\xd9\x88\xd8\xaf \xda\xa9\xd8\xb1\xd9\x86\xdb\x92 \xd8\xa7\xd9\x88\xd8\xb1 \xd9\xbe\xd9\x88\xd9\x84\xdb\x8c\xd8\xb3 \xd8\xaa\xd8\xb9\xdb\x8c\xd9\x86\xd8\xa7\xd8\xaa\xdb\x8c \xda\xa9\xdb\x92 \xd8\xad\xda\xa9\xd9\x85 \xd9\x86\xd8\xa7\xd9\x85\xdb\x92 \xd9\xbe\xd8\xb1 \xd8\xaf\xd8\xb3\xd8\xaa\xd8\xae\xd8\xb7 \xda\xa9\xd8\xb1\xda\xa9\xdb\x92 \xd8\xba\xd9\x84\xd8\xb7 \xda\xa9\xdb\x8c\xd8\xa7: \xd8\xac\xd9\x86\xd8\xb1\xd9\x84 \xd9\x85\xd8\xb4\xd8\xb1\xd9\x81
</p>
<p style=\"font-family: 'XB Zar';\">Pashto<br />
\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a.
<br />
\xd9\x87 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xda\xa9\xdb\x90 \xd9\x8a\xd9\x88\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd9\x86\xd8\xb8\xd8\xb1 \xd8\xb4\xd9\x85\xdb\x90\xd8\xb1\xd9\x86\xd9\x87 \xda\x9a\xd9\x8a\xd9\x8a \xda\x86\xdb\x90 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\xa7\xd9\x86 \xd9\xbe\xd9\x87 \xd8\xb2\xd9\x8a\xd8\xa7\xd8\xaa\xdb\x90\xd8\xaf\xd9\x88\xd9\x86\xda\xa9\xd9\x8a \xd8\xaa\xd9\x88\xda\xaf\xd9\x87 \xd8\xaf \xd8\xad\xd8\xa7\xd9\x84\xd8\xa7\xd8\xaa\xd9\x88 \xd9\xbe\xd9\x87 \xd8\xa7\xda\x93\xd9\x87 \xd8\xa8\xd8\xaf\xd8\xa8\xd9\x8a\xd9\x86\xd9\x87 \xd8\xaf\xd9\x8a \xd8\xa7\xd9\x88 \xd8\xaf \xd8\xa8\xdb\x90 \xd8\xa8\xd8\xa7\xd9\x88\xd8\xb1\xd9\x8a \xd8\xa7\xd8\xad\xd8\xb3\xd8\xa7\xd8\xb3 \xda\xa9\xd9\x88\xd9\x8a\xd8\x8c \xd8\xae\xd9\x88 \xd8\xae\xd9\xbe\xd9\x84 \xd9\x87\xd9\x8a\xd9\x88\xd8\xa7\xd8\xaf \xd9\x8a\xd9\x88\xd9\x85\xd9\x88\xd9\xbc\xd9\x89 \xd8\xba\xd9\x88\xd8\xa7\xda\x93\xd9\x8a.
</p>
<p style=\"font-family: Arial;\">Sindhi<br />
&#x641;&#x648;&#x62c; &#x637;&#x631;&#x641;&#x627;&#x646; &#x6aa;&#x64a;&#x631;&#x64a; &#x644;&#x648;&#x6af;&#x631;&#x628;&#x644; &#x62c;&#x64a; &#x645;&#x62e;&#x627;&#x644;&#x641;&#x62a; &#x633;&#x628;&#x628; &#x632;&#x631;&#x62f;&#x627;&#x631;&#x64a; &#x62d;&#x6aa;&#x648;&#x645;&#x62a; &#x6a9;&#x64a; &#x62e;&#x637;&#x631;&#x648; &#x646;&#x627;&#x647;&#x64a;:&#x622;&#x645;&#x631;&#x64a;&#x6aa;&#x627;
<br />
&#x648;&#x627;&#x634;&#x646;&#x6af;&#x67d;&#x646; (&#x645; &#x68a;) &#x622;&#x645;&#x631;&#x64a;&#x6aa;&#x627; &#x686;&#x64a;&#x648; &#x622;&#x647;&#x64a; &#x62a;&#x647; &#x6aa;&#x64a;&#x631;&#x64a; &#x644;&#x648;&#x6af;&#x631;&#x628;&#x644; &#x62a;&#x64a; &#x67e;&#x627;&#x6aa; &#x641;&#x648;&#x62c; &#x62c;&#x64a; &#x62a;&#x62d;&#x641;&#x638;&#x627;&#x62a; &#x633;&#x627;&#x646; &#x67e;&#x627;&#x6aa;&#x633;&#x62a;&#x627;&#x646; &#x6fe; &#x62c;&#x645;&#x647;&#x648;&#x631;&#x64a; &#x637;&#x648;&#x631; &#x622;&#x64a;&#x644; &#x632;&#x631;&#x62f;&#x627;&#x631;&#x64a; &#x62c;&#x64a; &#x62d;&#x6aa;&#x648;&#x645;&#x62a; &#x6a9;&#x64a; &#x6aa;&#x648;&#x628;&#x647; &#x62e;&#x637;&#x631;&#x648; &#x646;&#x627;&#x647;&#x64a;&#x60c; &#x627;&#x646; &#x633;&#x648;&#x627;&#x644; &#x62a;&#x64a; &#x62a;&#x64a; &#x6aa;&#x64a;&#x631;&#x64a; &#x644;&#x648;&#x6af;&#x631;&#x628;&#x644; &#x6fe; &#x67e;&#x627;&#x6aa;&#x633;&#x62a;&#x627;&#x646; &#x6a9;&#x64a; &#x63a;&#x64a;&#x631; &#x645;&#x634;&#x631;&#x648;&#x637; &#x627;&#x645;&#x62f;&#x627;&#x62f; &#x68f;&#x64a;&#x6bb; &#x62c;&#x64a; &#x6b3;&#x627;&#x644;&#x647;&#x647; &#x6aa;&#x626;&#x64a; &#x648;&#x626;&#x64a; &#x622;&#x647;&#x64a;&#x60c; &#x62c;&#x68f;&#x647;&#x646; &#x62a;&#x647; &#x641;&#x648;&#x62c;&#x64a; &#x627;&#x645;&#x62f;&#x627;&#x62f; &#x62a;&#x64a; &#x634;&#x631;&#x637; &#x644;&#x627;&#x6b3;&#x648; &#x6aa;&#x64a;&#x627;
<br />
&#x660;.&#x661;.&#x662;.&#x663;.&#x664;.&#x665;.&#x666;.&#x667;.&#x668;.&#x669;
<br />
!\"#$%&'()*+,-./0123456789:;<=>?<br />
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br />
`abcdefghijklmnopqrstuvwxyz{|}~
</p>
From http://titus.uni-frankfurt.de/unicode/alphabet/arabtest.htm
<br />
1. Arabic:
<br />
&#x627; &#x640;&#x627; &#x640;&#x627;&#x640; &#x627;&#x640;
<br />
&#x628; &#x640;&#x628; &#x640;&#x628;&#x640; &#x628;&#x640;
<br />
&#x62a; &#x640;&#x62a; &#x640;&#x62a;&#x640; &#x62a;&#x640;
<br />
&#x62c; &#x640;&#x62c; &#x640;&#x62c;&#x640; &#x62c;&#x640;
<br />
&#x62d; &#x640;&#x62d; &#x640;&#x62d;&#x640; &#x62d;&#x640;
<br />
&#x62e; &#x640;&#x62e; &#x640;&#x62e;&#x640; &#x62e;&#x640;
<br />
&#x62f; &#x640;&#x62f; &#x640;&#x62f; &#x62f;
<br />
&#x630; &#x640;&#x630; &#x640;&#x630; &#x630;
<br />
&#x631; &#x640;&#x631; &#x640;&#x631; &#x631;
<br />
&#x632; &#x640;&#x632; &#x640;&#x632; &#x632;
<br />
&#x633; &#x640;&#x633; &#x640;&#x633;&#x640; &#x633;&#x640;
<br />
&#x634; &#x640;&#x634; &#x640;&#x634;&#x640; &#x634;&#x640;
<br />
&#x635; &#x640;&#x635; &#x640;&#x635;&#x640; &#x635;&#x640;
<br />
&#x636; &#x640;&#x636; &#x640;&#x636;&#x640; &#x636;&#x640;
<br />
&#x637; &#x640;&#x637; &#x640;&#x637;&#x640; &#x637;&#x640;
<br />
&#x638; &#x640;&#x638; &#x640;&#x638;&#x640; &#x638;&#x640;
<br />
&#x639; &#x640;&#x639; &#x640;&#x639;&#x640; &#x639;&#x640;
<br />
&#x63a; &#x640;&#x63a; &#x640;&#x63a;&#x640; &#x63a;&#x640;
<br />
&#x641; &#x640;&#x641; &#x640;&#x641;&#x640; &#x641;&#x640;
<br />
&#x642; &#x640;&#x642; &#x640;&#x642;&#x640; &#x642;&#x640;
<br />
&#x643; &#x640;&#x643; &#x640;&#x643;&#x640; &#x643;&#x640;
<br />
&#x644; &#x640;&#x644; &#x640;&#x644;&#x640; &#x644;&#x640;
<br />
&#x645; &#x640;&#x645; &#x640;&#x645;&#x640; &#x645;&#x640;
<br />
&#x646; &#x640;&#x646; &#x640;&#x646;&#x640; &#x646;&#x640;
<br />
&#x647; &#x640;&#x647; &#x640;&#x647;&#x640; &#x647;&#x640;
<br />
&#x648; &#x640;&#x648; &#x640;&#x648;&#x640; &#x648;&#x640;
<br />
&#x64a; &#x640;&#x64a; &#x640;&#x64a;&#x640; &#x64a;&#x640;
<br />
<br />
2. Persian:
<br />
Four extra letters: &#x67e; &#x686; &#x698; &#x6af;
<br />
&#x640;&#x67e; &#x640;&#x67e;&#x640; &#x67e;&#x640;
<br />
&#x640;&#x686; &#x640;&#x686;&#x640; &#x67e;&#x686;
<br />
&#x640;&#x698; &#x640;&#x698;&#x640; &#x698;&#x640;
<br />
&#x640;&#x6af; &#x640;&#x6af;&#x640; &#x6af;&#x640;
<br />
Original Arabic letter &#x643;
modified Persian letter &#x6a9;
<br />
Original Arabic letter &#x64a;
modified Persian letter &#x649;<br />
<br />
&#x647;&#x645;&#x647;&#x654; &#x627;&#x641;&#x631;&#x627;&#x62f; &#x628;&#x634;&#x631; &#x622;&#x632;&#x627;&#x62f; &#x628;&#x647; &#x62f;&#x646;&#x6cc;&#x627; &#x645;&#x6cc;&#x200c;&#x622;&#x6cc;&#x646;&#x62f; &#x648; &#x627;&#x632; &#x62f;&#x6cc;&#x62f; &#x62d;&#x6cc;&#x62b;&#x6cc;&#x62a; &#x648; &#x62d;&#x642;&#x648;&#x642; &#x628;&#x627; &#x647;&#x645; &#x628;&#x631;&#x627;&#x628;&#x631;&#x646;&#x62f;&#x60c; &#x647;&#x645;&#x647; &#x62f;&#x627;&#x631;&#x627;&#x6cc; &#x627;&#x646;&#x62f;&#x6cc;&#x634;&#x647; &#x648; &#x648;&#x62c;&#x62f;&#x627;&#x646; &#x647;&#x633;&#x62a;&#x646;&#x62f; &#x648; &#x628;&#x627;&#x6cc;&#x62f; &#x62f;&#x631; &#x628;&#x631;&#x627;&#x628;&#x631; &#x6cc;&#x6a9;&#x62f;&#x6cc;&#x6af;&#x631; &#x628;&#x627; &#x631;&#x648;&#x62d; &#x628;&#x631;&#x627;&#x62f;&#x631;&#x6cc; &#x631;&#x641;&#x62a;&#x627;&#x631; &#x6a9;&#x646;&#x646;&#x62f;.
<br />
<br />
3. Pashto:
<br />
<div style=\"font-family: 'XB Zar';\">
&#x627; &#x640;&#x627; &#x640;&#x627;&#x640; &#x627;&#x640;
&#x628; &#x640;&#x628; &#x640;&#x628;&#x640; &#x628;&#x640;
&#x67e; &#x640;&#x67e; &#x640;&#x67e;&#x640; &#x67e;&#x640;
&#x62a; &#x640;&#x62a; &#x640;&#x62a;&#x640; &#x62a;&#x640;
&#x67c; &#x640;&#x67c; &#x640;&#x67c;&#x640; &#x67c;&#x640;
&#x62b; &#x640;&#x62b; &#x640;&#x62b;&#x640; &#x62b;&#x640;
&#x62c; &#x640;&#x62c; &#x640;&#x62c;&#x640; &#x62c;&#x640;
&#x681; &#x640;&#x681; &#x640;&#x681;&#x640; &#x681;&#x640;
&#x686; &#x640;&#x686; &#x640;&#x686;&#x640; &#x686;&#x640;
&#x685; &#x640;&#x685; &#x640;&#x685;&#x640; &#x685;&#x640;
&#x62d; &#x640;&#x62d; &#x640;&#x62d;&#x640; &#x62d;&#x640;
&#x62e; &#x640;&#x62e; &#x640;&#x62e;&#x640; &#x62e;&#x640;
&#x62f; &#x640;&#x62f; &#x640;&#x62f;&#x640; &#x62f;&#x640;
&#x689; &#x640;&#x689; &#x640;&#x689;&#x640; &#x689;&#x640;
&#x630; &#x640;&#x630; &#x640;&#x630;&#x640; &#x630;&#x640;
&#x631; &#x640;&#x631; &#x640;&#x631;&#x640; &#x631;&#x640;
&#x693; &#x640;&#x693; &#x640;&#x693;&#x640; &#x693;&#x640;
&#x632; &#x640;&#x632; &#x640;&#x632;&#x640; &#x632;&#x640;
&#x698; &#x640;&#x698; &#x640;&#x698;&#x640; &#x698;&#x640;
&#x696; &#x640;&#x696; &#x640;&#x696;&#x640; &#x696;&#x640;
&#x633; &#x640;&#x633; &#x640;&#x633;&#x640; &#x633;&#x640;
&#x634; &#x640;&#x634; &#x640;&#x634;&#x640; &#x634;&#x640;
&#x69a; &#x640;&#x69a; &#x640;&#x69a;&#x640; &#x69a;&#x640;
&#x635; &#x640;&#x635; &#x640;&#x635;&#x640; &#x635;&#x640;
&#x636; &#x640;&#x636; &#x640;&#x636;&#x640; &#x636;&#x640;
&#x637; &#x640;&#x637; &#x640;&#x637;&#x640; &#x637;&#x640;
&#x638; &#x640;&#x638; &#x640;&#x638;&#x640; &#x638;&#x640;
&#x639; &#x640;&#x639; &#x640;&#x639;&#x640; &#x639;&#x640;
&#x63a; &#x640;&#x63a; &#x640;&#x63a;&#x640; &#x63a;&#x640;
&#x641; &#x640;&#x641; &#x640;&#x641;&#x640; &#x641;&#x640;
&#x642; &#x640;&#x642; &#x640;&#x642;&#x640; &#x642;&#x640;
&#x6a9; &#x640;&#x6a9; &#x640;&#x6a9;&#x640; &#x6a9;&#x640;
&#x6ab; &#x640;&#x6ab; &#x640;&#x6ab;&#x640; &#x6ab;&#x640;
&#x644; &#x640;&#x644; &#x640;&#x644;&#x640; &#x644;&#x640;
&#x645; &#x640;&#x645; &#x640;&#x645;&#x640; &#x645;&#x640;
&#x646; &#x640;&#x646; &#x640;&#x646;&#x640; &#x646;&#x640;
&#x6bc; &#x640;&#x6bc; &#x640;&#x6bc;&#x640; &#x6bc;&#x640;
&#x6bc; &#x640;&#x6bc; &#x640;&#x6bc;&#x640; &#x6bc;&#x640;
&#x624; &#x640;&#x624; &#x640;&#x624;&#x640; &#x624;&#x640;
&#x647; &#x640;&#x647; &#x640;&#x647;&#x640; &#x647;&#x640;
&#x6c0; &#x640;&#x6c0; &#x640;&#x6c0;&#x640; &#x6c0;&#x640;
&#x6cc; &#x640;&#x6cc; &#x640;&#x6cc;&#x640; &#x6cc;&#x640;
&#x64a; &#x640;&#x64a; &#x640;&#x64a;&#x640; &#x64a;&#x640;
&#x6d0; &#x640;&#x6d0; &#x640;&#x6d0;&#x640; &#x6d0;&#x640;
&#x6cd; &#x640;&#x6cd; &#x640;&#x6cd;&#x640; &#x6cd;&#x640;
&#x626; &#x640;&#x626; &#x640;&#x626;&#x640; &#x626;&#x640;
<br />
<br />
</div>
4. Urdu:
<br />
<div style=\"font-family: 'XB Zar';\">
&#x627; &#x640;&#x627; &#x640;&#x627;&#x640; &#x627;&#x640;
&#x628; &#x640;&#x628; &#x640;&#x628;&#x640; &#x628;&#x640;
&#x67e; &#x640;&#x67e; &#x640;&#x67e;&#x640; &#x67e;&#x640;
&#x62a; &#x640;&#x62a; &#x640;&#x62a;&#x640; &#x62a;&#x640;
&#x679; &#x640;&#x679; &#x640;&#x679;&#x640; &#x679;&#x640;
&#x62b; &#x640;&#x62b; &#x640;&#x62b;&#x640; &#x62b;&#x640;
&#x62c; &#x640;&#x62c; &#x640;&#x62c;&#x640; &#x62c;&#x640;
&#x62d; &#x640;&#x62d; &#x640;&#x62d;&#x640; &#x62d;&#x640;
&#x62e; &#x640;&#x62e; &#x640;&#x62e;&#x640; &#x62e;&#x640;
&#x62f; &#x640;&#x62f; &#x640;&#x62f;&#x640; &#x62f;&#x640;
&#x688; &#x640;&#x688; &#x640;&#x688;&#x640; &#x688;&#x640;
&#x630; &#x640;&#x630; &#x640;&#x630;&#x640; &#x630;&#x640;
&#x631; &#x640;&#x631; &#x640;&#x631;&#x640; &#x631;&#x640;
&#x691; &#x640;&#x691; &#x640;&#x691;&#x640; &#x691;&#x640;
&#x698; &#x640;&#x698; &#x640;&#x698;&#x640; &#x698;&#x640;
&#x633; &#x640;&#x633; &#x640;&#x633;&#x640; &#x633;&#x640;
&#x634; &#x640;&#x634; &#x640;&#x634;&#x640; &#x634;&#x640;
&#x635; &#x640;&#x635; &#x640;&#x635;&#x640; &#x635;&#x640;
&#x636; &#x640;&#x636; &#x640;&#x636;&#x640; &#x636;&#x640;
&#x637; &#x640;&#x637; &#x640;&#x637;&#x640; &#x637;&#x640;
&#x638; &#x640;&#x638; &#x640;&#x638;&#x640; &#x638;&#x640;
&#x639; &#x640;&#x639; &#x640;&#x639;&#x640; &#x639;&#x640;
&#x63a; &#x640;&#x63a; &#x640;&#x63a;&#x640; &#x63a;&#x640;
&#x641; &#x640;&#x641; &#x640;&#x641;&#x640; &#x641;&#x640;
&#x642; &#x640;&#x642; &#x640;&#x642;&#x640; &#x642;&#x640;
&#x6a9; &#x640;&#x6a9; &#x640;&#x6a9;&#x640; &#x6a9;&#x640;
&#x6af; &#x640;&#x6af; &#x640;&#x6af;&#x640; &#x6af;&#x640;
&#x644; &#x640;&#x644; &#x640;&#x644;&#x640; &#x644;&#x640;
&#x645; &#x640;&#x645; &#x640;&#x645;&#x640; &#x645;&#x640;
&#x646; &#x640;&#x646; &#x640;&#x646;&#x640; &#x646;&#x640;
&#x648; &#x640;&#x648; &#x640;&#x648;&#x640; &#x648;&#x640;
&#x6c1; &#xfba9; &#xfba8;
&#x6be; &#x640;&#x6be; &#x640;&#x6be;&#x640; &#x6be;&#x640;
&#x621; &#x640;&#x621; &#x640;&#x621;&#x640; &#x621;&#x640;
&#x6cc; &#x640;&#x6cc; &#x640;&#x6cc;&#x640; &#x6cc;&#x640;
&#x6d2; &#x640;&#x6d2; &#x640;&#x6d2;&#x640; &#x6d2;&#x640;
<br />
&#x62a;&#x645;&#x627;&#x645; &#x627;&#x646;&#x633;&#x627;&#x646; &#x622;&#x632;&#x627;&#x62f; &#x627;&#x648;&#x631; &#x62d;&#x642;&#x648;&#x642; &#x648; &#x639;&#x632;&#x62a; &#x6a9;&#x6d2; &#x627;&#x639;&#x62a;&#x628;&#x627;&#x631; &#x633;&#x6d2; &#x628;&#x631;&#x627;&#x628;&#x631; &#x67e;&#x6cc;&#x62f;&#x627; &#x6c1;&#x648;&#x6d3; &#x6c1;&#x6cc;&#x6ba;&#x6d4; &#x627;&#x646;&#x6c1;&#x6cc;&#x6ba; &#x636;&#x645;&#x6cc;&#x631; &#x627;&#x648;&#x631; &#x639;&#x642;&#x644; &#x648;&#x62f;&#x6cc;&#x639;&#x62a; &#x6c1;&#x648;&#x626;&#x6cc; &#x6c1;&#x6cc;&#x6d4; &#x627;&#x633;&#x644;&#x6d3; &#x627;&#x646;&#x6c1;&#x6cc;&#x6ba; &#x627;&#x6cc;&#x6a9; &#x62f;&#x648;&#x633;&#x631;&#x6d2; &#x6a9;&#x6d2; &#x633;&#x627;&#x62a;&#x6be; &#x628;&#x6be;&#x627;&#x626;&#x6cc; &#x686;&#x627;&#x631;&#x6d2; &#x6a9;&#x627; &#x633;&#x644;&#x648;&#x6a9; &#x6a9;&#x631;&#x646;&#x627; &#x686;&#x627;&#x6c1;&#x6cc;&#x6d3;&#x6d4;
<br />
<br />
</div>
5. Sindhi:
<br />
<div style=\"font-family: Arial;\">
&#x684; &#x640;&#x684; &#x640;&#x684;&#x640; &#x684;&#x640;
&#x67a; &#x640;&#x67a; &#x640;&#x67a;&#x640; &#x67a;&#x640;
&#x67d; &#x640;&#x67d; &#x640;&#x67d;&#x640; &#x67d;&#x640;
&#x67f; &#x640;&#x67f; &#x640;&#x67f;&#x640; &#x67f;&#x640;
&#x680; &#x640;&#x680; &#x640;&#x680;&#x640; &#x680;&#x640;
&#x67b; &#x640;&#x67b; &#x640;&#x67b;&#x640; &#x67b;&#x640;
&#x699; &#x640;&#x699; &#x640;&#x699;&#x640; &#x699;&#x640;
&#x68d; &#x640;&#x68d; &#x640;&#x68d;&#x640; &#x68d;&#x640;
&#x68a; &#x640;&#x68a; &#x640;&#x68a;&#x640; &#x68a;&#x640;
&#x68f; &#x640;&#x68f; &#x640;&#x68f;&#x640; &#x68f;&#x640;
&#x68c; &#x640;&#x68c; &#x640;&#x68c;&#x640; &#x68c;&#x640;
&#x687; &#x640;&#x687; &#x640;&#x687;&#x640; &#x687;&#x640;
&#x683; &#x640;&#x683; &#x640;&#x683;&#x640; &#x683;&#x640;
&#x6a6; &#x640;&#x6a6; &#x640;&#x6a6;&#x640; &#x6a6;&#x640;
&#x6bb; &#x640;&#x6bb; &#x640;&#x6bb;&#x640; &#x6bb;&#x640;
&#x6b1; &#x640;&#x6b1; &#x640;&#x6b1;&#x640; &#x6b1;&#x640;
&#x6b3; &#x640;&#x6b3; &#x640;&#x6b3;&#x640; &#x6b3;&#x640;
&#x6aa; &#x640;&#x6aa; &#x640;&#x6aa;&#x640; &#x6aa;&#x640;
<br />
&#x62c; &#x6be; &#x684; &#x62c; &#x67e; &#x62b; &#x67a; &#x67d; &#x67f; &#x62a; &#x680; &#x67b; &#x628; &#x627;
&#x699; &#x631; &#x630; &#x68d; &#x68a; &#x68f; &#x68c; &#x62f; &#x62e; &#x62d; &#x687; &#x686; &#x683;
&#x642; &#x6a6; &#x641; &#x63a; &#x639; &#x638; &#x637; &#x636; &#x635; &#x634; &#x633; &#x632; &#x699;&#x6be;
&#x64a; &#x647; &#x648; &#x6bb; &#x646; &#x645; &#x644; &#x6b1; &#x6af;&#x6be; &#x6b3; &#x6af; &#x6a9; &#x6aa;
<br />
<br />
</div>
<h4>Arabic</h4>
<p>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2<annotation content=\"\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" subject=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" icon=\"Comment\" color=\"#FE88EF\" author=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" />
\xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9 \xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7 \xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82.</p>
<p>\xd9\x87\xd9\x84 \xd8\xb3\xd8\xaa\xd8\xb3\xd9\x81\xd8\xb1 \xd8\xa7\xd9\x84\xd8\xac\xd9\x87\xd9\x88\xd8\xaf \xd8\xa7\xd9\x84\xd8\xaf\xd8\xa8\xd9\x84\xd9\x88\xd9\x85\xd8\xa7\xd8\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\x88\xd8\xb1 \xd8\xb3\xd9\x86\xd8\xaf\xda\xbe \xd9\x85\xdb\x8c\xda\xba \xda\xa9\xd8\xa6\xdb\x8c \xd8\xb3\xd9\x88\xd9\x84 \xd8\xac\xd8\xac \xd9\x85\xd8\xb3\xd8\xaa\xd8\xb9\xd9\x81\xdb\x8c \xdb\x81\xd9\x88\xda\xaf\xd8\xa6\xdb\x92 \xdb\x81\xdb\x8c\xda\xba\xdb\x94</p>
<h4>Pashto (ps)</h4>
<p style=\"font-family: 'XB Zar';\">\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a.</p>
";
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,59 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Watermarks</h2>
<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<hr />
<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div>
<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote>
<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetWatermarkText('DRAFT');
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->showWatermarkText = true;
$mpdf->WriteHTML($html);
$mpdf->AddPage();
$mpdf->SetWatermarkImage('tiger.wmf', 1, '', array(160,10));
$mpdf->showWatermarkImage = true;
$mpdf->WriteHTML('<h2>Using a Watermark as a Header</h2>');
$mpdf->WriteHTML($html);
$mpdf->AddPage();
$mpdf->SetWatermarkImage('tiger.wmf', 0.15, 'F');
$mpdf->WriteHTML('<h2>Using a Watermark Image as Background</h2>');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,36 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>Annotations</h2>
<h5>Heading 5<annotation content="This is an annotation'."\n".'in the middle of the text" subject="My Subject" icon="Comment" color="#FE88EF" author="Ian Back" /></h5>
<h6>Heading 6</h6>
<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <i>Fusce</i><annotation content="Fusce is a funny word!" subject="Idle Comments" icon="Note" author="Ian Back" pos-x="195" /> eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at <span title="This annotation was automatically defined from the title attribute of a span element">eleifend</span> lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada<annotation file="tiger.jpg" content="This is a file attachment (embedded file)
Double-click to open attached file
Right-click to save file on your computer" icon="Graph" title="Attached File: tiger.jpg" pos-x="195" /> sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->title2annots = true;
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,437 @@
<?php
$html = '
<html>
<head>
<style>
body {font-family: sans-serif;
font-size: 9pt;
background: transparent url(\'bgbarcode.png\') repeat-y scroll left top;
}
h5, p { margin: 0pt;
}
table.items {
font-size: 9pt;
border-collapse: collapse;
border: 3px solid #880000;
}
td { vertical-align: top;
}
table thead td { background-color: #EEEEEE;
text-align: center;
}
table tfoot td { background-color: #AAFFEE;
text-align: center;
}
.barcode {
padding: 1.5mm;
margin: 0;
vertical-align: top;
color: #000000;
}
.barcodecell {
text-align: center;
vertical-align: middle;
padding: 0;
}
</style>
</head>
<body>
<!--mpdf
<htmlpagefooter name="myfooter">
<div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; ">
Page {PAGENO} of {nb}
</div>
</htmlpagefooter>
<sethtmlpagefooter name="myfooter" value="on" />
mpdf-->
<h1>mPDF</h1>
<h2>Barcodes</h2>
<p>NB <b>Quiet zones</b> - The barcode object includes space to the right/left or top/bottom only when the specification states a \'quiet zone\' or \'light margin\'. All the examples below also have CSS property set on the barcode object i.e. padding: 1.5mm; </p>
<h3>EAN-13 Barcodes (EAN-2 and EAN-5)</h3>
<p>NB EAN-13, UPC-A, UPC-E, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p>
<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">EAN13</td>
<td>Standard EAN-13 barcode. Accepts 12 or 13 characters (creating checksum digit if required). [0-9] numeric only.</td>
<td class="barcodecell"><barcode code="978-0-9542246-0" text="1" class="barcode" /></td>
</tr>
<tr>
<td align="center">ISBN</td>
<td>Standard EAN-13 barcode with \'ISBN\' number shown above [shown at height="0.66"]</td>
<td class="barcodecell"><barcode code="978-0-9542246-0" type="ISBN" class="barcode" height="0.66" text="1" /></td>
</tr>
<tr>
<td align="center">ISSN</td>
<td>Standard EAN-13 barcode with \'ISSN\' number shown above [shown at size="0.8"]</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8" type="ISSN" size="0.8" class="barcode" text="1" /></td>
</tr>
</tbody>
</table>
<h3>EAN-8, UPC-A and UPC-E Barcodes</h3>
<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p>
<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">UPCA</td>
<td>UPC-A barcode. This is a subset of the EAN-13. (098277211236) Accepts 11 or 12 characters (creating checksum digit if required). [0-9] numeric only</td>
<td class="barcodecell"><barcode code="09827721123" type="UPCA" class="barcode" /></td>
</tr>
<tr>
<td align="center">UPCE</td>
<td>UPC-E barcode. Requires the UPC-A code to be entered as above (e.g. 042100005264 to give 425261). NB mPDF will die with an error message if the code is not valid, as only some UPC-A codes can be converted into valid UPC-E codes. UPC-E doesn\'t have a check digit encoded explicity, rather the check digit is encoded in the parity of the other six characters. The check digit that is encoded is the check digit from the original UPC-A barcode.</td>
<td class="barcodecell"><barcode code="04210000526" type="UPCE" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN8</td>
<td>EAN-8. Accepts 7 or 8 characters (creating checksum digit if required). [0-9] numeric only</td>
<td class="barcodecell"><barcode code="2468123" type="EAN8" class="barcode" /></td>
</tr>
</tbody>
</table>
<h3>EAN-2 and EAN-5 supplements, and combined forms</h3>
<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">EAN2</td>
<td colspan="2">EAN-2 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Used to denote an issue of a periodical. EAN-2 supplement accepts 2 digits [0-9] only, EAN-5 five.</td>
</tr>
<tr>
<td align="center">EAN5</td>
<td colspan="2">EAN-5 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Usually used in conjunction with EAN-13 for the price of books. 90000 is the code for no price. </td>
</tr>
<tr>
<td align="center">EAN13P2</td>
<td>Standard EAN-13 barcode with 2-digit UPC supplement (07)</td>
<td class="barcodecell"><barcode code="978-0-9542246-0 07" type="EAN13P2" class="barcode" /></td>
</tr>
<tr>
<td align="center">ISBNP2</td>
<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 2-digit EAN-2 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISBNP2" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">ISSNP2</td>
<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 2-digit EAN-2 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISSNP2" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">UPCAP2</td>
<td>UPC-A barcode with 2-digit EAN-2 supplement. This is a subset of the EAN-13. </td>
<td class="barcodecell"><barcode code="00633895260 24" type="UPCAP2" class="barcode" /></td>
</tr>
<tr>
<td align="center">UPCEP2</td>
<td>UPC-E barcode with 2-digit EAN-2 supplement. </td>
<td class="barcodecell"><barcode code="042100005264 07" type="UPCEP2" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN8P2</td>
<td>EAN-8 barcode with 2-digit EAN-2 supplement</td>
<td class="barcodecell"><barcode code="5512345 07" type="EAN8P2" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN13P5</td>
<td>Standard EAN-13 barcode with 5-digit UPC supplement (90000)</td>
<td class="barcodecell"><barcode code="978-0-9542246-0 90000" type="EAN13P5" class="barcode" /></td>
</tr>
<tr>
<td align="center">ISBNP5</td>
<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 5-digit EAN-5 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISBNP5" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">ISSNP5</td>
<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 5-digit EAN-5 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISSNP5" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">UPCAP5</td>
<td>UPC-A barcode with 5-digit EAN-5 supplement. This is a subset of the EAN-13</td>
<td class="barcodecell"><barcode code="07567816412 90000" type="UPCAP5" class="barcode" /></td>
</tr>
<tr>
<td align="center">UPCEP5</td>
<td>UPC-E barcode with 5-digit EAN-5 supplement. (042100005264 90000)</td>
<td class="barcodecell"><barcode code="042100005264 90000" type="UPCEP5" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN8P5</td>
<td>EAN-8 barcode with 5-digit EAN-5 supplement (55123457 90000)</td>
<td class="barcodecell"><barcode code="55123457 90000" type="EAN8P5" class="barcode" /></td>
</tr>
</tbody>
</table>
<h3>Postcode Barcodes</h3>
<p>These all have sizes fixed by their specification. Although they can be altered using \'size\' it is not recommended. \'height\' is ignored.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">IMB</td>
<td>Intelligent Mail Barcode - also known as: USPS OneCode 4-State Customer Barcode, OneCode 4CB, USPS 4CB, 4-CB, 4-State Customer Barcode, USPS OneCode Solution Barcode. (01234567094987654321-01234567891) Accepts: Up to 31 digits (required 20-digit Tracking Code, and up to 11-digit Routing Code; this may be 0, 5, 9, or 11 digits). If the Routing code is included, it should be spearated by a hyphen - like this example.</td>
<td class="barcodecell"><barcode code="01234567094987654321-01234567891" type="IMB" class="barcode" /></td>
</tr>
<tr>
<td align="center">RM4SCC</td>
<td>Royal Mail 4-state Customer barcode (SN34RD1A). Accepts: max. 9 characters. Valid characters: [A-Z,0-9] Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="SN34RD1A" type="RM4SCC" class="barcode" /></td>
</tr>
<tr>
<td align="center">KIX</td>
<td>Dutch KIX version of Royal Mail 4-state Customer barcode (SN34RD1A). Valid characters: [A-Z,0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="SN34RD1A" type="KIX" class="barcode" /></td>
</tr>
<tr>
<td align="center">POSTNET</td>
<td>POSTNET barcode. Accepts 5, 9 or 11 digits. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="123456789" type="POSTNET" class="barcode" /></td>
</tr>
<tr>
<td align="center">PLANET</td>
<td>PLANET barcode. Accepts 11 or 13 digits. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="00123456789" type="PLANET" class="barcode" /></td>
</tr>
</tbody>
</table>
<h3>Variable width Barcodes</h3>
<p>These barcodes are all of variable length depending on the code entered. There is no recommended maximum size for any of these specs, but all recommend a minimum X-dimension (width of narrowest bar) as 7.5mil (=0.19mm). The default used here is twice the minimum i.e. X-dim = 0.38mm.</p>
<p>The specifications give a minimum height of 15% of the barcode length (which can be variable). The bar height in mPDF is set to a default value of 10mm. </p>
<p>\'size\' will scale the barcode in both dimensions. mPDF will accept any number, but bear in mind that size="0.5" will set the bar width to the minimum. The \'height\' attribute further allows scaling - this factor is applied to already scaled barcode. Thus size="2" height="0.5" will give a barcode twice the default width (X-dim=0.76mm) and at the default height set in mPDF i.e. 10mm.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<tr>
<td align="center">C128A</td>
<td>CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="CODE 128 A" type="C128A" class="barcode" /></td>
</tr>
<tr>
<td align="center">C128B</td>
<td>CODE 128 B. Valid characters: [Upper / Lower Case + All ASCII Printable Characters]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="ABC123abc@456" type="C128B" class="barcode" /></td>
</tr>
<tr>
<td align="center">C128C</td>
<td>CODE 128 C. Valid characters: [0-9]. Must be an even number of digits. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="0123456789" type="C128C" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN128C [A/B/C]</td>
<td>EAN128 (A, B, and C). Specified variant of Code 128, utilising an FNC1 start code. Also known as UCC/EAN-128 or GS1-128. Valid characters: [cf. Code 128]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="0112345678912343" type="EAN128C" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39</td>
<td>CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. Valid characters: [0-9 A-Z \'-\' . Space $/+%]</td>
<td class="barcodecell"><barcode code="TEC-IT" type="C39" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39+</td>
<td>CODE 39 + CHECKSUM. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="39OR93" type="C39+" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39E</td>
<td>CODE 39 EXTENDED. Valid characters: [ASCII-characters between 0..127]</td>
<td class="barcodecell"><barcode code="CODE 39 E" type="C39E" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39E+</td>
<td>CODE 39 EXTENDED + CHECKSUM. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="CODE 39 E+" type="C39E+" class="barcode" /></td>
</tr>
<tr>
<td align="center">S25</td>
<td>Standard 2 of 5. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="54321068" type="S25" class="barcode" /></td>
</tr>
<tr>
<td align="center">S25+</td>
<td>Standard 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="54321068" type="S25+" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25</td>
<td>Interleaved 2 of 5. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="54321068" type="I25" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25+</td>
<td>Interleaved 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="54321068" type="I25+" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25B</td>
<td>Interleaved 2 of 5 with bearer bars. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="1234567" type="I25B" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25B+</td>
<td>Interleaved 2 of 5 + CHECKSUM with bearer bars. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="1234567" type="I25B+" class="barcode" /></td>
</tr>
<tr>
<td align="center">C93</td>
<td>CODE 93 - USS-93 (extended). Valid characters: [ASCII-characters between 0..127]. Checksum digits: automatic.</td>
<td class="barcodecell"><barcode code="39OR93" type="C93" class="barcode" /></td>
</tr>
<tr>
<td align="center">MSI</td>
<td>MSI. Modified Plessey. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="01234567897" type="MSI" class="barcode" /></td>
</tr>
<tr>
<td align="center">MSI+</td>
<td>MSI + CHECKSUM (module 11). Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="0123456789" type="MSI+" class="barcode" /></td>
</tr>
<tr>
<td align="center">CODABAR</td>
<td>CODABAR. Valid characters: [0-9 \'-\' $:/.+ ABCD] ABCD are used as stop and start characters e.g. A34698735B</td>
<td class="barcodecell"><barcode code="A34698735B" type="CODABAR" class="barcode" /></td>
</tr>
<tr>
<td align="center">CODE11</td>
<td>CODE 11. Valid characters: [0-9 and \'-\']. Checksum digits: 1 (or 2 if length of code is > 10 characters) - automatic.</td>
<td class="barcodecell"><barcode code="123-456-789" type="CODE11" class="barcode" /></td>
</tr>
</tbody>
</table>
<!-- QR-CODE
<h3>2D Code (QR-code)</h3>
<p>A nominal height and width for these barcodes is set as 25mm. \'size\' will scale both the height and width.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<tr>
<td align="center">QR-code</td>
<td>QR-code. Accepts numeric, alphanumeric or binary input, with specified error level: L, M, Q, H.</td>
<td class="barcodecell"><barcode code="Your message here" type="QR" class="barcode" size="0.8" error="M" /></td>
</tr>
</tbody>
</table>
-->
<br />
<div>
<h5>Useful links</h5>
<p><a href="http://www.adams1.com">http://www.adams1.com</a></p>
<p><a href="http://www.tec-it.com/Download/PDF/Barcode_Reference_EN.pdf">http://www.tec-it.com/Download/PDF/Barcode_Reference_EN.pdf</a></p>
<p><a href="http://www.tec-it.com/en/support/knowbase/symbologies/barcode-overview/linear/Default.aspx">http://www.tec-it.com/en/support/knowbase/symbologies/barcode-overview/linear/Default.aspx</a></p>
<p><a href="http://www.gs1uk.org/downloads/bar_code/Bar%20coding%20getting%20it%20right.pdf">http://www.gs1uk.org/downloads/bar_code/Bar%20coding%20getting%20it%20right.pdf</a></p>
<p><a href="http://web.archive.org/web/19990501035133/http://www.uc-council.org/d36-d.htm">http://web.archive.org/web/19990501035133/http://www.uc-council.org/d36-d.htm (EAN2 and EAN5)</a></p>
<p><a href="http://www.barcodeisland.com/ean13.phtml">http://www.barcodeisland.com/ean13.phtml (UPC-A)</a></p>
<p><a href="http://www.idautomation.com/fonts/postnet/#Specifications">http://www.idautomation.com/fonts/postnet/#Specifications</a></p>
<p><a href="http://www.outputlinks.com/sites/AFP/ibm_bcocafaq.pdf">http://www.outputlinks.com/sites/AFP/ibm_bcocafaq.pdf</a></p>
<p><a href="https://ribbs.usps.gov/intelligentmail_mailpieces/documents/tech_guides/USPSIMB_Tech_Resource_Guide.pdf">https://ribbs.usps.gov/intelligentmail_mailpieces/documents/tech_guides/USPSIMB_Tech_Resource_Guide.pdf (Intelligent Mail)</a></p>
<p><a href="http://www.mailsorttechnical.com/downloads_mailsort_user_guide.cfm">http://www.mailsorttechnical.com/downloads_mailsort_user_guide.cfm</a></p>
<p><a href="http://www.mailsorttechnical.com/docs/mug_jun_2009/MUG_10_2008_Mailsort_700.pdf">http://www.mailsorttechnical.com/docs/mug_jun_2009/MUG_10_2008_Mailsort_700.pdf</a> page 20</p>
</div>
<pagebreak />
<div>
<h3>Human-readable text</h3>
Human-readable text is only produced as part of the barcode object in EAN-13, ISBN, ISSN, EAN-8, UPC-A and UPC-E. Here is an example to add text to a barcode:
</div>
<div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;">
&lt;div style="position:fixed; right: 50mm; top: 60mm; border: 0.2mm solid #000000; text-align: center; padding: 0.5mm; padding-top: 2mm;"&gt;<br />
&lt;barcode code="00034698735346987355" type="EAN128C" /&gt;&lt;br /&gt;<br />
&lt;div style="font-family: ocrb;"&gt;(00) 0346987 35346987 355&lt;/div&gt;<br />
&lt;/div&gt;
</div>
<div style="position:fixed; right: 50mm; top: 60mm; border: 0.2mm solid #000000; text-align: center; padding: 0.5mm; padding-top: 2mm;">
<barcode code="00034698735346987355" type="EAN128C" /><br />
<div style="font-family: ocrb;">(00) 0346987 35346987 355</div>
</div>
</body>
</html>
';
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('','','','',20,15,25,25,10,10);
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,43 @@
<?php
$html = '
<style>
dottab.menu {
outdent: 4em;
}
p.menu {
text-align: left;
padding-right: 4em;
}
</style>
<h3>Menu</h3>
<div style="border: 0.2mm solid #000088; padding: 1em;">
<p class="menu">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus <dottab class="menu" />&nbsp;&pound;37.00</p>
<p class="menu">Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat <dottab class="menu" />&nbsp;&pound;3700.00</p>
<p class="menu">Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus <dottab class="menu" />&nbsp;&pound;27.00</p>
<p class="menu">Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod <dottab class="menu" />&nbsp;&pound;7.00</p>
<p class="menu">Donec et nulla. Sed quis orci <dottab class="menu" />&nbsp;&pound;1137.00</p>
</div>
';
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,31 @@
<?php
$html = '
<h1>mPDF</h1>
<h2>PDFA Compliance</h2>
<p>PDF/A1-b is a file format for the long-term archiving of electronic documents. This is an example of a PDF/A1-b compliant files.</p>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->PDFA = true;
$mpdf->PDFAauto = true;
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,20 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->SetImportUse();
$mpdf->Thumbnail('sample_orientation2.pdf', 4, 5); // number per row // spacing in mm
$mpdf->WriteHTML('<pagebreak /><div>Now with rotated pages</div>');
$mpdf->Thumbnail('sample_orientation3.pdf', 4); // number per row // spacing in mm
$mpdf->Output();
exit;
?>

View file

@ -0,0 +1,36 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('','','','',15,15,57,16,9,9);
$mpdf->SetImportUse();
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetCompression(false);
// Add First page
$pagecount = $mpdf->SetSourceFile('sample_basic.pdf');
$crop_x = 50;
$crop_y = 50;
$crop_w = 100;
$crop_h = 100;
$tplIdx = $mpdf->ImportPage(2, $crop_x, $crop_y, $crop_w, $crop_h);
$x = 50;
$y = 50;
$w = 100;
$h = 100;
$mpdf->UseTemplate($tplIdx, $x, $y, $w, $h);
$mpdf->Rect($x, $y, $w, $h);
$mpdf->Output('newpdf.pdf', 'I');
exit;
?>

View file

@ -0,0 +1,35 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('','','','',15,15,47,16,9,9);
$mpdf->SetImportUse();
$mpdf->SetDocTemplate('sample_logoheader2.pdf',1); // 1|0 to continue after end of document or not - used on matching page numbers
//===================================================
$mpdf->AddPage();
$mpdf->WriteHTML('Hallo World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hallo World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hallo World');
//===================================================
$mpdf->RestartDocTemplate();
//===================================================
$mpdf->AddPage();
$mpdf->WriteHTML('Hallo World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hallo World');
$mpdf->AddPage();
$mpdf->WriteHTML('Hallo World');
//===================================================
$mpdf->Output();
exit;
?>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,150 @@
<?php
// First write all your entries to a PDF file, forcing each entry to fit on one page
include("../mpdf.php");
// Define the maximum containing box width & height for each text box as it will appear on the final page (no padding or margin here)
$pw = 80;
$ph = 110;
$minK = 0.7; // Maximum scaling factor 0.7 = 70%
$inc = 0.01; // Increment to change scaling factor 0.05 = 5%
$spacing = 10; // millimetres (vertically and horizonatlly between boxes in output) shrinks if boxes too big
$border = 3; // millimetres round final boxes (-1 for no border)
$align = 'T'; // T(op) or M(iddle) for content of final output boxes
// Only change the first parameter of the next line e.g. utf-8
$mpdf = new mPDF('', array(($pw*(1/$minK)),($ph*(1/$minK))), '','', 0,($pw*(1/$minK))-$pw,0,($ph*(1/$minK))-$ph,0,0);
$pph = array();
// FOR EACH ENTRY FOR YOUR YEARBOOK saving the page height in $pph (where $html is the HTML code for the entry):
// $pph[$i] = SinglePage($html, $pw, $ph, $minK);
//==============================================================
// .. but we will use this for an example
$html1 = '
<style>
div { text-align: justify; }
</style>
<h2>Joanne Smith 2002-2007</h2><div>This is the normal text in the div: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque, <img src="tiger.wmf" width="100" style="float: right; margin: 4px; " /> risus at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed,<img src="tiger.jpg" width="100" style="float: left; margin: 4px; " /> nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </div>
';
$html2 = '
<style>
div { text-align: justify; }
</style>
<h2>Tim Another 2001-2007</h2><div>This is the normal text in the div: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque, <img src="tiger.jpg" width="100" style="float: right; margin: 4px; " /> risus at eleifend lacus sapien et risus. Phasellus metus, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. <br />
Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </div>
';
for($i=1; $i<=10; $i++) {
// $html = $html;
if ($i % 3 == 1) { $html = $html2; }
else { $html = $html1; }
$pph[$i] = SinglePage($html, $pw, $ph, $minK) ; // $pph saves the actual height of each page
}
//==============================================================
// Save the pages to a file
$mpdf->Output('test.pdf','F');
// Now collate those pages using IMPORT - 4 pages to one page
$mpdf=new mPDF();
$mpdf->SetImportUse();
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetHeader('{DATE j-m-Y}|My Yearbook 2005|{PAGENO}');
$mpdf->SetFooter('|Printed using mPDF|');
$pagecount = $mpdf->SetSourceFile('test.pdf');
for($i=1; $i<=$pagecount; $i++) {
if ($i % 4 == 1) { $mpdf->AddPage(); }
$pgheight = $mpdf->h - $mpdf->tMargin - $mpdf->bMargin;
$hspacing = min($spacing,($mpdf->pgwidth - $pw*2) );
$vspacing = min($spacing,($pgheight - $ph*2) );
$x1 = $mpdf->lMargin + ($mpdf->pgwidth/2 - $hspacing/2 - $pw)/2;
$x2 = $mpdf->lMargin + $mpdf->pgwidth/2 + $hspacing/2 + ($mpdf->pgwidth/2 - $hspacing/2 - $pw)/2;
$y1 = $mpdf->tMargin + ($pgheight /2 - $vspacing/2 - $ph)/2;
$y2 = $mpdf->tMargin + $pgheight /2 + $vspacing/2 + ($pgheight /2 - $vspacing/2 - $ph)/2;
if ($i % 4 == 1) { $x = $x1; $y = $y1; }
else if ($i % 4 == 2) { $x = $x2; $y = $y1; }
else if ($i % 4 == 3) { $x = $x1; $y = $y2; }
else if ($i % 4 == 0) { $x = $x2; $y = $y2; }
$tplIdx = $mpdf->ImportPage($i, 0,0,$pw,$pph[$i]);
if ($align=='T') { $mpdf->UseTemplate($tplIdx, $x, $y, $pw, $pph[$i]); }
else { $mpdf->UseTemplate($tplIdx, $x, ($y + (($ph - $pph[$i])/2)), $pw, $pph[$i]); }
if ($border >= 0) { $mpdf->Rect($x-$border, $y-$border, $pw+2*$border, $ph+2*$border); }
}
$mpdf->Output();
exit;
//==============================================================
function SinglePage($html, $pw, $ph, $minK=1, $inc=0.1) {
// returns height of page
global $mpdf;
$mpdf->AddPage('','','','','','',($mpdf->w - $pw),'',($mpdf->h - $ph),0,0);
$k = 1;
$currpage = $mpdf->page;
$mpdf->WriteHTML($html);
$newpage = $mpdf->page;
while($currpage != $newpage) {
for($u=0;$u<=($newpage-$currpage);$u++) {
// DELETE PAGE - the added page
unset($mpdf->pages[$mpdf->page]);
if (isset($mpdf->ktAnnots[$mpdf->page])) { unset( $mpdf->ktAnnots[$mpdf->page] ); }
if (isset($mpdf->tbrot_Annots[$mpdf->page])) { unset( $mpdf->tbrot_Annots[$mpdf->page] ); }
if (isset($mpdf->kwt_Annots[$mpdf->page])) { unset( $mpdf->kwt_Annots[$mpdf->page] ); }
if (isset($mpdf->PageAnnots[$mpdf->page])) { unset( $mpdf->PageAnnots[$mpdf->page] ); }
if (isset($mpdf->ktBlock[$mpdf->page])) { unset( $mpdf->ktBlock[$mpdf->page] ); }
if (isset($mpdf->PageLinks[$mpdf->page])) { unset( $mpdf->PageLinks[$mpdf->page] ); }
if (isset($mpdf->pageoutput[$mpdf->page])) { unset( $mpdf->pageoutput[$mpdf->page] ); }
// Go to page before - so can addpage
$mpdf->page--;
}
// mPDF 2.4 Float Images
if (count($mpdf->floatbuffer)) {
$mpdf->objectbuffer[] = $mpdf->floatbuffer['objattr'];
$mpdf->printobjectbuffer(false);
$mpdf->objectbuffer = array();
$mpdf->floatbuffer = array();
$mpdf->float = false;
}
$k += $inc;
if ((1/$k) < $minK) { die("Page no. ".$mpdf->page." is too large to fit"); }
$w = $pw * $k;
$h = $ph * $k;
$mpdf->_beginpage('','',($mpdf->w - $w),'',($mpdf->h - $h));
$currpage = $mpdf->page;
$mpdf->_out('2 J');
$mpdf->_out(sprintf('%.2f w',0.1*$mpdf->k));
$mpdf->SetFont($mpdf->default_font,'',$mpdf->default_font_size ,true,true); // forces write
$mpdf->SetDrawColor(0);
$mpdf->SetFillColor(255);
$mpdf->SetTextColor(0);
$mpdf->ColorFlag=false;
// Start Transformation
$mpdf->StartTransform();
$mpdf->transformScale((100/$k), (100/$k), 0, 0);
$mpdf->WriteHTML($html);
$newpage = $mpdf->page;
//Stop Transformation
$mpdf->StopTransform();
}
return ($mpdf->y / $k);
}
?>

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

@ -0,0 +1,41 @@
<?php
ini_set("memory_limit","384M");
// This is because changelog.txt contains over 100000 characters, and preg_* functions in mPDF won't work.
ini_set("pcre.backtrack_limit","200000");
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->tabSpaces = 6;
$mpdf->allow_charset_conversion=true;
$mpdf->charset_in='windows-1252';
//==============================================================
$html = '
<h1>mPDF</h1>
<h2>ChangeLog</h2>
<div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;">
';
$lines = file('../CHANGELOG.txt');
$html .= '<pre>';
foreach($lines AS $line) {
$html .= htmlspecialchars($line);
}
$html .= '</pre>';
$html .= '</div>';
//==============================================================
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
?>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,615 @@
<?php
$html = '
<style>
body { font-family: sans; }
h4, p { margin: 0pt;
}
h5 { margin-bottom: 0; }
table.items {
font-size: 9pt;
border-collapse: collapse;
border: 3px solid #880000;
background-color: #FFFFFF;
}
td { vertical-align: top;
}
table thead td { background-color: #EEEEEE;
text-align: center;
}
table tfoot td { background-color: #AAFFEE;
text-align: center;
}
.barcode {
padding: 1.5mm;
margin: 0;
vertical-align: top;
color: #000000;
}
.barcodecell {
text-align: center;
vertical-align: middle;
padding: 0;
}
@page {
background-gradient: linear #00FFFF #FFFF00 0 0.5 1 0.5;
odd-header-name: html_myHTMLHeaderOdd;
even-header-name: html_myHTMLHeaderEven;
odd-footer-name: html_myHTMLFooterOdd;
even-footer-name: html_myHTMLFooterEven;
}
#myfixed {
position: fixed;
overflow: auto;
height: 60mm;
margin-left: auto;
right: 30mm;
top: 150mm;
border: 1px solid #880000;
background-color: #EEDDFF;
padding: 3em;
text-align: justify;
text-indent: 3em;
font-size: 10pt;
font-family:sans;
font-style: italic;
line-height: 1.8;
color: red;
}
.myfixed2 { position: absolute;
overflow: visible;
left: 0;
right: 0;
width: 100mm;
top: 40mm;
margin-left: auto;
margin-right: auto;
border: 1px solid #000088;
background-color: #EEDDFF;
background: transparent url(\'bg.jpg\') repeat scroll right top;
padding: 1.5em;
font-family:sans;
}
.myfixed3 { position: absolute;
overflow: visible;
right: 0;
bottom: 0;
border: 1px solid #000088;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 1.5em;
font-family:sans;
}
.myfixed4 { position: absolute;
overflow: auto;
left: 150mm;
right: 0;
top: 100mm;
height: 10mm;
border: 1px solid #000088;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
font-family:sans;
}
.myfixed5 { position: absolute;
overflow: visible;
left: 150mm;
right: 0;
top: 125mm;
height: 10mm;
border: 1px solid #000088;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
font-family:sans;
}
.myfixed6 { position: absolute;
overflow: hidden;
right: 150mm;
left: 0;
top: 110mm;
height: 10mm;
border: 1px solid #000088;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
font-family:sans;
}
.myfixed7 { position: absolute;
right: 140mm;
top: 130mm;
width: auto;
border: 1px solid #000088;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
font-family:sans;
}
div.indic, div.arabic {
font-size: 14pt;
}
div.indic h5, div.arabic h5 {
margin: 0;
}
div.indic p, div.arabic p, div.arabic li {
margin: 0;
margin-botom: 1em;
line-height: 1.8;
}
div.arabic p, div.arabic h5, div.arabic h4, div.arabic td {
text-align: right;
}
div.arabic td {
text-align: right;
font-size: 14pt;
padding: 1em;
}
h2 { color: #880000; margin-bottom: 0.2em; }
h4 { margin-bottom: 0.2em; }
</style>
<htmlpageheader name="myHTMLHeaderOdd" style="display:none">
<div style="background-color:#BBEEFF" align="center"><b>Page {PAGENO} of {nb}</b></div>
</htmlpageheader>
<htmlpageheader name="myHTMLHeaderEven" style="display:none">
<div style="background-color:#EFFBBE" align="center"><b><i>{PAGENO}</i></b></div>
</htmlpageheader>
<htmlpagefooter name="myHTMLFooterOdd" style="display:none">
<div style="background-color:#CFFFFC" align="center"><b>{PAGENO}</b></div>
</htmlpagefooter>
<htmlpagefooter name="myHTMLFooterEven" style="display:none">
<div style="background-color:#FFCCFF" align="center"><b><i>{PAGENO}</i></b></div>
</htmlpagefooter>
<h1>mPDF Version 4.0 New features</h1>
<ul><li>Ability to embed font subsets (much smaller files)</li>
<li>Support for Fixed position block elements</li>
<li>Support for Indic languages including consonant conjuncts</li>
<li>Much improved support for Arabic languages</li>
<li>New utility to help create your own fonts</li>
<li>Increased support for barcodes</li>
</ul>
<h2>Indic Fonts/Languages</h2>
<h5>From BBC World Service Hindi News (http://www.bbc.co.uk/hindi/)</h5>
<div class="indic">
<h4 lang="hi">&#x915;&#x941;&#x91b; &#x914;&#x930; &#x924;&#x925;&#x94d;&#x92f; &#x92a;&#x949;&#x92a;</h4>
<p lang="hi">&#x91c;&#x948;&#x915;&#x94d;&#x938;&#x928; &#x92e;&#x93e;&#x92e;&#x932;&#x947; &#x938;&#x947; &#x91c;&#x941;&#x921;&#x93c;&#x947; &#x928;&#x90f; &#x924;&#x925;&#x94d;&#x92f; &#x938;&#x93e;&#x92e;&#x928;&#x947; &#x906;&#x90f;.</p>
</div>
<h5>From BBC World Service Tamil News (http://www.bbc.co.uk/tamil/)</h5>
<div class="indic">
<h4 lang="ta">&#xb9a;&#xbc6;&#xbaf;&#xbcd;&#xba4;&#xbbf;&#xbaf;&#xbb0;&#xb99;&#xbcd;&#xb95;&#xbae;&#xbcd;</h4>
<p lang="ta">&#xb87;&#xbb2;&#xb99;&#xbcd;&#xb95;&#xbc8;&#xbaf;&#xbbf;&#xbb2;&#xbcd; &#xb9a;&#xbbf;&#xbb1;&#xbc1;&#xbaa;&#xbbe;&#xba9;&#xbcd;&#xbae;&#xbc8;&#xb95;&#xbcd; &#xb95;&#xb9f;&#xbcd;&#xb9a;&#xbbf;&#xb95;&#xbb3;&#xbc1;&#xb95;&#xbcd;&#xb95;&#xbbf;&#xb9f;&#xbc8;&#xbaf;&#xbbf;&#xbb2;&#xbcd; &#xbaa;&#xbca;&#xba4;&#xbc1; &#xb87;&#xba3;&#xb95;&#xbcd;&#xb95;&#xbaa;&#xbcd;&#xbaa;&#xbbe;&#xb9f;&#xbcd;&#xb9f;&#xbc8; &#xb8e;&#xb9f;&#xbcd;&#xb9f;&#xbc1;&#xbae;&#xbcd; &#xbae;&#xbc1;&#xbaf;&#xbb1;&#xbcd;&#xb9a;&#xbbf;&#xbaf;&#xbbf;&#xbb2;&#xbcd; ...</p>
</div>
<h5>From Yahoo Indian- Malayalam (http://in.malayalam.yahoo.com/)</h5>
<div class="indic">
<h4 lang="ml">&#xd2a;&#xd34;&#xd36;&#xd4d;&#xd36;&#xd3f;&#xd30;&#xd3e;&#xd1c; &#xd2e;&#xd46;&#xd17;&#xd3e;&#xd39;&#xd3f;&#xd31;&#xd4d;&#xd31;&#xd4d;; &#x2018;&#xd38;&#xd4d;&#xd35;.&#xd32;&#xd47;&#x2019; &#xd2e;&#xd41;&#xd28;&#xd4d;&#xd28;&#xd47;&#xd31;&#xd41;&#xd28;&#xd4d;&#xd28;&#xd41;</h4>
<p lang="ml">&#xd2a;&#xd34;&#xd36;&#xd4d;&#xd36;&#xd3f;&#xd30;&#xd3e;&#xd1c; &#xd2e;&#xd32;&#xd2f;&#xd3e;&#xd33; &#xd38;&#xd3f;&#xd28;&#xd3f;&#xd2e;&#xd2f;&#xd41;&#xd1f;&#xd46; &#xd1a;&#xd30;&#xd3f;&#xd24;&#xd4d;&#xd30;&#xd24;&#xd4d;&#xd24;&#xd3f;&#xd32;&#xd46; &#xd0f;&#xd31;&#xd4d;&#xd31;&#xd35;&#xd41;&#xd02; &#xd35;&#xd32;&#xd3f;&#xd2f; &#xd35;&#xd3f;&#xd1c;&#xd2f;&#xd2e;&#xd3e;&#xd15;&#xd41;&#xd15;&#xd2f;&#xd3e;&#xd23;&#xd4d;. 30 &#xd26;&#xd3f;&#xd35;&#xd38;&#xd19;&#xd4d;&#xd19;&#xd33;&#xd4d;&#x200d; &#xd2a;&#xd3f;&#xd28;&#xd4d;&#xd28;&#xd3f;&#xd1f;&#xd4d;&#xd1f;&#xd2a;&#xd4d;&#xd2a;&#xd4b;&#xd33;&#xd4d;&#x200d; &#xd1a;&#xd3f;&#xd24;&#xd4d;&#xd30;&#xd24;&#xd4d;&#xd24;&#xd3f;&#xd28;&#xd4d;&#x200d;&#xd31;&#xd46; &#xd15;&#xd33;&#xd15;&#xd4d;&#xd37;&#xd28;&#xd4d;&#x200d; 12 &#xd15;&#xd4b;&#xd1f;&#xd3f;...</p>
</div>
<h5>From Yahoo Indian- Punjabi (http://in.punjabi.yahoo.com/)</h5>
<div class="indic">
<h4 lang="pa">&#xa1a;&#xa3e;&#xa02;&#xa38; &#xa2a;&#xa47; &#xa21;&#xa3e;&#xa02;&#xa38; &#xa36;&#xa3e;&#xa39;&#xa3f;&#xa26; &#xa26;&#xa40; &#xa15;&#xa39;&#xa3e;&#xa23;&#xa40;</h4>
<p lang="pa">&#xa15;&#xa47;&#xa28; &#xa18;&#xa4b;&#xa36; &#xa26;&#xa40; &#xa5e;&#xa3f;&#xa32;&#xa2e; &#xa1a;&#xa3e;&#xa02;&#xa38; &#xa2a;&#xa47; &#xa21;&#xa3e;&#xa02;&#xa38; &#xa5e;&#xa3f;&#xa32;&#xa2e; &#xa35;&#xa3f;&#xa71;&#xa1a; &#xa36;&#xa3e;&#xa39;&#xa3f;&#xa26; &#xa15;&#xa2a;&#xa42;&#xa30; &#xa2e;&#xa41;&#xa71;&#xa16; &#xa2d;&#xa42;&#xa2e;&#xa3f;&#xa15;&#xa3e; &#xa35;&#xa3f;&#xa71;&#xa1a; &#xa39;&#xa28;&#x964; &#xa5e;&#xa3f;&#xa32;&#xa2e; &#xa26;&#xa47; &#xa2c;&#xa3e;&#xa30;&#xa47; &#xa35;&#xa3f;&#xa71;&#xa1a; &#xa15;&#xa3f;&#xa39;&#xa3e; &#xa1c;&#xa3e; &#xa38;&#xa15;&#xa26;&#xa3e; &#xa39;&#xa48; &#xa15;&#xa3f; &#xa07;&#xa39; &#xa06;&#xa2a; &#xa36;&#xa3e;&#xa39;&#xa3f;&#xa26; &#xa26;&#xa40; &#xa15;&#xa39;&#xa3e;&#xa23;&#xa40; &#xa39;&#xa48;&#x964; &#xa5e;&#xa3f;&#xa32;&#xa2e; &#xa26;&#xa3e; &#xa28;&#xa3e;&#xa07;&#xa15; &#xa2e;&#xa71;&#xa27;&#xa2e; &#xa2a;&#xa30;&#xa3f;&#xa35;&#xa3e;&#xa30; &#xa26;&#xa3e; &#xa26;&#xa71;&#xa38;&#xa3f;&#xa06; &#xa17;&#xa3f;&#xa06; &#xa39;&#xa48; &#xa05;&#xa24;&#xa47; &#xa15;&#xa08;...</p>
</div>
<h5>From Yahoo Indian- Gujarati (http://in.gujarati.yahoo.com/)</h5>
<div class="indic">
<h4 lang="gu">&#xab6;&#xabf;&#xab2;&#xacd;&#xaaa;&#xabe; &#xa85;&#xaa8;&#xac7; &#xab0;&#xabe;&#xa9c; &#xa86;&#xa9c;&#xac7; &#xab8;&#xabe;&#xaa4; &#xaab;&#xac7;&#xab0;&#xabe; &#xab2;&#xac7;&#xab6;&#xac7;</h4>
<p lang="gu">&#xaac;&#xacb;&#xab2;&#xac0;&#xab5;&#xac1;&#xaa1; &#xab8;&#xac1;&#xa82;&#xaa6;&#xab0;&#xac0; &#xab6;&#xabf;&#xab2;&#xacd;&#xaaa;&#xabe; &#xab6;&#xac7;&#xa9f;&#xacd;&#xa9f;&#xac0; &#xaaa;&#xacb;&#xaa4;&#xabe;&#xaa8;&#xabe; &#xaae;&#xa82;&#xa97;&#xac7;&#xaa4;&#xab0; &#xaad;&#xabe;&#xab0;&#xaa4;&#xac0;&#xaaf; &#xaae;&#xac2;&#xab3;&#xaa8;&#xabe; &#xaac;&#xacd;&#xab0;&#xabf;&#xa9f;&#xabf;&#xab6; &#xa89;&#xaa6;&#xacd;&#xaaf;&#xacb;&#xa97;&#xaaa;&#xaa4;&#xabf; &#xab0;&#xabe;&#xa9c; &#xa95;&#xac1;&#xa82;&#xaa6;&#xacd;&#xab0;&#xabe; &#xab8;&#xabe;&#xaa5;&#xac7; &#xa86;&#xa9c;&#xac7; &#xab2;&#xa97;&#xacd;&#xaa8; &#xaac;&#xa82;&#xaa7;&#xaa8;&#xaae;&#xabe;&#xa82; &#xaac;&#xa82;&#xaa7;&#xabe;&#xaaf; &#xa9c;&#xab6;&#xac7;. &#xab5;&#xabf;&#xab5;&#xabe;&#xab9; &#xab8;&#xaae;&#xabe;&#xab0;&#xa82;&#xaad; &#xab0;&#xabe;&#xa9c;&#xaa8;&#xabe; &#xaae;&#xabf;&#xaa4;&#xacd;&#xab0; &#xa95;&#xabf;&#xab0;&#xaa3; &#xaac;&#xabe;&#xab5;&#xabe;&#xaa8;&#xabe; &#xa96;&#xa82;&#xaa1;&#xabe;&#xab2;&#xabe;&#xaae;&#xabe;&#xa82; &#xa86;&#xab5;&#xac7;&#xab2; &#xaab;&#xabe;&#xab0;&#xacd;&#xaae;...</p>
</div>
<pagebreak />
<h2>Arabic Fonts/Languages</h2>
<h5>From BBC World Service Arabic News (http://www.bbc.co.uk/arabic/)</h5>
<div class="arabic">
<h4 lang="ar">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</h4>
<p lang="ar">&#x628;&#x64a;&#x639; &#x627;&#x644;&#x642;&#x641;&#x627;&#x632; &#x627;&#x644;&#x62c;&#x644;&#x62f;&#x64a; &#x627;&#x644;&#x645;&#x631;&#x635;&#x639; &#x627;&#x644;&#x630;&#x64a; &#x627;&#x631;&#x62a;&#x62f;&#x627;&#x647; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x644;&#x644;&#x645;&#x631;&#x629; &#x627;&#x644;&#x627;&#x648;&#x644;&#x649; &#x639;&#x627;&#x645; 1983 &#x62e;&#x644;&#x627;&#x644; &#x627;&#x648;&#x644; &#x62e;&#x637;&#x648;&#x629; &#x645;&#x646; &#x631;&#x642;&#x635;&#x62a;&#x647; &#x627;&#x644;&#x634;&#x647;&#x64a;&#x631;&#x629; "&#x627;&#x644;&#x633;&#x64a;&#x631; &#x639;&#x644;&#x649; &#x627;&#x644;&#x642;&#x645;&#x631; (&#x645;&#x648;&#x646; &#x648;&#x648;&#x643;)" &#x628;&#x633;&#x639;&#x631; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631; &#x627;&#x644;&#x633;&#x628;&#x62a; &#x641;&#x64a; &#x646;&#x64a;&#x648;&#x64a;&#x648;&#x631;&#x643; &#x62e;&#x644;&#x627;&#x644; &#x645;&#x632;&#x627;&#x62f; &#x644;&#x645;&#x642;&#x62a;&#x646;&#x64a;&#x627;&#x62a; &#x627;&#x644;&#x645;&#x63a;&#x646;&#x64a; &#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a; &#x627;&#x644;&#x631;&#x627;&#x62d;&#x644;.</p>
</div>
<h5 style="text-align: right;">In alternative fonts (available with mPDF):</h5>
<div class="arabic">
<table border="1" style="border-collapse: collapse;" width="100%"> <tr> <td>
<p style="font-family: ar_1_002">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_1_003">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_1_004">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_1_005">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_1_006">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
</td><td>
<p style="font-family: ar_1_007">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_2_001">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_2_002">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_2_003">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
<p style="font-family: ar_2_004">&#x628;&#x64a;&#x639; &#x642;&#x641;&#x627;&#x632; &#x645;&#x627;&#x64a;&#x643;&#x644; &#x62c;&#x627;&#x643;&#x633;&#x648;&#x646; &#x628;&#x640; 350 &#x627;&#x644;&#x641; &#x62f;&#x648;&#x644;&#x627;&#x631;</p>
</td></tr></table>
</div>
<h5>From BBC World Service Persian News (http://www.bbc.co.uk/persian/)</h5>
<div class="arabic">
<h4 lang="fa">\'&#x637;&#x628;&#x642; &#x646;&#x638;&#x631;&#x633;&#x646;&#x62c;&#x6cc; &#x62f;&#x648;&#x644;&#x62a; &#x627;&#x646;&#x62a;&#x62e;&#x627;&#x628;&#x627;&#x62a; &#x628;&#x647; &#x62f;&#x648;&#x631; &#x62f;&#x648;&#x645; &#x6a9;&#x634;&#x6cc;&#x62f;&#x647; &#x645;&#x6cc; &#x634;&#x62f;\'</h4>
<p lang="fa">&#x639;&#x644;&#x6cc;&#x631;&#x636;&#x627; &#x632;&#x627;&#x6a9;&#x627;&#x646;&#x6cc; &#x646;&#x645;&#x627;&#x6cc;&#x646;&#x62f;&#x647; &#x62a;&#x647;&#x631;&#x627;&#x646; &#x62f;&#x631; &#x645;&#x62c;&#x644;&#x633; &#x6af;&#x641;&#x62a;&#x647; &#x6a9;&#x647; &#x6cc;&#x6a9; &#x631;&#x648;&#x632; &#x67e;&#x6cc;&#x634; &#x627;&#x632; &#x628;&#x631;&#x6af;&#x632;&#x627;&#x631;&#x6cc; &#x627;&#x646;&#x62a;&#x62e;&#x627;&#x628;&#x627;&#x62a; &#x631;&#x6cc;&#x627;&#x633;&#x62a; &#x62c;&#x645;&#x647;&#x648;&#x631;&#x6cc; &#x62f;&#x631; &#x627;&#x6cc;&#x631;&#x627;&#x646;&#x60c; &#x646;&#x638;&#x631;&#x633;&#x646;&#x62c;&#x6cc; &#x648;&#x632;&#x627;&#x631;&#x62a; &#x6a9;&#x634;&#x648;&#x631; &#x648; &#x648;&#x632;&#x627;&#x631;&#x62a; &#x627;&#x637;&#x644;&#x627;&#x639;&#x627;&#x62a; &#x627;&#x6cc;&#x631;&#x627;&#x646; &#x646;&#x634;&#x627;&#x646; &#x645;&#x6cc; &#x62f;&#x627;&#x62f; &#x6a9;&#x647; &#x627;&#x646;&#x62a;&#x62e;&#x627;&#x628;&#x627;&#x62a; &#x628;&#x647; &#x62f;&#x648;&#x631; &#x62f;&#x648;&#x645; &#x6a9;&#x634;&#x6cc;&#x62f;&#x647; &#x645;&#x6cc; &#x634;&#x648;&#x62f;.</p>
</div>
<h5>From BBC World Service Urdu News (http://www.bbc.co.uk/urdu/)</h5>
<div class="arabic">
<h4 lang="ur">&#x62c;&#x6cc;&#x6a9;&#x633;&#x646; &#x6a9;&#x627; &#x62f;&#x633;&#x62a;&#x627;&#x646;&#x6c1; 35 &#x644;&#x627;&#x6a9;&#x6be; &#x688;&#x627;&#x644;&#x631; &#x6a9;&#x627;</h4>
<p lang="ur">&#x627;&#x645;&#x631;&#x6cc;&#x6a9;&#x6cc; &#x67e;&#x627;&#x67e; &#x633;&#x646;&#x6af;&#x631; &#x645;&#x627;&#x626;&#x6cc;&#x6a9;&#x644; &#x62c;&#x6cc;&#x6a9;&#x633;&#x646; &#x6a9;&#x627; &#x62f;&#x633;&#x62a;&#x627;&#x646;&#x6c1; &#x62c;&#x633; &#x67e;&#x631; &#x646;&#x642;&#x644;&#x6cc; &#x6c1;&#x6cc;&#x631;&#x6d2; &#x62c;&#x691;&#x6d2; &#x6c1;&#x648;&#x626;&#x6d2; &#x62a;&#x6be;&#x6d2; &#x627;&#x648;&#x631; &#x62c;&#x648; &#x627;&#x646;&#x6be;&#x6cc;&#x6ba; &#x67e;&#x6c1;&#x644;&#x6cc; &#x645;&#x631;&#x62a;&#x628;&#x6c1; &#x2019;&#x645;&#x648;&#x646; &#x648;&#x627;&#x6a9;&#x2018; &#x67e;&#x6cc;&#x634; &#x6a9;&#x6cc;&#x626;&#x6d2; &#x62c;&#x627;&#x646;&#x6d2; &#x67e;&#x631; &#x645;&#x644;&#x627; &#x62a;&#x6be;&#x627; &#x67e;&#x6cc;&#x646;&#x62a;&#x6cc;&#x633; &#x644;&#x627;&#x6a9;&#x6be; &#x688;&#x627;&#x644;&#x631; &#x645;&#x6cc;&#x6ba; &#x646;&#x6cc;&#x644;&#x627;&#x645; &#x6c1;&#x648; &#x6af;&#x6cc;&#x627; &#x6c1;&#x6d2;&#x6d4;</p>
</div>
<h5>From BBC World Service Pashto News (http://www.bbc.co.uk/pashto/)</h5>
<div class="arabic">
<h4 lang="ps">&#x633;&#x62a;&#x627;&#x633;&#x64a; &#x67e;&#x64a;&#x63a;&#x627;&#x645;&#x648;&#x646;&#x647; &#x627;&#x648;&#x62f; &#x62e;&#x648;&#x69a;&#x649; &#x633;&#x646;&#x62f;&#x631;&#x6d0;</h4>
<p lang="ps">&#x62f; &#x645;&#x648;&#x633;&#x64a;&#x642;&#x6cd; &#x62f;&#x627;&#x62e;&#x67e;&#x631;&#x648;&#x646;&#x6d0; &#x67e;&#x647; &#x627;&#x641;&#x63a;&#x627;&#x646;&#x633;&#x62a;&#x627;&#x646; &#x6a9;&#x6d0; &#x62f;&#x627;&#x6d0;&#x641; &#x627;&#x6d0;&#x645; &#x67e;&#x647; &#x685;&#x67e;&#x648;&#x62f; &#x633;&#x647;&#x627;&#x631; &#x67e;&#x647; &#x644;&#x633;&#x648; &#x628;&#x62c;&#x648; &#x627;&#x648;&#x631;&#x64a;&#x62f;&#x644;&#x649; &#x634;&#x649;</p>
</div>
<pagebreak />
<h2>Fixed-position block elements</h2>
mPDF 4.0 supports fixed-position block elements (at least partially). This page has some examples of fixed-position elements.
<div id="myfixed">
<div style="border: 1px solid #000088; background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; background-color: #DDFFEE; padding: 0.5em;">#1. Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula eros vehicula pretium. Maecenas feugiat pede vel risus. <span title="Nulla is marked by a span">Nulla</span> et lectus. Fusce eleifend neque sit amet erat. Integer <a href="mailto:admin@bpm1.com">consectetuer</a> nulla non orci. Morbi feugiat pulvinar dolor. Cras odio.
<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula eros vehicula pretium. Maecenas feugiat pede vel risus. <span title="Nulla is marked by a span">Nulla</span> et lectus. Fusce eleifend neque sit amet erat. Integer <a href="mailto:admin@bpm1.com">consectetuer</a> nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. </p>
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt eros turpis, vel aliquam quam eros odio et sapien.
<div style="border: 1px solid #008800; background-color: #EEFFDD; text-align: left; padding: 0.5em;">
Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt eros turpis, vel aliquam quam eros odio et sapien.
</div>
Mauris ante pede, eros auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </div>
</div>
<div class="myfixed2">#2. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. <div style="border: 1px dotted green; padding: 1em; background-color: #FFEEFF; color: red">Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>
<div class="myfixed3">#3. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>
<div class="myfixed4">#4. overflow: auto<br />Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi.</div>
<div class="myfixed5">#5. overflow: visible<br />Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi.</div>
<div class="myfixed6">#6. overflow: hidden<br />Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi.</div>
<div class="myfixed7">#7. width: auto<br />Shrink-to-fit</div>
<pagebreak />
<h2>Barcodes</h2>
<p>NB <b>Quiet zones</b> - The barcode object includes space to the right/left or top/bottom only when the specification states a \'quiet zone\' or \'light margin\'. All the examples below also have CSS property set on the barcode object i.e. padding: 1.5mm; </p>
<h3>EAN-13 Barcodes (EAN-2 and EAN-5)</h3>
<p>NB EAN-13, UPC-A, UPC-E, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p>
<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">EAN13</td>
<td>Standard EAN-13 barcode. Accepts 12 or 13 characters (creating checksum digit if required). [0-9] numeric only.</td>
<td class="barcodecell"><barcode code="978-0-9542246-0" class="barcode" /></td>
</tr>
<tr>
<td align="center">ISBN</td>
<td>Standard EAN-13 barcode with \'ISBN\' number shown above [shown at height="0.66"]</td>
<td class="barcodecell"><barcode code="978-0-9542246-0" type="ISBN" class="barcode" height="0.66" text="1" /></td>
</tr>
<tr>
<td align="center">ISSN</td>
<td>Standard EAN-13 barcode with \'ISSN\' number shown above [shown at size="0.8"]</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8" type="ISSN" size="0.8" class="barcode" text="1" /></td>
</tr>
</tbody>
</table>
<h3>EAN-8, UPC-A and UPC-E Barcodes</h3>
<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p>
<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">UPCA</td>
<td>UPC-A barcode. This is a subset of the EAN-13. (098277211236) Accepts 11 or 12 characters (creating checksum digit if required). [0-9] numeric only</td>
<td class="barcodecell"><barcode code="09827721123" type="UPCA" class="barcode" /></td>
</tr>
<tr>
<td align="center">UPCE</td>
<td>UPC-E barcode. Requires the UPC-A code to be entered as above (e.g. 042100005264 to give 425261). NB mPDF will die with an error message if the code is not valid, as only some UPC-A codes can be converted into valid UPC-E codes. UPC-E doesn\'t have a check digit encoded explicity, rather the check digit is encoded in the parity of the other six characters. The check digit that is encoded is the check digit from the original UPC-A barcode.</td>
<td class="barcodecell"><barcode code="04210000526" type="UPCE" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN8</td>
<td>EAN-8 (5512345) Accepts 7 or 8 characters (creating checksum digit if required). [0-9] numeric only</td>
<td class="barcodecell"><barcode code="2468123" type="EAN8" class="barcode" /></td>
</tr>
</tbody>
</table>
<h3>EAN-2 and EAN-5 supplements, and combined forms</h3>
<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">EAN2</td>
<td colspan="2">EAN-2 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Used to denote an issue of a periodical. EAN-2 supplement accepts 2 digits [0-9] only, EAN-5 five.</td>
</tr>
<tr>
<td align="center">EAN5</td>
<td colspan="2">EAN-5 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Usually used in conjunction with EAN-13 for the price of books. 90000 is the code for no price. </td>
</tr>
<tr>
<td align="center">EAN13P2</td>
<td>Standard EAN-13 barcode with 2-digit UPC supplement (07)</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="EAN13P2" class="barcode" /></td>
</tr>
<tr>
<td align="center">ISBNP2</td>
<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 2-digit EAN-2 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISBNP2" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">ISSNP2</td>
<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 2-digit EAN-2 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISSNP2" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">UPCAP2</td>
<td>UPC-A barcode with 2-digit EAN-2 supplement. This is a subset of the EAN-13. (075678164125 07)</td>
<td class="barcodecell"><barcode code="00633895260 24" type="UPCAP2" class="barcode" /></td>
</tr>
<tr>
<td align="center">UPCEP2</td>
<td>UPC-E barcode with 2-digit EAN-2 supplement. (042100005264 07)</td>
<td class="barcodecell"><barcode code="042100005264 07" type="UPCEP2" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN8P2</td>
<td>EAN-8 barcode with 2-digit EAN-2 supplement (55123457 07)</td>
<td class="barcodecell"><barcode code="55123457 07" type="EAN8P2" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN13P5</td>
<td>Standard EAN-13 barcode with 5-digit UPC supplement (90000)</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="EAN13P5" class="barcode" /></td>
</tr>
<tr>
<td align="center">ISBNP5</td>
<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 5-digit EAN-5 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISBNP5" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">ISSNP5</td>
<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 5-digit EAN-5 supplement</td>
<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISSNP5" class="barcode" text="1" /></td>
</tr>
<tr>
<td align="center">UPCAP5</td>
<td>UPC-A barcode with 5-digit EAN-5 supplement. This is a subset of the EAN-13. (075678164125 90000)</td>
<td class="barcodecell"><barcode code="075678164125 90000" type="UPCAP5" class="barcode" /></td>
</tr>
<tr>
<td align="center">UPCEP5</td>
<td>UPC-E barcode with 5-digit EAN-5 supplement. (042100005264 90000)</td>
<td class="barcodecell"><barcode code="042100005264 90000" type="UPCEP5" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN8P5</td>
<td>EAN-8 barcode with 5-digit EAN-5 supplement (55123457 90000)</td>
<td class="barcodecell"><barcode code="55123457 90000" type="EAN8P5" class="barcode" /></td>
</tr>
</tbody>
</table>
<pagebreak />
<h3>Postcode Barcodes</h3>
<p>These all have sizes fixed by their specification. Although they can be altered using \'size\' it is not recommended. \'height\' is ignored.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">IMB</td>
<td>Intelligent Mail Barcode - also known as: USPS OneCode 4-State Customer Barcode, OneCode 4CB, USPS 4CB, 4-CB, 4-State Customer Barcode, USPS OneCode Solution Barcode. (01234567094987654321-01234567891) Accepts: Up to 31 digits (required 20-digit Tracking Code, and up to 11-digit Routing Code; this may be 0, 5, 9, or 11 digits). If the Routing code is included, it should be spearated by a hyphen - like this example.</td>
<td class="barcodecell"><barcode code="01234567094987654321-01234567891" type="IMB" class="barcode" /></td>
</tr>
<tr>
<td align="center">RM4SCC</td>
<td>Royal Mail 4-state Customer barcode (SN34RD1A). Accepts: max. 9 characters. Valid characters: [A-Z,0-9] Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="SN34RD1A" type="RM4SCC" class="barcode" /></td>
</tr>
<tr>
<td align="center">KIX</td>
<td>Dutch KIX version of Royal Mail 4-state Customer barcode (SN34RD1A). Valid characters: [A-Z,0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="SN34RD1A" type="KIX" class="barcode" /></td>
</tr>
<tr>
<td align="center">POSTNET</td>
<td>POSTNET barcode. Accepts 5, 9 or 11 digits. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="123456789" type="POSTNET" class="barcode" /></td>
</tr>
<tr>
<td align="center">PLANET</td>
<td>PLANET barcode. Accepts 11 or 13 digits. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="00123456789" type="PLANET" class="barcode" /></td>
</tr>
</tbody>
</table>
<h3>Variable width Barcodes</h3>
<p>These barcodes are all of variable length depending on the code entered. There is no recommended maximum size for any of these specs, but all recommend a minimum X-dimension (width of narrowest bar) as 7.5mil (=0.19mm). The default used here is twice the minimum i.e. X-dim = 0.38mm.</p>
<p>The specifications give a minimum height of 15% of the barcode length (which can be variable). The bar height in mPDF is set to a default value of 10mm. </p>
<p>\'size\' will scale the barcode in both dimensions. mPDF will accept any number, but bear in mind that size="0.5" will set the bar width to the minimum. The \'height\' attribute further allows scaling - this factor is applied to already scaled barcode. Thus size="2" height="0.5" will give a barcode twice the default width (X-dim=0.76mm) and at the default height set in mPDF i.e. 10mm.</p>
<table class="items" width="100%" cellpadding="8" border="1">
<thead>
<tr>
<td width="10%">CODE</td>
<td>DESCRIPTION</td>
<td>BARCODE</td>
</tr>
</thead>
<tbody>
<tr>
<td align="center">C128A</td>
<td>CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="CODE 128 A" type="C128A" class="barcode" /></td>
</tr>
<tr>
<td align="center">C128B</td>
<td>CODE 128 B. Valid characters: [Upper / Lower Case + All ASCII Printable Characters]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="ABC123abc@456" type="C128B" class="barcode" /></td>
</tr>
<tr>
<td align="center">C128C</td>
<td>CODE 128 C. Valid characters: [0-9]. Must be an even number of digits. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="0123456789" type="C128C" class="barcode" /></td>
</tr>
<tr>
<td align="center">EAN128C [A/B/C]</td>
<td>EAN128 (A, B, and C). Specified variant of Code 128, utilising an FNC1 start code. Also known as UCC/EAN-128 or GS1-128. Valid characters: [cf. Code 128]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="0112345678912343" type="EAN128C" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39</td>
<td>CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. Valid characters: [0-9 A-Z \'-\' . Space $/+%]</td>
<td class="barcodecell"><barcode code="TEC-IT" type="C39" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39+</td>
<td>CODE 39 + CHECKSUM. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="39OR93" type="C39+" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39E</td>
<td>CODE 39 EXTENDED. Valid characters: [ASCII-characters between 0..127]</td>
<td class="barcodecell"><barcode code="CODE 39 E" type="C39E" class="barcode" /></td>
</tr>
<tr>
<td align="center">C39E+</td>
<td>CODE 39 EXTENDED + CHECKSUM. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="CODE 39 E+" type="C39E+" class="barcode" /></td>
</tr>
<tr>
<td align="center">S25</td>
<td>Standard 2 of 5. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="54321068" type="S25" class="barcode" /></td>
</tr>
<tr>
<td align="center">S25+</td>
<td>Standard 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="54321068" type="S25+" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25</td>
<td>Interleaved 2 of 5. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="54321068" type="I25" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25+</td>
<td>Interleaved 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="54321068" type="I25+" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25B</td>
<td>Interleaved 2 of 5 with bearer bars. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="1234567" type="I25B" class="barcode" /></td>
</tr>
<tr>
<td align="center">I25B+</td>
<td>Interleaved 2 of 5 + CHECKSUM with bearer bars. Valid characters: [0-9]. Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="1234567" type="I25B+" class="barcode" /></td>
</tr>
<tr>
<td align="center">C93</td>
<td>CODE 93 - USS-93 (extended). Valid characters: [ASCII-characters between 0..127]. Checksum digits: automatic.</td>
<td class="barcodecell"><barcode code="39OR93" type="C93" class="barcode" /></td>
</tr>
<tr>
<td align="center">MSI</td>
<td>MSI. Modified Plessey. Valid characters: [0-9]</td>
<td class="barcodecell"><barcode code="01234567897" type="MSI" class="barcode" /></td>
</tr>
<tr>
<td align="center">MSI+</td>
<td>MSI + CHECKSUM (module 11). Checksum digit: automatic.</td>
<td class="barcodecell"><barcode code="0123456789" type="MSI+" class="barcode" /></td>
</tr>
<tr>
<td align="center">CODABAR</td>
<td>CODABAR. Valid characters: [0-9 \'-\' $:/.+ ABCD] ABCD are used as stop and start characters e.g. A34698735B</td>
<td class="barcodecell"><barcode code="A34698735B" type="CODABAR" class="barcode" /></td>
</tr>
<tr>
<td align="center">CODE11</td>
<td>CODE 11. Valid characters: [0-9 and \'-\']. Checksum digits: 1 (or 2 if length of code is > 10 characters) - automatic.</td>
<td class="barcodecell"><barcode code="123-456-789" type="CODE11" class="barcode" /></td>
</tr>
</tbody>
</table>
';
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF('s');
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,36 @@
<html>
<head>
<style>
body { font-family: Arial, Helvetica, sans-serif; }
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
}
</style>
</head>
<body>
<h4>Line-height & vertical alignment</h4>
<div>In these examples, top and bottom padding are set to 0, so the block height = line height.</div>
<div>The inline text (set to a larger font-size) inherits the line-height as a factor of the largest font-size i.e. the line height will expand to reflect the largest font on the line.<br />
Line-height: "normal" (set in mPDF by default as 1.33).</div>
<p class="gradient" style="font-size: 10pt; line-height: normal; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size &#194;</span> and normal again</p>
<div>Line-height: 2.0 When using relative line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the largest font.</div>
<p class="gradient" style="font-size: 10pt; line-height: 2.0; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size &#194;</span> and normal again</p>
<div>Line-heights set as a percentages are computed on the base font-size, and are then inherited and treated the same as absolute lengths. This is also true for "em" values. The line-height of this line is set as 200% of the paragraph font-size (10pt).<br />
When using absolute line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the base font.<br />
This means that as far as possible, multiple lines will remain equally spaced<br />
Line-height: 200% </div>
<p class="gradient" style="font-size: 10pt; line-height: 200%; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size &#194;</span> and normal again</p>
<div>If the line includes a font-size greater than 1.6 times the computed line-height, then the text baseline is dropped so that the text will approximately fit within the line-height.
<br />Line-height: 2em</div>
<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 18pt;">18pt font-size &#194;</span> and normal again</p>
<div>If the line includes a font-size greater than 2 times the computed line-height, then the line-height is increased to accommodate the larger fontsize.<br />
Line-height: 2em</div>
<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 24pt;">24pt font-size &#194;</span> and normal again</p>
</body>
</html>

View file

@ -0,0 +1,492 @@
<?php
ini_set("memory_limit","256M");
$html = '
<style>
body {
font-family: sans-serif;
}
@page {
margin-top: 2.0cm;
margin-bottom: 2.0cm;
margin-left: 2.3cm;
margin-right: 1.7cm;
margin-header: 8mm;
margin-footer: 8mm;
footer: html_myHTMLFooter;
background-color:#ffffff;
}
@page :first {
margin-top: 6.5cm;
margin-bottom: 2cm;
header: html_myHTMLHeader;
footer: _blank;
resetpagenum: 1;
background-gradient: linear #FFFFFF #FFFF44 0 0.5 1 0.5;
background: #ccffff url(bgbarcode.png) repeat-y fixed left top;
}
@page letterhead {
margin-top: 2.0cm;
margin-bottom: 2.0cm;
margin-left: 2.3cm;
margin-right: 1.7cm;
margin-header: 8mm;
margin-footer: 8mm;
footer: html_myHTMLFooter;
background-color:#ffffff;
}
@page letterhead :first {
margin-top: 6.5cm;
margin-bottom: 2cm;
header: html_myHTMLHeader;
footer: _blank;
resetpagenum: 1;
}
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
border-radius: 2mm;
background-clip: border-box;
}
h4 {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.3em;
}
div.text {
padding:1em;
margin-bottom: 0.25em;
text-align:justify;
}
div.artificial {
font-family: arialuni; /* custom font using MS Arial Unicode */
}
p { margin-top: 0; }
.code {
font-family: mono;
font-size: 9pt;
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
}
</style>
<body>
<!--mpdf
<htmlpageheader name="myHTMLHeader">
<div style="float:right; width: 90; height: 90; text-align: right; vertical-align: bottom; border: 1mm double #000088"><img src="tiger.png" width="90" /></div>
<div style="color:#0000BB;"><span style="font-weight: bold; font-size: 14pt;">mPDF Version 4.2</span><br />123 Anystreet<br />Your City<br />GD12 4LP<br /><span style="font-size: 15pt;">&#x260e;</span> 01777 123 567
</div>
<div style="clear: both; margin-top: 1cm; text-align: right;">{DATE jS F Y}</div>
</htmlpageheader>
<htmlpagefooter name="myHTMLFooter">
<table width="100%" style="border-top: 0.1mm solid #000000; vertical-align: top; font-size: 9pt; color: #000055;"><tr>
<td width="25%"></td>
<td width="50%" align="center">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a> for further details</td>
<td width="25%" align="right">Page {PAGENO} of {nbpg} pages</td>
</tr></table>
</htmlpagefooter>
mpdf-->
<h2>mPDF Version 4.2</h2>
<h2>New Features</h2>
<div class="gradient text">
<ul>
<li>image handling improved</li>
<li>table layout - additional control over resizing</li>
<li>vertical-alignment of images - better support for all CSS types</li>
<li>top and bottom margins collapse between block elements</li>
<li>improved support for CSS line-height</li>
<li>display progress bar whilst generating file</li>
<li>CSS @page selector can be specified when adding a pagebreak</li>
<li>CSS @page selector allows different margins, backgrounds, headers/footers on :first :left and :right pages</li>
<li>PNG images with alpha channel fully supported</li>
<li>ability to generate italic and bold font variants from base font file</li>
<li>CJK fonts to embed as subsets</li>
<li>"double" border on block elements</li>
<li>character substitution for missing characters in UTF-8 fonts</li>
<li>direct passing of dynamically produced image data</li>
<li>background-gradient and background-image can now co-exist </li>
</ul>
Note: automatic top- and bottom-margin to accomodate varying header/footer size was introduced in v4.0 but was not highlighted cf. AutoHeaderMargin in the Manual.
</div>
<br />
<div class="gradient text">
<h4>Page backgrounds</h4>
Background images, gradients and/or colours can be used together on the same page. On this page, the bars on the left hand side are created using a background-image, whilst a background-gradient sets the background to the whole page.
</div>
<br />
<div class="gradient text" style="background-color: #d9def0; border-style: double; border-color:#444444; border-width:1mm;">
<h4>CSS "double" border</h4>
Block elements can now use the CSS property: border(style) = double. See also the tiger logo in the header of this page.
</div>
<br />
<div class="gradient text">
<h4>CJK fonts to embed as subsets</h4>
When writing documents with Chinese, Japanese or Korean characters, mPDF has previously required the end-user to download Adobe\'s free CJK font pack.
The ability to embed font subsets now makes it feasible to use open license CJK fonts. 2 fonts are now available to download as an additional font-pack:
<ul>
<li>zn_hannom_a - contains all characters in the SJIS, BIG-5, and GBK codepages; original file was Han Nom A font (Hi-res version) from http://vietunicode.sourceforge.net/fonts/fonts_hannom.html</li>
<li>unbatang_0613 - contains all the (Korean) characters in the UHC codepage; original file from from http://kldp.net/projects/unfonts/download</li>
</ul>
The following characters only added an extra 15kB to the size of this PDF file, and approximately 0.15 seconds extra to compile:<br />
Chinese (traditional) <span style="font-family:zn_hannom_a">'."\xe6\x86\x82\xe9\xac\xb1".'</span> ; chinese (simplified) <span style="font-family:zn_hannom_a">'."\xe6\x9d\xa5\xe8\x87\xaa".'</span> ; japanese <span style="font-family:zn_hannom_a">'."\xe3\x81\x9f\xe3\x82\x90".'</span> ; korean <span style="font-family:unBatang_0613">'."\xed\x82\xa4\xec\x8a\xa4".'</span>
</div>
<br />
<div class="artificial gradient text">
<h4>Artificial Bold and Italic</h4>
The text in this block is in ArialUnicodeMS font. Using embedded subsets it covers most characters you want to print - BUT it does not have bold, italic, or bold-italic forms.<br />
From version 4.2, mPDF will create "artificial" font styles if they are not available as separate font files:<br />
<p style="font-weight: bold">The quick brown fox jumps over a lazy dog</p>
<p style="font-style: italic">The quick brown fox jumps over a lazy dog</p>
<p style="font-weight: bold; font-style: italic">The quick brown fox jumps over a lazy dog</p>
</div>
<br />
<div class="gradient text" style="font-family: \'Trebuchet MS\'">
<h4>Character substitution in UTF-8 files</h4>
This paragraph has the font-family set to Trebuchet MS, and the document has the default font set as DejaVuSansCondensed.
The following characters are not present in the Trebuchet font, and are substituted from the core Adobe Zapfdingbats font:<br />
&#x2710; &#x2711; &#x2712; &#x2713; &#x2714; &#x2715; &#x2716; &#x2717; &#x2718; &#x2719; &#x271a; &#x271b; &#x271c; &#x271d; &#x271e; &#x271f;<br />
The characters are not present in the Trebuchet font, and are substituted from the (default) DejaVuSansCondensed font:<br />
&#x280; &#x281; &#x282; &#x283; &#x284; &#x285; &#x286; &#x287; &#x288; &#x289; &#x28a; &#x28b; &#x28c; &#x28d; &#x28e; &#x28f;<br />
Character substitution in UTF-8 files is enabled by setting:
<p class="code">
$mpdf->useSubstitutionsMB = true;
</p>
<div style="color:red; padding:0; margin:0;">NB In mPDF 5.0 this has changed to
<p class="code" style="padding:0; margin:0;">
$mpdf->useSubstitutions = true;
</p>
</div>
It is not recommended to enable this for regular use, as it will add to the processing time.
</div>
<pagebreak />
<h2>Margin-collapse</h2>
<p>mPDF has always allowed margins to be collapsed at the top and bottom of pages. This is specified by the custom CSS property "margin-collapse: collapse"</p>
<p>mPDF 4.2 also allows margins to collapse between block elements on the page. This is the default behaviour in browsers, and has been enabled in mPDF 4.2 by default.</p>
<p>In the next 2 paragraphs, the first one has the margin-bottom set to 3em, and the second has the margin-top set to 0em. So the vertical-space between paragraphs is 3em:</p>
<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-bottom: 3em;">The quick brown fox jumps over a lazy dog</p>
<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-top: 0em;">The quick brown fox jumps over a lazy dog</p>
<p>In the next 2 paragraphs, the first one has the margin-bottom set to 2em, and the second has the margin-top set to 1em. The margins collapse to the larger of the adjoining margins i.e. 2em:</p>
<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-bottom: 2em;">The quick brown fox jumps over a lazy dog</p>
<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-top: 1em;">The quick brown fox jumps over a lazy dog</p>
<pagebreak />
<h2>Images</h2>
<h4>PNG Alpha channel</h4>
PNG alpha channel transparency is now fully supported, and works against solid backgrounds, gradients or background images:
<table>
<tr>
<td><img style="vertical-align: top" src="alpha.png" width="90" /></td>
<td style="background-color:#FFCCFF; "><img style="vertical-align: top" src="alpha.png" width="90" /></td>
<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="alpha.png" width="90" /></td>
<td style="background-color:#CCFFFF; background-gradient: linear #88FFFF #FFFF44 0 0.5 1 0.5; "><img style="vertical-align: top" src="alpha.png" width="90" /></td>
<td style="background-color:#CCFFFF; background: transparent url(\'bgrock.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="alpha.png" width="90" /></td>
</tr>
</table>
<br />
<h4>Image Border and padding</h4>
Image padding is now supported as well as border and margin:
<img src="sunset.jpg" width="100" style="border:3px solid #44FF44; padding: 1em; vertical-align: text-top; " />
<br />
<h4>Vertical alignment</h4>
<div>From mPDF version 4.2 onwards, most of the values for "vertical-align" are supported: top, bottom, middle, baseline, text-top, and text-bottom.<br />
<b>Note:</b> The default value for vertical alignment has been changed to baseline, and the default padding to 0, consistent with most browsers.
</div>
<br />
<div class="gradient" style="font-size: 80%;">
baseline: <img src="sunset.jpg" width="50" style="vertical-align: baseline;" />
text-bottom: <img src="sunset.jpg" width="30" style="vertical-align: text-bottom;" />
middle: <img src="sunset.jpg" width="30" style="vertical-align: middle;" />
bottom: <img src="sunset.jpg" width="80" style="vertical-align: bottom;" />
text-top: <img src="sunset.jpg" width="50" style="vertical-align: text-top;" />
top: <img src="sunset.jpg" width="100" style="vertical-align: top;" />
</div>
<pagebreak />
<h4>Image Alignment</h4>
<div>From mPDF version 4.2 onwards, in-line images can be individually aligned (vertically).
</div>
<div class="gradient" style="margin: 0.5em 0;">
These images <img src="img1.png" style="vertical-align: top;" />
are <img src="img2.png" style="vertical-align: top;" />
<b>top</b> <img src="img3.png" style="vertical-align: top;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<div class="gradient" style="margin: 0.5em 0;">
These images <img src="img1.png" style="vertical-align: text-top;" />
are <img src="img2.png" style="vertical-align: text-top;" />
<b>text-top</b> <img src="img3.png" style="vertical-align: text-top;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<div class="gradient" style="margin: 0.5em 0;">
These images <img src="img1.png" style="vertical-align: bottom;" />
are <img src="img2.png" style="vertical-align: bottom;" />
<b>bottom</b> <img src="img3.png" style="vertical-align: bottom;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<div class="gradient" style="margin: 0.5em 0;">
These images <img src="img1.png" style="vertical-align: text-bottom;" />
are <img src="img2.png" style="vertical-align: text-bottom;" />
<b>text-bottom</b> <img src="img3.png" style="vertical-align: text-bottom;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<div class="gradient" style="margin: 0.5em 0;">
These images <img src="img1.png" style="vertical-align: baseline;" />
are <img src="img2.png" style="vertical-align: baseline;" />
<b>baseline</b> <img src="img3.png" style="vertical-align: baseline;" />
aligned <img src="img4.png" style="vertical-align: middle;" />
</div>
<div class="gradient" style="margin: 0.5em 0;">
These images <img src="img1.png" style="vertical-align: middle;" />
are <img src="img2.png" style="vertical-align: middle;" />
<b>middle</b> <img src="img3.png" style="vertical-align: middle;" />
aligned <img src="img5.png" style="vertical-align: bottom;" />
</div>
<pagebreak />
<h4>Images from PHP</h4>
<br />
<img src="var:smileyface" />
<br />
This image was created with the following code:
<p class="code">
$img = imagecreatetruecolor(200, 200);<br />
$white = imagecolorallocate($img, 255, 255, 255);<br />
$red = imagecolorallocate($img, 255, 0, 0);<br />
$green = imagecolorallocate($img, 0, 255, 0);<br />
$blue = imagecolorallocate($img, 0, 0, 255);<br />
imagearc($img, 100, 100, 200, 200, 0, 360, $white);<br />
imagearc($img, 100, 100, 150, 150, 25, 155, $red);<br />
imagearc($img, 60, 75, 50, 50, 0, 360, $green);<br />
imagearc($img, 140, 75, 50, 50, 0, 360, $blue);<br />
ob_start();<br />
imagejpeg($img);<br />
$mpdf->smileyface = ob_get_clean(); <br />
imagedestroy($img);<br />
</p>
and written to the document using:
<p class="code">
&lt;img src="var:smileyface" /&gt;
</p>
<pagebreak>
<h4>Line-height inheritance</h4>
Line-height inheritance has been altered to follow the CSS2 recommendation:
<ul>
<li>normal is inherited as "normal"</li>
<li>1.2 is inherited as a factor</li>
<li>120% is converted to an actual value and then inherited as the computed value</li>
<li>em is converted to an actual value and then inherited as the computed value</li>
<li>px pt mm are inherited as fixed values</li>
</ul>
<div>Relative values (e.g. 1.3, normal)</div>
<div style="font-size: 12pt; line-height: 2.0; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;">
This DIV has the line-height set as "2.0" and font-size as 12pt. The line-height is therefore 24pt, but the factor of 2 is inherited...<br />
Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse...
<div style="font-size: 8pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;">
This DIV has the font-size set as 8pt. The line-height of 2 is inherited...<br />
Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci.
<div style="font-size: 18pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;">
This DIV has the font-size set as 18pt. The line-height of 2 is inherited...<br />
Nulla felis erat, imperdiet eu, ullamcorper non...
</div>
</div>
</div>
<br />
<div>Absolute values (e.g. 130%, 1.3em, 18pt)</div>
<div style="font-size: 12pt; line-height: 200%; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;">
This DIV has the line-height set as "200%" and font-size as 12pt. The computed line-height of 24pt is inherited...<br />
Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse...
<div style="font-size: 8pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;">
This DIV has the font-size set as 8pt. The computed line-height of 24pt is inherited...<br />
Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci.
<div style="font-size: 18pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;">
This DIV has the font-size set as 18pt. The computed line-height of 24pt is inherited...<br />
Nulla felis erat, imperdiet eu, ullamcorper non...
</div>
</div>
</div>
<pagebreak />
<h4>Line-height & vertical alignment</h4>
<div>In these examples, top and bottom padding are set to 0, so the block height = line height.</div>
<div>The inline text (set to a larger font-size) inherits the line-height as a factor of the largest font-size i.e. the line height will expand to reflect the largest font on the line.<br />
Line-height: "normal" (set in mPDF by default as 1.33).</div>
<p class="gradient" style="font-size: 10pt; line-height: normal; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size &#194;</span> and normal again</p>
<div>Line-height: 2.0 When using relative line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the largest font.</div>
<p class="gradient" style="font-size: 10pt; line-height: 2.0; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size &#194;</span> and normal again</p>
<div>Line-heights set as a percentages are computed on the base font-size, and are then inherited and treated the same as absolute lengths. This is also true for "em" values. The line-height of this line is set as 200% of the paragraph font-size (10pt).<br />
When using absolute line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the base font.<br />
This means that as far as possible, multiple lines will remain equally spaced<br />
Line-height: 200% </div>
<p class="gradient" style="font-size: 10pt; line-height: 200%; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size &#194;</span> and normal again</p>
<div>If the line includes a font-size greater than 1.6 times the computed line-height, then the text baseline is dropped so that the text will approximately fit within the line-height.
<br />Line-height: 2em</div>
<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 18pt;">18pt font-size &#194;</span> and normal again</p>
<div>If the line includes a font-size greater than 2 times the computed line-height, then the line-height is increased to accommodate the larger fontsize.<br />
Line-height: 2em</div>
<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 24pt;">24pt font-size &#194;</span> and normal again</p>
<br />
This broadly reflects the behaviour of IE and Firefox. Note that tall characters such as &#194; may fall outside the computed line-heights. See the same in an <a href="example52_lineheight.htm">HTML page</a>.
<pagebreak page-selector="letterhead" />
<h2>Extended use of CSS @page selectors</h2>
The CSS @page selector, together with the pseudo-selectors :first :left :right have increased support in mPDF 4.2<br />
A named @page can be selected when forcing a new page, e.g. this page was started with:<br />
<span style="font-family: mono; font-size: 9pt;">&lt;pagebreak page-selector="letterhead" /&gt;</span>
<br />
The header and background on this page (and page 1 of the document) are set by the CSS selector: @page letterhead :first {} whilst subsequent pages have no header, a footer, and no background.
<br />
CSS @page selectors allow different margins, backgrounds, headers/footers to be set on :first :left and :right pages. Only fixed or mirrored left- and right-margins are supported (i.e. cannot specify different margins for :left and :right).
<br />
This layout can be used to produce company letters with only the first page on letterheaded paper.
<pagebreak />
<h2>Table Layout control</h2>
<p>mPDF attempts to layout tables according to HTML and CSS specifications. However, because of the difference between screen and paged media, mPDF resizes tables when necessary to make them fit the page. This will happen if the minimum table-width is greater than the page-width. Minimum table-width is defined as the minimum width to accomodate the longest word in each column i.e. words will never be split.
</p>
<p>This resizing (minimum-width) can be disabled using a custom CSS property "overflow" on the TABLE tag. There are 4 options:</p>
&lt;table style="overflow: auto"&gt; (this is the default, using resizing)
<table border="1" style="overflow: auto; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
</tr></table>
<br />
&lt;table style="overflow: visible"&gt; (disables resizing, but allows overflow to show)
<table border="1" style="overflow: visible; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
</tr></table>
<br />
&lt;table style="overflow: hidden"&gt; (disables resizing, and hides/clips any overflow)
<table border="1" style="overflow: hidden; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
</tr></table>
<br />
&lt;table style="overflow: wrap"&gt; (forces words to break as necessary)
<table border="1" style="overflow: wrap; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
<td>Verylongwordwithnospacesinitatall</td>
</tr></table>
<br />
';
if ($_REQUEST['html']) { echo $html; exit; }
//==============================================================
//==============================================================
//==============================================================
define('_MPDF_URI','../'); // required for the progress bar
include("../mpdf.php");
$mpdf=new mPDF('','A4','','',15,15,20,20,5,5);
$mpdf->StartProgressBarOutput(2); // 2 => advanced mode
$mpdf->SetDisplayMode('fullpage');
$mpdf->useSubstitutions = true;
// Dynamically create image in var:smileyface
$img = imagecreatetruecolor(200, 200);
$white = imagecolorallocate($img, 255, 255, 255);
$red = imagecolorallocate($img, 255, 0, 0);
$green = imagecolorallocate($img, 0, 255, 0);
$blue = imagecolorallocate($img, 0, 0, 255);
imagearc($img, 100, 100, 200, 200, 0, 360, $white);
imagearc($img, 100, 100, 150, 150, 25, 155, $red);
imagearc($img, 60, 75, 50, 50, 0, 360, $green);
imagearc($img, 140, 75, 50, 50, 0, 360, $blue);
ob_start();
imagejpeg($img);
$mpdf->smileyface = ob_get_clean();
imagedestroy($img);
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,431 @@
<?php
ini_set("memory_limit","128M");
$html = '
<style>
body {
font-family: sans-serif;
font-size: 10pt;
}
h4 {
font-variant: small-caps;
}
h5 {
margin-bottom: 0;
color: #110044;
}
dl {
margin: 0;
}
</style>
<h1></a>mPDF</h1>
<h2>Fonts in mPDF Version 5.x</h2>
<p style="color: red"><b>Note:</b> This example will only display correctly if you have all the fonts installed in mPDF</p>
<p>mPDF version 5 supports Truetype fonts, reading and embedding directly from the .ttf font files. Fonts must follow the Truetype specification and use Unicode mapping to the characters. Truetype collections (.ttc files) and Opentype files (.otf) in Truetype format are also supported.</p>
<h4>Easy to add new fonts</h4>
<ol>
<li>Upload the Truetype font file to the fonts directory (/ttfonts)</li>
<li>Define the font file details in the configuration file (config_fonts.php)</li>
<li>Access the font by specifying it in your HTML code as the CSS font-family</li>
</ol>
<div>These are some examples of Windows fonts:</div>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<div style="font-family: Arial">Arial - The quick, sly fox jumped over the lazy brown dog.</div>
<div style="font-family: \'Comic Sans MS\'">Comic Sans MS - The quick, sly fox jumped over the lazy brown dog.</div>
<div style="font-family: \'Trebuchet MS\'">Trebuchet - The quick, sly fox jumped over the lazy brown dog.</div>
<div style="font-family: Calibri">Calibri - The quick, sly fox jumped over the lazy brown dog.</div>
<div style="font-family: Quillscript">QuillScript - The quick, sly fox jumped over the lazy brown dog.</div>
<div style="font-family: \'Lucida Console\'">Lucidaconsole - The quick, sly fox jumped over the lazy brown dog.</div>
<div style="font-family: Tahoma">Tahoma - The quick, sly fox jumped over the lazy brown dog.</div>
</div>
<h4>Full Unicode support</h4>
<p>The DejaVu fonts distributed with mPDF contain an extensive set of characters, but it is easy to add fonts to access uncommon characters.</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<dl>
<dt>Georgian (DejaVuSansCondensed)</dt>
<dd style="font-family:\'Dejavu Sans Condensed\';">&#4256; &#4257; &#4258; &#4259; &#4260; &#4261; &#4262; &#4263; &#4264; &#4265; &#4266; &#4267; &#4268; &#4269; &#4270; &#4271; &#4272; &#4273; &#4274; &#4275;</dd>
<dt>Runic (Junicode)</dt>
<dd style="font-family:junicode;">&#5792; &#5793; &#5794; &#5795; &#5796; &#5797; &#5798; &#5799; &#5800; &#5801; &#5802; &#5803; &#5804; &#5805; &#5806; &#5807; &#5808; &#5809; &#5810; &#5811; &#5812; &#5813; &#5814; &#5815; &#5816; &#5817; &#5818; &#5819; &#5820;</dd>
<dt>Greek Extended (Quivira)</dt>
<dd style="font-family:quivira;">&#7936; &#7937; &#7938; &#7939; &#7940; &#7941; &#7942; &#7943; &#7944; &#7945; &#7946; &#7947; &#7948; &#7949; &#7950; &#7951; &#7952; &#7953; &#7954; &#7955; &#7956; &#7957; </dd>
<dt>IPA Extensions (Quivira)</dt>
<dd style="font-family:quivira;">&#592; &#593; &#594; &#595; &#596; &#597; &#598; &#599; &#600; &#601; &#602; &#603; &#604; &#675; &#676; &#677; &#678; &#679; &#680; &#681; &#682; &#683; </dd>
<dt>Letterlike Symbols (Symbola)</dt>
<dd style="font-family:symbola;">&#8448; &#8449; &#8450; &#8451; &#8452; &#8453; &#8454; &#8455; &#8456; &#8457; &#8458; &#8459; &#8460; &#8461; &#8462; &#8463; &#8464; &#8465; &#8466; &#8467; &#8468; &#8469; &#8470; &#8471; &#8472; &#8473; &#8474; &#8475; &#8476; </dd>
<dt>Mathematical Operators (Symbola)</dt>
<dd style="font-family:symbola;">&#8704; &#8705; &#8706; &#8707; &#8708; &#8709; &#8710; &#8711; &#8712; &#8713; &#8714; &#8715; &#8716; &#8717; &#8718; &#8719; &#8720; &#8721; &#8722; &#8723; &#8724; &#8725; &#8726; &#8727; &#8728; &#8729; &#8730; &#8731; &#8732; &#8733; &#8734; </dd>
<dt>Miscellaneous Technical (Symbola)</dt>
<dd style="font-family:symbola;">&#8960; &#8961; &#8962; &#8963; &#8964; &#8965; &#8966; &#8967;&#8974; &#8975; &#8976; &#8977; &#8978; &#8979; &#8980; &#8981; &#8982; &#8983; &#8984; &#8985; &#8986; &#8987; &#8992; &#8993; &#8994; &#8995; &#8996; &#8997; &#8998; &#8999; </dd>
<dt>Enclosed Alphanumerics (Quivira)</dt>
<dd style="font-family:quivira;">&#9312; &#9313; &#9314; &#9315; &#9316; &#9317; &#9318; &#9319; &#9320; &#9321; &#9322; &#9323; &#9324; &#9325; &#9326; &#9327;</dd>
<dt>Miscellaneous Symbols (DejaVuSansCondensed)</dt>
<dd style="font-family:\'Dejavu Sans Condensed\';">&#9728; &#9729; &#9730; &#9731; &#9732; &#9733; &#9734; &#9735; &#9736; &#9737; &#9738; &#9739; &#9740; &#9741; &#9742; &#9743; &#9744; &#9745; &#9746; </dd>
<dt>Supplemental Arrows-B (Symbola)</dt>
<dd style="font-family:symbola;">&#10496; &#10497; &#10498; &#10499; &#10500; &#10501; &#10502; &#10503; &#10504; &#10505; &#10506; &#10507; &#10512; &#10513; &#10516; &#10517; &#10518; &#10519; &#10520; &#10614; &#10615; &#10616; &#10617; &#10618; &#10619; &#10620; &#10621; </dd>
</dl>
</div>
The online manual lists a number of open-source fonts available to cover uncommon characters: <a href="http://mpdf1.com/manual/index.php?tid=451">http://mpdf1.com/manual/index.php?tid=451</a>
<pagebreak />
<h2>Complex scripts</h2>
<p>Although all characters may be displayed, there are various reasons why a script may not appear as expected.</p>
<h4>Right-to-left languages (Hebrew, Arabic etc.)</h4>
Arabic languages and Hebrew are written in a right-to-left direction (RTL). mPDF recognises both Arabic and Hebrew languages and reverses text direction automatically.
<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; font-family:tahoma; text-align: center;">
&#1571;&#1604;&#1587;&#1617;&#1604;&#1575;&#1605; &#1593;&#1604;&#1610;&#1603;&#1605; &nbsp; &nbsp; &#1513;&#1500;&#1493;&#1501;
</div>
Arabic languages (but not Hebrew) also change the form of the letter depending on its position in the text e.g. these are the initial, medial, final, and isolated forms of arabic letter \'ain\':
<div style="font-family:xbriyaz; border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; text-align: center;"> &#x639; &#x640;&#x639; &#x640;&#x639;&#x640; &#x639;&#x640; </div>
The isolated characters are contained in the Unicode block \'Arabic\' U+0600 - U+06FF.<br />
The initial, medial and final forms are contained in Unicode Blocks \'Arabic Presentation Forms\' A and B (U+FB50 - U+FDFF, U+FE70 - U+FEFE). Note that quite a large number of fonts contain the isolated characters but not the presentation forms. Fonts used with mPDF must contain the \'Arabic Presentation Forms\' in order to display arabic text correctly. mPDF automatically converts letters to their initial/medial/final forms in several languages: arabic, persian/farsi, urdu, sindhi and pashto.
<p>Arabic text is used for many different languages e.g. persian/farsi, urdu, pashto etc. These languages often contain letters unique to that language. \'Arabic\' fonts do not always contain the full set of arabic charcters necessary for all languages. </p>
<p>Other RTL languages (using other alphabets) are reversed in order, but not otherwise processed, by mPDF e.g. Syriac, Thaana, N\'Ko, and Samaritan.</p>
<h4>Indic languages</h4>
Indic languages are also complex scripts which require some processing of characters before display. For example some vowels consist of 2 characters, to be placed before and after the adjacent consonant e.g.
<div style="font-family:ind_ml_1_001; border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; text-align: center;">
<div style="font-family: sans; font-size:normal">U+0D1C + U+0D4C [vowel AU] = [written together as &amp;#x0D1C;&amp;#x0D4C;]</div>
&#x0D1C; + &#x0D4C; = &#x0D1C;&#x0D4C;</div>
<p style="margin-bottom: 0">Consonant conjuncts are where two adjacent characters are written as a single \'conjunct\' form e.g.</p>
<div style="font-family:ind_hi_1_001; border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; text-align: center;"> &#2346; + &#2401; = &#2346;&#2403;</div>
<p style="margin-bottom: 0">mPDF can support some of these languages, but requires specially prepared font files that are unique to mPDF.<br />
Supported languages: Bengali, Devan&#257;gar&#299;, Gujar&#257;ti, Gurmukhi, Kannada, Malayalam, Oriya, Tamil, Telugu</p>
<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt;">
<span style="font-family:ind_bn_1_001;">&#2438;&#2488;&#2488;&#2494;&#2482;&#2494;&#2478;&#2497; &#2438;&#2482;&#2494;&#2439;&#2453;&#2497;&#2478; </span>
<span style="font-family:ind_gu_1_001;">&#2728;&#2734;&#2744;&#2765;&#2724;&#2759; </span>
<span style="font-family:ind_ml_1_001;">&#3368;&#3374;&#3384;&#3405;&#3349;&#3390;&#3376;&#3330; </span>
<span style="font-family:ind_hi_1_001;">&#x0928;&#x092E;&#x0938;&#x094D;&#x0924;&#x0947; </span>
<span style="font-family:ind_ta_1_001;">&#2997;&#2979;&#2965;&#3021;&#2965;&#2990;&#3021;! </span>
</div>
Complex scripts <b>not</b> supported: Khmer, Sinhala, Tibetan, Myanmar (Burmese), Balinese
<h4>Vertical writing</h4>
<div>Vertical writing is not supported by mPDF (e.g. Mongolian and Phags-pa) although the individual characters can be displayed using suitable fonts.</div>
<pagebreak />
<h4>Combining diacritics</h4>
<p>In Unicode, letters with diacritics (e.g. &#193;&#225;&#550;&#551;&#196;&#228;) are usually represented as a single character e.g. Unicode U+0196 is an A Umlaut. There are 4 blocks in Unicode of diacritics or \'marks\' which can be used to combine with adjacent letters: Combining Diacritical Marks (U+0300 - U+036F), Combining Diacritical Marks Supplement (U+1DC0 - U+1DFF), Combining Marks for Symbols(U+20D0 - U+20FF) and Combining Half Marks (U+FE20 - U+FE2F). </p>
<p>Software applications use special positioning information stored in OpenType font files to resposition the diacritic/mark depending on the context. mPDF does not support this repositioning and is dependent on the font design and original placement of the diacritic:
</p>
<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 14pt;">
<div style="font-family:\'Dejavu Sans Condensed\';">&#193; &#225; &#550; &#551; &#196; &#228; &iuml; (Precomposed characters: DejaVu Sans Condensed)</div>
<div style="font-family:\'Dejavu Sans Condensed\';">A&#769; a&#769; A&#x307; a&#x307; A&#x308; a&#x308; i&#x308; (Using diacritics: DejaVu Sans Condensed)</div>
<div style="font-family:\'Arial Unicode MS\';">A&#769; a&#769; A&#x307; a&#x307; A&#x308; a&#x308; i&#x308; (Arial Unicode MS)</div>
<div style="font-family:\'Times New Roman\';">A&#769; a&#769; A&#x307; a&#x307; A&#x308; a&#x308; i&#x308; (Times New Roman)</div>
<div style="font-family:\'Courier new\';">A&#769; a&#769; A&#x307; a&#x307; A&#x308; a&#x308; i&#x308; (Courier New)</div>
</div>
<p><b>It is recommended to use precomposed characters whenever possible with mPDF.</b></p>
<pagebreak />
<h2>Unicode Supplementary Planes</h2>
<p>The original Unicode allocated characters between x0000 and xFFFF (65,536 characters). This \'Basic Multilingual Plane\' supported most characters in common use, including a large number of Unified Chinese-Japanese-Korean characters (CJK). Later the Unicode standard was extended to 16 Planes. </p>
<p>The first plane (plane 0), the Basic Multilingual Plane (BMP), is where most characters have been assigned so far.</p>
<p>Plane 1, the Supplementary Multilingual Plane (SMP), is mostly used for historic scripts such as Linear B, but is also used for musical and mathematical symbols.</p>
<p>Plane 2, the Supplementary Ideographic Plane (SIP), is used for about 40,000 Unified Han (CJK) Ideographs.</p>
<p>mPDF version 5 supports fonts containing characters from all Unicode Planes. By choosing the correct font, almost every single character from Unicode 5 can be displayed in a PDF file.</p>
<h4>Unicode Supplementary Multilingual Plane (SMP or Plane 1) U+10000 - U+1FFFF</h4>
<h5>Gothic text</h5>
<div>
This paragraph shows Gothic text. These characters lie in the Unicode Supplementary Multilingual Plane U+10330 - U+1034F.
</div>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<div style="font-family:damase">
&#66352; &#66353; &#66354; &#66355; &#66356; &#66357; &#66358; &#66359; &#66360; &#66361; &#66362; &#66363; &#66364; &#66365; &#66366; &#66367; &#66368; &#66369; &#66370; &#66371; &#66372; &#66373; &#66374; &#66375; &#66376; &#66377; &#66378;
</div>
</div>
<div>
Font: MPH2BDamase (damase_v.2.ttf) available from: http://www.wazu.jp/gallery/views/View_MPH2BDamase.html
</div>
<h5>Egyptian Hieroglyphics</h5>
<div>
This paragraph shows Egyptian Hieroglyphics. These characters lie in the Unicode Supplementary Multilingual Plane U+13000 - U+1342F.
</div>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<div style="font-family:aegyptus; font-size: 24pt">
&#77824; &#77825; &#77826; &#77827; &#77828; &#77829; &#77830; &#77831; &#77832; &#77833; &#77834; &#77835; &#77836; &#77837; &#77838; &#77839; &#77840; &#77841;
</div>
</div>
<div>
Font: Aegyptus.otf available from: http://users.teilar.gr/~g1951d/
</div>
<p>SMP contains mainly ancient scripts - see <a href="http://mpdf1.com/manual/index.php?tid=451">http://mpdf1.com/manual/index.php?tid=451</a> for full list.</p>
<p>mPDF uses a different method to embed fonts in the PDF file if they include characters from SMP or SIP, because the characters cannot be represented by a 4 character hex code 0000-FFFF. This method is less eficient than the default method, and it can be suppressed by adding the font name to the array \'BMPonly\' in the config_fonts.php configuration file. </p>
<p>Note that the DejaVu fonts distributed with mPDF and (GNU)FreeSans and FreeSerif fonts do contain a few characters in the SMP plane, but most users will not require them and by default they have been added to the array \'BMPonly\'.</p>
<pagebreak />
<h4>CJK characters</h4>
<p>Below are examples of all the CJK Unicode blocks contained in the Basic Multilingual Plane and Supplemental Ideographic Plane</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<h5>Plane 0 (BMP)</h5>
<dl style="font-family:sun-exta;">
<dt>CJK Radicals Supplement</dt>
<dd>&#11918; &#11919; &#11920; &#11921; &#11922; &#11923; &#11924; &#11925; &#11926; &#11927; &#11928; &#11929; &#11931; &#11932; &#11933; &#11934; &#11935; &#11936; &#11937; &#11938; &#11939; &#11940; &#11941; &#11942; &#11943; &#11944; &#11945; &#11946; </dd>
<dt>Kangxi Radicals</dt>
<dd>&#12083; &#12084; &#12085; &#12086; &#12087; &#12088; &#12089; &#12090; &#12091; &#12092; &#12093; &#12094; &#12095; &#12096; &#12097; &#12098; &#12099; &#12100; &#12101; &#12102; &#12103; &#12104; &#12105; &#12106; &#12107; &#12108; &#12109; </dd>
<dt>Ideographic Description Characters</dt>
<dd>&#12272; &#12273; &#12274; &#12275; &#12276; &#12277; &#12278; &#12279; &#12280; &#12281; &#12282; &#12283; </dd>
<dt>CJK Symbols and Punctuation</dt>
<dd>&#12288;&#12296; &#12297; &#12298; &#12299; &#12300; &#12301; &#12302; &#12303; &#12304; &#12305; &#12306; &#12307; &#12308; &#12309; &#12310; &#12311; &#12312; &#12313; &#12314; &#12315; &#12316; &#12317; &#12318; &#12326; &#12327; &#12328; &#12329; &#12330; </dd>
<dt>Hiragana</dt>
<dd>&#12353; &#12354; &#12355; &#12356; &#12357; &#12358; &#12359; &#12360; &#12361; &#12362; &#12363; &#12364; &#12365; &#12366; &#12367; &#12368; &#12369; &#12370; &#12371; &#12372; &#12373; &#12374; </dd>
<dt>Katakana</dt>
<dd>&#12448; &#12449; &#12450; &#12451; &#12452; &#12453; &#12454; &#12455; &#12456; &#12457; &#12458; &#12459; &#12460; &#12461; &#12462; &#12463; &#12464; &#12465; &#12466; &#12467; &#12468; </dd>
<dt>Bopomofo</dt>
<dd>&#12549; &#12550; &#12551; &#12552; &#12553; &#12554; &#12555; &#12556; &#12557; &#12558; &#12559; &#12560; &#12561; &#12562; &#12563; &#12564; &#12565; &#12566; </dd>
<dt>Hangul Compatibility Jamo</dt>
<dd>&#12593; &#12594; &#12595; &#12596; &#12597; &#12598; &#12599; &#12600; &#12601; &#12602; &#12603; &#12604; &#12605; &#12606; &#12607; &#12608; &#12609; &#12610; </dd>
<dt>Kanbun</dt>
<dd>&#12688; &#12689; &#12690; &#12691; &#12692; &#12693; &#12694; &#12695; &#12696; &#12697; &#12698; &#12699; &#12700; &#12701; &#12702; &#12703; </dd>
<dt>Bopomofo Extended</dt>
<dd>&#12704; &#12705; &#12706; &#12707; &#12708; &#12709; &#12710; &#12711; &#12712; &#12713; &#12714; &#12715; &#12716; &#12717; &#12718; &#12719; &#12720; &#12721; &#12722; &#12723; &#12724; &#12725; &#12726; &#12727; </dd>
<dt>Katakana Phonetic Extensions</dt>
<dd>&#12784; &#12785; &#12786; &#12787; &#12788; &#12789; &#12790; &#12791; &#12792; &#12793; &#12794; &#12795; &#12796; &#12797; &#12798; &#12799; </dd>
<dt>Enclosed CJK Letters and Months</dt>
<dd>&#12804; &#12805; &#12806; &#12807; &#12808; &#12809; &#12810; &#12811; &#12812; &#12813; &#12814; &#12815; &#12816; &#12817; &#12818; &#12819; &#12820; &#12821; &#12822; &#12823; &#12824; &#12825; &#12826; &#12827; &#12828; </dd>
<dt>CJK Compatibility</dt>
<dd>&#13056; &#13057; &#13058; &#13059; &#13060; &#13061; &#13062; &#13063; &#13064; &#13065; &#13066; &#13067; &#13068; &#13069; &#13070; &#13071; &#13072; &#13073; &#13074; &#13075; &#13076; &#13077; &#13078; &#13079; &#13080; </dd>
<dt>CJK Unified Ideographs Extension A</dt>
<dd>&#13312; &#13313; &#13314; &#13315; &#13316; &#13317; &#13318; &#13319; &#13320; &#13321; &#13322; &#13323; &#13324; &#13325; &#13326; &#13327; &#13328; &#13329; &#13330; &#13331; &#13332; &#13333; &#13334; &#13335; &#13336; </dd>
<dt>CJK Unified Ideographs</dt>
<dd>&#19968; &#19969; &#19970; &#19971; &#19972; &#19973; &#19974; &#19975; &#19976; &#19977; &#19978; &#19979; &#19980; &#19981; &#19982; &#19983; &#19984; &#19985; &#19986; &#19987; &#19988; &#19989; &#19990; &#19991; &#19992; </dd>
<dt>Yi Syllables</dt>
<dd>&#40960; &#40961; &#40962; &#40963; &#40964; &#40965; &#40966; &#40967; &#40968; &#40969; &#40970; &#40971; &#40972; &#40973; &#40974; &#40975; &#40976; &#40977; &#40978; &#40979; &#40980; &#40981; &#40982; &#40983; &#40984; &#40985; &#40986; </dd>
<dt>Yi Radicals</dt>
<dd>&#42128; &#42129; &#42130; &#42131; &#42132; &#42133; &#42134; &#42135; &#42136; &#42137; &#42138; &#42139; &#42140; &#42141; &#42142; &#42143; &#42144; &#42145; &#42146; &#42147; &#42148; &#42149; &#42150; &#42151; &#42152; &#42153; </dd>
<dt>Hangul Syllables</dt>
<dd>&#44032; &#44033; &#44034; &#44035; &#44036; &#44037; &#44038; &#44039; &#44040; &#44041; &#44042; &#44043; &#44044; &#44045; &#44046; &#44047; &#44048; &#44049; &#44050; &#44051; &#44052; &#44053; &#44054; &#44055; &#44056; </dd>
<dt>CJK Compatibility Ideographs</dt>
<dd>&#63744; &#63745; &#63746; &#63747; &#63748; &#63749; &#63750; &#63752; &#63753; &#63754; &#63755; &#63756; &#63757; &#63758; &#63759; &#63760; &#63761; &#63762; &#63763; &#63764; &#63765; &#63766; &#63767; &#63768; &#63769; </dd>
</dl>
<h5>Plane 2 (SIP)</h5>
<dl style="font-family:sun-exta;">
<dt>CJK Unified Ideographs Extension B</dt>
<dd>&#x20000; &#x20001; &#x20002; &#x20003; &#x20004; &#x20005; &#x20006; &#x20007; &#x20008; &#x20009; &#x2000A; &#x2000B; &#x2000C; &#x2000D; &#x2000E; &#x2000F; &#x20010; &#x20011; &#x20012; &#x20013; </dd>
<dt>CJK Unified Ideographs Extension C</dt>
<dd>&#x2A700; &#x2A701; &#x2A702; &#x2A703; &#x2A704; &#x2A705; &#x2A706; &#x2A707; &#x2A708; &#x2A709; &#x2A70A; &#x2A70B; &#x2A70C; &#x2A70D; &#x2A70E; &#x2A70F; &#x2A710; &#x2A711; &#x2A712; &#x2A713; </dd>
<dt>CJK Compatibility Ideographs Supplement</dt>
<dd>&#x2F800; &#x2F801; &#x2F802; &#x2F803; &#x2F804; &#x2F805; &#x2F806; &#x2F807; &#x2F808; &#x2F809; &#x2F80A; &#x2F80B; &#x2F80C; &#x2F80D; &#x2F80E; &#x2F80F; &#x2F810; &#x2F811; &#x2F812; &#x2F813; </dd>
</dl>
</div>
<pagebreak />
<h4>Using CJK fonts in mPDF</h4>
<p>Fonts containing CJK characters are large files, typically 10-30MB. Adobe provides a free download of an \'Asian font pack\' allowing you to create PDF files without including (embedding) the font information in the file. This keeps the file size to a minimum and minimises resource usage on your website generating the PDF file. However, users will have to download the Adobe font packs to read the file, and other PDF software will not display the text correctly.</p>
<p>mPDF allows you to embed subsets of CJK fonts keeping file size down, although there is increased memory usage to generate these files.</p>
<p>Some CJK fonts are broken up into 2 files because of the size of the files. One freely available font with almost complete coverage of all CJK characters (in both BMP and SIP) is \'Sun\' available from Alan Wood\'s excellent website: <a href="http://www.alanwood.net/unicode/fonts-east-asian.html">http://www.alanwood.net/unicode/fonts-east-asian.html</a>. This comes as 2 files, Sun-ExtA and Sun-ExtB (both about 20MB in size) containing the characters from BMP and SIP respectively.
</p>
<p>mPDF allows you to treat these as one font by defining the second file as an SIP-extension of the first in the config_fonts.php configuration file. The following text includes random characters from the BMP and SIP mixed together:</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<div style="font-family:sun-extA;">
&#40706; &#40712; &#40727; &#x2320f; &#x23225; &#40742; &#40743; &#x2322f; &#x23231; &#40761; &#40772; &#x23232; &#x23233; &#40773; &#40784; &#x23234; &#x23256; &#40787; &#40794; &#x23262; &#x23281; &#40802; &#40809; &#x23289; &#x2328a;
</div>
</div>
<p>This is the entry in the config_fonts.php configuration file:</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;">
$this->fontdata = array(<br />
...<br />
&nbsp; &nbsp; &nbsp; "sun-exta" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "Sun-ExtA.ttf",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'sip-ext\' => \'sun-extb\',<br />
&nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; "sun-extb" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "Sun-ExtB.ttf",<br />
&nbsp; &nbsp; &nbsp; ),<br />
<br />
...<br />
);
</div>
<p>This is the HTML code - note only the sun-exta font-family needs to be referenced:</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;">
&lt;div style="font-family:sun-extA;"&gt;
&amp;#40706; &amp;#40712; &amp;#40727; &amp;#x2320f; &amp;#x23225; &amp;#40742; &amp;#40743; &amp;#x2322f; &amp;#x23231; &amp;#40761; &amp;#40772; &amp;#x23232; &amp;#x23233; &amp;#40773; &amp;#40784; &amp;#x23234; &amp;#x23256; &amp;#40787; &amp;#40794; &amp;#x23262; &amp;#x23281; &amp;#40802; &amp;#40809; &amp;#x23289; &amp;#x2328a;
&lt;/div&gt;
</div>
<p>NB You may also need to edit the value $this->useAdobeCJK=false in config.php or use new mPDF(\'-aCJK\'), and edit the config_cp.php configuration file.</p>
<pagebreak />
<h4>TrueType Collections</h4>
<p>TrueType Collections (.ttc files) contain more than one font. mPDF treats each font separately by defining the TTCfontID array in the config_fonts.php configuration file. </p>
<p>This example uses the Windows MingLiU fonts, which consist of 2 files containing 6 fonts (note that mingliub is not a Bold variant): </p>
<p>Font collection file (mingliu.ttc) contains the following fonts:<br />
[1] MingLiU (mingliu) Regular<br />
[2] PMingLiU (pmingliu) Regular (Proportional)<br />
[3] MingLiU_HKSCS (mingliu_hkscs) Regular<br />
</p>
<p>Font collection file (mingliub.ttc) contains the following fonts:<br />
[1] MingLiU-ExtB (mingliu-extb) Regular<br />
[2] PMingLiU-ExtB (pmingliu-extb) Regular (Proportional)<br />
[3] MingLiU_HKSCS-ExtB (mingliu_hkscs-extb) Regular<br />
</p>
<p>The following text includes characters from both BMP and SIP:</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;">
<div style="font-family:mingliu;">
&#40706; &#40742; &#40772; &#40784; &#40802; &#40809; &#x23289; &#x2328a;
</div>
<div style="font-family:mingliu_hkscs;">
&#40706; &#40742; &#40772; &#40784; &#40802; &#40809; &#x23289; &#x2328a;
</div>
<div style="font-family:pmingliu;">
&#40706; &#40742; &#40772; &#40784; &#40802; &#40809; &#x23289; &#x2328a;
</div>
</div>
<p>This is the entry in the config_fonts.php configuration file:</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;">
$this->fontdata = array(<br />
...<br />
&nbsp; &nbsp; &nbsp; "mingliu" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "mingliu.ttc",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'TTCfontID\' => array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => 1,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'sip-ext\' => \'mingliu-extb\',<br />
&nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; "pmingliu" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "mingliu.ttc",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'TTCfontID\' => array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => 2,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'sip-ext\' => \'pmingliu-extb\',<br />
&nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; "mingliu_hkscs" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "mingliu.ttc",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'TTCfontID\' => array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => 3,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'sip-ext\' => \'mingliu_hkscs-extb\',<br />
&nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; "mingliu-extb" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "mingliub.ttc",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'TTCfontID\' => array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => 1,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; "pmingliu-extb" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "mingliub.ttc",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'TTCfontID\' => array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => 2,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; "mingliu_hkscs-extb" => array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => "mingliub.ttc",<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'TTCfontID\' => array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \'R\' => 3,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; ),<br />
<br />
...<br />
);
</div>
<p>This is the HTML code:</p>
<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;">
&lt;div style="font-family:mingliu;"&gt;
&amp;#40706; &amp;#40742; &amp;#40772; &amp;#40784; &amp;#40802; &amp;#40809; &amp;#x23289; &amp;#x2328a;
&lt;/div&gt;
<br />
&lt;div style="font-family:mingliu_hkscs;"&gt;
&amp;#40706; &amp;#40742; &amp;#40772; &amp;#40784; &amp;#40802; &amp;#40809; &amp;#x23289; &amp;#x2328a;
&lt;/div&gt;
<br />
&lt;div style="font-family:pmingliu;"&gt;
&amp;#40706; &amp;#40742; &amp;#40772; &amp;#40784; &amp;#40802; &amp;#40809; &amp;#x23289; &amp;#x2328a;
&lt;/div&gt;
</div>
';
//==============================================================
//==============================================================
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,498 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('');
//==============================================================
$html = '
<style>
body {
font-family: sans-serif;
font-size: 10pt;
}
h4 {
font-variant: small-caps;
}
h5 {
margin-bottom: 0;
color: #110044;
}
p { margin-top: 0; }
dl {
margin: 0;
}
table {
border-spacing: 0.5em;
border: 7px dashed teal;
}
.table1 {
background-image: -moz-linear-gradient(left, #07cdde 20%, #00f200 );
}
.table1 tr.thisrow1 {
background-image-resolution: 300dpi;
background: transparent url(\'bayeux1.jpg\') repeat scroll left top;
}
.table1 tr.thisrow1 td {
height: 28mm;
}
.table1 tr.thisrow2 {
background-image: none;
background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.29, rgb(90,83,12)), color-stop(0.65, rgb(117,117,39)), color-stop(0.83, rgb(153,153,67)));
}
.table3 {
border-collapse: collapse;
/* background-gradient: linear #07cdde #00f200 1 0 0.5 1; */
background: -moz-linear-gradient(left, #07cdde 20%, #00f200 );
}
tr.thisrow {
border: 3px dashed red;
background: transparent url(\'bayeux1.jpg\') repeat scroll left top;
}
.table3 tr.thisrow {
border: 3px dashed orange;
background: transparent url(\'bgrock.jpg\') repeat scroll left top;
}
tfoot tr {
border: 5px dashed blue;
/* background-gradient: linear #c7Fdde #FF0000 1 0 0.5 0; */
background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
}
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background: linear-gradient(top, #c7cdde, #f0f2ff);
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background: linear-gradient(top, #c7cdde, #f0f2ff);
border-radius: 2mm;
background-clip: border-box;
}
div.text {
padding:1em;
margin: 1em 0;
text-align:justify;
}
.code {
font-family: mono;
font-size: 9pt;
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
}
</style>
<body style="background: -moz-repeating-radial-gradient(rgba(255,0,0,0.1), rgba(0,0,255,0.1) 40px, rgba(255,0,0,0.1) 80px)">
<div style="position:fixed; top: 0; right: 0"><img src="tux.svg" width="110" /></div>
<h1></a>mPDF</h1>
<h2>New features in mPDF Version 5.1</h2>
<div class="rounded text">
<ul>
<li>CSS background (images, colours or gradients) on &lt;TR&gt; and &lt;TABLE&gt;</li>
<li>CSS border on &lt;TR&gt; (only in border-collapsed mode)</li>
<li>support for Mozilla and CSS3 gradient syntax:
<ul>
<li>-moz-linear-gradient, linear-gradient</li>
<li>-moz-radial-gradient, radial-gradient</li>
<li>-moz-repeating-linear-gradient, linear-repeating-gradient</li>
<li>-moz-repeating-radial-gradient, radial-repeating-gradient</li>
</ul>
</li>
<li>expanded support for gradients (including in SVG images):
<ul>
<li>multiple colour \'stops\'</li>
<li>opacity (transparency)</li>
<li>angle and/or position can be specified</li>
</ul>
</li>
<li>gradient can be used as an image mask (custom mPDF styles: gradient-mask)</li>
<li>CSS3 image-orientation supported for &lt;IMG&gt; (similar to existing custom mPDF attribute: rotate)</li>
<li>CSS3 image-resolution supported for &lt;IMG&gt;</li>
<li>background-image-resolution (custom mPDF CSS-type style) to define resolution of background images</li>
<li>improved support for SVG images</li>
<li>SVG and WMF images supported in background-image</li>
<li>file attachments (embedded in PDF file) &rarr; &rarr; &rarr; &rarr; &rarr; <annotation file="tiger.jpg" content="This is a file attachment (embedded file)
Double-click to open attached file
Right-click to save file on your computer" icon="Paperclip" title="Attached File: tiger.jpg" pos-x="150" /></li>
</ul>
</div>
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Tables: borders, background images & gradients</div>
<div class="rounded text">Background images or gradients can be set on whole tables or table rows (as well as individual table cells)</div>
<table class="table1">
<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr>
<tr class="thisrow1"><td>This row has</td><td>a background-image</td><td>of the bayeux tapestry</td></tr>
<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr>
<tr class="thisrow2"><td>This row has</td><td>a gradient set</td><td>which spans all 3 cells</td></tr>
<tr><td>Row 5</td><td>Also data</td><td>Also data</td></tr>
</tbody></table>
<div class="rounded text">Border can be set on table rows (only when border-collapse is set to collapse)</div>
<table class="table3" border="1">
<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr>
<tr class="thisrow"><td>Row 2</td><td>This is data<br />This is data<br />This is data<br />This is data</td><td>Also data</td></tr>
<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr>
</tbody></table>
<!-- ============================================================== -->
<div style="margin-top: 2em; height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div>
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mozilla and CSS3 gradient syntax</div>
<div style="height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div>
<h2>Linear gradients</h2>
<h4> Angle set AND points e.g. -moz-linear-gradient(34% 84% 30deg, red, orange, yellow...</h4>
<table style="border-collapse: collapse; repeat scroll left top; border: none;">
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);">top right 210 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);">30% 80% 60 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);">10px 40px 325 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);">bottom left 135deg&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
</table>
<h4> Points set only e.g. -moz-linear-gradient(bottom left, red, orange, yellow...</h4>
<table style="border-collapse: collapse; repeat scroll left top; border: none;">
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);">bottom right</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);">top</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);">10px 40px</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);">30% 10%</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
</table>
<pagebreak />
<h4> Angle set but no points e.g. -moz-linear-gradient(30deg, red, orange, yellow...</h4>
<table style="border-collapse: collapse; repeat scroll left top; border: none;">
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);">90 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);">120 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);">180 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);">210 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
</table>
<div class="rounded text">
<p>Linear and radial gradients are not specified in the CSS2 specification. The CSS3 draft specification gives a way of outputting gradients, but currently this is not supported by any browser.</p>
<p>Mozilla (Firefox) has developed its own way of producing gradients, which approximates to the CSS3 draft specification: </p>
<ul>
<li><i>-moz-linear-gradient</i> </li>
<li><i>-moz-repeating-linear-gradient</i></li>
<li><i>-moz-radial-gradient</i> and </li>
<li><i>-moz-repeating-radial-gradient</i></li>
</ul>
<p>WebKit (Safari, Chrome etc.) have a separate way of defining gradients using <i>-webkit-gradient</i></p>
<p>Microsoft (IE) does not support any such method of specifying gradients, but does have a function <i>filter: progid:DXImageTransform.Microsoft.gradient()</i> </p>
<p>When writing HTML for cross-browser compatibility, it is common to see something like this in a stylesheet:</p>
<p class="code">
background: #999999; /* for non-css3 browsers */<br />
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\'); /* for IE */<br />
background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#000000)); /* for webkit browsers */<br />
background: -moz-linear-gradient(top, #cccccc, #000000); /* for firefox 3.6+ */<br />
</p>
<p>mPDF versions <= 5.0 supported a custom style property <i>background-gradient</i> which accepted both linear and radial gradients. These continue to be supported (and both old and new forms can be used together); note the differences:</p>
<ul>
<li>mPDF background-gradients are output underneath background-images, and both can be specified; whereas the new CSS3/Mozilla-type gradients are defined as a type of background-image</li>
<li>CSS3/Mozilla gradients support multiple colour-stops, opacity, repeating-gradients, and a greater number of options for defining the gradient axis (linear gradients) or shape and extent (radial gradients)</li>
</ul>
<p>mPDF will attempt to parse a CSS stylesheet written for cross-browser compatibility:</p>
<ul>
<li>parse and support <i>-moz</i> type gradients</li>
<li>parse and support CSS3 gradient syntax</li>
<li>ignore <i>-webkit</i> syntax gradients</li>
</ul>
<p>More details can be found at:</p>
<ul>
<li>Mozilla linear - <a href="https://developer.mozilla.org/en/CSS/-moz-linear-gradient">https://developer.mozilla.org/en/CSS/-moz-linear-gradient</a></li>
<li>Mozilla radial - <a href="https://developer.mozilla.org/en/CSS/-moz-radial-gradient">https://developer.mozilla.org/en/CSS/-moz-radial-gradient</a></li>
<li>Mozilla gradients use - <a href="https://developer.mozilla.org/en/Using_gradients">https://developer.mozilla.org/en/Using_gradients</a></li>
<li>CSS3 linear gradients - <a href="http://dev.w3.org/csswg/css3-images/#linear-gradients">http://dev.w3.org/csswg/css3-images/#linear-gradients</a></li>
<li>CSS3 radial gradients - <a href="http://dev.w3.org/csswg/css3-images/#radial-gradients">http://dev.w3.org/csswg/css3-images/#radial-gradients</a></li>
<li>WebKit gradients - <a href="http://webkit.org/blog/175/introducing-css-gradients/">http://webkit.org/blog/175/introducing-css-gradients/</a></li>
</ul>
</div>
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Repeating gradients</div>
<p class="code">
background: repeating-linear-gradient(red, blue 20px, red 40px);
<br /> <br />
background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px);
</p>
<div style="float: right; width: 250px; height: 150px; background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px);">&nbsp;</div>
<div style="float: left; width: 250px; height: 150px; background: repeating-linear-gradient(red, blue 20px, red 40px);">&nbsp;</div>
<br style="clear: both;" />
<br />
<br />
<p class="code">
background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px);
<br /> <br />
background: repeating-radial-gradient(red, blue 20px, red 40px);
</p>
<div style="float: right; width: 250px; height: 150px; background: repeating-radial-gradient(red, blue 20px, red 40px);">&nbsp;</div>
<div style="float: left; width: 250px; height: 150px; background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px);">&nbsp;</div>
<br style="clear: both;" />
<pagebreak />
<h2>Radial gradients</h2>
<div style="float: right; width: 250px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8;
border-radius: 155px / 100px;
-moz-border-radius: 155px / 100px;
box-shadow: 10px 10px 25px #CCC;
-moz-box-shadow: 5px 5px 25px #CCC;
background-image: -moz-radial-gradient(70% 30%, ellipse , #ffffff 0%, #F56991 50%, #8A2624 100%);">&nbsp;</div>
<div style="float: left; width: 150px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8;
border-radius: 100px;
-moz-border-radius: 100px;
box-shadow: 10px 10px 25px #CCC;
-moz-box-shadow: 5px 5px 25px #CCC;
background-image: -moz-radial-gradient(70% 30%, circle , #ffffff 0%, #E56991 50%, #8A2624 100%);">&nbsp;</div>
<br style="clear: both;" />
<div style="float: right; width: 150px; height: 150px; border: 0.2mm solid black;
background: radial-gradient(bottom left, farthest-side, red, blue 50px, pink);
background-image: -moz-radial-gradient(red, yellow, #1E90FF);
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.48, rgb(107,14,86)), color-stop(0.74, rgb(140,41,112)), color-stop(0.87, rgb(168,70,146)));">&nbsp;</div>
<div style="float: left; width: 150px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(red 5%, yellow 25%, #1E90FF 50%);">&nbsp;</div>
<br style="clear: both;" />
<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, circle, red, yellow, #1E90FF);">&nbsp;</div>
<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, ellipse, red, yellow, #1E90FF);">&nbsp;</div>
<br style="clear: both;" />
<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse closest-side, red, yellow 10%, #1E90FF 50%, white);">&nbsp;</div>
<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse farthest-corner, red, yellow 10%, #1E90FF 50%, white);">&nbsp;</div>
<br style="clear: both;" />
<p style="background-image: -moz-radial-gradient(center , red, orange, yellow, green, blue, indigo, violet);">&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;</p>
<p style="background-image: -moz-radial-gradient(center , circle closest-side, blue 0%, red 100%);">&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;</p>
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Gradient Image mask</div>
<div class="rounded text">Gradients (linear or radial) can also be used to produce \'masks\' for images. The same syntax is used as for background gradients (e.g. -moz-linear-gradient) but is set using a custom mPDF style: <i>gradient-mask</i>. The rgba() method for defining colours is used: colours are ignored, but the opacity value is used to mask the image.</div>
<p class="code">&lt;img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /&gt;
<br /><br />&lt;img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /&gt;
<br /><br />&lt;img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" /&gt;
</p>
<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" />
<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" />
<img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" />
<br />
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image orientation</div>
<div class="rounded text">Images can be rotated using a custom mPDF HTML attribute: rotate. mPDF now also supports the draft CSS3 property of image-orientation. Rotation can be expressed in degrees, radians or grad units; it is corrected if necessary to an orthogonal rotation i.e. 90, 180 or 270 degrees. NB This does not work on background-images.</div>
<p class="code">&lt;img src="tiger2.png" style="image-orientation: -90deg" width="100" /&gt;
<br />
&lt;img src="tiger2.png" style="image-orientation: 3.14159rad" width="100" /&gt;
</p>
<img src="tiger2.png" width="100" />
<img src="tiger2.png" style="image-orientation: 75deg;" width="100" />
<img src="tiger2.png" style="image-orientation: 180deg; image-resolution: 300dpi; " width="100" />
<img src="tiger2.png" style="image-orientation: -90deg" width="100" />
<br />
<br />
<br />
<br />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image resolution</div>
<div class="rounded text">Image files (which do not have an output width or height specified) are displayed in mPDF at the default resolution set by the variable $mpdf->img_dpi. This can be overridden using the draft CSS3 property \'image-resolution\', which can be applied to &lt;IMG&gt; or background-images.
<br />
The next 3 image files are identical (300px x 300px) but they have been saved with a different specified resolution: the first at 96dpi, the second at 300dpi.
<br />
NB When used in combination with \'from-image\', a specified resolution is only used if the image does not have an intrinsic resolution. Only JPG, PNG and BMP files store a specified DPI resolution in the file.</div>
<p class="code">&lt;img src="tiger300px300dpi.png" style="image-resolution: from-image;" /&gt;
<br />&lt;img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" /&gt;
<br />&lt;img src="tiger300px96dpi.png" style="image-resolution: from-image;" /&gt;</p>
<img src="tiger300px300dpi.png" style="image-resolution: from-image;" />
<img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" />
<img src="tiger300px96dpi.png" style="image-resolution: from-image;" />
<br /> <br />
<pagebreak />
<div class="rounded text">Image resolution can also be applied to a background-image. This can be used as an alternative to the custom mPDF style property - \'background-image-resize\'</div>
<p class="code">&lt;div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"&gt;</p>
<div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;">Hallo<br />world
</div>
<br />
<p class="code">&lt;div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"&gt;</p>
<div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;">
</div>
<br />
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mixed effects</div>
<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 90px;background-color: #00f200 ; ">
<div style="padding: 15px; background: -moz-linear-gradient(top right, red, orange, yellow, green, blue, indigo, violet); border-radius: 75px; ">
<div style="padding: 15px; background-gradient: linear #07cdde #00f200 0 0 0.5 1; border-radius: 60px; ">
<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 45px; background-image-resolution: 180dpi; ">
<div style="padding: 15px; background: -moz-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); border-radius: 30px; ">
<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 180dpi; ">
Hallo World
</div>
<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 360dpi; ">
Hallo World
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<div style="background-color:#FF0000 ; width:180px; background-image: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));">
<img src="tux.svg" width="180" />
</div>
';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->WriteHTML($html);
//==============================================================
//==============================================================
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,456 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('');
$mpdf->useKerning=true;
$mpdf->restrictColorSpace=3; // forces everything to convert to CMYK colors
$mpdf->AddSpotColor('PANTONE 534 EC',85,65,47,9);
//==============================================================
$html = '
<style>
@page {
sheet-size: A4;
size: 17cm 25cm;
margin: 10%; /* % of page-box width for LR, height for TB */
margin-header: 5mm;
margin-footer: 5mm;
margin-left: 2cm;
margin-right: 1cm;
marks: cross crop;
background-image: -moz-repeating-radial-gradient(rgba(255,0,0,0.1), rgba(0,0,255,0.1) 40px, rgba(255,0,0,0.1) 80px);
}
body {
font-family: sans-serif;
font-size: 10pt;
}
h4 {
font-variant: small-caps;
}
h5 {
margin-bottom: 0;
color: #110044;
}
p { margin-top: 0; }
dl {
margin: 0;
}
table {
border-spacing: 0.5em;
border: 7px dashed teal;
}
.table1 {
background-image: -moz-linear-gradient(left, #07cdde 20%, #00f200 );
}
.table1 tr.thisrow1 {
background-image-resolution: 300dpi;
background: transparent url(\'bayeux1.jpg\') repeat scroll left top;
}
.table1 tr.thisrow1 td {
height: 28mm;
}
.table1 tr.thisrow2 {
background-image: none;
background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.29, rgb(90,83,12)), color-stop(0.65, rgb(117,117,39)), color-stop(0.83, rgb(153,153,67)));
}
.table3 {
border-collapse: collapse;
/* background-gradient: linear #07cdde #00f200 1 0 0.5 1; */
background: -moz-linear-gradient(left, #07cdde 20%, #00f200 );
}
tr.thisrow {
border: 3px dashed red;
background: transparent url(\'bayeux1.jpg\') repeat scroll left top;
}
.table3 tr.thisrow {
border: 3px dashed orange;
background: transparent url(\'bgrock.jpg\') repeat scroll left top;
}
tfoot tr {
border: 5px dashed blue;
/* background-gradient: linear #c7Fdde #FF0000 1 0 0.5 0; */
background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
}
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background: linear-gradient(top, #c7cdde, #f0f2ff);
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background: linear-gradient(top, #c7cdde, #f0f2ff);
border-radius: 2mm;
background-clip: border-box;
}
div.text {
padding:1em;
margin: 1em 0;
text-align:justify;
}
.code {
font-family: mono;
font-size: 9pt;
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
}
</style>
<body>
<div style="position:fixed; top: 0; right: 0"><img src="tux.svg" width="110" /></div>
<h1></a>mPDF</h1>
<h2>Other new features in mPDF Version 5.1</h2>
<div class="rounded text">
<ul>
<li>Kerning</li>
<li>Letter- and word-spacing</li>
<li>Small-caps improved to work with justified text, and now with kerning, letter- and word-spacing</li>
<li>Bleed area on @page media</li>
<li>Colorspace and colour conversion (almost everything except BMP images)</li>
<li>Spot colours</li>
<li>PDF/X files</li>
<li>dir="rtl"</li>
<li>numeric list-styles for arabic and indic</li>
</ul>
</div>
<!-- ============================================================== -->
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Kerning</div>
<div class="rounded text">Font kerning is supported. This corrects the inter-character spacing between specific pairs of letters. It is dependent on kerning information being available in the original font file.
<br />
You need to set $mpdf-&gt;useKerning=true; either in the config.php configuration file, or at runtime. This causes the kerning information to be loaded when fonts are accessed (and will therefore increase memory usage).
<br />
You can then set kerning on or off using the draft CSS3 style property "font-kerning". Values of normal or auto will turn kerning on; "none" will turn kerning off.
</div>
<div style="border: 0.2mm solid black; font-family: arial; font-size: 40pt;">
Off: AWAY To War.
</div>
<div style="border: 0.2mm solid black; font-family: arial; font-size: 40pt; font-kerning: auto;">
On: AWAY To War.
</div>
<!-- ============================================================== -->
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Letter and word spacing & text justification</div>
<div class="rounded text">Letter- and word-spacing can be set on almost all block and in-line style elements, using the CSS properties letter-spacing and word-spacing. Values of normal or a length can be specified (em or ex recommended).
Note that setting the letter-spacing value (including setting it to zero) will prevent any additional letter-spacing to be added when full-justifying text. The word-spacing value, however, is a <i>minimum</i> value, and can be increased in order to justify text.
<br />
<br />
Text-align: justify - no longer uses configurable variable $jSpacing= C | W | \'\'
<br />
The default value is for mixed letter- and word-spacing, set by jSWord and jSmaxChar
<br />
If a line contains a cursive script (RTL or Indic [devanagari, punjabi, bengali]) then it prevents letter-spacing
for justification on that line - effectively the same as setting letter-spacing:0
<br />
Spacing values have been removed from the config_cp.php configuration file, so the "lang" property
(in config_cp) no longer determines justification behaviour (this includes the use of Autofont()).
<br />
When using RTL or Indic [devanagari, punjabi, bengali] scripts, you should set CSS letter-spacing:0
whenever you use text-align:justify.
</div>
<p style="border: 0.2mm solid black; padding: 0.3em;">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <span style="letter-spacing: 0.2em; color: red;">Letter spacing set at 0.2em. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci.</span> Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. <span style="word-spacing: 1em; color: teal;">Word spacing set at 1em. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</span> Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p>
<!-- ============================================================== -->
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Colours</div>
<div class="rounded text">Whenever a colour can be specified in a style, additional formats are now supported: rgb(), rgba(), hsl(), hsla(), cmyk(), cmyka(), or spot().
<br />
Spot colours need to be defined at the start of the script using e.g. $mpdf-&gt;AddSpotColor(\'PANTONE 534 EC\',85,65,47,9);
<br />
The four values define the CMYK values used when the spot colour is not available. A tint % can be specified when using the spot colour in the document.
</div>
<div style="border: 0.2mm solid black; background-color: rgba(150,150,255, 0.5); color: rgb(0,150,150);">background-color: rgba(150,150,255, 0.5); color: rgb(0,150,150);</div>
<div style="border: 0.2mm solid black; background-color: rgba(60%,60%,100%, 0.5); color: rgb(0,60%,60%);">background-color: rgba(60%,60%,100%, 0.5); color: rgb(0,60%,60%);</div>
<div style="border: 0.2mm solid black; background-color: hsla(180,30%,25%, 0.5); color: hsl(360,100%,50%);">background-color: hsla(180,30%,25%, 0.5); color: hsl(360,100%,50%);</div>
<div style="border: 0.2mm solid black; background-color: cmyka(0,100,0,30, 0.3); color: spot(PANTONE 534 EC,90%);">background-color: cmyka(85,65,0,30, 0.3); color: spot(PANTONE 300 EC,80%);</div>
<br />
<br />
<!-- ============================================================== -->
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">@page media</div>
<div class="rounded text">When using @page to create a print publication with page-size less than sheet-size, the bleed margin is now configurable.
Backgrounds/gradients/images now use the bleed box as their "container box", rather than the whole page. (See this document as an example.)
<br />
Crop- and cross-marks can now both be used together, and are more configurable.
Also, background-image-opacity and background-image-resize have been extended to work with @page CSS.
<br />
The following values can be set in the configuration file, config.php:
$this-&gt;bleedMargin<br />
$this-&gt;crossMarkMargin<br />
$this-&gt;cropMarkMargin<br />
$this-&gt;cropMarkLength<br />
$this-&gt;nonPrintMargin<br />
</div>
<!-- ============================================================== -->
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Colorspace and colour conversion </div>
<div class="rounded text">PDF files can contain objects using different colorSpaces e.g. Grayscale, RGB and CMYK. By default,
mPDF creates PDF files using the colours as they are specified: font colour may be set (e.g. #880000) as an RGB colour, and the
file may contain JPG images in RGB or CMYK format.
<br />
In some circumstances, you may wish to create a PDF file with restricted colorSpaces e.g. printers will often want files
which contain only CMYK, spot colours, or grayscale, but <i>not</i> RGB.
<br />
Additional methods for defining colours can be used (see above), but alternatively you can set mPDF to restrict the colorSpace by setting
the value for $mpdf-&gt;restrictColorSpace:
<br />
1 - allow GRAYSCALE only [converts CMYK/RGB->gray]
<br />
2 - allow RGB / SPOT COLORS / Grayscale [converts CMYK->RGB]
<br />
3 - allow CMYK / SPOT COLORS / Grayscale [converts RGB->CMYK]
<br />
This will attempt to convert every colour value used in the document to the permitted colorSpace(s). Almost everything including images
will be converted (except BMP images), and the conversion of images may take significant time.
<br />
This example file is set to (3) CMYK; compare the appearance of the Tux penguin in this file and in the previous example file (RGB).
</div>
<br />
<br />
<!-- ============================================================== -->
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">PDF/A and PDF/X files</div>
<div class="rounded text">mPDF can produce files which (attempt to) meet the PDF/A and PDF/X specifications. In addition to restricted colorSpace,
PDF/A and /X files cannot contain images or colour values with "transparency".
<br />
Please note that full compliance with the PDF/A or /X specification is not guaranteed.
</div>
<!-- ============================================================== -->
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">RTL (right-to-left) text</div>
<div class="rounded text"><div>Handling of RTL (right-to-left) languages has been significantly rewritten, and is likely to cause
changes to the resulting files if you have previously been using mPDF. The changes have made mPDF
act more like a browser, respecting the HTML/CSS rules.
Changes include:</div>
<ul>
<li>the document now has a baseline direction; this determines the
<ul>
<li>behaviour of blocks for which text-align has not been specifically set</li>
<li>layout of mirrored page-margins, columns, ToC and Indexes, headers / footers</li>
<li>base direction can be set by any of:
<ul>
<li>$mpdf-&gt;SetDirectionality(\'rtl\');</li>
<li>&lt;html dir="rtl" or style="direction: rtl;"&gt;</li>
<li>&lt;body dir="rtl" or style="direction: rtl;"&gt;</li>
</ul></li>
<li>base direction is an inherited CSS property, so will affect all content, unless...</li>
</ul></li>
<li>direction can be set for all HTML block elements e.g. &lt;DIV&gt;&lt;P&gt;&lt;TABLE&gt;&lt;UL&gt; etc using
<ul>
<li>CSS property &lt;style="direction: rtl;"&gt; </li>
<li>direction can only be set on the top-level element of nested lists</li>
<li>direction can only be set on &lt;TABLE&gt;, NOT on THEAD, TBODY, TD etc.</li>
<li>nested tables CAN have different directions</li>
</ul></li>
<li>NOTE that block/table margins/paddings are NOT reversed by direction</li>
<li>language (either CSS "lang", using Autofont, or through initial set-up e.g. $mpdf = new mPDF(\'ar\') )
no longer affects direction in any way.<br />
NB config_cp.php has been changed as a result; any values of "dir" set here are now ineffective</li>
<li>default text-align is now as per CSS spec: "a nameless value which is dependent on direction"<br />
NB default text-align removed in default stylesheet in config.php </li>
<li>once text-align is specified, it is respected and inherited<br />
NB mPDF &lt;5.1 reversed the text-align property for all blocks when RTL set.</li>
<li>the configurable value $rtlcss is depracated, as it is no longer required</li>
<li>improved algorithm for dtermining text direction
<ul>
<li>english word blocks are handled in text reversal as one block i.e. dir="rtl"<br />
[arabic text] this will not be reversed [arabic text]</li>
<li>arabic numerals 0-9 handled correctly</li>
</ul></li>
</ul>
Although the control of direction for block elements is now more configurable, the control of
text direction (RTL arabic characters) remains fully automatic and unconfigurable.
&lt;BDO&gt; etc has no effect. Enclosing text in silent tags can sometimes help e.g.:
content&lt;span&gt;[arabic text]&lt;/span&gt;content
</div>
<!-- ============================================================== -->
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">List styles</div>
<div class="rounded text">Additional numerical list-styles are supported. All of these (except Tamil) are consistent with the draft CSS3 specification:<br />
<b>list-style</b>: arabic-indic | bengali | devanagari | gujarati | gurmukhi | kannada | malayalam | oriya | persian | telugu | thai | urdu | tamil
</div>
<style>
ul.arabic { font-family:\'XB Zar\'; text-align: right; direction: rtl; }
ol.arabic { font-family:\'XB Zar\'; list-style: arabic-indic; text-align: right; direction: rtl; }
ol.persian { font-family:\'XB Zar\'; list-style: persian; text-align: right; direction: rtl; }
ol.urdu { font-family:\'XB Zar\'; list-style: urdu; text-align: right; direction: rtl; }
ol.bengali { font-family: ind_bn_1_001; list-style: bengali; }
ol.devanagari { font-family: ind_hi_1_001; list-style: devanagari; }
ol.gujarati { font-family: ind_gu_1_001; list-style: gujarati; }
ol.gurmukhi { font-family: ind_pa_1_001; list-style: gurmukhi; }
ol.kannada { font-family: ind_kn_1_001; list-style: kannada; }
ol.malayalam { font-family: ind_ml_1_001; list-style: malayalam ; }
ol.oriya { font-family: ind_or_1_001; list-style: oriya ; }
ol.tamil { font-family: ind_ta_1_001; list-style: tamil ; }
ol.telugu { font-family: ind_te_1_001; list-style: telugu ; }
</style>
<ul class="arabic">
<li>Arabic
<ol class="arabic">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
</ol>
</li>
<li>Persian
<ol class="persian">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
</ol>
</li>
<li>Urdu
<ol class="urdu">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
</ol>
</li>
</ul>
<ul>
<li>Bengali
<ol class="bengali">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Devanagari
<ol class="devanagari">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Gujarati
<ol class="gujarati">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Gurmukhi
<ol class="gurmukhi">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Kannada
<ol class="kannada">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Malayalam
<ol class="malayalam">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Oriya
<ol class="oriya">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Tamil
<ol class="tamil">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
<li>Telugu
<ol class="telugu">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</li>
</ul>
';
//==============================================================
$mpdf->WriteHTML($html);
//==============================================================
//==============================================================
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,497 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('');
$mpdf->restrictColorSpace = 1; // forces to grayscale
//==============================================================
$html = '
<style>
body {
font-family: sans-serif;
font-size: 10pt;
}
h4 {
font-variant: small-caps;
}
h5 {
margin-bottom: 0;
color: #110044;
}
p { margin-top: 0; }
dl {
margin: 0;
}
table {
border-spacing: 0.5em;
border: 7px dashed teal;
}
.table1 {
background-image: -moz-linear-gradient(left, #07cdde 20%, #00f200 );
}
.table1 tr.thisrow1 {
background-image-resolution: 300dpi;
background: transparent url(\'bayeux1.jpg\') repeat scroll left top;
}
.table1 tr.thisrow1 td {
height: 28mm;
}
.table1 tr.thisrow2 {
background-image: none;
background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.29, rgb(90,83,12)), color-stop(0.65, rgb(117,117,39)), color-stop(0.83, rgb(153,153,67)));
}
.table3 {
border-collapse: collapse;
/* background-gradient: linear #07cdde #00f200 1 0 0.5 1; */
background: -moz-linear-gradient(left, #07cdde 20%, #00f200 );
}
tr.thisrow {
border: 3px dashed red;
background: transparent url(\'bayeux1.jpg\') repeat scroll left top;
}
.table3 tr.thisrow {
border: 3px dashed orange;
background: transparent url(\'bgrock.jpg\') repeat scroll left top;
}
tfoot tr {
border: 5px dashed blue;
/* background-gradient: linear #c7Fdde #FF0000 1 0 0.5 0; */
background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 );
}
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background: linear-gradient(top, #c7cdde, #f0f2ff);
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background: linear-gradient(top, #c7cdde, #f0f2ff);
border-radius: 2mm;
background-clip: border-box;
}
div.text {
padding:1em;
margin: 1em 0;
text-align:justify;
}
.code {
font-family: mono;
font-size: 9pt;
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
}
</style>
<body style="background: -moz-repeating-radial-gradient(rgba(255,0,0,0.1), rgba(0,0,255,0.1) 40px, rgba(255,0,0,0.1) 80px)">
<div style="position:fixed; top: 0; right: 0"><img src="tux.svg" width="110" /></div>
<h1></a>mPDF</h1>
<h2>New features in mPDF Version 5.1</h2>
<div class="rounded text">
<p>This is a copy of Example 54, but all object colours are converted to grayscale using simply:</p>
<p class="code">$mpdf-&gt;restrictColorSpace = 1;</p>
</div>
<div class="rounded text">
<ul>
<li>CSS background (images, colours or gradients) on &lt;TR&gt; and &lt;TABLE&gt;</li>
<li>CSS border on &lt;TR&gt; (only in border-collapsed mode)</li>
<li>support for Mozilla and CSS3 gradient syntax:
<ul>
<li>-moz-linear-gradient, linear-gradient</li>
<li>-moz-radial-gradient, radial-gradient</li>
<li>-moz-repeating-linear-gradient, linear-repeating-gradient</li>
<li>-moz-repeating-radial-gradient, radial-repeating-gradient</li>
</ul>
</li>
<li>expanded support for gradients (including in SVG images):
<ul>
<li>multiple colour \'stops\'</li>
<li>opacity (transparency)</li>
<li>angle and/or position can be specified</li>
</ul>
</li>
<li>etc...</li>
</ul>
</div>
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Tables: borders, background images & gradients</div>
<div class="rounded text">Background images or gradients can be set on whole tables or table rows (as well as individual table cells)</div>
<table class="table1">
<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr>
<tr class="thisrow1"><td>This row has</td><td>a background-image</td><td>of the bayeux tapestry</td></tr>
<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr>
<tr class="thisrow2"><td>This row has</td><td>a gradient set</td><td>which spans all 3 cells</td></tr>
<tr><td>Row 5</td><td>Also data</td><td>Also data</td></tr>
</tbody></table>
<div class="rounded text">Border can be set on table rows (only when border-collapse is set to collapse)</div>
<table class="table3" border="1">
<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr>
<tr class="thisrow"><td>Row 2</td><td>This is data<br />This is data<br />This is data<br />This is data</td><td>Also data</td></tr>
<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr>
</tbody></table>
<!-- ============================================================== -->
<div style="margin-top: 2em; height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div>
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mozilla and CSS3 gradient syntax</div>
<div style="height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div>
<h2>Linear gradients</h2>
<h4> Angle set AND points e.g. -moz-linear-gradient(34% 84% 30deg, red, orange, yellow...</h4>
<table style="border-collapse: collapse; repeat scroll left top; border: none;">
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);">top right 210 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);">30% 80% 60 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);">10px 40px 325 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);">bottom left 135deg&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
</table>
<h4> Points set only e.g. -moz-linear-gradient(bottom left, red, orange, yellow...</h4>
<table style="border-collapse: collapse; repeat scroll left top; border: none;">
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);">bottom right</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);">top</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);">10px 40px</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);">30% 10%</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
</table>
<pagebreak />
<h4> Angle set but no points e.g. -moz-linear-gradient(30deg, red, orange, yellow...</h4>
<table style="border-collapse: collapse; repeat scroll left top; border: none;">
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);">90 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);">120 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);">180 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
<tr>
<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);">210 degrees&nbsp;</td>
<td>&nbsp;</td>
<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);">&nbsp;</td>
</tr>
</table>
<div class="rounded text">
<p>Linear and radial gradients are not specified in the CSS2 specification. The CSS3 draft specification gives a way of outputting gradients, but currently this is not supported by any browser.</p>
<p>Mozilla (Firefox) has developed its own way of producing gradients, which approximates to the CSS3 draft specification: </p>
<ul>
<li><i>-moz-linear-gradient</i> </li>
<li><i>-moz-repeating-linear-gradient</i></li>
<li><i>-moz-radial-gradient</i> and </li>
<li><i>-moz-repeating-radial-gradient</i></li>
</ul>
<p>WebKit (Safari, Chrome etc.) have a separate way of defining gradients using <i>-webkit-gradient</i></p>
<p>Microsoft (IE) does not support any such method of specifying gradients, but does have a function <i>filter: progid:DXImageTransform.Microsoft.gradient()</i> </p>
<p>When writing HTML for cross-browser compatibility, it is common to see something like this in a stylesheet:</p>
<p class="code">
background: #999999; /* for non-css3 browsers */<br />
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\'); /* for IE */<br />
background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#000000)); /* for webkit browsers */<br />
background: -moz-linear-gradient(top, #cccccc, #000000); /* for firefox 3.6+ */<br />
</p>
<p>mPDF versions <= 5.0 supported a custom style property <i>background-gradient</i> which accepted both linear and radial gradients. These continue to be supported (and both old and new forms can be used together); note the differences:</p>
<ul>
<li>mPDF background-gradients are output underneath background-images, and both can be specified; whereas the new CSS3/Mozilla-type gradients are defined as a type of background-image</li>
<li>CSS3/Mozilla gradients support multiple colour-stops, opacity, repeating-gradients, and a greater number of options for defining the gradient axis (linear gradients) or shape and extent (radial gradients)</li>
</ul>
<p>mPDF will attempt to parse a CSS stylesheet written for cross-browser compatibility:</p>
<ul>
<li>parse and support <i>-moz</i> type gradients</li>
<li>parse and support CSS3 gradient syntax</li>
<li>ignore <i>-webkit</i> syntax gradients</li>
</ul>
<p>More details can be found at:</p>
<ul>
<li>Mozilla linear - <a href="https://developer.mozilla.org/en/CSS/-moz-linear-gradient">https://developer.mozilla.org/en/CSS/-moz-linear-gradient</a></li>
<li>Mozilla radial - <a href="https://developer.mozilla.org/en/CSS/-moz-radial-gradient">https://developer.mozilla.org/en/CSS/-moz-radial-gradient</a></li>
<li>Mozilla gradients use - <a href="https://developer.mozilla.org/en/Using_gradients">https://developer.mozilla.org/en/Using_gradients</a></li>
<li>CSS3 linear gradients - <a href="http://dev.w3.org/csswg/css3-images/#linear-gradients">http://dev.w3.org/csswg/css3-images/#linear-gradients</a></li>
<li>CSS3 radial gradients - <a href="http://dev.w3.org/csswg/css3-images/#radial-gradients">http://dev.w3.org/csswg/css3-images/#radial-gradients</a></li>
<li>WebKit gradients - <a href="http://webkit.org/blog/175/introducing-css-gradients/">http://webkit.org/blog/175/introducing-css-gradients/</a></li>
</ul>
</div>
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Repeating gradients</div>
<p class="code">
background: repeating-linear-gradient(red, blue 20px, red 40px);
<br /> <br />
background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px);
</p>
<div style="float: right; width: 250px; height: 150px; background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px);">&nbsp;</div>
<div style="float: left; width: 250px; height: 150px; background: repeating-linear-gradient(red, blue 20px, red 40px);">&nbsp;</div>
<br style="clear: both;" />
<br />
<br />
<p class="code">
background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px);
<br /> <br />
background: repeating-radial-gradient(red, blue 20px, red 40px);
</p>
<div style="float: right; width: 250px; height: 150px; background: repeating-radial-gradient(red, blue 20px, red 40px);">&nbsp;</div>
<div style="float: left; width: 250px; height: 150px; background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px);">&nbsp;</div>
<br style="clear: both;" />
<pagebreak />
<h2>Radial gradients</h2>
<div style="float: right; width: 250px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8;
border-radius: 155px / 100px;
-moz-border-radius: 155px / 100px;
box-shadow: 10px 10px 25px #CCC;
-moz-box-shadow: 5px 5px 25px #CCC;
background-image: -moz-radial-gradient(70% 30%, ellipse , #ffffff 0%, #F56991 50%, #8A2624 100%);">&nbsp;</div>
<div style="float: left; width: 150px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8;
border-radius: 100px;
-moz-border-radius: 100px;
box-shadow: 10px 10px 25px #CCC;
-moz-box-shadow: 5px 5px 25px #CCC;
background-image: -moz-radial-gradient(70% 30%, circle , #ffffff 0%, #E56991 50%, #8A2624 100%);">&nbsp;</div>
<br style="clear: both;" />
<div style="float: right; width: 150px; height: 150px; border: 0.2mm solid black;
background: radial-gradient(bottom left, farthest-side, red, blue 50px, pink);
background-image: -moz-radial-gradient(red, yellow, #1E90FF);
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.48, rgb(107,14,86)), color-stop(0.74, rgb(140,41,112)), color-stop(0.87, rgb(168,70,146)));">&nbsp;</div>
<div style="float: left; width: 150px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(red 5%, yellow 25%, #1E90FF 50%);">&nbsp;</div>
<br style="clear: both;" />
<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, circle, red, yellow, #1E90FF);">&nbsp;</div>
<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, ellipse, red, yellow, #1E90FF);">&nbsp;</div>
<br style="clear: both;" />
<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse closest-side, red, yellow 10%, #1E90FF 50%, white);">&nbsp;</div>
<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse farthest-corner, red, yellow 10%, #1E90FF 50%, white);">&nbsp;</div>
<br style="clear: both;" />
<p style="background-image: -moz-radial-gradient(center , red, orange, yellow, green, blue, indigo, violet);">&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;</p>
<p style="background-image: -moz-radial-gradient(center , circle closest-side, blue 0%, red 100%);">&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;</p>
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Gradient Image mask</div>
<div class="rounded text">Gradients (linear or radial) can also be used to produce \'masks\' for images. The same syntax is used as for background gradients (e.g. -moz-linear-gradient) but is set using a custom mPDF style: <i>gradient-mask</i>. The rgba() method for defining colours is used: colours are ignored, but the opacity value is used to mask the image.</div>
<p class="code">&lt;img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /&gt;
<br /><br />&lt;img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /&gt;
<br /><br />&lt;img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" /&gt;
</p>
<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" />
<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" />
<img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" />
<br />
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image orientation</div>
<div class="rounded text">Images can be rotated using a custom mPDF HTML attribute: rotate. mPDF now also supports the draft CSS3 property of image-orientation. Rotation can be expressed in degrees, radians or grad units; it is corrected if necessary to an orthogonal rotation i.e. 90, 180 or 270 degrees. NB This does not work on background-images.</div>
<p class="code">&lt;img src="tiger2.png" style="image-orientation: -90deg" width="100" /&gt;
<br />
&lt;img src="tiger2.png" style="image-orientation: 3.14159rad" width="100" /&gt;
</p>
<img src="tiger2.png" width="100" />
<img src="tiger2.png" style="image-orientation: 75deg;" width="100" />
<img src="tiger2.png" style="image-orientation: 180deg; image-resolution: 300dpi; " width="100" />
<img src="tiger2.png" style="image-orientation: -90deg" width="100" />
<br />
<br />
<br />
<br />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image resolution</div>
<div class="rounded text">Image files (which do not have an output width or height specified) are displayed in mPDF at the default resolution set by the variable $mpdf->img_dpi. This can be overridden using the draft CSS3 property \'image-resolution\', which can be applied to &lt;IMG&gt; or background-images.
<br />
The next 3 image files are identical (300px x 300px) but they have been saved with a different specified resolution: the first at 96dpi, the second at 300dpi.
<br />
NB When used in combination with \'from-image\', a specified resolution is only used if the image does not have an intrinsic resolution. Only JPG, PNG and BMP files store a specified DPI resolution in the file.</div>
<p class="code">&lt;img src="tiger300px300dpi.png" style="image-resolution: from-image;" /&gt;
<br />&lt;img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" /&gt;
<br />&lt;img src="tiger300px96dpi.png" style="image-resolution: from-image;" /&gt;</p>
<img src="tiger300px300dpi.png" style="image-resolution: from-image;" />
<img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" />
<img src="tiger300px96dpi.png" style="image-resolution: from-image;" />
<br /> <br />
<pagebreak />
<div class="rounded text">Image resolution can also be applied to a background-image. This can be used as an alternative to the custom mPDF style property - \'background-image-resize\'</div>
<p class="code">&lt;div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"&gt;</p>
<div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;">Hallo<br />world
</div>
<br />
<p class="code">&lt;div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"&gt;</p>
<div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;">
</div>
<br />
<pagebreak />
<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mixed effects</div>
<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 90px;background-color: #00f200 ; ">
<div style="padding: 15px; background: -moz-linear-gradient(top right, red, orange, yellow, green, blue, indigo, violet); border-radius: 75px; ">
<div style="padding: 15px; background-gradient: linear #07cdde #00f200 0 0 0.5 1; border-radius: 60px; ">
<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 45px; background-image-resolution: 180dpi; ">
<div style="padding: 15px; background: -moz-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); border-radius: 30px; ">
<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 180dpi; ">
Hallo World
</div>
<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 360dpi; ">
Hallo World
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<div style="background-color:#FF0000 ; width:180px; background-image: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));">
<img src="tux.svg" width="180" />
</div>
';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->WriteHTML($html);
//==============================================================
//==============================================================
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,233 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('');
//==============================================================
$html = '
<style>
textarea {
}
input {
}
select {
font-family: arialunicodems
}
</style>
<body>
<h2>Active Forms</h2>
<form action="http://127.0.0.1/MPDF1.com/common/mpdf/examples/formsubmit.php" method="post">
<b>Input Text</b>
<input type="text" size="90" name="inputfield" value="" title="The title attribute works like a tool-tip" />
<br /><br />
<b>Readonly</b>
<input type="text" size="90" name="readonlyfield" value="Read-only field. The value will be exported on submit" title="The title does not do anything if the field is read-only" readonly="readonly" />
<br /><br />
<b>Disabled</b>
<input type="text" size="90" name="disabledfield" value="Disabled field. The value will not be exported on submit" title="The title does not do anything if the field is disabled." disabled="disabled" />
<br /><br />
<b>Required</b>
<input type="text" size="90" name="requiredfield" value="" title="This field must be entered before you can submit." required="required" />
<br /><br />
<b>Hidden</b>
<input type="hidden" name="hiddenfield" value="value_of_hidden_field">
<br /><br />
<b>Input Password</b>
<input type="password" size="40" name="password" value="mysecretpassword" title="This field is set to act as a password field." >
<br /><br />
<b>Calculations</b>
<input type="text" size="20" name="maths1" value="0" onChange="var a = this.getField(\'maths1\').value;
var b = this.getField(\'maths2\').value;
this.getField(\'maths3\').value = a + b;
" /> +
<input type="text" size="20" name="maths2" value="0" onChange="var a = this.getField(\'maths1\').value;
var b = this.getField(\'maths2\').value;
this.getField(\'maths3\').value = a + b;
" /> =
<input type="text" size="20" name="maths3" value="" readonly="readonly"/>
<br /><br />
<b>Textarea</b>
<textarea name="textareafield" spellcheck="true" rows="5" cols="80" wrap="virtual" title="Textarea tooltip">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea>
<br /><br />
<b>First language</b>
<select name="first_language" editable="editable" onChange="
var choice = this.getField(\'first_language\').value;
this.getField(\'first_language_display\').value = choice;
">
<option value="" >- Please select or type in -</option>
<option value="Arabic" >&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;</option>
<option value="Bulgarian" >&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;</option>
<option value="Chinese" >&#27721;&#35821;</option>
<option value="Czech" >&#269;esky</option>
<option value="English" >English</option>
<option value="French" >Fran&#231;ais</option>
<option value="Greek" >&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;</option>
<option value="Japanese" >&#26085;&#26412;&#35486;</option>
<option value="Latvian" >Latvie&#353;u valoda</option>
<option value="Russian" >&#1056;&#1091;&#1089;&#1089;&#1082;&#1086;</option>
<option value="Spanish" >Espa&#241;ol</option>
<option value="Turkish" >T&#252;rk&#231;e</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
You have selected: <input type="text" size="20" name="first_language_display" value="" readonly="readonly"/>
<br /><br />
<div>
<b>Spoken language(s)</b><br />
<select size="6" multiple="multiple" name="spoken_languages">
<option value="Arabic" >&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;</option>
<option value="Bulgarian" >&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;</option>
<option value="Chinese" >&#27721;&#35821;</option>
<option value="Czech" >&#269;esky</option>
<option value="English" selected="selected">English</option>
<option value="French" >Fran&#231;ais</option>
<option value="Greek" >&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;</option>
<option value="Japanese" >&#26085;&#26412;&#35486;</option>
<option value="Latvian" >Latvie&#353;u valoda</option>
<option value="Russian" >&#1056;&#1091;&#1089;&#1089;&#1082;&#1086;</option>
<option value="Spanish" >Espa&#241;ol</option>
<option value="Turkish" >T&#252;rk&#231;e</option>
</select>
</div>
<br /><br />
<b>How many languages do you speak?</b> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="1" checked="checked" > One &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="2" > Two &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="3" > Three &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="4" > Four &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="5" > Five +
<br /><br />
<input type="checkbox" name="email" value="email_subscrbe" checked="checked" /> Please send me regular information by e-mail<br>
<input type="checkbox" name="phone" value="phone-me" disabled="disabled" /> Please phone me (not available at present)<br>
<input type="checkbox" name="subscribe" value="newsletter_subscribe" /> Please subscribe me to the Newsletter
<br /><br />
<br /><br />
Click this button to see Javascript in action:
<input type="image" name="imageButton" value="imagesubmitted" src="goto.gif" title="Click to run javascript" onClick="
var npass = this.getField(\'password\').value;
app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\');
var nButton = app.alert({
cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\',
cTitle: \'A message from A. C. Robat\',
nIcon: 2, nType: 2
});
if ( nButton == 4 ) {
this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\';
}
" />
<br /><br />
<input type="submit" name="disabled_submit" value="Disabled" disabled="disabled" title="This Submit button is disabled" />
<input type="reset" name="resetfield" value="Reset" />
<input type="submit" name="submit" value="Submit" title="Click here to submit" />
<input type="submit" name="submit_in_Turkish" value="Submit (T&#252;rk&#231;e)" title="Click here to submit in T&#252;rk&#231;e" />
<input type="button" name="javascriptButton" value="Javascript Button" onClick="
var npass = this.getField(\'password\').value;
app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\');
var nButton = app.alert({
cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\',
cTitle: \'A message from A. C. Robat\',
nIcon: 2, nType: 2
});
if ( nButton == 4 ) {
this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\';
}
" />
<br /><br />
</form>
';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->useActiveForms = true;
/*
// Try playing around with these (these are also in config.php)
$mpdf->formUseZapD = false;
$mpdf->formSubmitNoValueFields = true;
$mpdf->formExportType = 'xfdf'; // 'html' or 'xfdf'
$mpdf->formSelectDefaultOption = true; // for Select drop down box; if no option is explicitly maked as selected,
// this determines whether to select 1st option (as per browser)
// - affects whether "required" attribute is relevant
$mpdf->form_border_color = '0.0 0.820 0.0';
$mpdf->form_background_color = '0.941 0.941 0.941';
$mpdf->form_border_width = '1';
$mpdf->form_border_style = 'S';
$mpdf->form_radio_color = '0.0 0.820 0.0';
$mpdf->form_radio_background_color = '0.941 0.5 0.5';
$mpdf->form_button_border_color = '0.0 0.820 0.0';
$mpdf->form_button_background_color = '0.941 0.941 0.941';
$mpdf->form_button_border_width = '1';
$mpdf->form_button_border_style = 'S';
*/
$mpdf->WriteHTML($html);
//==============================================================
// JAVASCRIPT FOR WHOLE DOCUMENT
$mpdf->SetJS('
var dialogTitle = "Enter details";
var defaultAnswer = "";
var reply = app.response("This is javascript set to run when the document opens. Enter value for first field", dialogTitle, defaultAnswer);
if (reply != null) {
this.getField("inputfield").value = reply;
}
');
//==============================================================
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,234 @@
<?php
include("../mpdf.php");
$mpdf=new mPDF('');
//==============================================================
$html = '
<style>
textarea {
}
input {
}
select {
font-family: arialunicodems
}
</style>
<body>
<h2>Active Forms</h2>
<form action="http://127.0.0.1/MPDF1.com/common/mpdf/examples/formsubmit.php" method="post">
<b>Input Text</b>
<input type="text" size="90" name="inputfield" value="" title="The title attribute works like a tool-tip" />
<br /><br />
<b>Readonly</b>
<input type="text" size="90" name="readonlyfield" value="Read-only field. The value will be exported on submit" title="The title does not do anything if the field is read-only" readonly="readonly" />
<br /><br />
<b>Disabled</b>
<input type="text" size="90" name="disabledfield" value="Disabled field. The value will not be exported on submit" title="The title does not do anything if the field is disabled." disabled="disabled" />
<br /><br />
<b>Required</b>
<input type="text" size="90" name="requiredfield" value="" title="This field must be entered before you can submit." required="required" />
<br /><br />
<b>Hidden</b>
<input type="hidden" name="hiddenfield" value="value_of_hidden_field">
<br /><br />
<b>Input Password</b>
<input type="password" size="40" name="password" value="mysecretpassword" title="This field is set to act as a password field." >
<br /><br />
<b>Calculations</b>
<input type="text" size="20" name="maths1" value="0" onChange="var a = this.getField(\'maths1\').value;
var b = this.getField(\'maths2\').value;
this.getField(\'maths3\').value = a + b;
" /> +
<input type="text" size="20" name="maths2" value="0" onChange="var a = this.getField(\'maths1\').value;
var b = this.getField(\'maths2\').value;
this.getField(\'maths3\').value = a + b;
" /> =
<input type="text" size="20" name="maths3" value="" readonly="readonly"/>
<br /><br />
<b>Textarea</b>
<textarea name="textareafield" spellcheck="true" rows="5" cols="80" wrap="virtual" title="Textarea tooltip">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea>
<br /><br />
<b>First language</b>
<select name="first_language" editable="editable">
<option value="" >- Please select or type in -</option>
<option value="Arabic" >&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;</option>
<option value="Bulgarian" >&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;</option>
<option value="Chinese" >&#27721;&#35821;</option>
<option value="Czech" >&#269;esky</option>
<option value="English" >English</option>
<option value="French" >Fran&#231;ais</option>
<option value="Greek" >&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;</option>
<option value="Japanese" >&#26085;&#26412;&#35486;</option>
<option value="Latvian" >Latvie&#353;u valoda</option>
<option value="Russian" >&#1056;&#1091;&#1089;&#1089;&#1082;&#1086;</option>
<option value="Spanish" >Espa&#241;ol</option>
<option value="Turkish" >T&#252;rk&#231;e</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
You have selected: <input type="text" size="20" name="first_language_display" value="" readonly="readonly" onCalculate="
var choice = this.getField(\'first_language\').value;
this.getField(\'first_language_display\').value = choice;
"/>
<br /><br />
<div>
<b>Spoken language(s)</b><br />
<select size="6" multiple="multiple" name="spoken_languages">
<option value="Arabic" >&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;</option>
<option value="Bulgarian" >&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;</option>
<option value="Chinese" >&#27721;&#35821;</option>
<option value="Czech" >&#269;esky</option>
<option value="English" selected="selected">English</option>
<option value="French" >Fran&#231;ais</option>
<option value="Greek" >&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;</option>
<option value="Japanese" >&#26085;&#26412;&#35486;</option>
<option value="Latvian" >Latvie&#353;u valoda</option>
<option value="Russian" >&#1056;&#1091;&#1089;&#1089;&#1082;&#1086;</option>
<option value="Spanish" >Espa&#241;ol</option>
<option value="Turkish" >T&#252;rk&#231;e</option>
</select>
</div>
<br /><br />
<b>How many languages do you speak?</b> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="1" checked="checked" > One &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="2" > Two &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="3" > Three &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="4" > Four &nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="num_languages" value="5" > Five +
<br /><br />
<input type="checkbox" name="email" value="email_subscrbe" checked="checked" /> Please send me regular information by e-mail<br>
<input type="checkbox" name="phone" value="phone-me" disabled="disabled" /> Please phone me (not available at present)<br>
<input type="checkbox" name="subscribe" value="newsletter_subscribe" /> Please subscribe me to the Newsletter
<br /><br />
<br /><br />
Click this button to see Javascript in action:
<input type="image" name="imageButton" value="imagesubmitted" src="goto.gif" title="Click to run javascript" onClick="
var npass = this.getField(\'password\').value;
app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\');
var nButton = app.alert({
cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\',
cTitle: \'A message from A. C. Robat\',
nIcon: 2, nType: 2
});
if ( nButton == 4 ) {
this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\';
}
" />
<br /><br />
<input type="submit" name="disabled_submit" value="Disabled" disabled="disabled" title="This Submit button is disabled" />
<input type="reset" name="resetfield" value="Reset" />
<input type="submit" name="submit" value="Submit" title="Click here to submit" />
<input type="submit" name="submit_in_Turkish" value="Submit (T&#252;rk&#231;e)" title="Click here to submit in T&#252;rk&#231;e" />
<input type="button" name="javascriptButton" value="Javascript Button" onClick="
var npass = this.getField(\'password\').value;
app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\');
var nButton = app.alert({
cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\',
cTitle: \'A message from A. C. Robat\',
nIcon: 2, nType: 2
});
if ( nButton == 4 ) {
this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\';
}
" />
<br /><br />
</form>
';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->useActiveForms = true;
$mpdf->formUseZapD = false;
/*
// Try playing around with these (these are also in config.php)
$mpdf->formUseZapD = false;
$mpdf->formSubmitNoValueFields = true;
$mpdf->formExportType = 'xfdf'; // 'html' or 'xfdf'
$mpdf->formSelectDefaultOption = true; // for Select drop down box; if no option is explicitly maked as selected,
// this determines whether to select 1st option (as per browser)
// - affects whether "required" attribute is relevant
$mpdf->form_border_color = '0.0 0.820 0.0';
$mpdf->form_background_color = '0.941 0.941 0.941';
$mpdf->form_border_width = '1';
$mpdf->form_border_style = 'S';
$mpdf->form_radio_color = '0.0 0.820 0.0';
$mpdf->form_radio_background_color = '0.941 0.5 0.5';
$mpdf->form_button_border_color = '0.0 0.820 0.0';
$mpdf->form_button_background_color = '0.941 0.941 0.941';
$mpdf->form_button_border_width = '1';
$mpdf->form_button_border_style = 'S';
*/
$mpdf->WriteHTML($html);
//==============================================================
// JAVASCRIPT FOR WHOLE DOCUMENT
$mpdf->SetJS('
var dialogTitle = "Enter details";
var defaultAnswer = "";
var reply = app.response("This is javascript set to run when the document opens. Enter value for first field", dialogTitle, defaultAnswer);
if (reply != null) {
this.getField("inputfield").value = reply;
}
');
//==============================================================
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,547 @@
<?php
ini_set("memory_limit","64M");
include("../mpdf.php");
$mpdf=new mPDF('');
//==============================================================
$html = '
<style>
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
box-shadow: 0.3em 0.3em #888888;
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
border-radius: 2mm;
background-clip: border-box;
}
h4 {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.3em;
margin-top: 0;
}
div.text {
padding:0.8em;
margin-bottom: 0.7em;
}
p { margin: 0.25em 0; }
.code {
font-family: monospace;
font-size: 9pt;
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
border:0.2mm solid #000088;
box-shadow: 0.3em 0.3em #888888;
}
table {
overflow: visible;
empty-cells: hide;
border:1px solid #000000;
font-family: sans-serif;
font-size: 10pt;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
}
td, th {
border:1px solid #000000;
text-align: left;
font-weight: normal;
}
td.markedcell {
text-decoration: line-through;
color: #CC0000;
}
td.underlinedcell {
text-decoration: underline;
color: #CC0000;
}
td.rotatedcell {
text-decoration: line-through;
color: #CC0000;
text-rotate: 45;
}
td.cost { text-align: right; }
caption.tablecaption {
font-family: sans-serif;
font-weight: bold;
border: none;
caption-side: top;
margin-bottom: 0;
text-align: center;
}
u.doubleu {
text-decoration: none;
border-bottom: 3px double #000088;
}
a.reddashed {
text-decoration: none;
border: 1px dashed #880000;
}
.shadowtitle {
height: 8mm;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.8em;
padding-left: 3em;
font-family:sans;
font-size: 26pt;
font-weight: bold;
border: 0.2mm solid white;
border-radius: 0.2em;
box-shadow: 0 0 2em 0.5em rgba(0,0,255,0.9);
color: #AAAACC;
text-shadow: 0.03em 0.03em #666, 0.05em 0.05em rgba(127,127,127,0.5), -0.015em -0.015em white;
}
h3 {
margin: 3em 0 2em -15mm;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
padding-left: 3em;
width: 50%;
font-family:sans;
font-size: 16pt;
font-weight: bold;
border-left: none;
border-radius: 0 2em 2em 0;
box-shadow: 0 0 2em 0.5em rgba(255,0,0,1);
text-shadow: 0.05em 0.04em rgba(127,127,127,0.5);
}
.css {
font-family: arial;
font-style: italic;
color: #000088;
}
table.zebra tbody tr:nth-child(2n+1) td { background-color: rgba(255,255,127,0.6); }
table.zebra tbody tr:nth-child(2n+1) th { background-color: rgba(255,255,127,0.6); }
table.zebra thead tr { background-color: #FFBBFF; }
table.zebra tfoot tr { background-color: #BBFFFF; }
</style>
<body>
<div class="shadowtitle">New Features in mPDF v5.4</div>
<h3>Bookmark styles<bookmark content="Bookmark styles" level="0" /></h3>
<div>
<p>Bookmarks can be styled by adding code as below to your script. You can define a colour (array of RGB) and/or a font-style (B, I, or BI) for each level (starting at 0). Results may depend on the PDF Reader you are using.</p>
<p class="code">
$this->bookmarkStyles = array(<br />
&nbsp; &nbsp; &nbsp; 0 => array(\'color\'=> array(0,64,128), \'style\'=>\'B\'),<br />
&nbsp; &nbsp; &nbsp; 1 => array(\'color\'=> array(128,0,0), \'style\'=>\'\'),<br />
&nbsp; &nbsp; &nbsp; 2 => array(\'color\'=> array(0,128,0), \'style\'=>\'I\'),<br />
);
</p>
</div>
<h3>Embedded SVG code<bookmark content="Embedded SVG code" level="0" /></h3>
<p>SVG Images can be embedded in your HTML code. This is formally part of the XHTML specification and is supported by IE9+ and most other browsers.</p>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 400 200" width="400" height="200">
<circle cx="130" cy="100" r="80" stroke="black" stroke-width="1" fill="red" />
<circle cx="200" cy="100" r="80" stroke="black" stroke-width="1" fill="blue" />
</svg>
<p class="code">
&lt;svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 200 200" width="200" height="200"&gt; <br />
&nbsp; &lt;circle cx="100" cy="50" r="40" stroke="black" stroke-width="1" fill="red" /&gt;<br />
&nbsp; &lt;circle cx="130" cy="50" r="40" stroke="black" stroke-width="1" fill="blue" /&gt;<br />
&lt;/svg&gt;
</p>
<h3>Improved CSS support<bookmark content="Improved CSS support" level="0" /></h3>
<div class="gradient text">
<p><span class="css">border-radius</span> is now supported on fixed/absolute-positioned block elements.</p>
<p><span class="css">visibility</span> can be set on any block-style element e.g. DIV,P or images IMG as: visible|hidden|printonly|screenonly</p>
<p><span class="css">background-color</span> now supports rgba() and cmyka() alpha transparency formats in tables.</p>
<p>Color, underline and strike-through are now supported in table cells, including with rotated text (see example below of spread table)</p>
<p><span class="css">page-break-after: left|right|always</span> is supported on all block-style elements and tables</p>
<p><span class="css">text-transform: capitalize|uppercase|lowercase</span> is supported in table cells</p>
</div>
<div class="gradient text">
<h4>Zebra stripes in Tables<bookmark content="Zebra stripes" level="1" /></h4>
<div>
<p><span class="css">:nth-child()</span> selector can be used in tables (on TR, TD or TH) to stripe rows or columns. Both the <i>a</i>n+<i>b</i> and odd/even forms are supported e.g.</p>
<p class="code">
tr:nth-child(2n+1) { background-color: rgba(255,255,127,0.6); } <i>or</i><br />
tr:nth-child(odd) { background-color: rgba(255,255,127,0.6); }
</p>
<table class="zebra" align="center">
<tbody>
<tr>
<th>Row 1</th>
<td>This is data</td>
<td class="cost">167.00</td>
</tr>
<tr>
<th>Row 2</th>
<td>
<p>This is data p</p>
</td>
<td class="cost">
<p>444.53</p>
</td>
</tr>
<tr>
<th>
<p>Row 3</p>
</th>
<td>
<p>This is long data</p>
</td>
<td class="cost">14.00</td>
</tr>
<tr>
<td>
<p>Row 4</p>
</td>
<td>This is data</td>
<td class="cost">
<p>0.88</p>
</td>
</tr>
<tr>
<td>Row 5</td>
<td>Also data</td>
<td class="cost">144.00</td>
</tr>
<tr>
<td>Row 6</td>
<td>Also data</td>
<td class="cost">8089.00</td>
</tr>
</tbody></table>
<p><b>Note:</b> mPDF does NOT correctly apply specificity to all CSS. The following stylesheet:</p>
<p class="code">
table.zebra tbody tr:nth-child(2n+1) td { background-color: yellow; }<br />
table.zebra tbody td:nth-child(odd) { background-color: blue; }
</p>
<p>should make every odd row yellow, and every odd column blue, but with the row/yellow overriding the column/blue.
In mPDF the td:nth-child(odd) trumps the plain td, so the column colour wins out. You can force the effect you want by using:</p>
<p class="code">
table.zebra tbody tr:nth-child(2n+1) td:nth-child(1n+0) { background-color: yellow; }
</p>
<p>The :nth-child(1n+0) selector just selects every td cell.</p>
</div>
</div>
<div class="gradient text">
<p><span class="css">border</span> can now be defined on in-line elements eg SPAN</p>
<ul><li style="font-family: arial;">Cum sociis natoque <u class="doubleu">penatibus</u> et <a class="reddashed" href="#">magnis dis parturient</a> montes</li></ul>
<p><b>Note:</b> Remember that in mPDF, inside table cells, properties set on block elements are set when possible as in-line properties - so a P element inside a table with border set, will appear with a border around the text line as though it had been set on SPAN </p>
</div>
<div class="gradient text">
<h4>Shadows<bookmark content="Shadows" level="1" /></h4>
<p><span class="css">box-shadow</span> can be defined on any block-level element (P, DIV etc). It follows the CSS3 recommendation, but <i>inset</i> is not supported.</p>
<p><span class="css">text-shadow</span> can be defined on any element. It follows the CSS3 recommendation, but <i>blur</i> is not supported.</p>
<p class="code">
&lt;span style="text-shadow: 0.03em 0.03em #666, -0.015em -0.015em white;"&gt;<br />
&lt;div style="box-shadow: 0.3em 0.3em #888888;"&gt;
</p>
</div>
<h3>Other Enhancements<bookmark content="Other Enhancements" level="0" /></h3>
<h4>Column Totals (Tables)<bookmark content="Column totals" level="1" /></h4>
<p>{colsum} placed in the footer of a table will automatically display the sum of that column. If the table breaks across more than one page, the sum of the values on that page will be displayed. A number following the colsum e.g. {colsum2} will force that number of decimal places to be displayed.</p>
<table class="zebra" align="center">
<caption class="tablecaption" align="bottom">Table caption goes here</caption>
<thead>
<tr>
<th>Header Row</th>
<td>Header Row</td>
<td>Header Row</td>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<td>Column total: (using colsum2 in {})</td>
<td class="cost"><b>{colsum2}</b></td>
</tr>
</tfoot>
<tbody>
<tr>
<th>Row 1</th>
<td>This is data</td>
<td class="cost">167.00</td>
</tr>
<tr>
<th>Row 2</th>
<td>
<p>This is data p</p>
</td>
<td class="cost">
<p>444.53</p>
</td>
</tr>
<tr>
<th>
<p>Row 3</p>
</th>
<td>
<p>This is long data</p>
</td>
<td class="cost">14.00</td>
</tr>
<tr>
<td>
<p>Row 4</p>
</td>
<td>This is data</td>
<td class="cost">
<p>0.88</p>
</td>
</tr>
<tr>
<td>Row 5</td>
<td>Also data</td>
<td class="cost">144.00</td>
</tr>
<tr>
<td>Row 6</td>
<td>Also data</td>
<td class="cost">8089.00</td>
</tr>
<tr>
<td>Row 7</td>
<td>Also data</td>
<td class="cost">3.00</td>
</tr>
<tr>
<td>Row 8</td>
<td>Also data</td>
<td class="cost">23.00</td>
</tr>
</tbody></table>
<br />
<h4>Table <span style="font-variant: small-caps">caption</span><bookmark content="Table caption" level="1" /></h4>
<p>The caption element for tables is partially supported (see example above).</p>
<p class="code">
&lt;caption align="top|bottom" style="caption-side: top|bottom"&gt;
</p>
<ul>
<li>The caption must come immediately after &lt;table&gt;.</li>
<li>The CSS <span class="css">caption-side</span> or HTML <span class="css">align</span> attribute of top|bottom supported</li>
<li>Left or right placement are not supported.</li>
<li>The caption is handled as a separate block element brought outside the table, so:
<ul>
<li>CSS will not cascade correctly from the table</li>
<li>the width of the caption block is that of page or of the block element containing the table</li>
<li>text alignment will be to the page-width not the table width</li>
<li>if table page-break-after: always, the caption will follow the pagebreak</li>
</ul></li>
</ul>
<h4>Core fonts in non-core font document<bookmark content="Core fonts" level="1" /></h4>
<p>Core fonts, which do not need to be embedded in a PDF, can now be included in a document which uses non-core fonts. The pseudo font-family names: <span style="font-family: chelvetica">chelvetica</span>, <span style="font-family: ctimes">ctimes</span> and <span style="font-family: ccourier">ccourier</span> should be used.</p>
<p class="code">
&lt;div style="font-family: chelvetica"&gt;
</p>
<p>NB You could force mPDF to always use core fonts when Arial/Helvetica/Courier are specified, by editing $this->fonttrans in config_fonts.php:</p>
<p class="code">
$this->fonttrans = array(<br />
\'arial\' => \'chelvetica\',<br />
\'helvetica\' => \'chelvetica\',<br />
\'timesnewroman\' => \'ctimes\',<br />
\'times\' => \'ctimes\',<br />
\'couriernew\' => \'ccourier\',<br />
\'courier\' => \'ccourier\',<br />
...
</p>
<br />
<h4>Javascript in Forms<bookmark content="Javascript in Forms" level="1" /></h4>
<p>Javascript used in (active) forms has been altered to reflect the Adobe Acrobat specification for Javascript in PDF documents.</p>
<p>textarea and input (text-types) now accept javascript as: onKeystroke, onValidate, onCalculate and onFormat. onChange is depracated but is not ignored; it works as though for onCalculate. (PS Select still accepts onChange)</p>
<br />
<h4>Overlapping Rows in Tables<bookmark content="Overlapping Table Rows" level="1" /></h4>
<p> Support for overlapping rowspans in tables has been improved (although probably not foolproof!)</p>
<table style="border-collapse: separate; border-spacing: 3.5mm;">
<tr>
<td style="width: 30mm; height: 30mm; background-color: rgb(213,226,253)">&nbsp;</td>
<td style="width: 30mm; height: 30mm; background-color: rgb(75,155,215)">&nbsp;</td>
<td rowspan="2" style="width: 30mm; height: 63.5mm; background-color: rgb(183,225,253)">&nbsp;</td>
</tr>
<tr>
<td colspan="2" rowspan="2" style="width: 63.5mm; height: 63.5mm; background-color: rgb(183,225,253)">&nbsp;</td>
</tr>
<tr>
<td style="width: 30mm; height: 30mm; background-color: rgb(75,155,215)">&nbsp;</td>
</tr>
</table>
<br />
<h3>Circular Text<bookmark content="Circular Text" level="0" /></h3>
<p>Circular Text can be included in a PDF document as a custom HTML tag (or a function)</p>
<ul>
<li>top-text and/or bottom-text can be specified</li>
<li>Radius (r) and font-size (using CSS) are user-defined</li>
<li>Width and height are calculated from radius and font-size</li>
<li>Other CSS styles supported on Circular Text: border, margin, padding, color, background-color, font-family, font-size, font-weight, font-style, display, visibility, and opacity</li>
<li>space-width should be specified as an integer defining the letter-spacing as a percentage of normal (default 120)</li>
<li>char-width should be specified as an integer defining the width of each character as a percentage of normal (default 100)</li>
<li>Circular Text is displayed as though an in-line element</li>
</ul>
<p>NB If $mpdf->useKerning is true then automatic kerning will be used on Circular Text.</p>
<p class="code">
&lt;textcircle r="30mm" top-text="Circular Text Circular Text" style="color: blue; font-size: 34pt; font-style: italic" /&gt;<br /><br />
&lt;textcircle r="30mm" space-width="120" char-width="150" top-text="&amp;bull; Circular Text &amp;bull;" bottom-text="Circular Text" style="background-color: #FFAAAA; border:1px solid red; padding: 0.3em; margin: 0.3em; color: #000000; font-size: 21pt; font-weight:bold; font-family: Arial" /&gt;
</p>
<textcircle r="30mm" top-text="Circular Text Circular Text" style="color: blue; font-size: 34pt; font-style: italic" />
<textcircle r="30mm" space-width="120" char-width="150" top-text="&bull; Circular Text &bull;" bottom-text="Circular Text" style="background-color: #FFAAAA; border:1px solid red; padding: 0.3em; margin: 0.3em; color: #000000; font-size: 21pt; font-weight:bold; font-family: Arial" />
<h3 style="page-break-before: left;">Spread tables<bookmark content="Spread Tables" level="0" /></h3>
<div class="gradient text">
Setting the CSS property "overflow: visible" on a table now has the effect of cancelling resizing, and allowing tables to split columns across multiple pages.
The maximum width for a column (or group of columns set by colspan) is the page width. It is recommended to specify absolute values of width on each column (not percentages).
</div>
<br />
<input type="button" name="javascriptButton" value="Show 2 pages" onClick="TwoPages()" />
<input type="button" name="javascriptButton2" value="Show 1 page" onClick="OnePage()" />
<br /><br />
<table cellPadding="9" style="font-size: 16pt;">
<caption class="tablecaption">Periodic Table (table caption)</caption>
<thead>
<tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th><th>11</th><th>12</th><th>13</th><th>14</th><th>15</th><th>16</th><th>17</th><th>18</th></tr></thead>
<tbody>
<tr>
<td>H </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td>He </td>
</tr>
<tr>
<td>Li </td><td>Be </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td>
</tr>
<tr>
<td>Na </td><td>Mg </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td>
</tr>
<tr>
<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td class="markedcell">Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td>
<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td>
</tr>
<tr>
<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td class="underlinedcell">Ru </td><td>Rh </td>
<td>Pd </td><td>Ag </td><td>Cd </td><td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td>
</tr>
<tr>
<td>Cs </td><td>Ba </td><td class="rotatedcell">Lu </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td>
<td>Au </td><td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td>
</tr>
<tr>
<td>Fr </td><td>Ra </td><td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td></td>
</tr>
</tbody></table>
<br /><br />
<div class="gradient text">
<h4>Limitations of Spread tables<bookmark content="Limitations" level="1" /></h4>
Spread tables cannot be used with: keep-headings-with-table ($mpdf->use_kwt), table rotate, table page-break-inside:avoid, columns,
CJK (chinese-japanese-korean) or RTL (right-to-left) languages.
They will also cause problems with $mpdf->forcePortraitHeaders or $mpdf->forcePortraitMargins.<br />
Warning: If a table row is too tall to fit on a page, mPDF will crash with an error message.<br />
If the width settings within the table cause conflicts, it will override some of these settings.
</div>
<br />
';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->useActiveForms = true;
$mpdf->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'),
);
$mpdf->useKerning=true; // set this to improve appearance of Circular text
// must be set before the font is first loaded
$mpdf->WriteHTML($html);
// JAVASCRIPT FOR WHOLE DOCUMENT
$mpdf->SetJS('
function TwoPages() {
this.layout="TwoColumnRight";
this.zoomType = zoomtype.fitW;
}
function OnePage() {
this.layout="SinglePage";
this.zoom = 100;
}
');
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,387 @@
<?php
ini_set("memory_limit","64M");
include("../mpdf.php");
$mpdf=new mPDF('');
//==============================================================
$html = '
<style>
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
box-shadow: 0.3em 0.3em #888888;
}
.rounded {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
border-radius: 2mm;
background-clip: border-box;
}
h4 {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.3em;
margin-top: 0;
}
div.text {
padding:0.8em;
margin-bottom: 0.7em;
}
p { margin: 0.25em 0; }
.code {
font-family: monospace;
font-size: 9pt;
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
border:0.2mm solid #000088;
box-shadow: 0.3em 0.3em #888888;
}
table {
border:1px solid #000000;
font-family: sans-serif;
font-size: 10pt;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
}
td, th {
border:1px solid #000000;
text-align: left;
font-weight: normal;
}
.shadowtitle {
height: 8mm;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.8em;
padding-left: 3em;
font-family:sans;
font-size: 26pt;
font-weight: bold;
border: 0.2mm solid white;
border-radius: 0.2em;
box-shadow: 0 0 2em 0.5em rgba(0,0,255,0.9);
color: #AAAACC;
text-shadow: 0.03em 0.03em #666, 0.05em 0.05em rgba(127,127,127,0.5), -0.015em -0.015em white;
}
h3 {
margin: 3em 0 2em -15mm;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
padding-left: 3em;
width: 50%;
font-family:sans;
font-size: 16pt;
font-weight: bold;
border-left: none;
border-radius: 0 2em 2em 0;
box-shadow: 0 0 2em 0.5em rgba(255,0,0,1);
text-shadow: 0.05em 0.04em rgba(127,127,127,0.5);
}
.css {
font-family: arial;
font-style: italic;
color: #000088;
}
table.pop {
border-collapse: collapse;
}
table.pop td {
font-family: arial;
font-size: 10px;
border: 1px solid #888888;
}
meter.pop {
margin: 3px;
}
fieldset { border: 1px solid #000000; border-radius: 5px; padding: 10px; }
div.folder {
background: url(data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub//ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcppV0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7) no-repeat 4px center;
padding: 5px 0 5px 25px;
border: 1px solid #000000;
}
</style>
<body>
<div class="shadowtitle">New Features in mPDF v5.6</div>
<h3>HTML5 tags</h3>
<div class="gradient text">
<p>New tags introduced in HTML5 now have basic support in mPDF, and will thus support CSS style references.</p>
<p>The following are treated as block elements similar to &lt;div&gt;:</p>
<p class="code">&lt;article&gt; &lt;aside&gt; &lt;details&gt; &lt;figure&gt; &lt;figcaption&gt; &lt;footer&gt; &lt;header&gt; &lt;hgroup&gt; &lt;nav&gt; &lt;section&gt; &lt;summary&gt; </p>
<p>The following are treated as in-line elements:</p>
<p class="code">&lt;time&gt; &lt;mark&gt;</p>
<p>Mark is set by default to highlight in yellow in config.php using $defaultCSS e.g. <mark>mark</mark></p>
<p>Progress and meter are discussed below:</p>
</div>
<h3>&lt;progress&gt;</h3>
<div class="gradient text">
<p>Progress: accepts the attributes value and max. A progress element without a value is called an indeterminate progress bar.
Text between the opening and closing tags is not displayed.</p>
<p>CSS styles properties can be applied: display, visibility, margin, padding, border, vertical-align, width, height and opacity.
HTML attributes width and height are supported, although not officially part of the spec.</p>
<p>Example:</p>
<p class="code">&lt;progress value="5" max="10"&gt;50%&lt;/progress&gt;</p>
<ul class="compact">
<li>
<label>Indeterminate</label>
<progress max="100"></progress>
</li>
<li>
<label>Progress: 0%</label>
<progress max="10" value="0"></progress>
</li>
<li>
<label>Progress: 100%</label>
<progress max="3254" value="3254"></progress>
</li>
<li>
<label>Progress: 57%</label>
<progress max="0.7" value="0.4"></progress>
</li>
</ul>
</div>
<h3>&lt;meter&gt;</h3>
<div class="gradient text">
<p>Meter: accepts the attributes min, max, value, optimum, low, and high.
Text between the opening and closing tags is not displayed.</p>
<p>CSS styles properties can be applied: display, visibility, margin, padding, border, vertical-align, width, height and opacity.
HTML attributes width and height are supported, although not officially part of the spec.</p>
<p>Example:</p>
<p class="code">&lt;meter value="5" max="10" min="1" low="2" high="8" optimum="5.6"&gt;5&lt;/meter&gt;</p>
<ul class="compact">
<li>
<label>Meter: full</label>
<meter value="1"></meter>
</li>
<li>
<label>Preferred usage</label>
<meter min="1024" max="10240" low="2048" high="8192" value="1824" optimum="1024"></meter>
</li>
<li>
<label>Too much traffic</label>
<meter min="1024" max="10240" low="2048" high="8192" value="6216" optimum="1024"></meter>
</li>
<li>
<label>Much too much traffic</label>
<meter min="1024" max="10240" low="2048" high="8192" value="9216" optimum="1024"></meter>
</li>
</ul>
</div>
<div class="gradient text">
<h4>Custom appearances for &lt;meter&gt; and &lt;progress&gt;</h4>
<p>Meter (and to a lesser extent progress) can be used with custom appearances e.g. by using optimum to display the average, and low/high to indicate 90th centiles</p>
<p>Custom appearances can be written by editing the script in classes/meter.php - Use a custom attribute of type="anyname" which is passed to the class as a variable e.g.</p>
<p class="code">&lt;meter type="2" value="612.7" optimum="580.4" min="517.0 " max="642.7" low="542" high="600"&gt;612.7&lt;/meter&gt;</p>
</div>
<table class="pop">
<tbody>
<tr>
<td><p><b>Domain</b></p></td>
<td><p><b>Indicator</b></p></td>
<td><p><b>LHB</b></p><p><b>number</b></p></td>
<td><p><b>LHB</b></p><p><b>Indicator</b></p>
<p><b>value</b></p>
</td>
<td><p><b>Wales</b></p><p><b>average</b></p>
</td>
<td><p><b>Wales range</b></p></td>
<td><p><b>Comparison</b></p></td>
</tr>
<tr>
<td rowspan="4"><p><b>Deaths</b></p></td>
<td><p>Death Rates per 100,000 population</p></td>
<td><p>3046</p></td>
<td><p><b>612.7</b><b></b></p></td>
<td><p>580.4</p></td>
<td><p>517.0 - 642.7</p></td>
<td><meter class="pop" type="2" value="612.7" optimum="580.4" min="517.0 " max="642.7" low="542" high="600">612.7</meter></td>
</tr>
<tr>
<td><p>Death Rates per 100,000 from cancer</p></td>
<td><p>789</p></td>
<td><p><b>178.2</b><b></b></p></td>
<td><p>172.7</p></td>
<td><p>159.5 - 182.2</p></td>
<td><meter class="pop" type="2" value="178.2" optimum="172.7" min="159.5 " max="182.2" low="162" high="180">178.2</meter></td>
</tr>
<tr>
<td><p>Death Rates per 100,000 from respiratory disease</p></td>
<td><p>505</p></td>
<td><p><b>60.5</b><b></b></p></td>
<td><p>72.11</p></td>
<td><p>54.41 - 95.5</p></td>
<td><meter class="pop" type="2" value="60.5" optimum="72.11" min="54.41 " max="95.5" low="68" high="80">60.5</meter></td>
</tr>
<tr>
<td><p>Death Rates per 100,000 from cardiovascular disease</p></td>
<td><p>913</p></td>
<td><p><b>178.2</b><b></b></p></td>
<td><p>165.0</p></td>
<td><p>151.8 - 179.9</p></td>
<td><meter class="pop" type="2" value="160.2" optimum="165" min="151.8 " max="179.9" low="158" high="170">160.2</meter></td>
</tr>
</tbody>
</table>
<h3>Fieldset and Legend</h3>
<form>
<fieldset>
<legend>Fieldset and legend</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
<label for="name">Username:</label>
<input type="text" name="name" id="name" />
<br />
<label for="mail">E-mail:</label>
<input type="text" name="mail" id="mail" />
</fieldset>
</form>
<h3>CSS styles</h3>
<div class="gradient text">
<h4></h4>
<p><span class="css">min-height</span>, <span class="css">min-width</span>, <span class="css">max-height</span> and <span class="css">max-width</span> are now supported in CSS style sheets for &lt;img&gt; (only).</p>
<p><span class="css">background: url(data:image/gif;base64,...)</span> is now supported in CSS style sheets (gif, png and jpeg).</p>
</div>
<div class="folder">This &lt;div&gt; has the folder icon set as an embedded image in the CSS</div>
<p class="code">div.folder {
background: url(data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub//ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcppV0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7) no-repeat 4px center;
padding: 5px 0 5px 25px;
border: 1px solid #000000;
}
</p>
<h3>Arabic text</h3>
<br /><br />
<div class="gradient text">
<p>The script handling Arabic text (RTL) was rewritten in mPDF 5.5 with improved support for Pashto/Sindhi/Urdu/Kurdish, especially for joining characters and added new presentation forms.</p>
<p>Some characters in Pashto/Sindhi/Urdu/Kurdish do not have Unicode values for the final/initial/medial forms of the characters. However, some fonts include glyphs for these characters "un-mapped" to Unicode (including XB Zar and XB Riyaz, which are bundled with mPDF).</p>
<p>By editing config_fonts.php and adding:</p>
<p class="code">
\'unAGlyphs\' => true,
</p>
<p>to appropriate fonts, this will force mPDF to use unmapped glyphs. It requires the font file to include a Format 2.0 POST table which references the glyphs by name as e.g. uni067C.med or uni067C.medi</p>
<p>XB Riyaz, XB Zar, Arabic Typesetting (MS), Arial (MS) all contain this table. NB If you want to know if a font file is suitable, you can open a .ttf file in a text editor and search for "uni067C.med" - if it exists, it may work!</p>
<p>Using "unAGlyphs" forces subsetting of fonts, and will not work with SIP/SMP fonts (using characters beyond the Unicode BMP Plane).</p>
<p>mPDF maps these characters to part of the Private Use Area allocated by Unicode U+F500-F7FF. This could interfere with correct use
if the font already utilises these codes (unlikely).</p>
</div>
<pagebreak />
<p>Using Arial MS font:</p>
';
//==============================================================
// Test for all Arabic characters which may need joining
//==============================================================
$mpdf->cacheTables = true;
$html .='
<style>
.script-arabic { font-family: arial; font-size: 22pt; direction: rtl; padding: 0.1em 0.5em; text-align: center; }
.joined { color: #888888; }
</style>
<div dir="ltr">
';
$ranges = array(0=>array(0x0621, 0x063a), 1=>array(0x0640, 0x064a), 2=>array(0x0671, 0x0672), 3=>array(0x0674, 0x06d3));
foreach($ranges AS $r) {
$html .= '<table border="1" style="border-collapse: collapse">';
$html .= '<thead><tr>';
$html .= '<td></td>';
$html .= '<td style="text-align:center; padding: 0 0.5em;">Isolated</td>';
$html .= '<td></td>';
$html .= '<td style="text-align:center; padding: 0 0.5em;">Final</td>';
$html .= '<td style="text-align:center; padding: 0 0.5em;">Medial</td>';
$html .= '<td style="text-align:center; padding: 0 0.5em;">Initial</td>';
$html .= '<td></td>';
$html .= '</tr></thead><tbody>';
for($n=$r[0];$n<=$r[1];$n++) {
$html .= '<tr>';
$html .= '<td>U+0'.strtoupper(dechex($n)) .'</td>';
$html .= '<td class="script-arabic">&#x0'.dechex($n) .';</td>';
$html .= '<td class="script-arabic joined">&#x626;&#x0'.dechex($n) .';</td>';
$html .= '<td class="script-arabic">&#x640;&#x0'.dechex($n) .';</td>';
$html .= '<td class="script-arabic">&#x640;&#x0'.dechex($n) .';&#x640;</td>';
$html .= '<td class="script-arabic">&#x0'.dechex($n) .';&#x640;</td>';
$html .= '<td class="script-arabic joined">&#x0'.dechex($n) .';&#x647;</td>';
$html .= '</tr>';
}
$html .='</tbody></table>';
$html .='<br />';
}
$html .='</div>';
//==============================================================
$html .='
<br />
';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->WriteHTML($html);
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

View file

@ -0,0 +1,595 @@
<?php
ini_set("memory_limit","64M");
include("../mpdf.php");
$mpdf=new mPDF('');
//==============================================================
$html = '
<style>
.gradient {
border:0.1mm solid #220044;
background-color: #f0f2ff;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
box-shadow: 0.3em 0.3em #888888;
}
h4 {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.3em;
margin-top: 0;
}
div.text {
padding:0.8em;
margin-bottom: 0.7em;
}
p { margin: 0.25em 0; }
p.code {
background-color: #d5d5d5;
margin: 1em 1cm;
padding: 0 0.3cm;
border:0.2mm solid #000088;
box-shadow: 0.3em 0.3em #888888;
}
.code {
font-family: monospace;
font-size: 9pt;
}
.shadowtitle {
height: 8mm;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.8em;
padding-left: 3em;
font-family:sans;
font-size: 26pt;
font-weight: bold;
border: 0.2mm solid white;
border-radius: 0.2em;
box-shadow: 0 0 1em 0.5em rgba(0,0,255,0.5);
color: #AAAACC;
text-shadow: 0.03em 0.03em #666, 0.05em 0.05em rgba(127,127,127,0.5), -0.015em -0.015em white;
}
h3 {
margin: 3em 0 2em -15mm;
background-color: #EEDDFF;
background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
padding: 0.5em;
padding-left: 3em;
width: 50%;
font-family:sans;
font-size: 16pt;
font-weight: bold;
border-left: none;
border-radius: 0 2em 2em 0;
box-shadow: 0 0 2em 0.5em rgba(255,0,0,1);
text-shadow: 0.05em 0.04em rgba(127,127,127,0.5);
}
.css {
font-family: arial;
font-style: italic;
color: #000088;
}
.aBDP { text-align: "." center; }
.arBDP { text-align: "\66B" center; }
.middot { text-align: "\B7" center ; }
p.menu {
text-align: justify;
padding-right: 4em;
}
dottab.menu {
outdent: 4em;
}
.outlined {
text-outline: 0.1mm 0.1mm #FF0000;
font-weight: bold;
font-size: 20pt;
color: #FFFFFF;
}
/* For background-clip and -origin */
.divclip {
border: 10px dashed #000000;
border-radius: 3em;
padding: 20px;
background:yellow;
background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);
width: 300px;
height: 50px;
margin-bottom: 1em;
background-repeat: no-repeat ;
background-size: 100% 100%;
}
.divpic {
background:yellow;
background: yellow url("bayeux1.jpg") no-repeat scroll left top;
background-size: 100% 100%;
}
.div1 {
background-clip: content-box;
background-origin: content-box;
}
.div2 {
background-clip: padding-box;
background-origin: padding-box;
}
.div3 {
background-clip: border-box;
background-origin: border-box;
}
.div4 {
background-clip: content-box;
background-origin: border-box;
}
.div5 {
background-clip: border-box;
background-origin: content-box;
}
/* For Table of Contents */
div.mpdf_toc {
font-family: sans-serif;
font-size: 11pt;
}
a.mpdf_toc_a {
text-decoration: none;
color: black;
}
div.mpdf_toc_level_0 { /* Whole line level 0 */
line-height: 1.5;
margin-left: 0;
padding-right: 2em; /* should match e.g <dottab outdent="2em" /> 0 is default */
}
span.mpdf_toc_t_level_0 { /* Title level 0 - may be inside <a> */
font-weight: bold;
}
span.mpdf_toc_p_level_0 { /* Page no. level 0 - may be inside <a> */
}
div.mpdf_toc_level_1 { /* Whole line level 1 */
margin-left: 2em;
text-indent: -2em;
padding-right: 2em; /* should match <dottab outdent="2em" /> 2em is default */
}
span.mpdf_toc_t_level_1 { /* Title level 1 */
font-style: italic;
font-weight: bold;
}
span.mpdf_toc_p_level_1 { /* Page no. level 1 - may be inside <a> */
}
div.mpdf_toc_level_2 { /* Whole line level 2 */
margin-left: 4em;
text-indent: -2em;
padding-right: 2em; /* should match <dottab outdent="2em" /> 2em is default */
}
span.mpdf_toc_t_level_2 { /* Title level 2 */
}
span.mpdf_toc_p_level_2 { /* Page no. level 2 - may be inside <a> */
}
</style>
<body>
<tocpagebreak links="on" toc-preHTML="&lt;div class=&quot;shadowtitle&quot;&gt;New Features in mPDF v5.7&lt;/div&gt;&lt;h3&gt;Table of Contents&lt;/h3&gt;" toc-bookmarktext="Table of Contents"/>
<h3>ToC Layout and styling</h3>
<div class="gradient text">
<h4>Table of Contents styling</h4>
<p>When a Table of Contents is generated by mPDF using e.g. &lt;tocpagebreak&gt;, mPDF 5.7 will generate the ToC as HTML. This means that a CSS stylesheet can be used to format its appearance.</p>
</div>
<div class="gradient text">
<p>Example table of contents:</p>
<div class="mpdf_toc" id="mpdf_toc_0">
<div class="mpdf_toc_level_0">
<a class="mpdf_toc_a" href="#__mpdfinternallink_1"><span class="mpdf_toc_t_level_0">Section 1</span></a>
<dottab outdent="2em" />
<a class="mpdf_toc_a" href="#__mpdfinternallink_1"><span class="mpdf_toc_p_level_0">5</span></a>
</div>
<div class="mpdf_toc_level_1">
<a class="mpdf_toc_a" href="#__mpdfinternallink_2"><span class="mpdf_toc_t_level_1">Chapter 1</span></a>
<dottab outdent="2em" />
<a class="mpdf_toc_a" href="#__mpdfinternallink_2"><span class="mpdf_toc_p_level_1">6</span></a>
</div>
<div class="mpdf_toc_level_2">
<a class="mpdf_toc_a" href="#__mpdfinternallink_3"><span class="mpdf_toc_t_level_2">Topic 1</span></a>
<dottab outdent="2em" />
<a class="mpdf_toc_a" href="#__mpdfinternallink_3"><span class="mpdf_toc_p_level_2">7</span></a>
</div>
</div>
</div>
<div class="gradient text">
<p>This will result in the following HTML code generated (internally):</p>
<p class="code">
&lt;div class="mpdf_toc" id="mpdf_toc_0"&gt;<br />
&nbsp; &lt;div class="mpdf_toc_level_0"&gt;<br />
&nbsp; &nbsp; &lt;a class="mpdf_toc_a" href="#__mpdfinternallink_1"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;span class="mpdf_toc_t_level_0"&gt;Section 1&lt;/span&gt;<br />
&nbsp; &nbsp; &lt;/a&gt;<br />
&nbsp; &nbsp; &lt;dottab outdent="2em" /&gt;<br />
&nbsp; &nbsp; &lt;a class="mpdf_toc_a" href="#__mpdfinternallink_1"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;span class="mpdf_toc_p_level_0"&gt;5&lt;/span&gt;<br />
&nbsp; &nbsp; &lt;/a&gt;<br />
&nbsp; &lt;/div&gt;<br />
&nbsp; &lt;div class="mpdf_toc_level_1"&gt;<br />
&nbsp; &nbsp; &lt;a class="mpdf_toc_a" href="#__mpdfinternallink_2"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;span class="mpdf_toc_t_level_1"&gt;Chapter 1&lt;/span&gt;<br />
&nbsp; &nbsp; &lt;/a&gt;<br />
&nbsp; &nbsp; &lt;dottab outdent="2em" /&gt;<br />
&nbsp; &nbsp; &lt;a class="mpdf_toc_a" href="#__mpdfinternallink_2"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;span class="mpdf_toc_p_level_1"&gt;6&lt;/span&gt;<br />
&nbsp; &nbsp; &lt;/a&gt;<br />
&nbsp; &lt;/div&gt;<br />
&nbsp; &lt;div class="mpdf_toc_level_2"&gt;<br />
&nbsp; &nbsp; &lt;a class="mpdf_toc_a" href="#__mpdfinternallink_3"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;span class="mpdf_toc_t_level_2"&gt;Topic 1&lt;/span&gt;<br />
&nbsp; &nbsp; &lt;/a&gt;<br />
&nbsp; &nbsp; &lt;dottab outdent="2em" /&gt;<br />
&nbsp; &nbsp; &lt;a class="mpdf_toc_a" href="#__mpdfinternallink_3"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;span class="mpdf_toc_p_level_2"&gt;7&lt;/span&gt;<br />
&nbsp; &nbsp; &lt;/a&gt;<br />
&nbsp; &lt;/div&gt;<br />
&lt;/div&gt;
</p>
<p>NB The id is "0" (mpdf_toc_0) for root/un-named ToC; otherwise it is lowercase of the name="" used for the ToC</p>
</div>
<div class="gradient text">
<p>Example Styling using CSS</p>
<p>The following CSSwill format the ToC as it appears in this document:</p>
<p class="code">
/* For Table of Contents */<br />
div.mpdf_toc {<br />
&nbsp; font-family: sans-serif;<br />
&nbsp; font-size: 11pt;<br />
}<br />
a.mpdf_toc_a {<br />
&nbsp; text-decoration: none;<br />
&nbsp; color: black;<br />
}<br /><br />
/* Whole line level 0 */<br />
div.mpdf_toc_level_0 {<br />
&nbsp; line-height: 1.5;<br />
&nbsp; margin-left: 0;<br />
&nbsp; padding-right: 2em;<br />
}<br /><br />
/* Title level 0 - may be inside &lt;a&gt; */<br />
span.mpdf_toc_t_level_0 {<br />
&nbsp; font-weight: bold;<br />
}<br /><br />
/* Page no. level 0 - may be inside &lt;a&gt; */<br />
span.mpdf_toc_p_level_0 { }<br /><br />
/* Whole line level 1 */<br />
div.mpdf_toc_level_1 {<br />
&nbsp; margin-left: 2em;<br />
&nbsp; padding-right: 2em;<br />
}<br /><br />
/* Title level 1 */<br />
span.mpdf_toc_t_level_1 {<br />
&nbsp; font-style: italic;<br />
&nbsp; font-weight: bold;<br />
}<br /><br />
/* Page no. level 1 - may be inside &lt;a&gt; */<br />
span.mpdf_toc_p_level_1 { }<br /><br />
/* Whole line level 2 */<br />
div.mpdf_toc_level_2 {<br />
&nbsp; margin-left: 4em;<br />
&nbsp; padding-right: 2em;<br />
}<br /><br />
/* Title level 2 */<br />
span.mpdf_toc_t_level_2 { }<br /><br />
/* Page no. level 2 - may be inside &lt;a&gt; */<br />
span.mpdf_toc_p_level_2 { }<br /><br />
</p>
<p>NB padding-right should match &lt;dottab&gt; "outdent" (0 is default). See &lt;dottab&gt; for more details</p>
</div>
<div class="gradient text">
<p>The functions TOCpagebreakByArray() and TOCpagebreak() have a new final parameter, and HTML tags &lt;TOC&gt; and &lt;TOCpagebreak&gt; have a new attribute "tocoutdent". This should be blank or a valid CSS length e.g. "2em". See &lt;dottab&gt; for more details.</p>
</div>
<h3>Text-align on decimal point</h3>
<div class="gradient text">
<p>Text inside a table column can be aligned on a decimal point (or any other character) by using either HTML attribute or CSS.</p>
<p>This example table uses the following CSS stylesheet:</p>
<p class="code">
&lt;style&gt;<br />
.aBDP { text-align: "." center; }<br />
.arBDP { text-align: "\66B" center; }<br />
.middot { text-align: "\B7" center ; }<br />
&lt;/style&gt;
</p>
<p></p>
<table border="1" style="border-collapse: collapse;" align="center">
<tr><th>&lt;TD&gt; element</th><th>Column</th></tr>
<tr><td class="code">align="left"</td><td align="left">Left text</td></tr>
<tr><td class="code">align="right"</td><td align="right">Right text</td></tr>
<tr><td class="code">align="center"</td><td align="center">Center text</td></tr>
<tr><td class="code">align="char"</td><td align="char"><p>1000.0001</p></td></tr>
<tr><td class="code">align="char" char=","</td><td align="char" char=","><p>1000,0001</p></td></tr>
<tr><td class="code">align="char" char="&amp;middot;"</td><td align="char" char="&middot;"><p>1000&#183;0001</p></td></tr>
<tr><td class="code">align="char" char="&amp;#183;"</td><td align="char" char="&#183;"><p>1000&#183;0001</p></td></tr>
<tr><td class="code">style="text-align: \'.\' center"</td><td style="text-align: \'.\' center">100.001</td></tr>
<tr><td class="code">style="text-align: \'.\' center"</td><td style="text-align: \'.\' center">DP aligned text</td></tr>
<tr><td class="code">style="text-align: \',\' center"</td><td style="text-align: \',\' center"><p>1.000,0001</p></td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP">10.01</td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP">1000</td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP"><p>1000.0001</p></td></tr>
<tr><td class="code">class="middot"</td><td class="middot">1&#8201;000&#183;0001</td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP"><p>1,000,000.00001</p></td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP">1.000000001</td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP">1.000.000.001</td></tr>
<tr><td class="code">class="arBDP"</td><td class="arBDP"><p style="lang: ar">&#x661;&#x66c;&#x665;&#x666;&#x667;&#x66c;&#x662;&#x663;&#x664;&#x66b;&#x662;&#x663;&#x664;&#x667;</p></td></tr>
<tr><td class="code">class="aBDP"</td><td class="aBDP">(GBP) 1,000,000.00001<br />1,000,000.00001 (EUR)<br />1,000,000.00001</td></tr>
</table>
</div>
<pagebreak />
<h3>Automatic ToC and Bookmarks</h3>
<div class="gradient text">
<p>A Table of Contents and/or Bookmarks can be generated automatically from any of the heading tags H1 - H6. This example will generate ToC and bookmarks from all &lt;h3&gt; tags (top level) and &lt;h4&gt; tags (next level)</p>
<p class="code">
$mpdf->h2toc = array(\'H3\'=>0, \'H4\'=>1);<br />
$mpdf->h2bookmarks = array(\'H3\'=>0, \'H4\'=>1);
</p>
</div>
<h3>Improved line-breaking</h3>
<p>mPDF will now avoid line-breaks in the middle of words even between &lt;tags&gt;</p>
<div class="gradient text">
<p class="code">
&lt;b>Na&lt;sub&gt;2&lt;/sub&gt;HCO&lt;sub&gt;3&lt;/sub&gt;&lt;/b&gt;
</p>
<p>Pellentesque purus feugiat semper. Donec nunc odio, et vitae pellentesque. Pellentesque <b>Na<sub>2</sub>HCO<sub>3</sub></b> velit lacus.</p>
</div>
<h3>CSS hyphens</h3>
<div class="gradient text">
<p>The CSS property hyphens is now supported on all block elements</p>
<p class="code">
hyphens: manual | auto | none
</p>
<p>In the following example, the word interdependent contains no soft hyphen or similar characters, and is moved to the next line.</p>
<p style="hyphens:none;border: 1px solid #000000;">Cum velit lacus pena sociis natoque penatibus et magnis disa montes, nascetur ridicuus interdependent (no characters suggesting line-break).</p>
<p><b>manual</b> (default)
Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities. Characters can be explicit ("-" hard hyphen) or conditional (&amp;shy; &amp;#173; &lt;wbr&gt;). </p>
<p style="hyphens:manual;border: 1px solid #000000;">Cum velit lacus pena sociis natoque penatibus et magnis disa montes, nascetur ridicuus inter&shy;dependent (uses soft hyphen &amp;shy;).</p>
<p><b>none</b> - Words are not broken at line breaks, even if characters inside the word suggest line break points. </p>
<p style="hyphens:none;border: 1px solid #000000;">Cum velit lacus pena sociis natoque penatibus et magnis disa montes, nascetur ridicuus inter-dependent (hard hyphen).</p>
<p><b>auto</b>
Words can be broken at appropriate hyphenation points, as determined by characters inside the word.</p>
<p style="hyphens:auto;border: 1px solid #000000;">Cum velit lacus pena sociis natoque penatibus et magnis disa montes, nascetur ridicuus interdependent (No characters suggesting line-break).</p>
<p>SHY inside the word take priority over hyphenation points determined by other resources. </p>
<p style="hyphens:auto;border: 1px solid #000000;">Cum velit lacus pena sociis natoque penatibus et magnis disa montes, nascetur ridicuus inter&shy;dependent (uses soft hyphen &amp;shy;).</p>
<p>The configurable variables $this-&gt;hyphenate and $this-&gt;hyphenateTables are henceforth redundant and have no effect.</p>
<p>NB Support for &lt;wbr&gt; is new in mPDF 5.7</p>
</div>
<h3>Text circle</h3>
<div class="gradient text">
<p>Added in mPDF 5.6 but not included in New Features example - transparent background and Divider were new. Now also added support for font-size:auto</p>
<p class="code">
&lt;textcircle r="30mm" top-text="Text Circular Text Circular" bottom-text="Text Circular Text Circular" divider="&amp;bull;" style="font-size: auto" /&gt;
</p>
<p></p>
<div align="center"><textcircle r="30mm" top-text="Text Circular Text Circular" bottom-text="Text Circular Text Circular" divider="&bull;" style="font-size: auto" /></div>
</div>
<h3>List numbering</h3>
<div class="gradient text">
<p>This list is set to start numbering at 5</p>
<p class="code">&lt;ol start="5"&gt;</p>
<ol start="5">
<li>List item number 1</li>
<li>List item number 2</li>
<li>List item number 3</li>
</ol>
</div>
<h3>&lt;dottab&gt; and outdent</h3>
<div class="gradient text">
<p>&lt;dottab&gt; now supports a custom CSS property "outdent", which can also be used as an HTML attribute i.e. &lt;dottab outdent="2em"&gt;</p>
<p>The first item uses &lt;dottab outdent="4em"&gt; whereas the following items have &lt;dottab class="menu"&gt; (with CSS <code>dottab.menu{outdent: 4em;}</code> ) and all have padding-right="4em" on the &lt;div&gt; element</p>
<div style="border: 0.2mm solid #000088; padding: 1em;">
<p class="menu">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus <dottab outdent="4em" />&nbsp;&pound;37.00</p>
<p class="menu">Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat <dottab class="menu" />&nbsp;&pound;3700.00</p>
<p class="menu">Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus <dottab class="menu" />&nbsp;&pound;27.00</p>
<p class="menu">Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod <dottab class="menu" />&nbsp;&pound;7.00</p>
<p class="menu">Donec et nulla. Sed quis orci <dottab class="menu" />&nbsp;&pound;1137.00</p>
</div>
<p></p>
<p class="code">
p.menu { text-align: justify; padding-right: 4em; }<br />
dottab.menu { outdent: 4em; }
</p>
<p>NB It is recommended to use &amp;nbsp; after the dottab if a space is required before the following content.</p>
<p>NB This (outdent) is also used in the Table of Contents (see earlier in this document).</p>
</div>
<h3>Layers</h3>
<div class="gradient text">
<p>mPDF 5.7 will create layers in the document using the CSS property z-index. All layers are visible by default.</p>
<p>This demonstrates layers in a PDF document. Select the layers named "Correct Answers" or "Wrong Answers" in your PDF viewer (the layers pane should be open already in Adobe Acrobat)</p>
<div><b>What is the name of the Prime Minister of Britain?</b></div>
<div style="z-index:1;color: green;float: left; width:30%">David Cameron</div>
<div style="z-index:2;color: red;">Rupert Murdoch</div>
<div><b>What is the name of the David Beckham\'s bulldog?</b></div>
<div style="z-index:1;color: green;float: left; width:30%;">Scarlet</div>
<div style="z-index:2;color: red;">Victoria</div>
<p>To open/close/select layers in Adobe Reader (10):<br />
<img src="layers_tab.jpg" /></p>
<p>The layer names and initial state can be set (optionally) e.g.</p>
<p class="code">
$mpdf-&gt;layerDetails[1][\'state\']=\'hidden\'; // Set initial state of layer - "hidden" or ""<br />
$mpdf-&gt;layerDetails[1][\'name\']=\'Correct Answers\';<br />
$mpdf-&gt;layerDetails[2][\'state\']=\'hidden\';<br />
$mpdf-&gt;layerDetails[2][\'name\']=\'Wrong Answers\';<br />
</p>
<p>This is the code used in the example above:</p>
<p class="code">
&lt;div style="z-index:1;color: green;float: left; width:30%;"&gt;Scarlet&lt;/div&gt;<br />
&lt;div style="z-index:2;color: red;"&gt;Victoria&lt;/div&gt;
</p>
<div>To force the PDF reader to open with the layers tab open, set:
<p class="code">$mpdf-&gt;open_layer_pane = true;</p>
</div>
</div>
<h3>CSS visibility on &lt;span&gt;</h3>
<p>CSS visibility:hidden is now supported on inline elements e.g. &lt;span&gt;</p>
<div class="gradient text">
<p>This next bit of text is hidden - <span style="visibility:hidden; border:1px solid #880000;background-color:yellow">Hidden text</span> - and this isn\'t.</p>
<p class="code">style="visibility:hidden;"</p>
<p>This next bit of text is only visible in print - <span style="visibility:printonly; border:1px solid #008800;background-color:yellow">Hidden text</span> - and this isn\'t.</p>
<p class="code">style="visibility:printonly;"</p>
<p>This next bit of text is only visible on screen - <span style="visibility:screenonly; border:1px solid #000088;background-color:yellow">Hidden text</span> - and this isn\'t.</p>
<p class="code">style="visibility:screenonly;"</p>
<p>You can show or hide these elements as for layers (above).</p>
</div>
<h3>CSS "rem" unit</h3>
<div class="gradient text">
<div style="font-size: 1rem; border: 1px solid #888888; padding: 5px 20px;">This line has the font-size set as 1rem
<div style="font-size: 0.5rem; border: 1px solid #888888; padding: 5px 20px;">This line has the font-size set as 0.5rem
<div style="font-size: 1.5rem; border: 1px solid #888888; padding: 5px 20px;">This line has the font-size set as 1.5rem
</div>
</div>
</div>
<div style="font-size: 1em; border: 1px solid #888888; padding: 5px 20px;">This line has the font-size set as 1em
<div style="font-size: 0.5em; border: 1px solid #888888; padding: 5px 20px;">This line has the font-size set as 0.5em
<div style="font-size: 1.5em; border: 1px solid #888888; padding: 5px 20px;">This line has the font-size set as 1.5em
</div>
</div>
</div>
</div>
<h3>CSS outline</h3>
<div class="gradient text">
<div class="outlined">This is text with an outline set by CSS</div>
<p class="code">
.outlined { text-outline: 0.1mm 0.1mm #FF0000; }
</p>
</div>
<h3>CSS background-clip, background-origin &amp; background-size</h3>
<div class="gradient text">
<p>CSS background-clip, background-origin &amp; background-size are now supported for most block level elements. (Not supported in tables, nor on page/body backgrounds).</p>
<div class="divclip">background-clip: border-box[default value]<br />background-origin: padding-box[default value]</div>
<div class="divclip div1">background-clip: content-box;<br />background-origin: content-box</div>
<div class="divclip div2">background-clip: padding-box;<br />background-origin: padding-box</div>
<div class="divclip div3">background-clip: border-box;<br />background-origin: border-box</div>
<div class="divclip div4">background-clip: content-box;<br />background-origin: border-box</div>
<div class="divclip div5">background-clip: border-box;<br />background-origin: content-box</div>
<div class="divclip divpic">background-clip: border-box[default value]<br />background-origin: padding-box[default value]</div>
<div class="divclip div1 divpic">background-clip: content-box;<br />background-origin: content-box</div>
<div class="divclip div2 divpic">background-clip: padding-box;<br />background-origin: padding-box</div>
<div class="divclip div3 divpic">background-clip: border-box;<br />background-origin: border-box</div>
<div class="divclip div4 divpic">background-clip: content-box;<br />background-origin: border-box</div>
<div class="divclip div5 divpic">background-clip: border-box;<br />background-origin: content-box</div>
</div>
';
$mpdf->h2toc = array('H3'=>0, 'H4'=>1);
$mpdf->h2bookmarks = array('H3'=>0, 'H4'=>1);
$mpdf->open_layer_pane = false;
$mpdf->layerDetails[1]['state']='hidden'; // Set initial state of layer - "hidden" or nothing
$mpdf->layerDetails[1]['name']='Correct Answers';
$mpdf->layerDetails[2]['state']='hidden'; // Set initial state of layer - "hidden" or nothing
$mpdf->layerDetails[2]['name']='Wrong Answers';
//==============================================================
if ($_REQUEST['html']) { echo $html; exit; }
if ($_REQUEST['source']) {
$file = __FILE__;
header("Content-Type: text/plain");
header("Content-Length: ". filesize($file));
header("Content-Disposition: attachment; filename='".$file."'");
readfile($file);
exit;
}
//==============================================================
$mpdf->WriteHTML($html);
// OUTPUT
$mpdf->Output(); exit;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -0,0 +1,94 @@
<?php
echo '<'.'!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<h2>Submitted data from PDF Form</h2>
<p style="font-size:0.9em;">(See formsubmit.php in the Examples folder for details)</p>
';
if (count($_POST)) {
// To display HTML output from PDF form
echo '<h4>HTML format data sent as POST</h4>';
foreach($_POST AS $name=>$val) {
$t = mb_convert_encoding(PDFDocEncodingToWin1252($val), 'UTF-8', 'Windows-1252' ); // If from core fonts doc
echo '<p>PDFDocEnc: '.$name.' => '.htmlspecialchars($t).'</p>';
}
}
else if (count($_GET)) {
// To display HTML output from PDF form
echo '<h4>HTML format data sent as GET</h4>';
foreach($_GET AS $name=>$val) {
$t = mb_convert_encoding(PDFDocEncodingToWin1252($val), 'UTF-8', 'Windows-1252' ); // If from core fonts doc
echo '<p>PDFDocEnc: '.$name.' => '.htmlspecialchars($t).'</p>';
}
}
else {
$postdata = file_get_contents("php://input");
if ($postdata) {
echo '<h4>XFDF format data detected</h4>';
// To parse XFDF
if (preg_match_all('/<field name="([^>]*)"\s*>\s*(<value\s*>(.*?)<\/value\s*>)\s*<\/field\s*>/s', $postdata, $m)) {
for($i=0; $i<count($m[0]); $i++) {
// if multiple values in response e.g. from multiple selected options
preg_match_all('/<value\s*>(.*?)<\/value\s*>/s', $m[2][$i], $v);
if (count($v[0])>1) {
$values = array();
foreach($v[1] AS $val) { $values[] = $val; }
//foreach($v[1] AS $val) { $values[] = htmlspecialchars_decode($val); }
echo '<p>Field: '.$m[1][$i].' => [array of values] ('.implode(', ',$values).')</p>';
}
else {
//echo '<p>Field: '.$m[1][$i].' => '.htmlspecialchars_decode($m[3][$i]).'</p>';
echo '<p>Field: '.$m[1][$i].' => '.$m[3][$i].'</p>';
}
}
}
if (preg_match_all('/<field name="([^>]*)"\s*>\s*<value\s*\/\s*>\s*<\/field\s*>/s', $postdata, $m)) {
for($i=0; $i<count($m[0]); $i++) {
echo '<p>Field: '.$m[1][$i].' => [blank]</p>';
}
}
if (preg_match_all('/<field name="([^>]*)"\s*\/\s*>/s', $postdata, $m)) {
for($i=0; $i<count($m[0]); $i++) {
echo '<p>Field: '.$m[1][$i].' => [no value]</p>';
}
}
// To display whole XFDF
//$postdata = preg_replace("/[\n\r]/", "", $postdata);
//$postdata = preg_replace('/>\s*</', ">\n<", $postdata);
//echo nl2br(htmlspecialchars($postdata));
}
else { echo "No form data detected"; }
}
echo '</body></html>';
exit;
function PDFDocEncodingToWin1252($txt) {
$Win1252ToPDFDocEncoding = array(
chr(0200) => chr(0240), chr(0214) => chr(0226), chr(0212) => chr(0227), chr(0237) => chr(0230),
chr(0225) => chr(0200), chr(0210) => chr(0032), chr(0206) => chr(0201), chr(0207) => chr(0202),
chr(0205) => chr(0203), chr(0227) => chr(0204), chr(0226) => chr(0205), chr(0203) => chr(0206),
chr(0213) => chr(0210), chr(0233) => chr(0211), chr(0211) => chr(0213), chr(0204) => chr(0214),
chr(0223) => chr(0215), chr(0224) => chr(0216), chr(0221) => chr(0217), chr(0222) => chr(0220),
chr(0202) => chr(0221), chr(0232) => chr(0235), chr(0230) => chr(0037), chr(0231) => chr(0222),
chr(0216) => chr(0231)
);
return strtr($txt, array_flip($Win1252ToPDFDocEncoding) );
}
?>

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