first commit
This commit is contained in:
621
prints/Table/LICENSE
Executable file
621
prints/Table/LICENSE
Executable file
@ -0,0 +1,621 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
1732
prints/Table/class.fpdf.php
Executable file
1732
prints/Table/class.fpdf.php
Executable file
File diff suppressed because it is too large
Load Diff
1567
prints/Table/class.fpdf_table.php
Executable file
1567
prints/Table/class.fpdf_table.php
Executable file
File diff suppressed because it is too large
Load Diff
858
prints/Table/class.multicelltag.php
Executable file
858
prints/Table/class.multicelltag.php
Executable file
@ -0,0 +1,858 @@
|
||||
<?php
|
||||
/**
|
||||
* FPDF Tag Based Multicell - FPDF class extension
|
||||
* Copyright (c) 2005-2010, http://www.interpid.eu
|
||||
*
|
||||
* FPDF Tag Based Multicell is licensed under the terms of the GNU Open Source GPL 3.0
|
||||
* license.
|
||||
*
|
||||
* Commercial use is prohibited. Visit <http://www.interpid.eu/fpdf-components>
|
||||
* if you need to obtain a commercial license.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
*
|
||||
*
|
||||
* Version: 1.4.2
|
||||
* Date: 2005/12/08
|
||||
* Last Modification: 2008/02/24
|
||||
* Author: Bintintan Andrei <andy@interpid.eu>
|
||||
|
||||
|
||||
/**
|
||||
Modifications:
|
||||
2007.01.21
|
||||
- added left, top, right and bottom padding to the MultiCellTag Functions
|
||||
2006.09.18
|
||||
- added YPOS parameter to the tab for super/subscript posibility. ypos = '-1' means the relative position to the normal Y.
|
||||
2006.07.30
|
||||
- added Paragraph Support(a sort of) - paragraphs can be specified with size='integer value' and PARAGRAPH_STRING character
|
||||
2006.05.18
|
||||
- removed the NBLines functions
|
||||
- added mt_StringToLines function
|
||||
- modified MultiCellTag to accept as data parameter an array type like the return from mt_StringToLines function
|
||||
- these modifications does not affect the main class behavior, they are used for further developement and class extensions
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/class.fpdf.php');
|
||||
require_once(dirname(__FILE__).'/class.string_tags.php');
|
||||
|
||||
if (!defined('PARAGRAPH_STRING')) define('PARAGRAPH_STRING', '~~~');
|
||||
|
||||
/**
|
||||
* MultiCellTag Class
|
||||
* The intern functions are prefaced with mt_, not be be overwritten
|
||||
*
|
||||
* @author andy@interpid.eu
|
||||
* @version 1.4
|
||||
*
|
||||
*/
|
||||
class fpdf_multicelltag extends FPDF{
|
||||
|
||||
/**
|
||||
* Valid Tag Maximum Width
|
||||
*
|
||||
* @access protected
|
||||
* @var integer
|
||||
*/
|
||||
protected $wt_TagWidthMax = 10;
|
||||
|
||||
/**
|
||||
* The current active tag
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
protected $wt_Current_Tag = '';
|
||||
|
||||
/**
|
||||
* Tags Font Information
|
||||
*
|
||||
* @access protected
|
||||
* @var struct
|
||||
*/
|
||||
protected $wt_FontInfo;
|
||||
|
||||
/**
|
||||
* Parsed string data info
|
||||
*
|
||||
* @access protected
|
||||
* @var struct
|
||||
*/
|
||||
protected $wt_DataInfo;
|
||||
|
||||
/**
|
||||
* Data Extra Info
|
||||
*
|
||||
* @access protected
|
||||
* @var struct
|
||||
*/
|
||||
protected $wt_DataExtraInfo;
|
||||
|
||||
/**
|
||||
* Temporary Info
|
||||
*
|
||||
* @access protected
|
||||
* @var struct
|
||||
*/
|
||||
protected $wt_TempData;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the Tags Maximum width
|
||||
*
|
||||
* @access public
|
||||
* @param numeric $iWidth - the width of the tags
|
||||
* @return void
|
||||
*/
|
||||
public function setTagWidthMax($iWidth = 10){
|
||||
$this->wt_TagWidthMax = $iWidth;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resets the current class internal variables to default values
|
||||
*
|
||||
* @access protected
|
||||
* @param none
|
||||
* @return void
|
||||
*/
|
||||
protected function mt_Reset_Datas(){
|
||||
$this->wt_Current_Tag = "";
|
||||
$this->wt_DataInfo = array();
|
||||
$this->wt_DataExtraInfo = array(
|
||||
"LAST_LINE_BR" => "", //CURRENT LINE BREAK TYPE
|
||||
"CURRENT_LINE_BR" => "", //LAST LINE BREAK TYPE
|
||||
"TAB_WIDTH" => 10 //The tab WIDTH IS IN mm
|
||||
);
|
||||
|
||||
//if another measure unit is used ... calculate your OWN
|
||||
$this->wt_DataExtraInfo["TAB_WIDTH"] *= (72/25.4) / $this->k;
|
||||
/*
|
||||
$this->wt_FontInfo - do not reset, once read ... is OK!!!
|
||||
*/
|
||||
}//function mt_Reset_Datas(){
|
||||
|
||||
/**
|
||||
* Sets current tag to specified style
|
||||
*
|
||||
* @access public
|
||||
* @param string $tag - tag name
|
||||
* @param string $family - text font family name
|
||||
* @param string $style - text font style
|
||||
* @param numeric $size - text font size
|
||||
* @param array $color - text color
|
||||
* @return void
|
||||
*/
|
||||
public function SetStyle($tag, $family, $style, $size, $color)
|
||||
{
|
||||
|
||||
if ($tag == "ttags") $this->Error (">> ttags << is reserved TAG Name.");
|
||||
if ($tag == "") $this->Error ("Empty TAG Name.");
|
||||
|
||||
//use case insensitive tags
|
||||
$tag=trim(strtoupper($tag));
|
||||
$this->TagStyle[$tag]['family']=trim($family);
|
||||
$this->TagStyle[$tag]['style']=trim($style);
|
||||
$this->TagStyle[$tag]['size']=trim($size);
|
||||
$this->TagStyle[$tag]['color']=trim($color);
|
||||
}//function SetStyle
|
||||
|
||||
/**
|
||||
* Sets current tag to specified style
|
||||
* - if the tag name is not in the tag list then de "DEFAULT" tag is saved.
|
||||
* This includes a fist call of the function mt_SaveCurrentStyle()
|
||||
*
|
||||
* @access protected
|
||||
* @param string $tag - tag name
|
||||
* @return void
|
||||
*/
|
||||
protected function mt_ApplyStyle($tag){
|
||||
|
||||
//use case insensitive tags
|
||||
$tag=trim(strtoupper($tag));
|
||||
|
||||
if ($this->wt_Current_Tag == $tag) return;
|
||||
|
||||
if (($tag == "") || (! isset($this->TagStyle[$tag]))) $tag = "DEFAULT";
|
||||
|
||||
$this->wt_Current_Tag = $tag;
|
||||
|
||||
$style = & $this->TagStyle[$tag];
|
||||
|
||||
if (isset($style)){
|
||||
$this->SetFont($style['family'], $style['style'], $style['size']);
|
||||
//this is textcolor in FPDF format
|
||||
if (isset($style['textcolor_fpdf'])) {
|
||||
$this->TextColor = $style['textcolor_fpdf'];
|
||||
$this->ColorFlag=($this->FillColor!=$this->TextColor);
|
||||
}else
|
||||
{
|
||||
if ($style['color'] <> ""){//if we have a specified color
|
||||
$temp = explode(",", $style['color']);
|
||||
$this->SetTextColor($temp[0], $temp[1], $temp[2]);
|
||||
}//fi
|
||||
}
|
||||
/**/
|
||||
}//isset
|
||||
}//function mt_ApplyStyle($tag){
|
||||
|
||||
/**
|
||||
* Save the current settings as a tag default style under the DEFAUTLT tag name
|
||||
*
|
||||
* @access protected
|
||||
* @param none
|
||||
* @return void
|
||||
*/
|
||||
protected function mt_SaveCurrentStyle(){
|
||||
$this->TagStyle['DEFAULT']['family'] = $this->FontFamily;;
|
||||
$this->TagStyle['DEFAULT']['style'] = $this->FontStyle;
|
||||
$this->TagStyle['DEFAULT']['size'] = $this->FontSizePt;
|
||||
$this->TagStyle['DEFAULT']['textcolor_fpdf'] = $this->TextColor;
|
||||
$this->TagStyle['DEFAULT']['color'] = "";
|
||||
}//function mt_SaveCurrentStyle
|
||||
|
||||
|
||||
/**
|
||||
* Divides $this->wt_DataInfo and returnes a line from this variable
|
||||
*
|
||||
* @access protected
|
||||
* @param numeric $w - the width of the text
|
||||
* @return array $aLine - array() -> contains informations to draw a line
|
||||
*/
|
||||
protected function mt_MakeLine($w){
|
||||
|
||||
$aDataInfo = & $this->wt_DataInfo;
|
||||
$aExtraInfo = & $this->wt_DataExtraInfo;
|
||||
|
||||
//last line break >> current line break
|
||||
$aExtraInfo['LAST_LINE_BR'] = $aExtraInfo['CURRENT_LINE_BR'];
|
||||
$aExtraInfo['CURRENT_LINE_BR'] = "";
|
||||
|
||||
if($w==0)
|
||||
$w=$this->w - $this->rMargin - $this->x;
|
||||
|
||||
$wmax = ($w - 2*$this->cMargin) * 1000;//max width
|
||||
|
||||
$aLine = array();//this will contain the result
|
||||
$return_result = false;//if break and return result
|
||||
$reset_spaces = false;
|
||||
|
||||
$line_width = 0;//line string width
|
||||
$total_chars = 0;//total characters included in the result string
|
||||
$space_count = 0;//numer of spaces in the result string
|
||||
$fw = & $this->wt_FontInfo;//font info array
|
||||
|
||||
$last_sepch = ""; //last separator character
|
||||
|
||||
foreach ($aDataInfo as $key => $val){
|
||||
|
||||
$s = $val['text'];
|
||||
|
||||
$tag = &$val['tag'];
|
||||
|
||||
$bParagraph = false;
|
||||
if (($s == "\t") && ($tag == 'pparg')){
|
||||
$bParagraph = true;
|
||||
$s = "\t";//place instead a TAB
|
||||
}
|
||||
|
||||
$s_lenght=strlen($s);
|
||||
|
||||
$i = 0;//from where is the string remain
|
||||
$j = 0;//untill where is the string good to copy -- leave this == 1->> copy at least one character!!!
|
||||
$str = "";
|
||||
$s_width = 0; //string width
|
||||
$last_sep = -1; //last separator position
|
||||
$last_sepwidth = 0;
|
||||
$last_sepch_width = 0;
|
||||
$ante_last_sep = -1; //ante last separator position
|
||||
$spaces = 0;
|
||||
|
||||
//parse the whole string
|
||||
while ($i < $s_lenght){
|
||||
$c = $s[$i];
|
||||
|
||||
if($c == "\n"){//Explicit line break
|
||||
$i++; //ignore/skip this caracter
|
||||
$aExtraInfo['CURRENT_LINE_BR'] = "BREAK";
|
||||
$return_result = true;
|
||||
$reset_spaces = true;
|
||||
break;
|
||||
}
|
||||
|
||||
//space
|
||||
if($c == " "){
|
||||
$space_count++;//increase the number of spaces
|
||||
$spaces ++;
|
||||
}
|
||||
|
||||
// Font Width / Size Array
|
||||
if (!isset($fw[$tag]) || ($tag == "")){
|
||||
//if this font was not used untill now,
|
||||
$this->mt_ApplyStyle($tag);
|
||||
$fw[$tag]['w'] = $this->CurrentFont['cw'];//width
|
||||
$fw[$tag]['s'] = $this->FontSize;//size
|
||||
}
|
||||
|
||||
$char_width = $fw[$tag]['w'][$c] * $fw[$tag]['s'];
|
||||
|
||||
//separators
|
||||
if(is_int(strpos(" ,.:;",$c))){
|
||||
|
||||
$ante_last_sep = $last_sep;
|
||||
$ante_last_sepch = $last_sepch;
|
||||
$ante_last_sepwidth = $last_sepwidth;
|
||||
$ante_last_sepch_width = $last_sepch_width;
|
||||
|
||||
$last_sep = $i;//last separator position
|
||||
$last_sepch = $c;//last separator char
|
||||
$last_sepch_width = $char_width;//last separator char
|
||||
$last_sepwidth = $s_width;
|
||||
|
||||
}
|
||||
|
||||
if ($c == "\t"){//TAB
|
||||
$c = $s[$i] = "";
|
||||
$char_width = $aExtraInfo['TAB_WIDTH'] * 1000;
|
||||
}
|
||||
|
||||
if ($bParagraph == true){
|
||||
$c = $s[$i] = "";
|
||||
$char_width = $this->wt_TempData['LAST_TAB_REQSIZE']*1000 - $this->wt_TempData['LAST_TAB_SIZE'];
|
||||
if ($char_width < 0) $char_width = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$line_width += $char_width;
|
||||
|
||||
if($line_width > $wmax){//Automatic line break
|
||||
|
||||
$aExtraInfo['CURRENT_LINE_BR'] = "AUTO";
|
||||
|
||||
if ($total_chars == 0) {
|
||||
/* This MEANS that the $w (width) is lower than a char width...
|
||||
Put $i and $j to 1 ... otherwise infinite while*/
|
||||
$i = 1;
|
||||
$j = 1;
|
||||
$return_result = true;//YES RETURN THE RESULT!!!
|
||||
break;
|
||||
}//fi
|
||||
|
||||
if ($last_sep <> -1){
|
||||
//we have a separator in this tag!!!
|
||||
//untill now there one separator
|
||||
if (($last_sepch == $c) && ($last_sepch != " ") && ($ante_last_sep <> -1)){
|
||||
/* this is the last character and it is a separator, if it is a space the leave it...
|
||||
Have to jump back to the last separator... even a space
|
||||
*/
|
||||
$last_sep = $ante_last_sep;
|
||||
$last_sepch = $ante_last_sepch;
|
||||
$last_sepwidth = $ante_last_sepwidth;
|
||||
}
|
||||
|
||||
if ($last_sepch == " "){
|
||||
$j = $last_sep;//just ignore the last space (it is at end of line)
|
||||
$i = $last_sep + 1;
|
||||
if ( $spaces > 0 ) $spaces --;
|
||||
$s_width = $last_sepwidth;
|
||||
}else{
|
||||
$j = $last_sep + 1;
|
||||
$i = $last_sep + 1;
|
||||
$s_width = $last_sepwidth + $last_sepch_width;
|
||||
}
|
||||
|
||||
}elseif(count($aLine) > 0){
|
||||
//we have elements in the last tag!!!!
|
||||
if ($last_sepch == " "){//the last tag ends with a space, have to remove it
|
||||
|
||||
$temp = & $aLine[ count($aLine)-1 ];
|
||||
|
||||
if ($temp['text'][strlen($temp['text'])-1] == " "){
|
||||
|
||||
$temp['text'] = substr($temp['text'], 0, strlen($temp['text']) - 1);
|
||||
$temp['width'] -= $fw[ $temp['tag'] ]['w'][" "] * $fw[ $temp['tag'] ]['s'];
|
||||
$temp['spaces'] --;
|
||||
|
||||
//imediat return from this function
|
||||
break 2;
|
||||
}else{
|
||||
#die("should not be!!!");
|
||||
}//fi
|
||||
}//fi
|
||||
}//fi else
|
||||
|
||||
$return_result = true;
|
||||
break;
|
||||
}//fi - Auto line break
|
||||
|
||||
//increase the string width ONLY when it is added!!!!
|
||||
$s_width += $char_width;
|
||||
|
||||
$i++;
|
||||
$j = $i;
|
||||
$total_chars ++;
|
||||
}//while
|
||||
|
||||
$str = substr($s, 0, $j);
|
||||
|
||||
$sTmpStr = & $aDataInfo[$key]['text'];
|
||||
$sTmpStr = substr($sTmpStr, $i, strlen($sTmpStr));
|
||||
|
||||
if (($sTmpStr == "") || ($sTmpStr === FALSE))//empty
|
||||
array_shift($aDataInfo);
|
||||
|
||||
if ($val['text'] == $str){
|
||||
}
|
||||
|
||||
if (!isset($val['href'])) $val['href']='';
|
||||
if (!isset($val['ypos'])) $val['ypos']=0;
|
||||
|
||||
//we have a partial result
|
||||
array_push($aLine, array(
|
||||
'text' => $str,
|
||||
'tag' => $val['tag'],
|
||||
'href' => $val['href'],
|
||||
'width' => $s_width,
|
||||
'spaces' => $spaces,
|
||||
'ypos' => $val['ypos']
|
||||
));
|
||||
|
||||
$this->wt_TempData['LAST_TAB_SIZE'] = $s_width;
|
||||
$this->wt_TempData['LAST_TAB_REQSIZE'] = (isset($val['size'])) ? $val['size'] : 0;
|
||||
|
||||
if ($return_result) break;//break this for
|
||||
|
||||
}//foreach
|
||||
|
||||
// Check the first and last tag -> if first and last caracters are " " space remove them!!!"
|
||||
|
||||
if ((count($aLine) > 0) && ($aExtraInfo['LAST_LINE_BR'] == "AUTO")){
|
||||
//first tag
|
||||
$temp = & $aLine[0];
|
||||
if ( (strlen($temp['text']) > 0) && ($temp['text'][0] == " ")){
|
||||
$temp['text'] = substr($temp['text'], 1, strlen($temp['text']));
|
||||
$temp['width'] -= $fw[ $temp['tag'] ]['w'][" "] * $fw[ $temp['tag'] ]['s'];
|
||||
$temp['spaces'] --;
|
||||
}
|
||||
|
||||
//last tag
|
||||
$temp = & $aLine[count($aLine) - 1];
|
||||
if ( (strlen($temp['text'])>0) && ($temp['text'][strlen($temp['text'])-1] == " ")){
|
||||
$temp['text'] = substr($temp['text'], 0, strlen($temp['text']) - 1);
|
||||
$temp['width'] -= $fw[ $temp['tag'] ]['w'][" "] * $fw[ $temp['tag'] ]['s'];
|
||||
$temp['spaces'] --;
|
||||
}
|
||||
}
|
||||
|
||||
if ($reset_spaces){//this is used in case of a "Explicit Line Break"
|
||||
//put all spaces to 0 so in case of "J" align there is no space extension
|
||||
for ($k=0; $k< count($aLine); $k++) $aLine[$k]['spaces'] = 0;
|
||||
}//fi
|
||||
|
||||
return $aLine;
|
||||
}//function mt_MakeLine
|
||||
|
||||
/**
|
||||
Draws a MultiCell with TAG recognition parameters
|
||||
@param $w - with of the cell
|
||||
$h - height of the cell
|
||||
$pData - string or data to be printed
|
||||
$border - border
|
||||
$align - align
|
||||
$fill - fill
|
||||
$pad_left - pad left
|
||||
$pad_top - pad top
|
||||
$pad_right - pad right
|
||||
$pad_bottom - pad bottom
|
||||
$pDataIsString - true if $pData is a string
|
||||
- false if $pData is an array containing lines formatted with $this->mt_MakeLine($w) function
|
||||
(the false option is used in relation with mt_StringToLines, to avoid double formatting of a string
|
||||
|
||||
These paramaters are the same and have the same behavior as at Multicell function
|
||||
@return void
|
||||
*/
|
||||
/**
|
||||
* Draws a MultiCell with TAG recognition parameters
|
||||
*
|
||||
* @param numeric $w - with of the cell
|
||||
* @param numeric $h - height of the lines in the cell
|
||||
* @param string $pData - string or formatted data to be putted in the multicell
|
||||
* @param string or numeric $border
|
||||
* Indicates if borders must be drawn around the cell block. The value can be either a number:
|
||||
* 0 = no border
|
||||
* 1 = frame border
|
||||
* or a string containing some or all of the following characters (in any order):
|
||||
* L: left
|
||||
* T: top
|
||||
* R: right
|
||||
* B: bottom
|
||||
* @param string $align - Sets the text alignment
|
||||
* Possible values:
|
||||
* L: left
|
||||
* R: right
|
||||
* C: center
|
||||
* J: justified
|
||||
* @param numeric $fill - Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
|
||||
* @param numeric $pad_left - Left pad
|
||||
* @param numeric $pad_top - Top pad
|
||||
* @param numeric $pad_right - Right pad
|
||||
* @param numeric $pad_bottom - Bottom pad
|
||||
* @param boolean $pDataIsString
|
||||
* - true if $pData is a string
|
||||
* - false if $pData is an array containing lines formatted with $this->mt_MakeLine($w) function
|
||||
* (the false option is used in relation with mt_StringToLines, to avoid double formatting of a string
|
||||
* @return void
|
||||
*/
|
||||
public function MultiCellTag($w, $h, $pData, $border=0, $align='J', $fill=0, $pad_left=0, $pad_top=0, $pad_right=0, $pad_bottom=0, $pDataIsString = true){
|
||||
|
||||
//save the current style settings, this will be the default in case of no style is specified
|
||||
$this->mt_SaveCurrentStyle();
|
||||
$this->mt_Reset_Datas();
|
||||
|
||||
$utf8_decoded_here = false;
|
||||
|
||||
//if data is string
|
||||
if ($pDataIsString === true) {
|
||||
|
||||
//IF UTF8 Support is needed then
|
||||
if (isset($this->utf8_support) && isset($this->utf8_decoded)){
|
||||
if (($this->utf8_support) && (!$this->utf8_decoded)) {
|
||||
$pData = utf8_decode($pData);
|
||||
$utf8_decoded_here = true;
|
||||
$this->utf8_decoded = true;
|
||||
}
|
||||
}
|
||||
$this->mt_DivideByTags($pData);
|
||||
}
|
||||
|
||||
$b = $b1 = $b2 = $b3 = '';//borders
|
||||
|
||||
if($w==0)
|
||||
$w = $this->w - $this->rMargin - $this->x;
|
||||
|
||||
/**
|
||||
* If the vertical padding is bigger than the width then we ignore it
|
||||
* In this case we put them to 0.
|
||||
*/
|
||||
if ( ($pad_left+$pad_right) > $w) {
|
||||
$pad_left = 0;
|
||||
$pad_right = 0;
|
||||
}
|
||||
|
||||
$w_text = $w - $pad_left - $pad_right;
|
||||
|
||||
//save the current X position, we will have to jump back!!!!
|
||||
$startX = $this -> GetX();
|
||||
|
||||
if($border)
|
||||
{
|
||||
if($border==1)
|
||||
{
|
||||
$border = 'LTRB';
|
||||
$b1 = 'LRT';//without the bottom
|
||||
$b2 = 'LR';//without the top and bottom
|
||||
$b3 = 'LRB';//without the top
|
||||
}
|
||||
else
|
||||
{
|
||||
$b2='';
|
||||
if(is_int(strpos($border,'L')))
|
||||
$b2.='L';
|
||||
if(is_int(strpos($border,'R')))
|
||||
$b2.='R';
|
||||
$b1=is_int(strpos($border,'T')) ? $b2 . 'T' : $b2;
|
||||
$b3=is_int(strpos($border,'B')) ? $b2 . 'B' : $b2;
|
||||
}
|
||||
|
||||
//used if there is only one line
|
||||
$b = '';
|
||||
$b .= is_int(strpos($border,'L')) ? 'L' : "";
|
||||
$b .= is_int(strpos($border,'R')) ? 'R' : "";
|
||||
$b .= is_int(strpos($border,'T')) ? 'T' : "";
|
||||
$b .= is_int(strpos($border,'B')) ? 'B' : "";
|
||||
}
|
||||
|
||||
$first_line = true;
|
||||
$last_line = false;
|
||||
|
||||
if ($pDataIsString === true){
|
||||
$last_line = !(count($this->wt_DataInfo) > 0);
|
||||
}else {
|
||||
$last_line = !(count($pData) > 0);
|
||||
}
|
||||
|
||||
while(!$last_line){
|
||||
|
||||
if ($first_line && ($pad_top > 0)){
|
||||
/**
|
||||
* If this is the first line and there is top_padding
|
||||
*/
|
||||
$this->MultiCell($w, $pad_top, '', $b1, $align, 1);
|
||||
$b1 = str_replace('T', '', $b1);
|
||||
$b = str_replace('T', '', $b);
|
||||
}
|
||||
|
||||
if ($fill == 1){
|
||||
//fill in the cell at this point and write after the text without filling
|
||||
$this->Cell($w,$h,"",0,0,"",1);
|
||||
$this->SetX($startX);//restore the X position
|
||||
}
|
||||
|
||||
if ($pDataIsString === true){
|
||||
//make a line
|
||||
$str_data = $this->mt_MakeLine($w_text);
|
||||
//check for last line
|
||||
$last_line = !(count($this->wt_DataInfo) > 0);
|
||||
}else {
|
||||
//make a line
|
||||
$str_data = array_shift($pData);
|
||||
//check for last line
|
||||
$last_line = !(count($pData) > 0);
|
||||
}
|
||||
|
||||
if ($last_line && ($align == "J")){//do not Justify the Last Line
|
||||
$align = "L";
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the X position with the corresponding padding if it exist
|
||||
* The Right padding is done automatically by calculating the width of the text
|
||||
*/
|
||||
$this->SetX( $startX + $pad_left );
|
||||
$this->mt_PrintLine($w_text, $h, $str_data, $align);
|
||||
|
||||
|
||||
//see what border we draw:
|
||||
if($first_line && $last_line){
|
||||
//we have only 1 line
|
||||
$real_brd = $b;
|
||||
}elseif($first_line){
|
||||
$real_brd = $b1;
|
||||
}elseif($last_line){
|
||||
$real_brd = $b3;
|
||||
}else{
|
||||
$real_brd = $b2;
|
||||
}
|
||||
|
||||
if ($last_line && ($pad_bottom > 0)){
|
||||
/**
|
||||
* If we have bottom padding then the border and the padding is outputted
|
||||
*/
|
||||
$this->SetX($startX);//restore the X
|
||||
$this->Cell($w,$h,"",$b2,2);
|
||||
$this->SetX($startX);//restore the X
|
||||
$this->MultiCell($w, $pad_bottom, '', $real_brd, $align, 1);
|
||||
}else{
|
||||
//draw the border and jump to the next line
|
||||
$this->SetX($startX);//restore the X
|
||||
$this->Cell($w,$h,"",$real_brd,2);
|
||||
}
|
||||
|
||||
|
||||
if ($first_line) $first_line = false;
|
||||
}//while(! $last_line){
|
||||
|
||||
//APPLY THE DEFAULT STYLE
|
||||
$this->mt_ApplyStyle("DEFAULT");
|
||||
|
||||
$this->x=$this->lMargin;
|
||||
|
||||
//UTF8 Support
|
||||
if (isset($this->utf8_support) && isset($this->utf8_decoded)){
|
||||
if (true == $utf8_decoded_here) $this->utf8_decoded = false;
|
||||
}
|
||||
|
||||
}//function MultiCellExt
|
||||
|
||||
|
||||
/**
|
||||
This method divides the string into the tags and puts the result into wt_DataInfo variable.
|
||||
@param $pStr - string to be printed
|
||||
@return void
|
||||
*/
|
||||
|
||||
/**
|
||||
* This method divides the string into the tags and puts the result into wt_DataInfo variable.
|
||||
*
|
||||
* @access protected
|
||||
* @param string $pStr - string to be parsed
|
||||
* @param boolean $return - ==TRUE if the result is returned or not
|
||||
* @return struct or void
|
||||
*/
|
||||
protected function mt_DivideByTags($pStr, $return = false){
|
||||
|
||||
$pStr = str_replace("\t", "<ttags>\t</ttags>", $pStr);
|
||||
$pStr = str_replace(PARAGRAPH_STRING, "<pparg>\t</pparg>", $pStr);
|
||||
$pStr = str_replace("\r", "", $pStr);
|
||||
|
||||
//initialize the string_tags class
|
||||
$sWork = new string_tags(5);
|
||||
|
||||
//get the string divisions by tags
|
||||
$this->wt_DataInfo = $sWork->get_tags($pStr);
|
||||
|
||||
if ($return) return $this->wt_DataInfo;
|
||||
}//function mt_DivideByTags($pStr){
|
||||
|
||||
/**
|
||||
* This method parses the current text and return an array that contains the text information for
|
||||
* each line that will be drawed.
|
||||
*
|
||||
* @access protected
|
||||
* @param numeric $w - width of the line
|
||||
* @param string $pStr - String to be parsed
|
||||
* @return array $aStrLines - contains parsed text information.
|
||||
*/
|
||||
protected function mt_StringToLines($w = 0, $pStr){
|
||||
|
||||
//save the current style settings, this will be the default in case of no style is specified
|
||||
$this->mt_SaveCurrentStyle();
|
||||
$this->mt_Reset_Datas();
|
||||
|
||||
$this->mt_DivideByTags($pStr);
|
||||
|
||||
$last_line = !(count($this->wt_DataInfo) > 0);
|
||||
|
||||
$aStrLines = array();
|
||||
|
||||
while (!$last_line){
|
||||
|
||||
//make a line
|
||||
$str_data = $this->mt_MakeLine($w);
|
||||
array_push($aStrLines, $str_data);
|
||||
|
||||
//check for last line
|
||||
$last_line = !(count($this->wt_DataInfo) > 0);
|
||||
}//while(! $last_line){
|
||||
|
||||
//APPLY THE DEFAULT STYLE
|
||||
$this->mt_ApplyStyle("DEFAULT");
|
||||
|
||||
return $aStrLines;
|
||||
}//function mt_StringToLines
|
||||
|
||||
|
||||
/**
|
||||
* Draws a Tag Based formatted line returned from mt_MakeLine function into the pdf document
|
||||
*
|
||||
* @access protected
|
||||
* @param numeric $w - width of the text
|
||||
* @param numeric $h - height of a line
|
||||
* @param string $aTxt - text to be draw
|
||||
* @param string $align - align of the text
|
||||
* @return void
|
||||
*/
|
||||
protected function mt_PrintLine($w, $h, $aTxt, $align='J'){
|
||||
|
||||
if($w==0)
|
||||
$w=$this->w-$this->rMargin - $this->x;
|
||||
|
||||
$wmax = $w; //Maximum width
|
||||
|
||||
$total_width = 0; //the total width of all strings
|
||||
$total_spaces = 0; //the total number of spaces
|
||||
|
||||
$nr = count($aTxt);//number of elements
|
||||
|
||||
for ($i=0; $i<$nr; $i++){
|
||||
$total_width += ($aTxt[$i]['width']/1000);
|
||||
$total_spaces += $aTxt[$i]['spaces'];
|
||||
}
|
||||
|
||||
//default
|
||||
$w_first = $this->cMargin;
|
||||
|
||||
switch($align){
|
||||
case 'J':
|
||||
if ($total_spaces > 0)
|
||||
$extra_space = ($wmax - 2 * $this->cMargin - $total_width) / $total_spaces;
|
||||
else $extra_space = 0;
|
||||
break;
|
||||
case 'L':
|
||||
break;
|
||||
case 'C':
|
||||
$w_first = ($wmax - $total_width) / 2;
|
||||
break;
|
||||
case 'R':
|
||||
$w_first = $wmax - $total_width - $this->cMargin;;
|
||||
break;
|
||||
}
|
||||
|
||||
// Output the first Cell
|
||||
if ($w_first != 0){
|
||||
$this->Cell($w_first, $h, "", 0, 0, "L", 0);
|
||||
}
|
||||
|
||||
$last_width = $wmax - $w_first;
|
||||
|
||||
while (list($key, $val) = each($aTxt)) {
|
||||
|
||||
$bYPosUsed = false;
|
||||
|
||||
//apply current tag style
|
||||
$this->mt_ApplyStyle($val['tag']);
|
||||
|
||||
//If > 0 then we will move the current X Position
|
||||
$extra_X = 0;
|
||||
|
||||
if ($val['ypos'] != 0){
|
||||
$lastY = $this->y;
|
||||
$this->y = $lastY - $val['ypos'];
|
||||
$bYPosUsed = true;
|
||||
}
|
||||
|
||||
//string width
|
||||
$width = $this->GetStringWidth($val['text']);
|
||||
$width = $val['width'] / 1000;
|
||||
|
||||
if ($width == 0) continue;// No width jump over!!!
|
||||
|
||||
if($align=='J'){
|
||||
if ($val['spaces'] < 1) $temp_X = 0;
|
||||
else $temp_X = $extra_space;
|
||||
|
||||
$this->ws = $temp_X;
|
||||
|
||||
$this->_out(sprintf('%.3f Tw', $temp_X * $this->k));
|
||||
|
||||
$extra_X = $extra_space * $val['spaces'];//increase the extra_X Space
|
||||
|
||||
}else{
|
||||
$this->ws = 0;
|
||||
$this->_out('0 Tw');
|
||||
}//fi
|
||||
|
||||
//Output the Text/Links
|
||||
$this->Cell($width, $h, $val['text'], 0, 0, "C", 0, $val['href']);
|
||||
|
||||
$last_width -= $width;//last column width
|
||||
|
||||
if ($extra_X != 0){
|
||||
$this -> SetX($this->GetX() + $extra_X);
|
||||
$last_width -= $extra_X;
|
||||
}//fi
|
||||
|
||||
if ($bYPosUsed) $this->y = $lastY;
|
||||
|
||||
}//while
|
||||
|
||||
// Output the Last Cell
|
||||
if ($last_width != 0){
|
||||
$this->Cell($last_width, $h, "", 0, 0, "", 0);
|
||||
}//fi
|
||||
}//function mt_PrintLine
|
||||
|
||||
}//class
|
||||
|
||||
?>
|
263
prints/Table/class.string_tags.php
Executable file
263
prints/Table/class.string_tags.php
Executable file
@ -0,0 +1,263 @@
|
||||
<?php
|
||||
/**
|
||||
* Tag Extraction Class
|
||||
* Copyright (c) 2005-2010, http://www.interpid.eu
|
||||
*
|
||||
* Tag Extraction Class is licensed under the terms of the GNU Open Source GPL 3.0
|
||||
* license.
|
||||
*
|
||||
* Commercial use is prohibited. Visit <http://www.interpid.eu/fpdf-components>
|
||||
* if you need to obtain a commercial license.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
*
|
||||
*
|
||||
* Version: 1.1
|
||||
* Date: 2005/12/08
|
||||
* Author: Bintintan Andrei <andy@interpid.eu>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Extracts the tags and corresponding text from a string
|
||||
*
|
||||
* @name string_tags
|
||||
* @author Bintintan Andrei <andy@interpid.eu>
|
||||
* @version 1.1
|
||||
*/
|
||||
class string_tags{
|
||||
|
||||
/**
|
||||
* Contains the Tag/String Correspondence
|
||||
*
|
||||
* @access protected
|
||||
* @var struct(array)
|
||||
*/
|
||||
protected $aTAGS = array();
|
||||
|
||||
/**
|
||||
* Contains the links for the tags that have specified this parameter
|
||||
*
|
||||
* @access protected
|
||||
* @var struct(array)
|
||||
*/
|
||||
protected $aHREF;
|
||||
|
||||
/**
|
||||
* The maximum number of chars for a tag
|
||||
*
|
||||
* @access protected
|
||||
* @var integer
|
||||
*/
|
||||
protected $iTagMaxElem;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param numeric $p_tagmax - the number of characters allowed in a tag
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($p_tagmax = 10){
|
||||
$this->aTAGS = array();
|
||||
$this->aHREF = array();
|
||||
$this->iTagMaxElem = $p_tagmax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns TRUE if the specified tag name is an "<open tag>", (it is not already opened)
|
||||
*
|
||||
* @access protected
|
||||
* @param string $p_tag - tag name
|
||||
* @param array $p_array - tag arrays
|
||||
* @return boolean
|
||||
*/
|
||||
protected function OpenTag($p_tag, $p_array){
|
||||
|
||||
$aTAGS = & $this->aTAGS;
|
||||
$aHREF = & $this->aHREF;
|
||||
$maxElem = & $this->iTagMaxElem;
|
||||
|
||||
if (!preg_match("/^<([a-zA-Z0-9]{1,$maxElem}) *(.*)>$/i", $p_tag, $reg)) return false;
|
||||
|
||||
$p_tag = $reg[1];
|
||||
|
||||
$sHREF = array();
|
||||
if (isset($reg[2])) {
|
||||
preg_match_all("|([^ ]*)=[\"'](.*)[\"']|U", $reg[2], $out, PREG_PATTERN_ORDER);
|
||||
for ($i=0; $i<count($out[0]); $i++){
|
||||
$out[2][$i] = preg_replace("/(\"|')/i", "", $out[2][$i]);
|
||||
array_push($sHREF, array($out[1][$i], $out[2][$i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array($p_tag, $aTAGS)) return false;//tag already opened
|
||||
|
||||
if (in_array("</$p_tag>", $p_array)) {
|
||||
array_push($aTAGS, $p_tag);
|
||||
array_push($aHREF, $sHREF);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}//OpenTag
|
||||
|
||||
/** returnes true if $p_tag is a "<close tag>"
|
||||
@param $p_tag - tag string
|
||||
$p_array - tag array;
|
||||
@return true/false
|
||||
*/
|
||||
/**
|
||||
* Returns true if $p_tag is a "<close tag>"
|
||||
*
|
||||
* @access protected
|
||||
* @param sting $p_tag - tag name
|
||||
* @param array $p_array - tag array
|
||||
* @return boolean
|
||||
*/
|
||||
protected function CloseTag($p_tag, $p_array){
|
||||
|
||||
$aTAGS = & $this->aTAGS;
|
||||
$aHREF = & $this->aHREF;
|
||||
$maxElem = & $this->iTagMaxElem;
|
||||
|
||||
if (!preg_match("/^<\/([a-zA-Z0-9]{1,$maxElem})>$/i", $p_tag, $reg)) return false;
|
||||
|
||||
$p_tag = $reg[1];
|
||||
|
||||
if (in_array("$p_tag", $aTAGS)) {
|
||||
array_pop($aTAGS);
|
||||
array_pop($aHREF);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}// CloseTag
|
||||
|
||||
/**
|
||||
* Expands the paramteres that are kept in Href field
|
||||
*
|
||||
* @access protected
|
||||
* @param array of parameters
|
||||
* @return string with concatenated results
|
||||
*/
|
||||
|
||||
/**
|
||||
* Expands the paramteres that are kept in Href field
|
||||
*
|
||||
* @access protected
|
||||
* @param struct $pResult
|
||||
* @return string
|
||||
*/
|
||||
protected function expand_parameters($pResult){
|
||||
$aTmp = $pResult['params'];
|
||||
if ($aTmp <> '')
|
||||
for ($i=0; $i<count($aTmp); $i++){
|
||||
$pResult[$aTmp[$i][0]] = $aTmp[$i][1];
|
||||
}
|
||||
|
||||
unset($pResult['params']);
|
||||
|
||||
return $pResult;
|
||||
}//expand_parameters
|
||||
|
||||
|
||||
/**
|
||||
* Optimizes the result of the tag result array
|
||||
* In the result array there can be strings that are consecutive and have the same tag, they
|
||||
* are concatenated.
|
||||
*
|
||||
* @access protected
|
||||
* @param array $result - the array that has to be optimized
|
||||
* @return array - optimized result
|
||||
*/
|
||||
protected function optimize_tags($result){
|
||||
|
||||
if (count($result) == 0) return $result;
|
||||
|
||||
$res_result = array();
|
||||
$current = $result[0];
|
||||
$i = 1;
|
||||
|
||||
while ($i < count($result)){
|
||||
|
||||
//if they have the same tag then we concatenate them
|
||||
if (($current['tag'] == $result[$i]['tag']) && ($current['params'] == $result[$i]['params'])){
|
||||
$current['text'] .= $result[$i]['text'];
|
||||
}else{
|
||||
$current = $this->expand_parameters($current);
|
||||
array_push($res_result, $current);
|
||||
$current = $result[$i];
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$current = $this->expand_parameters($current);
|
||||
array_push($res_result, $current);
|
||||
|
||||
return $res_result;
|
||||
}//optimize_tags
|
||||
|
||||
|
||||
|
||||
/** Parses a string and returnes the result
|
||||
@param $p_str - string
|
||||
@return array (
|
||||
array (string1, tag1),
|
||||
array (string2, tag2)
|
||||
)
|
||||
*/
|
||||
/**
|
||||
* Parses a string and returnes an array of TAG - SRTING correspondent array
|
||||
* The result has the following structure:
|
||||
* array(
|
||||
* array (string1, tag1),
|
||||
* array (string2, tag2),
|
||||
* ... etc
|
||||
* )
|
||||
*
|
||||
* @access public
|
||||
* @param string $p_str - the Input String
|
||||
* @return array - the result array
|
||||
*/
|
||||
public function get_tags($p_str){
|
||||
|
||||
$aTAGS = & $this->aTAGS;
|
||||
$aHREF = & $this->aHREF;
|
||||
$aTAGS = array();
|
||||
$result = array();
|
||||
|
||||
$reg = preg_split('/(<.*>)/U', $p_str, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
$sTAG = "";
|
||||
$sHREF = "";
|
||||
|
||||
while (list($key, $val) = each($reg)) {
|
||||
if ($val == "") continue;
|
||||
|
||||
if ($this->OpenTag($val,$reg)){
|
||||
$sTAG = (($temp = end($aTAGS)) != NULL) ? $temp : "";
|
||||
$sHREF = (($temp = end($aHREF)) != NULL) ? $temp : "";
|
||||
}elseif($this->CloseTag($val, $reg)){
|
||||
$sTAG = (($temp = end($aTAGS)) != NULL) ? $temp : "";
|
||||
$sHREF = (($temp = end($aHREF)) != NULL) ? $temp : "";
|
||||
}else {
|
||||
if ($val != "")
|
||||
array_push($result, array('text'=>$val, 'tag'=>$sTAG, 'params'=>$sHREF));
|
||||
}
|
||||
}//while
|
||||
|
||||
return $this->optimize_tags($result);
|
||||
}//get_tags
|
||||
|
||||
}//class string_tags
|
||||
|
||||
?>
|
56
prints/Table/example1.inc
Executable file
56
prints/Table/example1.inc
Executable file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
//load the table default definitions DEFAULT!!!
|
||||
require("example1_def.inc");
|
||||
|
||||
$columns = 3; //number of Columns
|
||||
|
||||
|
||||
//Initialize the table class
|
||||
$pdf->tbInitialize($columns, true, true);
|
||||
|
||||
//set the Table Type
|
||||
$pdf->tbSetTableType($table_default_table_type);
|
||||
|
||||
|
||||
$aSimpleHeader = array();
|
||||
|
||||
//Table Header
|
||||
for($i=0; $i<$columns; $i++) {
|
||||
$aSimpleHeader[$i] = $table_default_header_type;
|
||||
$aSimpleHeader[$i]['TEXT'] = "Column " . ($i + 1) . " text";
|
||||
$aSimpleHeader[$i]['WIDTH'] = 30;
|
||||
}
|
||||
|
||||
//set the Table Header
|
||||
$pdf->tbSetHeaderType($aSimpleHeader);
|
||||
|
||||
//Draw the Header
|
||||
$pdf->tbDrawHeader();
|
||||
|
||||
//Table Data Settings
|
||||
$aDataType = Array();
|
||||
for ($i=0; $i<$columns; $i++) $aDataType[$i] = $table_default_data_type;
|
||||
|
||||
$pdf->tbSetDataType($aDataType);
|
||||
|
||||
for ($j=1; $j<5; $j++)
|
||||
{
|
||||
$data = Array();
|
||||
$data[0]['TEXT'] = "Line $j Text 1";
|
||||
$data[0]['T_ALIGN'] = "L";//default in the example is C
|
||||
$data[1]['TEXT'] = "Line $j Text 2";
|
||||
$data[2]['TEXT'] = "Line $j Text 3";
|
||||
$data[2]['T_ALIGN'] = "R";
|
||||
|
||||
$pdf->tbDrawData($data);
|
||||
}
|
||||
|
||||
//output the table data to the pdf
|
||||
$pdf->tbOuputData();
|
||||
|
||||
//draw the Table Border
|
||||
$pdf->tbDrawBorder();
|
||||
|
||||
|
||||
?>
|
45
prints/Table/example1_def.inc
Executable file
45
prints/Table/example1_def.inc
Executable file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES
|
||||
*****************************************************/
|
||||
|
||||
$table_default_header_type = array(
|
||||
'WIDTH' => 6, //cell width
|
||||
'T_COLOR' => array(255,255,240), //text color
|
||||
'T_SIZE' => 7, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => 'B', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(25, 124, 224), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.2, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
'TEXT' => '', //text
|
||||
);
|
||||
|
||||
$table_default_data_type = array(
|
||||
'T_COLOR' => array(0,0,0), //text color
|
||||
'T_SIZE' => 6, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(255,255,255), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.1, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
);
|
||||
|
||||
$table_default_table_type = array(
|
||||
'TB_ALIGN' => 'L', //table align on page
|
||||
'L_MARGIN' => 0, //space to the left margin
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => '0.3', //border size
|
||||
);
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES --- END
|
||||
*****************************************************/
|
||||
?>
|
145
prints/Table/example2.inc
Executable file
145
prints/Table/example2.inc
Executable file
@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
//load the table default definitions
|
||||
require("example2_def.inc");
|
||||
|
||||
$columns = 3; //number of Columns
|
||||
|
||||
//Initialize the table class
|
||||
$pdf->tbInitialize($columns, true, true);
|
||||
|
||||
$aSimpleHeader = array();
|
||||
|
||||
//Table Header
|
||||
for($i=0; $i<$columns; $i++) {
|
||||
$aSimpleHeader[$i] = $table_default_header_type;
|
||||
$aSimpleHeader[$i]['TEXT'] = "Column " . ($i + 1) . " text";
|
||||
$aSimpleHeader[$i]['WIDTH'] = 30;
|
||||
}
|
||||
|
||||
$aSimpleHeader1 = $aSimpleHeader;
|
||||
$aSimpleHeader2 = $aSimpleHeader;
|
||||
|
||||
$aSimpleHeader1[1]['TEXT'] = "Rowspan/Colspan can be made also in the header.";
|
||||
$aSimpleHeader1[1]['ROWSPAN'] = 2;
|
||||
$aSimpleHeader1[1]['COLSPAN'] = 2;
|
||||
$aSimpleHeader1[1]['BG_COLOR'] = $bg_color4;
|
||||
$aSimpleHeader1[1]['T_COLOR'] = array(0,0,0);
|
||||
|
||||
$aHeader = array(
|
||||
$aSimpleHeader,
|
||||
$aSimpleHeader1,
|
||||
$aSimpleHeader2
|
||||
);
|
||||
|
||||
//set the Table Header
|
||||
$pdf->tbSetHeaderType($aHeader, true);
|
||||
|
||||
//set the Table Type
|
||||
$pdf->tbSetTableType($table_default_table_type);
|
||||
|
||||
if (isset($bTableSplitMode))
|
||||
$pdf->tbSetSplitMode($bTableSplitMode);
|
||||
|
||||
//Draw the Header
|
||||
$pdf->tbDrawHeader();
|
||||
|
||||
//Table Data Settings
|
||||
$aDataType = Array();
|
||||
for ($i=0; $i<$columns; $i++) $aDataType[$i] = $table_default_data_type;
|
||||
|
||||
$pdf->tbSetDataType($aDataType);
|
||||
|
||||
for ($j=1; $j<=15; $j++)
|
||||
{
|
||||
$data = Array();
|
||||
$data[0]['TEXT'] = "Line $j Text 1";
|
||||
$data[1]['TEXT'] = "Line $j Text 2";
|
||||
$data[2]['TEXT'] = "Line $j Text 3";
|
||||
|
||||
if ($j == 1){
|
||||
$data[0]['BG_COLOR'] = $bg_color5;
|
||||
$data[0]['TEXT'] = 'Colspan Example';
|
||||
$data[0]['COLSPAN'] = 2;
|
||||
}
|
||||
|
||||
if ($j == 2){
|
||||
$data[1]['BG_COLOR'] = $bg_color6;
|
||||
$data[1]['TEXT'] = 'Rowspan Example';
|
||||
$data[1]['ROWSPAN'] = 2;
|
||||
}
|
||||
|
||||
if ($j == 4){
|
||||
$data[1]['BG_COLOR'] = $bg_color7;
|
||||
$data[1]['TEXT'] = 'Rowspan && Colspan Example';
|
||||
$data[1]['ROWSPAN'] = 2;
|
||||
$data[1]['COLSPAN'] = 2;
|
||||
}
|
||||
|
||||
if (($j >= 7) && ($j <= 9)){
|
||||
$data[0]['TEXT'] = "More lines...\nLine2\nLine3";
|
||||
}
|
||||
|
||||
if ($j == 7){
|
||||
$data[1]['TEXT'] = "Top Left Align";
|
||||
$data[1]['V_ALIGN'] = "T";
|
||||
$data[1]['T_ALIGN'] = "L";
|
||||
|
||||
$data[2]['TEXT'] = "Bottom Right Align";
|
||||
$data[2]['V_ALIGN'] = "B";
|
||||
$data[2]['T_ALIGN'] = "R";
|
||||
}
|
||||
|
||||
if ($j == 8){
|
||||
$data[1]['TEXT'] = "Top Center Align";
|
||||
$data[1]['V_ALIGN'] = "T";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
|
||||
$data[2]['TEXT'] = "Bottom Center Align";
|
||||
$data[2]['V_ALIGN'] = "B";
|
||||
$data[2]['T_ALIGN'] = "C";
|
||||
}
|
||||
|
||||
if ($j == 9){
|
||||
|
||||
$pdf->SetStyle("sd1", "times", "", 6, "0,49,159");
|
||||
$pdf->SetStyle("sd2", "arial", "", 5, "140,12,12");
|
||||
$pdf->SetStyle("sd3", "arial", "", 6, "0,5,90");
|
||||
|
||||
$data[1]['TEXT'] = "<sd1>This is just a longer text, justified align, middle vertical align to demonstrate some other capabilities. Test text. Test text.</sd1>
|
||||
<sd3>\tSettings:</sd3>
|
||||
<p size='15' > ~~~</p><sd2>- Rowspan=4</sd2>
|
||||
<p size='15' > ~~~</p><sd2>- Colspan=2</sd2>
|
||||
";
|
||||
|
||||
$data[1]['V_ALIGN'] = "M";
|
||||
$data[1]['T_ALIGN'] = "J";
|
||||
$data[1]['COLSPAN'] = 2;
|
||||
$data[1]['ROWSPAN'] = 4;
|
||||
$data[1]['LN_SIZE'] = 2.3;
|
||||
}
|
||||
|
||||
if ($j==14){
|
||||
|
||||
$data[1]['TEXT'] = "Cell Properties Overwriting Example";
|
||||
$data[1]['T_FONT'] = "Times";
|
||||
$data[1]['T_SIZE'] = 7;
|
||||
$data[1]['T_TYPE'] = "B";
|
||||
$data[1]['BG_COLOR'] = array(240,240,209);
|
||||
$data[1]['BRD_COLOR'] = array(100, 100, 200);
|
||||
|
||||
$data[1]['V_ALIGN'] = "T";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
}
|
||||
|
||||
$pdf->tbDrawData($data);
|
||||
}
|
||||
|
||||
//output the table data to the pdf
|
||||
$pdf->tbOuputData();
|
||||
|
||||
//draw the Table Border
|
||||
$pdf->tbDrawBorder();
|
||||
|
||||
|
||||
?>
|
45
prints/Table/example2_def.inc
Executable file
45
prints/Table/example2_def.inc
Executable file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES
|
||||
*****************************************************/
|
||||
|
||||
$table_default_header_type = array(
|
||||
'WIDTH' => 6, //cell width
|
||||
'T_COLOR' => array(255,255,240), //text color
|
||||
'T_SIZE' => 7, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 3, //line size for one row
|
||||
'BG_COLOR' => array(25, 124, 224), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.2, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
'TEXT' => '', //text
|
||||
);
|
||||
|
||||
$table_default_data_type = array(
|
||||
'T_COLOR' => array(0,0,0), //text color
|
||||
'T_SIZE' => 6, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 3, //line size for one row
|
||||
'BG_COLOR' => array(255,255,255), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.1, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
);
|
||||
|
||||
$table_default_table_type = array(
|
||||
'TB_ALIGN' => 'C', //table align on page
|
||||
'L_MARGIN' => 0, //space to the left margin
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => '0.3', //border size
|
||||
);
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES --- END
|
||||
*****************************************************/
|
||||
?>
|
190
prints/Table/example3.inc
Executable file
190
prints/Table/example3.inc
Executable file
@ -0,0 +1,190 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES
|
||||
*****************************************************/
|
||||
|
||||
$table_default_header_type = array(
|
||||
'WIDTH' => 6, //cell width
|
||||
'T_COLOR' => array(255,255,240), //text color
|
||||
'T_SIZE' => 7, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 3, //line size for one row
|
||||
'BG_COLOR' => array(25, 124, 224), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.2, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
'TEXT' => '', //text
|
||||
);
|
||||
|
||||
$table_default_data_type = array(
|
||||
'T_COLOR' => array(0,0,0), //text color
|
||||
'T_SIZE' => 6, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 3, //line size for one row
|
||||
'BG_COLOR' => array(255,255,255), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.1, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
);
|
||||
|
||||
$table_default_table_type = array(
|
||||
'TB_ALIGN' => 'L', //table align on page
|
||||
'L_MARGIN' => 0, //space to the left margin
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => '0.3', //border size
|
||||
);
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES --- END
|
||||
*****************************************************/
|
||||
|
||||
$columns = 3; //number of Columns
|
||||
|
||||
$sTxt = "<s1>Example 3 - Table From example 3 at the end of the page</s1>\n<s2>Splitting mode = ON</s2>";
|
||||
|
||||
$pdf->SetY(220);
|
||||
$pdf->MultiCellTag(100, 2.5, $sTxt, 0);
|
||||
$pdf->Ln(1);
|
||||
|
||||
//Initialize the table class
|
||||
$pdf->tbInitialize($columns, true, true);
|
||||
|
||||
$aSimpleHeader = array();
|
||||
|
||||
//Table Header
|
||||
for($i=0; $i<$columns; $i++) {
|
||||
$aSimpleHeader[$i] = $table_default_header_type;
|
||||
$aSimpleHeader[$i]['TEXT'] = "Column " . ($i + 1) . " text";
|
||||
$aSimpleHeader[$i]['WIDTH'] = 30;
|
||||
}
|
||||
|
||||
$aSimpleHeader1 = $aSimpleHeader;
|
||||
$aSimpleHeader2 = $aSimpleHeader;
|
||||
|
||||
$aSimpleHeader1[1]['TEXT'] = "Rowspan/Colspan can be made also in the header.";
|
||||
$aSimpleHeader1[1]['ROWSPAN'] = 2;
|
||||
$aSimpleHeader1[1]['COLSPAN'] = 2;
|
||||
$aSimpleHeader1[1]['BG_COLOR'] = $bg_color4;
|
||||
$aSimpleHeader1[1]['T_COLOR'] = array(0,0,0);
|
||||
|
||||
$aHeader = array(
|
||||
$aSimpleHeader,
|
||||
$aSimpleHeader1,
|
||||
$aSimpleHeader2
|
||||
);
|
||||
|
||||
//set the Table Header
|
||||
$pdf->tbSetHeaderType($aHeader, true);
|
||||
|
||||
//set the Table Type
|
||||
$pdf->tbSetTableType($table_default_table_type);
|
||||
|
||||
//Draw the Header
|
||||
$pdf->tbDrawHeader();
|
||||
|
||||
//Table Data Settings
|
||||
$aDataType = Array();
|
||||
for ($i=0; $i<$columns; $i++) $aDataType[$i] = $table_default_data_type;
|
||||
|
||||
$pdf->tbSetDataType($aDataType);
|
||||
|
||||
for ($j=1; $j<=15; $j++)
|
||||
{
|
||||
$data = Array();
|
||||
$data[0]['TEXT'] = "Line $j Text 1";
|
||||
$data[1]['TEXT'] = "Line $j Text 2";
|
||||
$data[2]['TEXT'] = "Line $j Text 3";
|
||||
|
||||
if ($j == 1){
|
||||
$data[0]['BG_COLOR'] = $bg_color5;
|
||||
$data[0]['TEXT'] = 'Colspan Example';
|
||||
$data[0]['COLSPAN'] = 2;
|
||||
}
|
||||
|
||||
if ($j == 2){
|
||||
$data[1]['BG_COLOR'] = $bg_color6;
|
||||
$data[1]['TEXT'] = 'Rowspan Example';
|
||||
$data[1]['ROWSPAN'] = 2;
|
||||
}
|
||||
|
||||
if ($j == 4){
|
||||
$data[1]['BG_COLOR'] = $bg_color7;
|
||||
$data[1]['TEXT'] = 'Rowspan && Colspan Example';
|
||||
$data[1]['ROWSPAN'] = 2;
|
||||
$data[1]['COLSPAN'] = 2;
|
||||
}
|
||||
|
||||
if (($j >= 7) && ($j <= 9)){
|
||||
$data[0]['TEXT'] = "More lines...\nLine2\nLine3";
|
||||
}
|
||||
|
||||
if ($j == 7){
|
||||
$data[1]['TEXT'] = "Top Left Align";
|
||||
$data[1]['V_ALIGN'] = "T";
|
||||
$data[1]['T_ALIGN'] = "L";
|
||||
|
||||
$data[2]['TEXT'] = "Bottom Right Align";
|
||||
$data[2]['V_ALIGN'] = "B";
|
||||
$data[2]['T_ALIGN'] = "R";
|
||||
}
|
||||
|
||||
if ($j == 8){
|
||||
$data[1]['TEXT'] = "Top Center Align";
|
||||
$data[1]['V_ALIGN'] = "T";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
|
||||
$data[2]['TEXT'] = "Bottom Center Align";
|
||||
$data[2]['V_ALIGN'] = "B";
|
||||
$data[2]['T_ALIGN'] = "C";
|
||||
}
|
||||
|
||||
if ($j == 9){
|
||||
|
||||
$pdf->SetStyle("sd1", "times", "", 6, "0,49,159");
|
||||
$pdf->SetStyle("sd2", "arial", "", 5, "140,12,12");
|
||||
$pdf->SetStyle("sd3", "arial", "", 6, "0,5,90");
|
||||
|
||||
$data[1]['TEXT'] = "<sd1>This is just a longer text, justified align, middle vertical align to demonstrate some other capabilities. Test text. Test text.</sd1>
|
||||
<sd3>\tSettings:</sd3>
|
||||
<p size='15' > ~~~</p><sd2>- Rowspan=4</sd2>
|
||||
<p size='15' > ~~~</p><sd2>- Colspan=2</sd2>
|
||||
";
|
||||
|
||||
$data[1]['V_ALIGN'] = "M";
|
||||
$data[1]['T_ALIGN'] = "J";
|
||||
$data[1]['COLSPAN'] = 2;
|
||||
$data[1]['ROWSPAN'] = 4;
|
||||
$data[1]['LN_SIZE'] = 2.3;
|
||||
}
|
||||
|
||||
if ($j==14){
|
||||
|
||||
$data[1]['TEXT'] = "Cell Properties Overwriting Example";
|
||||
$data[1]['T_FONT'] = "Times";
|
||||
$data[1]['T_SIZE'] = 7;
|
||||
$data[1]['T_TYPE'] = "B";
|
||||
$data[1]['BG_COLOR'] = array(240,240,209);
|
||||
$data[1]['BRD_COLOR'] = array(100, 100, 200);
|
||||
|
||||
$data[1]['V_ALIGN'] = "T";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
}
|
||||
|
||||
$pdf->tbDrawData($data);
|
||||
}
|
||||
|
||||
//output the table data to the pdf
|
||||
$pdf->tbOuputData();
|
||||
|
||||
//draw the Table Border
|
||||
$pdf->tbDrawBorder();
|
||||
|
||||
|
||||
?>
|
217
prints/Table/example_base.php
Executable file
217
prints/Table/example_base.php
Executable file
@ -0,0 +1,217 @@
|
||||
<?php
|
||||
|
||||
//Table Base Classs
|
||||
require_once("class.fpdf_table.php");
|
||||
|
||||
//Class Extention for header and footer
|
||||
require_once("header_footer.inc");
|
||||
|
||||
//Table Defintion File
|
||||
require_once("table_def.inc");
|
||||
|
||||
$bg_color1 = array(234, 255, 218);
|
||||
$bg_color2 = array(165, 250, 220);
|
||||
$bg_color3 = array(255, 252, 249);
|
||||
|
||||
$pdf = new pdf_usage();
|
||||
$pdf->Open();
|
||||
$pdf->SetAutoPageBreak(true, 20);
|
||||
$pdf->SetMargins(20, 20, 20);
|
||||
$pdf->AddPage();
|
||||
$pdf->AliasNbPages();
|
||||
|
||||
$columns = 5; //five columns
|
||||
|
||||
$pdf->SetStyle("p","times","",10,"130,0,30");
|
||||
$pdf->SetStyle("t1","arial","",10,"0,151,200");
|
||||
$pdf->SetStyle("size","times","BI",13,"0,0,120");
|
||||
|
||||
$ttxt1 = "<size>Tag-Based MultiCell Table</size>\nCreated by <t1 href='mailto:andy@interpid.eu'>Bintintan Andrei, Interpid Team</t1>";
|
||||
$ttxt2 = "<p>The cells in the table are fully functional <t1>Tag Based Multicells components</t1>. The description and usage of these components can be found <t1>here</t1>.</p>";
|
||||
|
||||
//Initialize the table class
|
||||
$pdf->tbInitialize($columns, true, true);
|
||||
|
||||
//set the Table Type
|
||||
$pdf->tbSetTableType($table_default_table_type);
|
||||
|
||||
//Table Header
|
||||
for($i=0; $i<$columns; $i++) $header_type[$i] = $table_default_header_type;
|
||||
|
||||
for($i=0; $i<$columns; $i++) {
|
||||
$header_type1[$i] = $table_default_header_type;
|
||||
$header_type2[$i] = $table_default_header_type;
|
||||
|
||||
$header_type2[$i]['T_COLOR'] = array(10,20, 100);
|
||||
$header_type2[$i]['BG_COLOR'] = $bg_color2;
|
||||
}
|
||||
|
||||
$header_type1[0]['WIDTH'] = 20;
|
||||
$header_type1[1]['WIDTH'] = 30;
|
||||
$header_type1[2]['WIDTH'] = 40;
|
||||
$header_type1[3]['WIDTH'] = 40;
|
||||
$header_type1[4]['WIDTH'] = 20;
|
||||
|
||||
|
||||
$header_type1[0]['TEXT'] = "Header 1";
|
||||
$header_type1[1]['TEXT'] = "Header 2";
|
||||
$header_type1[2]['TEXT'] = "Header 3";
|
||||
$header_type1[3]['TEXT'] = "Header 4";
|
||||
$header_type1[4]['TEXT'] = "Header 5";
|
||||
|
||||
|
||||
$header_type2[0]['TEXT'] = "Header Line 2, Centered, Colspan";
|
||||
$header_type2[0]['COLSPAN'] = 3;
|
||||
$header_type2[0]['T_ALIGN'] = 'C';
|
||||
|
||||
$header_type2[3]['TEXT'] = "The Header can have multiple lines";
|
||||
$header_type2[3]['COLSPAN'] = 2;
|
||||
$header_type2[3]['ROWSPAN'] = 2;
|
||||
|
||||
$aHeaderArray = array(
|
||||
$header_type1,
|
||||
$header_type2,
|
||||
$header_type1,
|
||||
$header_type1
|
||||
);
|
||||
|
||||
//set the Table Header
|
||||
$pdf->tbSetHeaderType($aHeaderArray, true);
|
||||
|
||||
//Draw the Header
|
||||
$pdf->tbDrawHeader();
|
||||
|
||||
//Table Data Settings
|
||||
$data_type = Array();//reset the array
|
||||
for ($i=0; $i<$columns; $i++) $data_type[$i] = $table_default_data_type;
|
||||
|
||||
$pdf->tbSetDataType($data_type);
|
||||
|
||||
$fsize = 5;
|
||||
$colspan = 2;
|
||||
$rowspan = 2;
|
||||
|
||||
$rgb_r = 255;
|
||||
$rgb_g = 255;
|
||||
$rgb_b = 255;
|
||||
|
||||
for ($j=0; $j<45; $j++)
|
||||
{
|
||||
$data = Array();
|
||||
$data[0]['TEXT'] = "Row No - $j";
|
||||
$data[0]['T_SIZE'] = $fsize;
|
||||
$data[1]['TEXT'] = "Test Text Column 1- $j";
|
||||
$data[1]['T_SIZE'] = 13 - $fsize;
|
||||
$data[2]['TEXT'] = "Test Text Column 2- $j";
|
||||
$data[3]['TEXT'] = "Longer text, this will split sometimes...";
|
||||
$data[3]['T_SIZE'] = 15 - $fsize;
|
||||
$data[4]['TEXT'] = "Short 4- $j";
|
||||
$data[4]['T_SIZE'] = 7;
|
||||
|
||||
if ($j==0){
|
||||
$data[1]['TEXT'] = $ttxt1;
|
||||
$data[1]['COLSPAN'] = 4;
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
$data[1]['LN_SIZE'] = 5;
|
||||
}elseif ($j==1){
|
||||
|
||||
$data[0]['TEXT'] = "Top Right Align <p>Align Top</p> Right Right Align ";
|
||||
$data[0]['T_ALIGN'] = "R";
|
||||
$data[0]['V_ALIGN'] = "T";
|
||||
|
||||
$data[1]['TEXT'] = "Middle Center Align Bold Italic";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
$data[1]['T_TYPE'] = "BI";
|
||||
$data[1]['V_ALIGN'] = "M";
|
||||
|
||||
$data[2]['TEXT'] = "\n\n\n\n\nBottom Left Align";
|
||||
$data[2]['T_ALIGN'] = "L";
|
||||
$data[2]['V_ALIGN'] = "B";
|
||||
|
||||
$data[3]['TEXT'] = "Middle Justified Align Longer text";
|
||||
$data[3]['T_ALIGN'] = "J";
|
||||
$data[3]['V_ALIGN'] = "M";
|
||||
|
||||
$data[4]['TEXT'] = "TOP RIGHT Align";
|
||||
$data[4]['T_ALIGN'] = "R";
|
||||
$data[4]['V_ALIGN'] = "T";
|
||||
}
|
||||
|
||||
if ($j>0){
|
||||
$data[0]['BG_COLOR'] = array(255-$rgb_b, $rgb_g, $rgb_r);
|
||||
$data[1]['BG_COLOR'] = array($rgb_r, $rgb_g, $rgb_b);
|
||||
$data[2]['BG_COLOR'] = array($rgb_b, $rgb_g, 220);
|
||||
$data[2]['T_COLOR'] = array(80, 20, $rgb_g);
|
||||
}
|
||||
|
||||
if ($j>3 && $j<7){
|
||||
$data[1]['TEXT'] = "Colspan Example - Center Align";
|
||||
$data[1]['COLSPAN'] = $colspan;
|
||||
$data[1]['BG_COLOR'] = array($rgb_b, 50, 50);
|
||||
$data[1]['T_COLOR'] = array(255,255,$rgb_g);
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
$colspan++;
|
||||
if ($colspan>4) $colspan = 2;
|
||||
}
|
||||
|
||||
if ($j==7){
|
||||
$data[3]['TEXT'] = "Rowspan Example";
|
||||
$data[3]['BG_COLOR'] = array($rgb_b, $rgb_b, 250);
|
||||
$data[3]['ROWSPAN'] = 4;
|
||||
|
||||
}
|
||||
|
||||
if ($j==8){
|
||||
$data[1]['TEXT'] = "Rowspan Example";
|
||||
$data[1]['BG_COLOR'] = array($rgb_b, 50, 50);
|
||||
$data[1]['ROWSPAN'] = 6;
|
||||
}
|
||||
|
||||
if ($j==9){
|
||||
$data[2]['TEXT'] = "Rowspan Example";
|
||||
$data[2]['BG_COLOR'] = array($rgb_r, $rgb_r, $rgb_r);
|
||||
$data[2]['ROWSPAN'] = 3;
|
||||
}
|
||||
|
||||
if ($j==12){
|
||||
$data[2]['TEXT'] = "Rowspan && Colspan Example\n\nCenter/Middle Allignment";
|
||||
$data[2]['T_ALIGN'] = 'C';
|
||||
$data[2]['V_ALIGN'] = 'M';
|
||||
$data[2]['BG_COLOR'] = array(234, 255, 218);
|
||||
$data[2]['ROWSPAN'] = 5;
|
||||
$data[2]['COLSPAN'] = 2;
|
||||
}
|
||||
|
||||
if ($j==17){
|
||||
$data[0]['TEXT'] = $ttxt2;
|
||||
$data[0]['T_ALIGN'] = 'C';
|
||||
$data[0]['V_ALIGN'] = 'M';
|
||||
$data[0]['BG_COLOR'] = array(234, 255, 218);
|
||||
$data[0]['ROWSPAN'] = 5;
|
||||
$data[0]['COLSPAN'] = 4;
|
||||
}
|
||||
|
||||
$fsize += 0.5;
|
||||
|
||||
if ($fsize > 10) $fsize = 5;
|
||||
|
||||
$rgb_b -= 10;
|
||||
$rgb_g -= 5;
|
||||
$rgb_b -= 20;
|
||||
|
||||
if ($rgb_b < 150) $rgb_b = 255;
|
||||
if ($rgb_g < 150) $rgb_g = 255;
|
||||
if ($rgb_b < 150) $rgb_b = 255;
|
||||
|
||||
$pdf->tbDrawData($data);
|
||||
}
|
||||
|
||||
//output the table data to the pdf
|
||||
$pdf->tbOuputData();
|
||||
|
||||
//draw the Table Border
|
||||
$pdf->tbDrawBorder();
|
||||
|
||||
$pdf->Output();
|
||||
|
||||
?>
|
69
prints/Table/example_detailed.php
Executable file
69
prints/Table/example_detailed.php
Executable file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
//Table Base Classs
|
||||
require_once("class.fpdf_table.php");
|
||||
|
||||
//Class Extention for header and footer
|
||||
require_once("header_footer.inc");
|
||||
|
||||
/**
|
||||
* Background Color Definitions
|
||||
*/
|
||||
$bg_color1 = array(234, 255, 218);
|
||||
$bg_color2 = array(165, 250, 220);
|
||||
$bg_color3 = array(255, 252, 249);
|
||||
$bg_color4 = array(86, 155, 225);
|
||||
$bg_color5 = array(207, 247, 239);
|
||||
$bg_color6 = array(246, 211, 207);
|
||||
$bg_color7 = array(216, 243, 228);
|
||||
|
||||
|
||||
$pdf = new pdf_usage();
|
||||
$pdf->Open();
|
||||
$pdf->SetAutoPageBreak(true, 20);
|
||||
$pdf->SetMargins(20, 20, 20);
|
||||
$pdf->AddPage();
|
||||
$pdf->AliasNbPages();
|
||||
|
||||
$pdf->SetStyle("s1","arial","",8,"118,0,3");
|
||||
$pdf->SetStyle("s2","arial","",6,"0,49,159");
|
||||
|
||||
//default text color
|
||||
$pdf->SetTextColor(118, 0, 3);
|
||||
|
||||
$pdf->MultiCellTag(100, 4, "<s1>Example 1 - Very Simple Table</s1>", 0);
|
||||
$pdf->Ln(1);
|
||||
require('example1.inc');
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$sTxt = "<s1>Example 2 - More detailed Table</s1>\n<s2>\t- Table Align = Center\n\t- The header has multiple lines\n\t- Colspanning Example\n\t- Rowspanning Example\n\t- Text Alignments\n\t- Properties overwriting</s2>";
|
||||
|
||||
$pdf->SetX(60);
|
||||
$pdf->MultiCellTag(100, 2.5, $sTxt, 0);
|
||||
$pdf->Ln(1);
|
||||
require('example2.inc');
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$sTxt = "<s1>Example 3 - Table split end of the page</s1>\n<s2>\t- This is the table from Example 2 at the end of the page\n\t- Splitting mode = ON, you can see that the cells are splitted</s2>";
|
||||
|
||||
$pdf->SetXY(60,215);
|
||||
$pdf->MultiCellTag(100, 2.5, $sTxt, 0);
|
||||
$pdf->Ln(1);
|
||||
$bTableSplitMode = true;
|
||||
require('example2.inc');
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$sTxt = "<s1>Example 4 - Table split end of the page</s1>\n<s2>\t- This is the table from Example 2 at the end of the page\n\t- Splitting mode = OFF. In this case the cells are NOT splitted</s2>";
|
||||
|
||||
$pdf->SetXY(60,215);
|
||||
$pdf->MultiCellTag(100, 2.5, $sTxt, 0);
|
||||
$pdf->Ln(1);
|
||||
$bTableSplitMode = false;
|
||||
require('example2.inc');
|
||||
|
||||
$pdf->Output();
|
||||
|
||||
?>
|
7
prints/Table/font/courier.php
Executable file
7
prints/Table/font/courier.php
Executable file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
?>
|
15
prints/Table/font/helvetica.php
Executable file
15
prints/Table/font/helvetica.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
15
prints/Table/font/helveticab.php
Executable file
15
prints/Table/font/helveticab.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
15
prints/Table/font/helveticabi.php
Executable file
15
prints/Table/font/helveticabi.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
15
prints/Table/font/helveticai.php
Executable file
15
prints/Table/font/helveticai.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
15
prints/Table/font/symbol.php
Executable file
15
prints/Table/font/symbol.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
15
prints/Table/font/times.php
Executable file
15
prints/Table/font/times.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
15
prints/Table/font/timesb.php
Executable file
15
prints/Table/font/timesb.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
15
prints/Table/font/timesbi.php
Executable file
15
prints/Table/font/timesbi.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
15
prints/Table/font/timesi.php
Executable file
15
prints/Table/font/timesi.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
15
prints/Table/font/zapfdingbats.php
Executable file
15
prints/Table/font/zapfdingbats.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
BIN
prints/Table/fpdf_table_example_base.pdf
Executable file
BIN
prints/Table/fpdf_table_example_base.pdf
Executable file
Binary file not shown.
BIN
prints/Table/fpdf_table_example_detailed.pdf
Executable file
BIN
prints/Table/fpdf_table_example_detailed.pdf
Executable file
Binary file not shown.
33
prints/Table/header_footer.inc
Executable file
33
prints/Table/header_footer.inc
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class extention for Header and Footer Definitions
|
||||
*
|
||||
*/
|
||||
class pdf_usage extends fpdf_table
|
||||
{
|
||||
|
||||
public function Header()
|
||||
{
|
||||
$this->SetStyle("head1","arial","",6,"160,160,160");
|
||||
$this->SetStyle("head2","arial","",6,"0,119,220");
|
||||
|
||||
$this->SetY(10);
|
||||
|
||||
$this->MultiCellTag(100, 3, "<head1>FPDF Table (Fpdf Add On)\nAuthor:</head1><head2 href='mailto:andy@interpid.eu'> Bintintan Andrei, Interpid Team</head2>");
|
||||
|
||||
$this->Image('images/interpid_logo.png', 160, 10, 40, 0, '', 'http://www.interpid.eu');
|
||||
|
||||
$this->SetY($this->tMargin);
|
||||
}
|
||||
|
||||
public function Footer()
|
||||
{
|
||||
$this->SetY(-10);
|
||||
$this->SetFont('Arial','I',7);
|
||||
$this->SetTextColor(170, 170, 170);
|
||||
$this->MultiCell(0, 4, "Page {$this->PageNo()} / {nb}", 0, 'C');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
BIN
prints/Table/images/interpid_logo.png
Executable file
BIN
prints/Table/images/interpid_logo.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
11
prints/Table/info.css
Executable file
11
prints/Table/info.css
Executable file
@ -0,0 +1,11 @@
|
||||
body {font-family:"Times New Roman",serif}
|
||||
h2 {color:#000BA0}
|
||||
.title1 {font-weight:bold; color:#A00000}
|
||||
.codediv{
|
||||
background:whitesmoke;
|
||||
width:1000px;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
border: 1px solid;
|
||||
font:courier;
|
||||
}
|
58
prints/Table/info.php
Executable file
58
prints/Table/info.php
Executable file
@ -0,0 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||
<title>Table (Fpdf Add On)</title>
|
||||
<link href="info.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<h2>Table (Fpdf Add On)</h2>
|
||||
<h4 class="title1">Informations:</h4>
|
||||
<blockquote>
|
||||
Author: <A HREF="mailto:andy@interpid.eu">Bintintan Andrei, Interpid Team</A>
|
||||
<br>
|
||||
</blockquote>
|
||||
<h4 class="title1">License:</h4>
|
||||
<blockquote>
|
||||
<?php echo nl2br(file_get_contents('license_short.txt'));?>
|
||||
</blockquote>
|
||||
<h4 class="title1">Description:</h4>
|
||||
<blockquote>
|
||||
This <a href="http://www.fpdf.org">FPDF</a> Add On Class allows the creation of complex <b>TABLES</b> in the pdf document<br>
|
||||
</blockquote>
|
||||
<h4 class="title1">Features:</h4>
|
||||
<ul>
|
||||
<li>Every Cell from the Table is a fully featured Tag Based Multicell Object</li>
|
||||
<li>The cells can be vertically and horizontally aligned</li>
|
||||
<li>The header can be printed automatically on every new page</li>
|
||||
<li>A common definition style can be defined for rows and headers, which can be overriden for every cell by specific settings</li>
|
||||
<li>Columns can be spanned</li>
|
||||
<li>Rows can be spanned</li>
|
||||
<li>If the table reaches the end of the page it is automatically splitted</li>
|
||||
<br><br>
|
||||
<b>Please see the examples for more details.</b>
|
||||
</ul>
|
||||
<br>
|
||||
<h4 class="title1">Table, Headers and Cell properties Example:</h4>
|
||||
<blockquote>
|
||||
<div class='codediv'>
|
||||
<?php
|
||||
highlight_file("table_def_ex.inc");
|
||||
?>
|
||||
</div>
|
||||
</blockquote>
|
||||
<h4 class="title1">Example:</h4>
|
||||
<blockquote>
|
||||
<b>Source Code:</b>
|
||||
<div class='codediv'>
|
||||
<?php
|
||||
highlight_file("example_base.php");
|
||||
?>
|
||||
</div>
|
||||
<br>
|
||||
<b>View the result <a target="_blank" href="table_example_base.pdf">here</a></b>
|
||||
<br>
|
||||
<br>
|
||||
<b><a target="_blank" href="table_example_detailed.pdf">Other example</a></b>
|
||||
</blockquote>
|
||||
</body>
|
||||
</html>
|
3
prints/Table/license_short.txt
Executable file
3
prints/Table/license_short.txt
Executable file
@ -0,0 +1,3 @@
|
||||
This program is licensed under the terms of the GNU Open Source GPL 3.0 license.
|
||||
Commercial use is prohibited. Visit <a href='http://www.interpid.eu/fpdf-components'>http://www.interpid.eu/fpdf-components</a> if you need to obtain a commercial license.
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
46
prints/Table/table_def.inc
Executable file
46
prints/Table/table_def.inc
Executable file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES
|
||||
*****************************************************/
|
||||
|
||||
$table_default_header_type = array(
|
||||
'WIDTH' => 6, //cell width
|
||||
'T_COLOR' => array(220,230,240), //text color
|
||||
'T_SIZE' => 8, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => 'B', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(41, 80, 132), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.2, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
'TEXT' => '', //text
|
||||
);
|
||||
|
||||
$table_default_data_type = array(
|
||||
'T_COLOR' => array(0,0,0), //text color
|
||||
'T_SIZE' => 6, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(255,255,255), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.1, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
);
|
||||
|
||||
$table_default_table_type = array(
|
||||
'TB_ALIGN' => 'L', //table align on page
|
||||
'L_MARGIN' => 25, //space to the left margin
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => '0.3', //border size
|
||||
);
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES --- END
|
||||
*****************************************************/
|
||||
?>
|
46
prints/Table/table_def_detailed.inc
Executable file
46
prints/Table/table_def_detailed.inc
Executable file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES
|
||||
*****************************************************/
|
||||
|
||||
$table_default_header_type = array(
|
||||
'WIDTH' => 6, //cell width
|
||||
'T_COLOR' => array(255,255,240), //text color
|
||||
'T_SIZE' => 7, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => 'B', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(25, 124, 224), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.2, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
'TEXT' => '', //text
|
||||
);
|
||||
|
||||
$table_default_data_type = array(
|
||||
'T_COLOR' => array(0,0,0), //text color
|
||||
'T_SIZE' => 6, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(255,255,255), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.1, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
);
|
||||
|
||||
$table_default_table_type = array(
|
||||
'TB_ALIGN' => 'L', //table align on page
|
||||
'L_MARGIN' => 0, //space to the left margin
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => '0.3', //border size
|
||||
);
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES --- END
|
||||
*****************************************************/
|
||||
?>
|
47
prints/Table/table_def_ex.inc
Executable file
47
prints/Table/table_def_ex.inc
Executable file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES
|
||||
*****************************************************/
|
||||
|
||||
$table_default_header_type = array(
|
||||
'WIDTH' => 6, //cell width
|
||||
'T_COLOR' => array(220,230,240), //text color
|
||||
'T_SIZE' => 8, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => 'B', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(41, 80, 132), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.2, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
'TEXT' => '', //text
|
||||
);
|
||||
|
||||
$table_default_data_type = array(
|
||||
'T_COLOR' => array(0,0,0), //text color
|
||||
'T_SIZE' => 6, //font size
|
||||
'T_FONT' => 'Arial', //font family
|
||||
'T_ALIGN' => 'C', //horizontal alignment, possible values: LRC (left, right, center)
|
||||
'V_ALIGN' => 'M', //vertical alignment, possible values: TMB(top, middle, bottom)
|
||||
'T_TYPE' => '', //font type
|
||||
'LN_SIZE' => 4, //line size for one row
|
||||
'BG_COLOR' => array(255,255,255), //background color
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => 0.1, //border size
|
||||
'BRD_TYPE' => '1', //border type, can be: 0, 1 or a combination of: "LRTB"
|
||||
);
|
||||
|
||||
$table_default_table_type = array(
|
||||
'TB_ALIGN' => 'L', //table align on page
|
||||
'L_MARGIN' => 25, //space to the left margin
|
||||
'BRD_COLOR' => array(0,92,177), //border color
|
||||
'BRD_SIZE' => '0.3', //border size
|
||||
);
|
||||
|
||||
/*****************************************************
|
||||
TABLE DEFAULT DEFINES --- END
|
||||
*****************************************************/
|
||||
?>
|
BIN
prints/Table/table_example_base.pdf
Executable file
BIN
prints/Table/table_example_base.pdf
Executable file
Binary file not shown.
BIN
prints/Table/table_example_detailed.pdf
Executable file
BIN
prints/Table/table_example_detailed.pdf
Executable file
Binary file not shown.
178
prints/Table/test.php
Executable file
178
prints/Table/test.php
Executable file
@ -0,0 +1,178 @@
|
||||
<?php
|
||||
|
||||
require_once("class.fpdf_table.php");
|
||||
require_once("table_def.inc");
|
||||
|
||||
$pdf=new utfFPDF();
|
||||
$pdf->SetAutoPageBreak(true, 20);
|
||||
$pdf->SetTopMargin(30);
|
||||
$pdf->AddPage();
|
||||
|
||||
$columns = 5; //five columns
|
||||
|
||||
$pdf->SetStyle("p", "times", "", 12, "130, 0, 30");
|
||||
$pdf->SetStyle("pb", "times", "B", 11, "130, 0, 30");
|
||||
$pdf->SetStyle("t1", "arial", "", 11, "254, 252, 222");
|
||||
$pdf->SetStyle("t1", "arial", "", 11, "0, 151, 200");
|
||||
$pdf->SetStyle("t2", "arial", "", 11, "0, 151, 200");
|
||||
$pdf->SetStyle("t3", "times", "B", 14, "203, 0, 48");
|
||||
$pdf->SetStyle("t4", "arial", "BI", 11, "0, 151, 200");
|
||||
$pdf->SetStyle("hh", "times", "B", 11, "255, 189, 12");
|
||||
$pdf->SetStyle("font", "helvetica", "", 10, "0, 0, 255");
|
||||
$pdf->SetStyle("style", "helvetica", "BI", 10, "0, 0, 220");
|
||||
$pdf->SetStyle("size", "times", "BI", 13, "0, 0, 120");
|
||||
$pdf->SetStyle("color", "times", "BI", 13, "0, 255, 255");
|
||||
|
||||
$ttxt[1] = "<size>Tag-Based MultiCell TABLE</size>
|
||||
|
||||
Done by <t1 href='mailto:klodoma@ar-sd.net'>Bintintan Andrei</t1>";
|
||||
$ttxt[2] = "<p>
|
||||
<t3>Description</t3>
|
||||
|
||||
\tThis method allows printing <t4><TAG></t4> formated text with line breaks. They can be automatic (as soon as the text reaches the right border of the cell) or explicit (via the <pb>\\n</pb> character). As many cells as necessary are output, one below the other.
|
||||
Text can be <hh>aligned</hh>, <hh>centered</hh> or <hh>justified</hh>. Different <font>Font</font>, <size>Sizes</size>, <style>Styles</style>, <color>Colors</color> can be used. The cell block can be framed and the background painted. The behavior/paramaters of the method are the same as to the <t2 href='http://www.fpdf.org/en/doc/multicell.htm'>FPDF Multicell method</t2>. <style href='www.fpdf.org'>Links</style> can be used in any tag.
|
||||
\t<t4>TAB</t4> spaces (<pb>\\t</pb>) can be used. The <t4><<ttags>></t4> Tag name is reserved for the TAB SPACES.</p>
|
||||
|
||||
\tIf no <t4><TAG></t4> is specified then the FPDF current settings are used.\n\n";
|
||||
$ttxt[3] ="\t\t<style>Best Regards</style>";
|
||||
|
||||
|
||||
//we initialize the table class
|
||||
$pdf->tbInitialize($columns, true, true);
|
||||
|
||||
$table_subtype = $table_default_table_type;
|
||||
$pdf->tbSetTableType($table_subtype);
|
||||
|
||||
//TABLE HEADER SETTINGS
|
||||
$header_subtype = $table_default_header_type;
|
||||
for($i=0; $i<$columns; $i++) $header_type[$i] = $table_default_header_type;
|
||||
|
||||
$header_type[0]['WIDTH'] = 20;
|
||||
$header_type[1]['WIDTH'] = 30;
|
||||
$header_type[2]['WIDTH'] = 40;
|
||||
$header_type[3]['WIDTH'] = 40;
|
||||
$header_type[4]['WIDTH'] = 20;
|
||||
|
||||
$header_type[0]['TEXT'] = "Header 1";
|
||||
$header_type[1]['TEXT'] = "Header 2 With COLSPAN";
|
||||
$header_type[2]['TEXT'] = "Header 3";
|
||||
$header_type[3]['TEXT'] = "Header 4";
|
||||
$header_type[4]['TEXT'] = "Header 5";
|
||||
|
||||
$header_type[1]['COLSPAN'] = "2";
|
||||
|
||||
//set the header type
|
||||
$pdf->tbSetHeaderType($header_type);
|
||||
|
||||
$pdf->tbDrawHeader();
|
||||
|
||||
//TABLE DATA SETTINGS
|
||||
$data_subtype = $table_default_data_type;
|
||||
|
||||
$data_type = Array();//reset the array
|
||||
for ($i=0; $i<$columns; $i++) $data_type[$i] = $data_subtype;
|
||||
|
||||
$pdf->tbSetDataType($data_type);
|
||||
|
||||
$fsize = 5;
|
||||
$colspan = 1;
|
||||
$rr = 255;
|
||||
|
||||
for ($j=0; $j<30; $j++)
|
||||
{
|
||||
$data = Array();
|
||||
$data[0]['TEXT'] = "No.$j";
|
||||
$data[1]['TEXT'] = "Test Test - $j";
|
||||
$data[2]['TEXT'] = "Test Test - $j";
|
||||
$data[3]['TEXT'] = "Text Longer <p href='www.google.com'>TexTest Longer Text</p> Test Longer Text - $j";
|
||||
$data[4]['TEXT'] = "Test text2 - $j";
|
||||
|
||||
$data[0]['T_SIZE'] = $fsize;
|
||||
$data[1]['T_SIZE'] = 13 - $fsize;
|
||||
$data[3]['T_SIZE'] = 14 - $fsize;
|
||||
|
||||
$data[0]['T_COLOR'] = array($rr, 0, 0);
|
||||
$data[0]['BG_COLOR'] = array($rr, $rr, $rr);
|
||||
$data[3]['T_COLOR'] = array($rr, 240, 240);
|
||||
$data[3]['BG_COLOR'] = array($rr, 100, 135);
|
||||
|
||||
$fsize++;
|
||||
if ($fsize > 11) $fsize = 5;
|
||||
|
||||
if ($j>3 && $j<13){
|
||||
$data[0]['TEXT'] = "Colspan Example$j";
|
||||
$data[0]['COLSPAN'] = $colspan;
|
||||
$data[0]['BG_COLOR'] = array($rr, 0, 0);
|
||||
$data[0]['T_COLOR'] = array(255, 255, $rr);
|
||||
$colspan++;
|
||||
if ($colspan>5) $colspan = 1;
|
||||
}
|
||||
|
||||
if ($j>15 && $j<25){
|
||||
$data[2]['TEXT'] = "Colspan Example$j";
|
||||
$data[2]['COLSPAN'] = $colspan;
|
||||
$data[2]['BG_COLOR'] = array($rr, 0, 0);
|
||||
$data[2]['T_COLOR'] = array(255, 255, $rr);
|
||||
$colspan++;
|
||||
if ($colspan>3) $colspan = 1;
|
||||
}
|
||||
|
||||
if ($j>1){
|
||||
$data[2]['BG_COLOR'] = array(255-$rr, $rr, $rr);
|
||||
$data[2]['T_COLOR'] = array(255, 255, $rr);
|
||||
}
|
||||
|
||||
if ($j==0){
|
||||
$data[0]['TEXT'] = "Top Right Align <p>Align Top</p> Right Right Align ";
|
||||
$data[0]['T_ALIGN'] = "R";
|
||||
$data[0]['V_ALIGN'] = "T";
|
||||
|
||||
$data[1]['TEXT'] = "Middle Center Align Bold Italic";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
$data[1]['T_TYPE'] = "BI";
|
||||
$data[1]['V_ALIGN'] = "M";
|
||||
|
||||
$data[2]['TEXT'] = "\n\n\n\n\nBottom Left Align";
|
||||
$data[2]['T_ALIGN'] = "L";
|
||||
$data[2]['V_ALIGN'] = "B";
|
||||
|
||||
$data[3]['TEXT'] = "Middle Justified Align Longer text";
|
||||
$data[3]['T_ALIGN'] = "J";
|
||||
$data[3]['V_ALIGN'] = "M";
|
||||
|
||||
$data[4]['TEXT'] = "TOP RIGHT Align";
|
||||
$data[4]['T_ALIGN'] = "R";
|
||||
$data[4]['V_ALIGN'] = "T";
|
||||
}
|
||||
|
||||
if ($j>0 and $j<4){
|
||||
$data[0]['TEXT'] = "";
|
||||
$data[1]['TEXT'] = "";
|
||||
$data[2]['TEXT'] = "";
|
||||
$data[3]['TEXT'] = "";
|
||||
$data[4]['TEXT'] = "";
|
||||
$data[$j-1]['TEXT'] = $ttxt[$j];
|
||||
$data[$j-1]['COLSPAN'] = 4;
|
||||
$data[$j-1]['T_ALIGN'] = "J";
|
||||
$data[$j-1]['LN_SIZE'] = 5;
|
||||
}
|
||||
|
||||
if ($j== 17) {
|
||||
$data[1]['TEXT'] = "<size>Colspan = 4 and ... this\nCELL\nIS\nSPLITTED. Turn this split off with:\nFPDF_TABLE::Set_Table_SplitMode(true(default)/false) function</size>";
|
||||
$data[1]['T_ALIGN'] = "C";
|
||||
$data[1]['BG_COLOR'] = array(240, 245, 221);
|
||||
$data[1]['COLSPAN'] = 4;
|
||||
}
|
||||
|
||||
|
||||
$rr -= 25;
|
||||
if ($rr<100) $rr = 255;
|
||||
|
||||
$pdf->tbDrawData($data);
|
||||
}
|
||||
$pdf->tbOuputData();
|
||||
$pdf->tbDrawBorder();
|
||||
|
||||
$pdf->Output();
|
||||
|
||||
?>
|
Reference in New Issue
Block a user