first commit
This commit is contained in:
BIN
prints/Briefbogen QM.docx
Executable file
BIN
prints/Briefbogen QM.docx
Executable file
Binary file not shown.
289
prints/FAQ.htm
Executable file
289
prints/FAQ.htm
Executable file
@ -0,0 +1,289 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>FAQ</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>FAQ</H2>
|
||||
<B>1.</B> <A HREF='#1'>What's exactly the license of FPDF? Are there any usage restrictions?</A><BR>
|
||||
<B>2.</B> <A HREF='#2'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</A><BR>
|
||||
<B>3.</B> <A HREF='#3'>I try to generate a PDF and IE displays a blank page. What happens?</A><BR>
|
||||
<B>4.</B> <A HREF='#4'>I send parameters using the POST method and the values don't appear in the PDF.</A><BR>
|
||||
<B>5.</B> <A HREF='#5'>When I use a PHP session, IE doesn't display my PDF any more but asks me to download it.</A><BR>
|
||||
<B>6.</B> <A HREF='#6'>When I'm on SSL, IE can't open the PDF.</A><BR>
|
||||
<B>7.</B> <A HREF='#7'>When I execute a script I get the message "FPDF error: Don't alter the locale before including class file".</A><BR>
|
||||
<B>8.</B> <A HREF='#8'>I try to put a PNG and Acrobat says "There was an error processing a page. A drawing error occurred".</A><BR>
|
||||
<B>9.</B> <A HREF='#9'>I encounter the following error when I try to generate a PDF: Warning: Cannot add header information - headers already sent by (output started at script.php:X)</A><BR>
|
||||
<B>10.</B> <A HREF='#10'>I try to display a variable in the Header method but nothing prints.</A><BR>
|
||||
<B>11.</B> <A HREF='#11'>I defined the Header and Footer methods in my PDF class but nothing appears.</A><BR>
|
||||
<B>12.</B> <A HREF='#12'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</A><BR>
|
||||
<B>13.</B> <A HREF='#13'>I try to put the euro symbol but it doesn't work.</A><BR>
|
||||
<B>14.</B> <A HREF='#14'>I draw a frame with very precise dimensions, but when printed I notice some differences.</A><BR>
|
||||
<B>15.</B> <A HREF='#15'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</A><BR>
|
||||
<B>16.</B> <A HREF='#16'>What's the limit of the file sizes I can generate with FPDF?</A><BR>
|
||||
<B>17.</B> <A HREF='#17'>Can I modify a PDF with FPDF?</A><BR>
|
||||
<B>18.</B> <A HREF='#18'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</A><BR>
|
||||
<B>19.</B> <A HREF='#19'>Can I convert an HTML page to PDF with FPDF?</A><BR>
|
||||
<B>20.</B> <A HREF='#20'>Can I concatenate PDF files with FPDF?</A><BR>
|
||||
<BR><BR>
|
||||
<P><A NAME='1'></A><B>1.</B> <FONT CLASS='st'>What's exactly the license of FPDF? Are there any usage restrictions?</FONT></P>
|
||||
FPDF is Freeware (it is stated at the beginning of the source file). There is no usage
|
||||
restriction. You may embed it freely in your application (commercial or not), with or
|
||||
without modification. You may redistribute it, too.
|
||||
<P><A NAME='2'></A><B>2.</B> <FONT CLASS='st'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</FONT></P>
|
||||
These "weird" characters are in fact the actual content of your PDF. This behaviour is a bug of
|
||||
IE. When it first receives an HTML page, then a PDF from the same URL, it displays it directly
|
||||
without launching Acrobat. This happens frequently during the development stage: on the least
|
||||
script error, an HTML page is sent, and after correction, the PDF arrives.
|
||||
<BR>
|
||||
To solve the problem, simply quit and restart IE. You can also go to another URL and come
|
||||
back.
|
||||
<BR>
|
||||
To avoid this kind of inconvenience during the development, you can generate the PDF directly
|
||||
to a file and open it through the explorer.
|
||||
<P><A NAME='3'></A><B>3.</B> <FONT CLASS='st'>I try to generate a PDF and IE displays a blank page. What happens?</FONT></P>
|
||||
First of all, check that you send nothing to the browser after the PDF (not even a space or a
|
||||
carriage return). You can put an exit statement just after the call to the Output() method to
|
||||
be sure.
|
||||
<BR>
|
||||
If it still doesn't work, it means you're a victim of the "blank page syndrome". IE used in
|
||||
conjunction with the Acrobat plug-in suffers from numerous bugs, in all versions. You should
|
||||
test your application with as many IE versions as possible (at least if you're on the Internet).
|
||||
The problem occurs mostly with the POST method, so it is strongly advised to avoid it (all the
|
||||
more that it causes other problems, see the next question). The GET works better but may fail
|
||||
when the URL becomes too long: don't use a query string with more than 45 characters. However, a
|
||||
tip exists to exceed this limit: end the URL with .pdf, which tricks IE. If you use a form, you
|
||||
can add a hidden field at the last position:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
<INPUT TYPE="HIDDEN" NAME="ext" VALUE=".pdf">
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
The usage of PHP sessions also often causes trouble (avoid using HTTP headers preventing caching).
|
||||
See question 5 for a workaround.
|
||||
<BR>
|
||||
<BR>
|
||||
To avoid all these problems in a reliable manner, two main techniques exist:
|
||||
<BR>
|
||||
<BR>
|
||||
- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat; in
|
||||
the File menu, Preferences, General, uncheck the option "Web Browser Integration" (for Acrobat
|
||||
5: Edit, Preferences, Options, "Display PDF in Browser"). Then, the next time you load a PDF in
|
||||
IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck the option "Always ask
|
||||
before opening this type of file" and choose Open. From now on, PDF files will open
|
||||
automatically in an external Acrobat window.
|
||||
<BR>
|
||||
The drawback of the method is that you need to alter the client configuration, which you can do
|
||||
in an intranet environment but not for the Internet.
|
||||
<BR>
|
||||
<BR>
|
||||
- Use a redirection technique. It consists in generating the PDF in a temporary file on the
|
||||
server and redirect the client on it (by using JavaScript, not the Location HTTP header which
|
||||
also causes trouble). For instance, at the end of the script, you can put the following:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
//Determine a temporary file name in the current directory<BR>
|
||||
$file=basename(tempnam(getcwd(),'tmp'));<BR>
|
||||
//Save PDF to file<BR>
|
||||
$pdf->Output($file);<BR>
|
||||
//JavaScript redirection<BR>
|
||||
echo "<HTML><SCRIPT>document.location='getpdf.php?f=$file';</SCRIPT></HTML>";
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
Then create the getpdf.php file with this:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
<?php<BR>
|
||||
$f=$HTTP_GET_VARS['f'];<BR>
|
||||
//Check file (don't skip it!)<BR>
|
||||
if(substr($f,0,3)!='tmp' or strpos($f,'/') or strpos($f,'\\'))<BR>
|
||||
die('Incorrect file name');<BR>
|
||||
if(!file_exists($f))<BR>
|
||||
die('File does not exist');<BR>
|
||||
//Handle special IE request if needed<BR>
|
||||
if($HTTP_SERVER_VARS['HTTP_USER_AGENT']=='contype')<BR>
|
||||
{<BR>
|
||||
Header('Content-Type: application/pdf');<BR>
|
||||
exit;<BR>
|
||||
}<BR>
|
||||
//Output PDF<BR>
|
||||
Header('Content-Type: application/pdf');<BR>
|
||||
Header('Content-Length: '.filesize($f));<BR>
|
||||
readfile($f);<BR>
|
||||
//Remove file<BR>
|
||||
unlink($f);<BR>
|
||||
exit;<BR>
|
||||
?>
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
This method works in most cases but IE6 can still experience trouble. The "ultimate" method
|
||||
consists in redirecting directly to the temporary file. The file name must therefore end with .pdf:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
//Determine a temporary file name in the current directory<BR>
|
||||
$file=basename(tempnam(getcwd(),'tmp'));<BR>
|
||||
rename($file,$file.'.pdf');<BR>
|
||||
$file.='.pdf';<BR>
|
||||
//Save PDF to file<BR>
|
||||
$pdf->Output($file);<BR>
|
||||
//JavaScript redirection<BR>
|
||||
echo "<HTML><SCRIPT>document.location='$file';</SCRIPT></HTML>";
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do
|
||||
some cleaning in order to delete the temporary files. For instance:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
function CleanFiles($dir)<BR>
|
||||
{<BR>
|
||||
//Delete temporary files<BR>
|
||||
$t=time();<BR>
|
||||
$h=opendir($dir);<BR>
|
||||
while($file=readdir($h))<BR>
|
||||
{<BR>
|
||||
if(substr($file,0,3)=='tmp' and substr($file,-4)=='.pdf')<BR>
|
||||
{<BR>
|
||||
$path=$dir.'/'.$file;<BR>
|
||||
if($t-filemtime($path)>3600)<BR>
|
||||
@unlink($path);<BR>
|
||||
}<BR>
|
||||
}<BR>
|
||||
closedir($h);<BR>
|
||||
}
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
This function deletes all files of the form tmp*.pdf older than an hour in the specified
|
||||
directory. You may call it where you want, for instance in the script which generates the PDF.
|
||||
<BR>
|
||||
<BR>
|
||||
Remark: it is necessary to open the PDF in a new window, as you can't go backwards due to the
|
||||
redirection.
|
||||
<P><A NAME='4'></A><B>4.</B> <FONT CLASS='st'>I send parameters using the POST method and the values don't appear in the PDF.</FONT></P>
|
||||
It's a problem affecting some versions of IE (especially the first 5.5). See the previous
|
||||
question for the ways to work around it.
|
||||
<P><A NAME='5'></A><B>5.</B> <FONT CLASS='st'>When I use a PHP session, IE doesn't display my PDF any more but asks me to download it.</FONT></P>
|
||||
It's a problem affecting some versions of IE. To work around it, add the following line before
|
||||
session_start():
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
session_cache_limiter('private');
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
or do a redirection as explained in question 3.
|
||||
<P><A NAME='6'></A><B>6.</B> <FONT CLASS='st'>When I'm on SSL, IE can't open the PDF.</FONT></P>
|
||||
The problem may be fixed by adding this line:<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
Header('Pragma: public');
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<P><A NAME='7'></A><B>7.</B> <FONT CLASS='st'>When I execute a script I get the message "FPDF error: Don't alter the locale before including class file".</FONT></P>
|
||||
When the decimal separator is configured as a comma before including a file, there is a
|
||||
<A HREF="http://bugs.php.net/bug.php?id=17105" TARGET="_blank">bug</A> in some PHP versions and decimal
|
||||
numbers get truncated. Therefore you shouldn't make a call to setlocale() before including the class.
|
||||
On Unix, you shouldn't set the LC_ALL environment variable neither, for it is equivalent to a
|
||||
setlocale() call.
|
||||
<P><A NAME='8'></A><B>8.</B> <FONT CLASS='st'>I try to put a PNG and Acrobat says "There was an error processing a page. A drawing error occurred".</FONT></P>
|
||||
Acrobat 5 has a bug and is unable to display transparent monochrome images (i.e. with 1 bit per
|
||||
pixel). Remove transparency or save your image in 16 colors (4 bits per pixel) or more.
|
||||
<P><A NAME='9'></A><B>9.</B> <FONT CLASS='st'>I encounter the following error when I try to generate a PDF: Warning: Cannot add header information - headers already sent by (output started at script.php:X)</FONT></P>
|
||||
You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return,
|
||||
neither before nor after. The script outputs something at line X.
|
||||
<P><A NAME='10'></A><B>10.</B> <FONT CLASS='st'>I try to display a variable in the Header method but nothing prints.</FONT></P>
|
||||
You have to use the <TT>global</TT> keyword, for instance:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
function Header()<BR>
|
||||
{<BR>
|
||||
global $title;<BR>
|
||||
<BR>
|
||||
$this->SetFont('Arial','B',15);<BR>
|
||||
$this->Cell(0,10,$title,1,1,'C');<BR>
|
||||
}
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<P><A NAME='11'></A><B>11.</B> <FONT CLASS='st'>I defined the Header and Footer methods in my PDF class but nothing appears.</FONT></P>
|
||||
You have to create an object from the PDF class, not FPDF:<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
$pdf=new PDF();
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
|
||||
<P><A NAME='12'></A><B>12.</B> <FONT CLASS='st'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</FONT></P>
|
||||
You have to enclose your string with double quotes, not single ones.
|
||||
<P><A NAME='13'></A><B>13.</B> <FONT CLASS='st'>I try to put the euro symbol but it doesn't work.</FONT></P>
|
||||
The standard fonts have the euro character at position 128. You can define a constant like this
|
||||
for convenience:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
define('EURO',chr(128));
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
Note: Acrobat 4 or higher is required to display euro.
|
||||
<P><A NAME='14'></A><B>14.</B> <FONT CLASS='st'>I draw a frame with very precise dimensions, but when printed I notice some differences.</FONT></P>
|
||||
To respect dimensions, you have to uncheck the option "Fit to page" in the print dialog box.
|
||||
<P><A NAME='15'></A><B>15.</B> <FONT CLASS='st'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</FONT></P>
|
||||
All printers have physical margins (different depending on the model), it is therefore impossible
|
||||
to remove them and print on the totality of the paper.
|
||||
<P><A NAME='16'></A><B>16.</B> <FONT CLASS='st'>What's the limit of the file sizes I can generate with FPDF?</FONT></P>
|
||||
There is no particular limit. There are some constraints however:
|
||||
<BR>
|
||||
<BR>
|
||||
- The maximum memory size allocated to PHP scripts defaults to 8MB. For very big documents,
|
||||
especially with images, this limit may be reached (the file being built into memory). The
|
||||
parameter is configured in the php.ini file.
|
||||
<BR>
|
||||
<BR>
|
||||
- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily
|
||||
reached. It is configured in php.ini and may be altered dynamically with set_time_limit().
|
||||
<BR>
|
||||
<BR>
|
||||
- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and
|
||||
reach the limit, it will be lost. It is therefore advised for very big documents to
|
||||
generate them in a file, and to send some data to the browser from time to time (for instance
|
||||
page 1, page 2... with flush() to force the output). When the document is finished, you can send
|
||||
a redirection on it with JavaScript or create a link.
|
||||
<BR>
|
||||
Remark: even when the browser goes in time-out, the script may continue to run on the server.
|
||||
<P><A NAME='17'></A><B>17.</B> <FONT CLASS='st'>Can I modify a PDF with FPDF?</FONT></P>
|
||||
You can import an existing PDF document thanks to the FPDI extension:<BR>
|
||||
<BR>
|
||||
<A HREF="http://fpdi.setasign.de" TARGET="_blank">http://fpdi.setasign.de</A>
|
||||
<P><A NAME='18'></A><B>18.</B> <FONT CLASS='st'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</FONT></P>
|
||||
No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from
|
||||
a PDF. It is provided with the Xpdf package:<BR>
|
||||
<BR>
|
||||
<A HREF="http://www.foolabs.com/xpdf/" TARGET="_blank">http://www.foolabs.com/xpdf/</A>
|
||||
<P><A NAME='19'></A><B>19.</B> <FONT CLASS='st'>Can I convert an HTML page to PDF with FPDF?</FONT></P>
|
||||
Not real pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:<BR>
|
||||
<BR>
|
||||
<A HREF="http://www.easysw.com/htmldoc/" TARGET="_blank">http://www.easysw.com/htmldoc/</A>
|
||||
<P><A NAME='20'></A><B>20.</B> <FONT CLASS='st'>Can I concatenate PDF files with FPDF?</FONT></P>
|
||||
No. But some free tools exist to perform this task:<BR>
|
||||
<BR>
|
||||
<A HREF="http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html" TARGET="_blank">http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html</A><BR STYLE="font-height:2em">
|
||||
<A HREF="http://www.accesspdf.com/pdftk/">http://www.accesspdf.com/pdftk/</A>
|
||||
</BODY>
|
||||
</HTML>
|
621
prints/LICENSE
Executable file
621
prints/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
|
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();
|
||||
|
||||
?>
|
22
prints/as_utf_class.php
Executable file
22
prints/as_utf_class.php
Executable file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require_once('fpdi.php');
|
||||
|
||||
# teilweise wird chr(149) in den Briefköpfen verwendet. Dieses durch uchr ersetzen
|
||||
function uchr ($u) {
|
||||
return mb_convert_encoding('&#' . intval($u) . ';', 'UTF-8', 'HTML-ENTITIES');
|
||||
}
|
||||
|
||||
class utfFPDF extends FPDI
|
||||
{
|
||||
function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
|
||||
{
|
||||
if ($txt != ''){
|
||||
$txt = utf8_decode($txt);
|
||||
}
|
||||
parent::Cell($w, $h, $txt, $border, $ln, $align, $fill, $link);
|
||||
}
|
||||
}
|
||||
if (!class_exists('FPDF_TPL')) {
|
||||
require_once('fpdf_tpl.php');
|
||||
}
|
||||
?>
|
1732
prints/class.fpdf.php
Executable file
1732
prints/class.fpdf.php
Executable file
File diff suppressed because it is too large
Load Diff
643
prints/class.fpdf_table.php
Executable file
643
prints/class.fpdf_table.php
Executable file
@ -0,0 +1,643 @@
|
||||
<?php
|
||||
/****************************************************************************
|
||||
* Software: FPDF class extention *
|
||||
* Creates Pdf Tables *
|
||||
* Version: 3.2 *
|
||||
* Date: 2005/07/20 *
|
||||
* Author: Bintintan Andrei -- klodoma@ar-sd.net *
|
||||
* *
|
||||
* Last Modification: 2006/09/25 *
|
||||
* *
|
||||
* License: Free for non-commercial use *
|
||||
* *
|
||||
* You may use and modify this software as you wish. *
|
||||
* PLEASE REPORT ANY BUGS TO THE AUTHOR. THANK YOU *
|
||||
****************************************************************************/
|
||||
/**
|
||||
Modifications:
|
||||
2006.09.25
|
||||
- corrected a bug for empty cell texts
|
||||
- corrected a bug for cell lines aligment error on new page
|
||||
2006.05.18
|
||||
- added support for cell splitting if new page ocuurs. FPDF_TABLE::Set_Table_SplitMode(true/false)
|
||||
sets the splitting mode.
|
||||
true = normal mode, the cell is splitted where the split ocuurs.
|
||||
false = if splitting is required then the cell is drawed on the new page. If the cell
|
||||
Height is bigger then the page height then the cell will be splitted.
|
||||
- if the header does not have enough space for double it's Height then a new page ocuurs.
|
||||
*/
|
||||
require_once('class.multicelltag.php');
|
||||
|
||||
//extension class
|
||||
class FPDF_TABLE extends FPDF_MULTICELLTAG
|
||||
{
|
||||
|
||||
var $tb_columns; //number of columns of the table
|
||||
var $tb_header_type; //array which contains the header characteristics and texts
|
||||
var $tb_header_draw; //TRUE or FALSE, the header is drawed or not
|
||||
var $tb_header_height; //This is the Table Header Maximum Height
|
||||
var $tb_border_draw; //TRUE or FALSE, the table border is drawed or not
|
||||
var $tb_data_type; //array which contains the data characteristics (only the characteristics)
|
||||
var $tb_table_type; //array which contains the table charactersitics
|
||||
var $table_startx, $table_starty; //the X and Y position where the table starts
|
||||
var $tb_split_normal; /* << ** special request from Marc Ulfig >>
|
||||
= false - the split is made only if the cell width does not fit into a page height
|
||||
= true - the split of a cell will ocuur whenever necesary
|
||||
*/
|
||||
var $Draw_Header_Command; //command which determines in the DrawData first the header draw
|
||||
var $Data_On_Current_Page; // = true/false ... if on current page was some data written
|
||||
|
||||
//returns the width of the page in user units
|
||||
function PageWidth(){
|
||||
return (int) $this->w-$this->rMargin-$this->lMargin;
|
||||
}
|
||||
|
||||
//constructor(not a real one, but have to call it first)
|
||||
//we initialize all the variables that we use
|
||||
function Table_Init($col_no = 0, $header_draw = true, $border_draw = true){
|
||||
$this->tb_columns = $col_no;
|
||||
$this->tb_header_type = Array();
|
||||
$this->tb_header_draw = $header_draw;
|
||||
$this->tb_header_height = 0;
|
||||
$this->tb_border_draw = $border_draw;
|
||||
$this->tb_data_type = Array();
|
||||
$this->tb_split_normal = true;
|
||||
$this->tb_type = Array();
|
||||
$this->table_startx = $this->GetX();
|
||||
$this->table_starty = $this->GetY();
|
||||
|
||||
$this->Draw_Header_Command = false; //by default we don't draw the header
|
||||
$this->Data_On_Current_Page = false;
|
||||
}
|
||||
|
||||
//Sets the number of columns of the table
|
||||
function Set_Table_Columns($nr){
|
||||
$this->tb_columns = $nr;
|
||||
}
|
||||
|
||||
//Sets the number of columns of the table
|
||||
function Set_Table_SplitMode($pSplit = true){
|
||||
$this->tb_split_normal = $pSplit;
|
||||
}
|
||||
|
||||
/*
|
||||
Characteristics constants for Header Type:
|
||||
EVERY CELL FROM THE TABLE IS A MULTICELL
|
||||
|
||||
WIDTH - this is the cell width. This value must be sent only to the HEADER!!!!!!!!
|
||||
T_COLOR - text color = array(r,g,b);
|
||||
T_SIZE - text size
|
||||
T_FONT - text font - font type = "Arial", "Times"
|
||||
T_ALIGN - text align - "RLCJ"
|
||||
V_ALIGN - text vertical alignment - "TMB"
|
||||
T_TYPE - text type (Bold Italic etc)
|
||||
LN_SPACE - space between lines
|
||||
BG_COLOR - background color = array(r,g,b);
|
||||
BRD_COLOR - border color = array(r,g,b);
|
||||
BRD_SIZE - border size --
|
||||
BRD_TYPE - border size -- up down, with border without!!! etc
|
||||
BRD_TYPE_NEW_PAGE - border type on new page - this is user only if specified(<>'')
|
||||
TEXT - header text -- THIS ALSO BELONGS ONLY TO THE HEADER!!!!
|
||||
|
||||
all these setting conform to the settings from the multicell functions!!!!
|
||||
*/
|
||||
|
||||
/*
|
||||
Function: Set_Header_Type($type_arr) -- sets the array for the header type
|
||||
|
||||
type array =
|
||||
array(
|
||||
0=>array(
|
||||
"WIDTH" => 10,
|
||||
"T_COLOR" => array(120,120,120),
|
||||
"T_SIZE" => 5,
|
||||
...
|
||||
"TEXT" => "Header text 1"
|
||||
),
|
||||
1=>array(
|
||||
...
|
||||
),
|
||||
);
|
||||
where 0,1... are the column number
|
||||
*/
|
||||
|
||||
function Set_Header_Type($type_arr){
|
||||
$this->tb_header_type = $type_arr;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Characteristics constants for Data Type:
|
||||
EVERY CELL FROM THE TABLE IS A MULTICELL
|
||||
T_COLOR - text color = array(r,g,b);
|
||||
T_SIZE - text size
|
||||
T_FONT - text font - font type = "Arial", "Times"
|
||||
T_ALIGN - text align - "RLCJ"
|
||||
V_ALIGN - text vertical alignment - "TMB"
|
||||
T_TYPE - text type (Bold Italic etc)
|
||||
LN_SPACE - space between lines
|
||||
BG_COLOR - background color = array(r,g,b);
|
||||
BRD_COLOR - border color = array(r,g,b);
|
||||
BRD_SIZE - border size --
|
||||
BRD_TYPE - border size -- up down, with border without!!! etc
|
||||
BRD_TYPE_NEW_PAGE - border type on new page - this is user only if specified(<>'')
|
||||
|
||||
all these settings conform to the settings from the multicell functions!!!!
|
||||
*/
|
||||
|
||||
/*
|
||||
Function: Set_data_Type($type_arr) -- sets the array for the header type
|
||||
|
||||
type array =
|
||||
array(
|
||||
0=>array(
|
||||
"T_COLOR" => array(120,120,120),
|
||||
"T_SIZE" => 5,
|
||||
...
|
||||
"BRD_TYPE" => 1
|
||||
),
|
||||
1=>array(
|
||||
...
|
||||
),
|
||||
);
|
||||
where 0,1... are the column number
|
||||
*/
|
||||
|
||||
function Set_Data_Type($type_arr){
|
||||
$this->tb_data_type = $type_arr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Function Set_Table_Type
|
||||
|
||||
$type_arr = array(
|
||||
"BRD_COLOR"=> array (120,120,120), //border color
|
||||
"BRD_SIZE"=>5), //border line width
|
||||
"TB_COLUMNS"=>5), //the number of columns
|
||||
"TB_ALIGN"=>"L"), //the align of the table, possible values = L, R, C equivalent to Left, Right, Center
|
||||
'L_MARGIN' => 0// left margin... reference from this->lmargin values
|
||||
)
|
||||
*/
|
||||
function Set_Table_Type($type_arr){
|
||||
|
||||
if (isset($type_arr['TB_COLUMNS'])) $this->tb_columns = $type_arr['TB_COLUMNS'];
|
||||
if (!isset($type_arr['L_MARGIN'])) $type_arr['L_MARGIN']=0;//default values
|
||||
|
||||
$this->tb_table_type = $type_arr;
|
||||
|
||||
}
|
||||
|
||||
//this functiondraws the exterior table border!!!!
|
||||
function Draw_Table_Border(){
|
||||
/* "BRD_COLOR"=> array (120,120,120), //border color
|
||||
"BRD_SIZE"=>5), //border line width
|
||||
"TB_COLUMNS"=>5), //the number of columns
|
||||
"TB_ALIGN"=>"L"), //the align of the table, possible values = L, R, C equivalent to Left, Right, Center
|
||||
*/
|
||||
|
||||
if ( ! $this->tb_border_draw ) return;
|
||||
|
||||
if ( ! $this->Data_On_Current_Page) return; //there was no data on the current page
|
||||
|
||||
//set the colors
|
||||
list($r, $g, $b) = $this->tb_table_type['BRD_COLOR'];
|
||||
$this->SetDrawColor($r, $g, $b);
|
||||
|
||||
//set the line width
|
||||
$this->SetLineWidth($this->tb_table_type['BRD_SIZE']);
|
||||
|
||||
#echo $this->GetY()-$this->table_starty." ";;
|
||||
|
||||
//draw the border
|
||||
$this->Rect(
|
||||
$this->table_startx,
|
||||
$this->table_starty,
|
||||
$this->Get_Table_Width(),
|
||||
$this->GetY()-$this->table_starty);
|
||||
|
||||
}
|
||||
|
||||
function End_Page_Border(){
|
||||
if (isset($this->tb_table_type['BRD_TYPE_END_PAGE'])){
|
||||
|
||||
if (strpos($this->tb_table_type['BRD_TYPE_END_PAGE'], 'B') >= 0){
|
||||
|
||||
//set the colors
|
||||
list($r, $g, $b) = $this->tb_table_type['BRD_COLOR'];
|
||||
$this->SetDrawColor($r, $g, $b);
|
||||
|
||||
//set the line width
|
||||
$this->SetLineWidth($this->tb_table_type['BRD_SIZE']);
|
||||
|
||||
//draw the line
|
||||
$this->Line($this->table_startx, $this->GetY(), $this->table_startx + $this->Get_Table_Width(), $this->GetY());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//returns the table width in user units
|
||||
function Get_Table_Width()
|
||||
{
|
||||
//calculate the table width
|
||||
$tb_width = 0;
|
||||
for ($i=0; $i < $this->tb_columns; $i++){
|
||||
$tb_width += $this->tb_header_type[$i]['WIDTH'];
|
||||
}
|
||||
return $tb_width;
|
||||
}
|
||||
|
||||
//alignes the table to C, L or R(default is L)
|
||||
function Table_Align(){
|
||||
//check if the table is aligned
|
||||
if (isset($this->tb_table_type['TB_ALIGN'])) $tb_align = $this->tb_table_type['TB_ALIGN']; else $tb_align='';
|
||||
|
||||
//set the table align
|
||||
switch($tb_align){
|
||||
case 'C':
|
||||
$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN'] + ($this->PageWidth() - $this->Get_Table_Width())/2);
|
||||
break;
|
||||
case 'R':
|
||||
$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN'] + ($this->PageWidth() - $this->Get_Table_Width()));
|
||||
break;
|
||||
default:
|
||||
$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN']);
|
||||
break;
|
||||
}//if (isset($this->tb_table_type['TB_ALIGN'])){
|
||||
}
|
||||
|
||||
//Draws the Header
|
||||
function Draw_Header(){
|
||||
$this->Draw_Header_Command = true;
|
||||
$this->tb_header_height = 0;
|
||||
}
|
||||
|
||||
function Init_Table_Position(){
|
||||
$this->Table_Align();
|
||||
|
||||
$this->table_startx = $this->GetX();
|
||||
$this->table_starty = $this->GetY();
|
||||
}
|
||||
|
||||
/**
|
||||
Draws the header line from a table.
|
||||
Call:
|
||||
@param none
|
||||
@return nothing
|
||||
*/
|
||||
function Draw_Header_(){
|
||||
|
||||
$this->tb_header_height = 0;
|
||||
|
||||
$this->Init_Table_Position();
|
||||
|
||||
$this->Draw_Header_Command = false;
|
||||
|
||||
//if the header will be showed
|
||||
if ( ! $this->tb_header_draw ) return;
|
||||
|
||||
$this->DrawTableLine($this->tb_header_type, false, 1, $height);
|
||||
|
||||
$this->Data_On_Current_Page = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Draws a data line from the table.
|
||||
Call this function after the table initialization, table, header and data types are set
|
||||
Call:
|
||||
@param $data - array containing line informations
|
||||
$header - header will be drawed or not in case of new page
|
||||
@return nothing
|
||||
*/
|
||||
function Draw_Data($data, $header = true, $height){
|
||||
|
||||
$this->DrawTableLine($data, $header, 0, $height);
|
||||
|
||||
}
|
||||
|
||||
/** Draws a data or header line from the table.
|
||||
Call:
|
||||
@param $data - array containing line informations
|
||||
$header - header will be drawed or not in case of new page
|
||||
$pDataType = 0 - normal line
|
||||
1 - header line
|
||||
2 - not implemented
|
||||
$heigt = Zellenhöhe
|
||||
@return nothing
|
||||
*/
|
||||
function DrawTableLine($data, $header, $pDataType = 0, $height){
|
||||
|
||||
$h = $height;
|
||||
$hm = 0;
|
||||
$xx = Array();
|
||||
$tt = Array();
|
||||
|
||||
if (!$this->Data_On_Current_Page) $this->Init_Table_Position();
|
||||
|
||||
if ($pDataType == 0){//data line
|
||||
if ($this->Draw_Header_Command){//draw the header
|
||||
$this->Draw_Header_();
|
||||
}
|
||||
}
|
||||
|
||||
//maximum Height available on this page
|
||||
$AvailPageH = $this->PageBreakTrigger - $this->GetY();
|
||||
|
||||
if ($AvailPageH <= 0){ //there is no more space on this page
|
||||
$this->TableAddPage($header);//add a page without header
|
||||
$this->DrawTableLine($data, $header, $pDataType, $height);//recall this function
|
||||
return;//exit this function
|
||||
}
|
||||
|
||||
|
||||
|
||||
$MaxPageH = $this->PageBreakTrigger - $this->tMargin;
|
||||
$split = false;
|
||||
|
||||
$backdata = $data; //backup data in case of split or recall;
|
||||
|
||||
//calculate the maximum height of the cells
|
||||
for($i=0; $i < $this->tb_columns; $i++)
|
||||
{
|
||||
if (!isset($data[$i]['TEXT']) || ($data[$i]['TEXT']=='')) $data[$i]['TEXT'] = " ";
|
||||
if (!isset($data[$i]['T_FONT'])) $data[$i]['T_FONT'] = $this->tb_data_type[$i]['T_FONT'];
|
||||
if (!isset($data[$i]['T_TYPE'])) $data[$i]['T_TYPE'] = $this->tb_data_type[$i]['T_TYPE'];
|
||||
if (!isset($data[$i]['T_SIZE'])) $data[$i]['T_SIZE'] = $this->tb_data_type[$i]['T_SIZE'];
|
||||
if (!isset($data[$i]['T_COLOR'])) $data[$i]['T_COLOR'] = $this->tb_data_type[$i]['T_COLOR'];
|
||||
if (!isset($data[$i]['T_ALIGN'])) $data[$i]['T_ALIGN'] = $this->tb_data_type[$i]['T_ALIGN'];
|
||||
if (!isset($data[$i]['V_ALIGN'])) $data[$i]['V_ALIGN'] = $this->tb_data_type[$i]['V_ALIGN'];
|
||||
if (!isset($data[$i]['LN_SIZE'])) $data[$i]['LN_SIZE'] = $this->tb_data_type[$i]['LN_SIZE'];
|
||||
if (!isset($data[$i]['BRD_SIZE'])) $data[$i]['BRD_SIZE'] = $this->tb_data_type[$i]['BRD_SIZE'];
|
||||
if (!isset($data[$i]['BRD_COLOR'])) $data[$i]['BRD_COLOR'] = $this->tb_data_type[$i]['BRD_COLOR'];
|
||||
if (!isset($data[$i]['BRD_TYPE'])) $data[$i]['BRD_TYPE'] = $this->tb_data_type[$i]['BRD_TYPE'];
|
||||
if (!isset($data[$i]['BG_COLOR'])) $data[$i]['BG_COLOR'] = $this->tb_data_type[$i]['BG_COLOR'];
|
||||
|
||||
$this->SetFont( $data[$i]['T_FONT'],
|
||||
$data[$i]['T_TYPE'],
|
||||
$data[$i]['T_SIZE']);
|
||||
|
||||
$data[$i]['CELL_WIDTH'] = $this->tb_header_type[$i]['WIDTH'];
|
||||
|
||||
if (isset($data[$i]['COLSPAN'])){
|
||||
|
||||
$colspan = (int) $data[$i]['COLSPAN'];//convert to integer
|
||||
|
||||
for ($j = 1; $j < $colspan; $j++){
|
||||
//if there is a colspan, then calculate the number of lines also with the with of the next cell
|
||||
if (($i + $j) < $this->tb_columns)
|
||||
$data[$i]['CELL_WIDTH'] += $this->tb_header_type[$i + $j]['WIDTH'];
|
||||
}
|
||||
}
|
||||
|
||||
$MaxLines = floor($AvailPageH / $data[$i]['LN_SIZE']);//floor this value, must be the lowest possible
|
||||
if (!isset($data[$i]['TEXT_STRLINES'])) $data[$i]['TEXT_STRLINES'] = $this->StringToLines($data[$i]['CELL_WIDTH'], $data[$i]['TEXT']);
|
||||
$NoLines = count($data[$i]['TEXT_STRLINES']);
|
||||
|
||||
$hm = max($hm, $data[$i]['LN_SIZE'] * $NoLines);//this would be the normal height
|
||||
|
||||
if ($NoLines > $MaxLines){
|
||||
$split = true;
|
||||
$NoLines = $MaxLines;
|
||||
$data[$i]['TEXT_SPLITLINES'] = array_splice($data[$i]['TEXT_STRLINES'], $MaxLines);
|
||||
}
|
||||
|
||||
$data[$i]['CELL_LINES'] = $NoLines;
|
||||
|
||||
//this is the maximum cell height
|
||||
$h = max($h, $data[$i]['LN_SIZE'] * $data[$i]['CELL_LINES']);
|
||||
|
||||
if (isset($data[$i]['COLSPAN'])){
|
||||
//just skip the other cells
|
||||
$i = $i + $colspan - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($pDataType == 0){//data line
|
||||
|
||||
if (!$this->tb_split_normal){//split only if the cell height is bigger than a page size
|
||||
|
||||
if ($split && (($hm + $this->tb_header_height) < $MaxPageH)){//if the header is splitted and it has space on a page
|
||||
$this->TableAddPage($header);//add a page without header
|
||||
$this->DrawTableLine($backdata, $header, 0, $height);//recall this function
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($pDataType == 1){//header line
|
||||
$this->tb_header_height = $hm;
|
||||
|
||||
if ($split && ($hm < $MaxPageH)){//if the header is splitted and it has space on a page
|
||||
//new page
|
||||
$this->TableAddPage(false);//add a page without header
|
||||
$this->DrawTableLine($backdata, $header, 1, $height);//recall this function
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ((2*$h) > $AvailPageH) && ((2*$h) < $MaxPageH)){
|
||||
/*
|
||||
if the header double size is bigger then the available size
|
||||
but the double size is smaller than a page size
|
||||
>>> we draw a new page
|
||||
**/
|
||||
$this->TableAddPage(false);//add a page withot header
|
||||
$this->DrawTableLine($backdata, $header, 1, $height);//recall this function
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->Table_Align();
|
||||
|
||||
//Draw the cells of the row
|
||||
for( $i = 0; $i < $this->tb_columns; $i++ )
|
||||
{
|
||||
|
||||
//border size BRD_SIZE
|
||||
$this->SetLineWidth($data[$i]['BRD_SIZE']);
|
||||
|
||||
//fill color = BG_COLOR
|
||||
list($r, $g, $b) = $data[$i]['BG_COLOR'];
|
||||
$this->SetFillColor($r, $g, $b);
|
||||
|
||||
//Draw Color = BRD_COLOR
|
||||
list($r, $g, $b) = $data[$i]['BRD_COLOR'];
|
||||
$this->SetDrawColor($r, $g, $b);
|
||||
|
||||
//Text Color = T_COLOR
|
||||
list($r, $g, $b) = $data[$i]['T_COLOR'];
|
||||
$this->SetTextColor($r, $g, $b);
|
||||
|
||||
//Set the font, font type and size
|
||||
$this->SetFont( $data[$i]['T_FONT'],
|
||||
$data[$i]['T_TYPE'],
|
||||
$data[$i]['T_SIZE']);
|
||||
|
||||
//Save the current position
|
||||
$x=$this->GetX();
|
||||
$y=$this->GetY();
|
||||
|
||||
//print the text
|
||||
$this->MultiCellTable(
|
||||
$data[$i]['CELL_WIDTH'],
|
||||
$data[$i]['LN_SIZE'],
|
||||
$data[$i]['TEXT_STRLINES'],
|
||||
$data[$i]['BRD_TYPE'],
|
||||
$data[$i]['T_ALIGN'],
|
||||
$data[$i]['V_ALIGN'],
|
||||
1,
|
||||
$h - $data[$i]['LN_SIZE'] * $data[$i]['CELL_LINES']
|
||||
);
|
||||
|
||||
//Put the position to the right of the cell
|
||||
$this->SetXY($x + $data[$i]['CELL_WIDTH'],$y);
|
||||
|
||||
//if we have colspan, just ignore the next cells
|
||||
if (isset($data[$i]['COLSPAN'])){
|
||||
$i = $i + (int)$data[$i]['COLSPAN'] - 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->Data_On_Current_Page = true;
|
||||
|
||||
//Go to the next line
|
||||
$this->Ln($h);
|
||||
|
||||
if ($split){
|
||||
|
||||
//calculate the maximum height of the cells
|
||||
for($i=0; $i < $this->tb_columns; $i++){
|
||||
$backdata[$i]['TEXT_STRLINES'] = isset($data[$i]['TEXT_SPLITLINES']) ? $data[$i]['TEXT_SPLITLINES'] : array();
|
||||
}
|
||||
|
||||
$this->TableAddPage($header);//we have a page split, add a page
|
||||
|
||||
if ($pDataType == 1) $header = false;
|
||||
$this->DrawTableLine($backdata, $header, $pDataType, $height);
|
||||
}
|
||||
}//DrawTableLine
|
||||
|
||||
/** Adds a new page in the pdf document and initializes the table and the header if necessary.
|
||||
Call:
|
||||
@param
|
||||
$header - boolean - if the header is drawed or not
|
||||
@return nothing
|
||||
*/
|
||||
function TableAddPage($header = true){
|
||||
$this->Draw_Table_Border();//draw the table border
|
||||
|
||||
$this->End_Page_Border();//if there is a special handling for end page??? this is specific for me
|
||||
|
||||
$this->AddPage($this->CurOrientation);//add a new page
|
||||
|
||||
$this->Data_On_Current_Page = false;
|
||||
|
||||
$this->table_startx = $this->GetX();
|
||||
$this->table_starty = $this->GetY();
|
||||
if ($header) $this ->Draw_Header();//if we have to draw the header!!!
|
||||
}//TableAddPage
|
||||
|
||||
/** This method allows printing text with line breaks.
|
||||
It works like a modified MultiCell
|
||||
Call:
|
||||
@param
|
||||
$w - width
|
||||
$h - line height
|
||||
$txtData - the outputed text
|
||||
$border - border(LRTB 0 or 1)
|
||||
$align - horizontal align 'JLR'
|
||||
$valign - Vertical Alignment - Top, Middle, Bottom
|
||||
$fill - fill (1/0)
|
||||
$vh - vertical adjustment - the Multicell Height will be with this VH Higher!!!!
|
||||
@return nothing
|
||||
*/
|
||||
function MultiCellTable($w, $h, $txtData, $border=0, $align='J', $valign='T', $fill=0, $vh=0)
|
||||
{
|
||||
|
||||
$b1 = '';//border for top cell
|
||||
$b2 = '';//border for middle cell
|
||||
$b3 = '';//border for bottom cell
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
switch ($valign){
|
||||
case 'T':
|
||||
$wh_T = 0;//Top width
|
||||
$wh_B = $vh - $wh_T;//Bottom width
|
||||
break;
|
||||
case 'M':
|
||||
$wh_T = $vh/2;
|
||||
$wh_B = $vh/2;
|
||||
break;
|
||||
case 'B':
|
||||
$wh_T = $vh;
|
||||
$wh_B = 0;
|
||||
break;
|
||||
default://default is TOP ALIGN
|
||||
$wh_T = 0;//Top width
|
||||
$wh_B = $vh - $wh_T;//Bottom width
|
||||
}
|
||||
|
||||
//save the X position
|
||||
$x = $this->x;
|
||||
/*
|
||||
if $wh_T == 0 that means that we have no vertical adjustments so I will skip the cells that
|
||||
draws the top and bottom borders
|
||||
*/
|
||||
|
||||
if ($wh_T != 0)//only when there is a difference
|
||||
{
|
||||
//draw the top borders!!!
|
||||
$this->Cell($w,$wh_T,'',$b1,2,$align,$fill);
|
||||
}
|
||||
|
||||
$b2 = is_int(strpos($border,'T')) && ($wh_T == 0) ? $b2.'T' : $b2;
|
||||
$b2 = is_int(strpos($border,'B')) && ($wh_B == 0) ? $b2.'B' : $b2;
|
||||
|
||||
#$this->MultiCell($w,$h,$txt,$b2,$align,$fill);
|
||||
$this->MultiCellTag($w, $h, $txtData, $b2, $align, 1, false);
|
||||
|
||||
if ($wh_B != 0){//only when there is a difference
|
||||
|
||||
//go to the saved X position
|
||||
//a multicell always runs to the begin of line
|
||||
$this->x = $x;
|
||||
|
||||
$this->Cell($w, $wh_B, '', $b3, 2, $align,$fill);
|
||||
|
||||
$this->x=$this->lMargin;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}//end of pdf_table class
|
||||
|
||||
?>
|
661
prints/class.multicelltag.php
Executable file
661
prints/class.multicelltag.php
Executable file
@ -0,0 +1,661 @@
|
||||
<?php
|
||||
/****************************************************************************
|
||||
* Software: FPDF class extension *
|
||||
* Tag Based Multicell *
|
||||
* Version: 1.3 *
|
||||
* Date: 2005/12/08 *
|
||||
* Author: Bintintan Andrei -- klodoma@ar-sd.net *
|
||||
* *
|
||||
* Last Modification: 2006/09/18 *
|
||||
* *
|
||||
* *
|
||||
* License: Free for non-commercial use *
|
||||
* *
|
||||
* You may use and modify this software as you wish. *
|
||||
* PLEASE REPORT ANY BUGS TO THE AUTHOR. THANK YOU *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
Modifications:
|
||||
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 StringToLines function
|
||||
- modified MultiCellTag to accept as data parameter an array type like the return from StringToLines function
|
||||
- these modifications does not affect the main class behavior, they are used for further developement and class extensions
|
||||
*/
|
||||
|
||||
require_once('fpdf.php');
|
||||
require_once("class.string_tags.php");
|
||||
|
||||
if (!defined('PARAGRAPH_STRING')) define('PARAGRAPH_STRING', '~~~');
|
||||
|
||||
class FPDF_MULTICELLTAG extends FPDF{
|
||||
var $wt_Current_Tag;
|
||||
var $wt_FontInfo;//tags font info
|
||||
var $wt_DataInfo;//parsed string data info
|
||||
var $wt_DataExtraInfo;//data extra INFO
|
||||
var $wt_TempData; //some temporary info
|
||||
|
||||
|
||||
|
||||
function _wt_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 _wt_Reset_Datas(){
|
||||
|
||||
/**
|
||||
Sets current tag to specified style
|
||||
@param $tag - tag name
|
||||
$family - text font family
|
||||
$style - text style
|
||||
$size - text size
|
||||
$color - text color
|
||||
@return nothing
|
||||
*/
|
||||
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 style as the current settings
|
||||
- if the tag name is not in the tag list then de "DEFAULT" tag is saved.
|
||||
This includes a fist call of the function SaveCurrentStyle()
|
||||
@param $tag - tag name
|
||||
@return nothing
|
||||
*/
|
||||
function 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 ApplyStyle($tag){
|
||||
|
||||
/**
|
||||
Save the current settings as a tag default style under the DEFAUTLT tag name
|
||||
@param none
|
||||
@return nothing
|
||||
*/
|
||||
function 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 SaveCurrentStyle
|
||||
|
||||
/**
|
||||
Divides $this->wt_DataInfo and returnes a line from this variable
|
||||
@param $w - Width of the text
|
||||
@return $aLine = array() -> contains informations to draw a line
|
||||
*/
|
||||
function 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->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 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
|
||||
$pDataIsString - true if $pData is a string
|
||||
- false if $pData is an array containing lines formatted with $this->MakeLine($w) function
|
||||
(the false option is used in relation with StringToLines, to avoid double formatting of a string
|
||||
|
||||
These paramaters are the same and have the same behavior as at Multicell function
|
||||
@return nothing
|
||||
*/
|
||||
function MultiCellTag($w, $h, $pData, $border=0, $align='J', $fill=0, $pDataIsString = true){
|
||||
|
||||
//save the current style settings, this will be the default in case of no style is specified
|
||||
$this->SaveCurrentStyle();
|
||||
$this->_wt_Reset_Datas();
|
||||
|
||||
//if data is string
|
||||
if ($pDataIsString === true) $this->DivideByTags($pData);
|
||||
|
||||
$b = $b1 = $b2 = $b3 = '';//borders
|
||||
|
||||
//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 ($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->MakeLine($w);
|
||||
//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";
|
||||
}
|
||||
|
||||
//outputs a line
|
||||
$this->PrintLine($w, $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 ($first_line) $first_line = false;
|
||||
|
||||
//draw the border and jump to the next line
|
||||
$this->SetX($startX);//restore the X
|
||||
$this->Cell($w,$h,"",$real_brd,2);
|
||||
}//while(! $last_line){
|
||||
|
||||
//APPLY THE DEFAULT STYLE
|
||||
$this->ApplyStyle("DEFAULT");
|
||||
|
||||
$this->x=$this->lMargin;
|
||||
}//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 nothing
|
||||
*/
|
||||
|
||||
function 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 DivideByTags($pStr){
|
||||
|
||||
/**
|
||||
This method parses the current text and return an array that contains the text information for
|
||||
each line that will be drawed.
|
||||
@param $w - with of the cell
|
||||
$pStr - String to be parsed
|
||||
@return $aStrLines - array - contains parsed text information.
|
||||
*/
|
||||
function StringToLines($w = 0, $pStr){
|
||||
|
||||
//save the current style settings, this will be the default in case of no style is specified
|
||||
$this->SaveCurrentStyle();
|
||||
$this->_wt_Reset_Datas();
|
||||
|
||||
$this->DivideByTags($pStr);
|
||||
|
||||
$last_line = !(count($this->wt_DataInfo) > 0);
|
||||
|
||||
$aStrLines = array();
|
||||
|
||||
while (!$last_line){
|
||||
|
||||
//make a line
|
||||
$str_data = $this->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->ApplyStyle("DEFAULT");
|
||||
|
||||
return $aStrLines;
|
||||
}//function StringToLines
|
||||
|
||||
|
||||
/**
|
||||
Draws a line returned from MakeLine function
|
||||
@param $w - with of the cell
|
||||
$h - height of the cell
|
||||
$aTxt - array from MakeLine
|
||||
$align - text align
|
||||
@return nothing
|
||||
*/
|
||||
function 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->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 PrintLine(
|
||||
}//class
|
||||
|
||||
?>
|
160
prints/class.string_tags.php
Executable file
160
prints/class.string_tags.php
Executable file
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/****************************************************************************
|
||||
* Software: Tag Extraction Class *
|
||||
* Extracts the tags and corresponding text from a string *
|
||||
* Version: 1.2 *
|
||||
* Date: 2005/12/08 *
|
||||
* Author: Bintintan Andrei -- klodoma@ar-sd.net *
|
||||
* *
|
||||
* $Id$
|
||||
* *
|
||||
* *
|
||||
* License: Free for non-commercial use *
|
||||
* *
|
||||
* You may use and modify this software as you wish. *
|
||||
* PLEASE REPORT ANY BUGS TO THE AUTHOR. THANK YOU
|
||||
*
|
||||
* @package externe
|
||||
* @subpackage FPDF * *
|
||||
****************************************************************************/
|
||||
/**
|
||||
* Extracts the tags from a string
|
||||
* @package externe
|
||||
* @subpackage FPDF
|
||||
*/
|
||||
class String_TAGS{
|
||||
var $aTAGS;
|
||||
var $aHREF;
|
||||
var $iTagMaxElem;
|
||||
/**
|
||||
Constructor
|
||||
*/
|
||||
function string_tags($p_tagmax = 2){
|
||||
$this->aTAGS = array();
|
||||
$this->aHREF = array();
|
||||
$this->iTagMaxElem = $p_tagmax;
|
||||
}
|
||||
/** returnes true if $p_tag is a "<open tag>"
|
||||
@param $p_tag - tag string
|
||||
$p_array - tag array;
|
||||
@return true/false
|
||||
*/
|
||||
function OpenTag($p_tag, $p_array){
|
||||
$aTAGS = & $this->aTAGS;
|
||||
$aHREF = & $this->aHREF;
|
||||
$maxElem = & $this->iTagMaxElem;
|
||||
|
||||
if (!preg_match("/^<([a-zA-Z1-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;
|
||||
}
|
||||
/** returnes true if $p_tag is a "<close tag>"
|
||||
@param $p_tag - tag string
|
||||
$p_array - tag array;
|
||||
@return true/false
|
||||
*/
|
||||
function CloseTag($p_tag, $p_array){
|
||||
$aTAGS = & $this->aTAGS;
|
||||
$aHREF = & $this->aHREF;
|
||||
$maxElem = & $this->iTagMaxElem;
|
||||
if (!preg_match("#^</([a-zA-Z1-9]{1,$maxElem})>$#", $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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc Expands the paramteres that are kept in Href field
|
||||
* @param array of parameters
|
||||
* @return string with concatenated results
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
/** Optimieses the result of the tag
|
||||
In the result array there can be strings that are consecutive and have the same tag
|
||||
This is eliminated
|
||||
@param $result
|
||||
@return optimized array
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/** Parses a string and returnes the result
|
||||
@param $p_str - string
|
||||
@return array (
|
||||
array (string1, tag1),
|
||||
array (string2, tag2)
|
||||
)
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}//class String_TAGS{
|
||||
?>
|
97
prints/decoders/ascii85.php
Executable file
97
prints/decoders/ascii85.php
Executable file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
//
|
||||
// FPDI - Version 1.1
|
||||
//
|
||||
// Copyright 2004,2005 Setasign - Jan Slabon
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
if (!defined("ORD_z"))
|
||||
define("ORD_z",ord('z'));
|
||||
if (!defined("ORD_!"))
|
||||
define("ORD_exclmark", ord('!'));
|
||||
if (!defined("ORD_u"))
|
||||
define("ORD_u", ord("u"));
|
||||
if (!defined("ORD_tilde"))
|
||||
define("ORD_tilde", ord('~'));
|
||||
|
||||
class ASCII85Decode {
|
||||
|
||||
function ASCII85Decode(&$fpdi) {
|
||||
$this->fpdi =& $fpdi;
|
||||
}
|
||||
|
||||
|
||||
function decode($in) {
|
||||
$out = "";
|
||||
$state = 0;
|
||||
$chn = null;
|
||||
|
||||
$l = strlen($in);
|
||||
|
||||
for ($k = 0; $k < $l; ++$k) {
|
||||
$ch = ord($in[$k]) & 0xff;
|
||||
|
||||
if ($ch == ORD_tilde) {
|
||||
break;
|
||||
}
|
||||
if (preg_match("/^\s$/",chr($ch))) {
|
||||
continue;
|
||||
}
|
||||
if ($ch == ORD_z && $state == 0) {
|
||||
$out .= chr(0).chr(0).chr(0).chr(0);
|
||||
continue;
|
||||
}
|
||||
if ($ch < ORD_exclmark || $ch > ORD_u) {
|
||||
$this->fpdi->error("Illegal character in ASCII85Decode.");
|
||||
}
|
||||
|
||||
$chn[$state++] = $ch - ORD_exclmark;
|
||||
|
||||
if ($state == 5) {
|
||||
$state = 0;
|
||||
$r = 0;
|
||||
for ($j = 0; $j < 5; ++$j)
|
||||
$r = $r * 85 + $chn[$j];
|
||||
$out .= chr($r >> 24);
|
||||
$out .= chr($r >> 16);
|
||||
$out .= chr($r >> 8);
|
||||
$out .= chr($r);
|
||||
}
|
||||
}
|
||||
$r = 0;
|
||||
|
||||
if ($state == 1)
|
||||
$this->fpdi->error("Illegal length in ASCII85Decode.");
|
||||
if ($state == 2) {
|
||||
$r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1]+1) * 85 * 85 * 85;
|
||||
$out .= chr($r >> 24);
|
||||
}
|
||||
else if ($state == 3) {
|
||||
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2]+1) * 85 * 85;
|
||||
$out .= chr($r >> 24);
|
||||
$out .= chr($r >> 16);
|
||||
}
|
||||
else if ($state == 4) {
|
||||
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3]+1) * 85 ;
|
||||
$out .= chr($r >> 24);
|
||||
$out .= chr($r >> 16);
|
||||
$out .= chr($r >> 8);
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
151
prints/decoders/lzw.php
Executable file
151
prints/decoders/lzw.php
Executable file
@ -0,0 +1,151 @@
|
||||
<?php
|
||||
//
|
||||
// FPDI - Version 1.1
|
||||
//
|
||||
// Copyright 2004,2005 Setasign - Jan Slabon
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
class LZWDecode {
|
||||
|
||||
var $sTable = array();
|
||||
var $data = null;
|
||||
var $tIdx;
|
||||
var $bitsToGet = 9;
|
||||
var $bytePointer;
|
||||
var $bitPointer;
|
||||
var $nextData = 0;
|
||||
var $nextBits = 0;
|
||||
var $andTable = array(511, 1023, 2047, 4095);
|
||||
|
||||
function LZWDecode(&$fpdi) {
|
||||
$this->fpdi =& $fpdi;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to decode LZW compressed data.
|
||||
*
|
||||
* @param string data The compressed data.
|
||||
*/
|
||||
function decode(&$data) {
|
||||
|
||||
if($data[0] == 0x00 && $data[1] == 0x01) {
|
||||
$this->fpdi->error("LZW flavour not supported.");
|
||||
}
|
||||
|
||||
$this->initsTable();
|
||||
|
||||
$this->data =& $data;
|
||||
|
||||
// Initialize pointers
|
||||
$this->bytePointer = 0;
|
||||
$this->bitPointer = 0;
|
||||
|
||||
$this->nextData = 0;
|
||||
$this->nextBits = 0;
|
||||
|
||||
$oldCode = 0;
|
||||
|
||||
$string = "";
|
||||
$uncompData = "";
|
||||
|
||||
while (($code = $this->getNextCode()) != 257) {
|
||||
if ($code == 256) {
|
||||
$this->initsTable();
|
||||
$code = $this->getNextCode();
|
||||
|
||||
if ($code == 257) {
|
||||
break;
|
||||
}
|
||||
|
||||
$uncompData .= $this->sTable[$code];
|
||||
$oldCode = $code;
|
||||
|
||||
} else {
|
||||
|
||||
if ($code < $this->tIdx) {
|
||||
$string = $this->sTable[$code];
|
||||
$uncompData .= $string;
|
||||
|
||||
$this->addStringToTable($this->sTable[$oldCode], $string[0]);
|
||||
$oldCode = $code;
|
||||
} else {
|
||||
$string = $this->sTable[$oldCode];
|
||||
$string = $string.$string[0];
|
||||
$uncompData .= $string;
|
||||
|
||||
$this->addStringToTable($string);
|
||||
$oldCode = $code;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $uncompData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the string table.
|
||||
*/
|
||||
function initsTable() {
|
||||
$this->sTable = array();
|
||||
|
||||
for ($i = 0; $i < 256; $i++)
|
||||
$this->sTable[$i] = chr($i);
|
||||
|
||||
$this->tIdx = 258;
|
||||
$this->bitsToGet = 9;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new string to the string table.
|
||||
*/
|
||||
function addStringToTable ($oldString, $newString="") {
|
||||
$string = $oldString.$newString;
|
||||
|
||||
// Add this new String to the table
|
||||
$this->sTable[$this->tIdx++] = $string;
|
||||
|
||||
if ($this->tIdx == 511) {
|
||||
$this->bitsToGet = 10;
|
||||
} else if ($this->tIdx == 1023) {
|
||||
$this->bitsToGet = 11;
|
||||
} else if ($this->tIdx == 2047) {
|
||||
$this->bitsToGet = 12;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the next 9, 10, 11 or 12 bits
|
||||
function getNextCode() {
|
||||
if ($this->bytePointer == strlen($this->data))
|
||||
return 257;
|
||||
|
||||
$this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff);
|
||||
$this->nextBits += 8;
|
||||
|
||||
if ($this->nextBits < $this->bitsToGet) {
|
||||
$this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff);
|
||||
$this->nextBits += 8;
|
||||
}
|
||||
|
||||
$code = ($this->nextData >> ($this->nextBits - $this->bitsToGet)) & $this->andTable[$this->bitsToGet-9];
|
||||
$this->nextBits -= $this->bitsToGet;
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
63
prints/doc/__construct.htm
Executable file
63
prints/doc/__construct.htm
Executable file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>__construct</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>__construct</h1>
|
||||
<code>__construct([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> size]]])</code>
|
||||
<h2>Description</h2>
|
||||
This is the class constructor. It allows to set up the page size, the orientation and the
|
||||
unit of measure used in all methods (except for font sizes).
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>orientation</code></dt>
|
||||
<dd>
|
||||
Default page orientation. Possible values are (case insensitive):
|
||||
<ul>
|
||||
<li><code>P</code> or <code>Portrait</code></li>
|
||||
<li><code>L</code> or <code>Landscape</code></li>
|
||||
</ul>
|
||||
Default value is <code>P</code>.
|
||||
</dd>
|
||||
<dt><code>unit</code></dt>
|
||||
<dd>
|
||||
User unit. Possible values are:
|
||||
<ul>
|
||||
<li><code>pt</code>: point</li>
|
||||
<li><code>mm</code>: millimeter</li>
|
||||
<li><code>cm</code>: centimeter</li>
|
||||
<li><code>in</code>: inch</li>
|
||||
</ul>
|
||||
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
|
||||
is a very common unit in typography; font sizes are expressed in that unit.
|
||||
<br>
|
||||
<br>
|
||||
Default value is <code>mm</code>.
|
||||
</dd>
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
The size used for pages. It can be either one of the following values (case insensitive):
|
||||
<ul>
|
||||
<li><code>A3</code></li>
|
||||
<li><code>A4</code></li>
|
||||
<li><code>A5</code></li>
|
||||
<li><code>Letter</code></li>
|
||||
<li><code>Legal</code></li>
|
||||
</ul>
|
||||
or an array containing the width and the height (expressed in the unit given by <code>unit</code>).<br>
|
||||
<br>
|
||||
Default value is <code>A4</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
Example with a custom 100x150 mm page size:
|
||||
<div class="doc-source">
|
||||
<pre><code>$pdf = new FPDF('P','mm',array(100,150));</code></pre>
|
||||
</div>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
63
prints/doc/acceptpagebreak.htm
Executable file
63
prints/doc/acceptpagebreak.htm
Executable file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>AcceptPageBreak</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>AcceptPageBreak</h1>
|
||||
<code><b>boolean</b> AcceptPageBreak()</code>
|
||||
<h2>Description</h2>
|
||||
Whenever a page break condition is met, the method is called, and the break is issued or not
|
||||
depending on the returned value. The default implementation returns a value according to the
|
||||
mode selected by SetAutoPageBreak().
|
||||
<br>
|
||||
This method is called automatically and should not be called directly by the application.
|
||||
<h2>Example</h2>
|
||||
The method is overriden in an inherited class in order to obtain a 3 column layout:
|
||||
<div class="doc-source">
|
||||
<pre><code>class PDF extends FPDF
|
||||
{
|
||||
var $col = 0;
|
||||
|
||||
function SetCol($col)
|
||||
{
|
||||
// Move position to a column
|
||||
$this->col = $col;
|
||||
$x = 10+$col*65;
|
||||
$this->SetLeftMargin($x);
|
||||
$this->SetX($x);
|
||||
}
|
||||
|
||||
function AcceptPageBreak()
|
||||
{
|
||||
if($this->col<2)
|
||||
{
|
||||
// Go to next column
|
||||
$this->SetCol($this->col+1);
|
||||
$this->SetY(10);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Go back to first column and issue page break
|
||||
$this->SetCol(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pdf = new PDF();
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Arial','',12);
|
||||
for($i=1;$i<=300;$i++)
|
||||
$pdf->Cell(0,5,"Line $i",0,1);
|
||||
$pdf->Output();</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
55
prints/doc/addfont.htm
Executable file
55
prints/doc/addfont.htm
Executable file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>AddFont</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>AddFont</h1>
|
||||
<code>AddFont(<b>string</b> family [, <b>string</b> style [, <b>string</b> file]])</code>
|
||||
<h2>Description</h2>
|
||||
Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font
|
||||
definition file first with the MakeFont utility.
|
||||
<br>
|
||||
The definition file (and the font file itself when embedding) must be present in the font directory.
|
||||
If it is not found, the error "Could not include font definition file" is raised.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>family</code></dt>
|
||||
<dd>
|
||||
Font family. The name can be chosen arbitrarily. If it is a standard family name, it will
|
||||
override the corresponding font.
|
||||
</dd>
|
||||
<dt><code>style</code></dt>
|
||||
<dd>
|
||||
Font style. Possible values are (case insensitive):
|
||||
<ul>
|
||||
<li>empty string: regular</li>
|
||||
<li><code>B</code>: bold</li>
|
||||
<li><code>I</code>: italic</li>
|
||||
<li><code>BI</code> or <code>IB</code>: bold italic</li>
|
||||
</ul>
|
||||
The default value is regular.
|
||||
</dd>
|
||||
<dt><code>file</code></dt>
|
||||
<dd>
|
||||
The font definition file.
|
||||
<br>
|
||||
By default, the name is built from the family and style, in lower case with no space.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>$pdf->AddFont('Comic','I');</code></pre>
|
||||
</div>
|
||||
is equivalent to:
|
||||
<div class="doc-source">
|
||||
<pre><code>$pdf->AddFont('Comic','I','comici.php');</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="setfont.htm">SetFont</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
26
prints/doc/addlink.htm
Executable file
26
prints/doc/addlink.htm
Executable file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>AddLink</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>AddLink</h1>
|
||||
<code><b>int</b> AddLink()</code>
|
||||
<h2>Description</h2>
|
||||
Creates a new internal link and returns its identifier. An internal link is a clickable area
|
||||
which directs to another place within the document.
|
||||
<br>
|
||||
The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is
|
||||
defined with SetLink().
|
||||
<h2>See also</h2>
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="write.htm">Write</a>,
|
||||
<a href="image.htm">Image</a>,
|
||||
<a href="link.htm">Link</a>,
|
||||
<a href="setlink.htm">SetLink</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
61
prints/doc/addpage.htm
Executable file
61
prints/doc/addpage.htm
Executable file
@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>AddPage</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>AddPage</h1>
|
||||
<code>AddPage([<b>string</b> orientation [, <b>mixed</b> size [, <b>int</b> rotation]]])</code>
|
||||
<h2>Description</h2>
|
||||
Adds a new page to the document. If a page is already present, the Footer() method is called
|
||||
first to output the footer. Then the page is added, the current position set to the top-left
|
||||
corner according to the left and top margins, and Header() is called to display the header.
|
||||
<br>
|
||||
The font which was set before calling is automatically restored. There is no need to call
|
||||
SetFont() again if you want to continue with the same font. The same is true for colors and
|
||||
line width.
|
||||
<br>
|
||||
The origin of the coordinate system is at the top-left corner and increasing ordinates go
|
||||
downwards.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>orientation</code></dt>
|
||||
<dd>
|
||||
Page orientation. Possible values are (case insensitive):
|
||||
<ul>
|
||||
<li><code>P</code> or <code>Portrait</code></li>
|
||||
<li><code>L</code> or <code>Landscape</code></li>
|
||||
</ul>
|
||||
The default value is the one passed to the constructor.
|
||||
</dd>
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
Page size. It can be either one of the following values (case insensitive):
|
||||
<ul>
|
||||
<li><code>A3</code></li>
|
||||
<li><code>A4</code></li>
|
||||
<li><code>A5</code></li>
|
||||
<li><code>Letter</code></li>
|
||||
<li><code>Legal</code></li>
|
||||
</ul>
|
||||
or an array containing the width and the height (expressed in user unit).<br>
|
||||
<br>
|
||||
The default value is the one passed to the constructor.
|
||||
</dd>
|
||||
<dt><code>rotation</code></dt>
|
||||
<dd>
|
||||
Angle by which to rotate the page. It must be a multiple of 90; positive values
|
||||
mean clockwise rotation. The default value is <code>0</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="__construct.htm">__construct</a>,
|
||||
<a href="header.htm">Header</a>,
|
||||
<a href="footer.htm">Footer</a>,
|
||||
<a href="setmargins.htm">SetMargins</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
45
prints/doc/aliasnbpages.htm
Executable file
45
prints/doc/aliasnbpages.htm
Executable file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>AliasNbPages</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>AliasNbPages</h1>
|
||||
<code>AliasNbPages([<b>string</b> alias])</code>
|
||||
<h2>Description</h2>
|
||||
Defines an alias for the total number of pages. It will be substituted as the document is
|
||||
closed.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>alias</code></dt>
|
||||
<dd>
|
||||
The alias. Default value: <code>{nb}</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>class PDF extends FPDF
|
||||
{
|
||||
function Footer()
|
||||
{
|
||||
// Go to 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
// Select Arial italic 8
|
||||
$this->SetFont('Arial','I',8);
|
||||
// Print current and total page numbers
|
||||
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
|
||||
}
|
||||
}
|
||||
|
||||
$pdf = new PDF();
|
||||
$pdf->AliasNbPages();</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="pageno.htm">PageNo</a>,
|
||||
<a href="footer.htm">Footer</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
104
prints/doc/cell.htm
Executable file
104
prints/doc/cell.htm
Executable file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Cell</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Cell</h1>
|
||||
<code>Cell(<b>float</b> w [, <b>float</b> h [, <b>string</b> txt [, <b>mixed</b> border [, <b>int</b> ln [, <b>string</b> align [, <b>boolean</b> fill [, <b>mixed</b> link]]]]]]])</code>
|
||||
<h2>Description</h2>
|
||||
Prints a cell (rectangular area) with optional borders, background color and character string.
|
||||
The upper-left corner of the cell corresponds to the current position. The text can be aligned
|
||||
or centered. After the call, the current position moves to the right or to the next line. It is
|
||||
possible to put a link on the text.
|
||||
<br>
|
||||
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is
|
||||
done before outputting.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>w</code></dt>
|
||||
<dd>
|
||||
Cell width. If <code>0</code>, the cell extends up to the right margin.
|
||||
</dd>
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
Cell height.
|
||||
Default value: <code>0</code>.
|
||||
</dd>
|
||||
<dt><code>txt</code></dt>
|
||||
<dd>
|
||||
String to print.
|
||||
Default value: empty string.
|
||||
</dd>
|
||||
<dt><code>border</code></dt>
|
||||
<dd>
|
||||
Indicates if borders must be drawn around the cell. The value can be either a number:
|
||||
<ul>
|
||||
<li><code>0</code>: no border</li>
|
||||
<li><code>1</code>: frame</li>
|
||||
</ul>
|
||||
or a string containing some or all of the following characters (in any order):
|
||||
<ul>
|
||||
<li><code>L</code>: left</li>
|
||||
<li><code>T</code>: top</li>
|
||||
<li><code>R</code>: right</li>
|
||||
<li><code>B</code>: bottom</li>
|
||||
</ul>
|
||||
Default value: <code>0</code>.
|
||||
</dd>
|
||||
<dt><code>ln</code></dt>
|
||||
<dd>
|
||||
Indicates where the current position should go after the call. Possible values are:
|
||||
<ul>
|
||||
<li><code>0</code>: to the right</li>
|
||||
<li><code>1</code>: to the beginning of the next line</li>
|
||||
<li><code>2</code>: below</li>
|
||||
</ul>
|
||||
Putting <code>1</code> is equivalent to putting <code>0</code> and calling Ln() just after.
|
||||
Default value: <code>0</code>.
|
||||
</dd>
|
||||
<dt><code>align</code></dt>
|
||||
<dd>
|
||||
Allows to center or align the text. Possible values are:
|
||||
<ul>
|
||||
<li><code>L</code> or empty string: left align (default value)</li>
|
||||
<li><code>C</code>: center</li>
|
||||
<li><code>R</code>: right align</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>fill</code></dt>
|
||||
<dd>
|
||||
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
<dt><code>link</code></dt>
|
||||
<dd>
|
||||
URL or identifier returned by AddLink().
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>// Set font
|
||||
$pdf->SetFont('Arial','B',16);
|
||||
// Move to 8 cm to the right
|
||||
$pdf->Cell(80);
|
||||
// Centered text in a framed 20*10 mm cell and line break
|
||||
$pdf->Cell(20,10,'Title',1,1,'C');</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="setfont.htm">SetFont</a>,
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a>,
|
||||
<a href="setfillcolor.htm">SetFillColor</a>,
|
||||
<a href="settextcolor.htm">SetTextColor</a>,
|
||||
<a href="setlinewidth.htm">SetLineWidth</a>,
|
||||
<a href="addlink.htm">AddLink</a>,
|
||||
<a href="ln.htm">Ln</a>,
|
||||
<a href="multicell.htm">MultiCell</a>,
|
||||
<a href="write.htm">Write</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
21
prints/doc/close.htm
Executable file
21
prints/doc/close.htm
Executable file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Close</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Close</h1>
|
||||
<code>Close()</code>
|
||||
<h2>Description</h2>
|
||||
Terminates the PDF document. It is not necessary to call this method explicitly because Output()
|
||||
does it automatically.
|
||||
<br>
|
||||
If the document contains no page, AddPage() is called to prevent from getting an invalid document.
|
||||
<h2>See also</h2>
|
||||
<a href="output.htm">Output</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
26
prints/doc/error.htm
Executable file
26
prints/doc/error.htm
Executable file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Error</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Error</h1>
|
||||
<code>Error(<b>string</b> msg)</code>
|
||||
<h2>Description</h2>
|
||||
This method is automatically called in case of a fatal error; it simply throws an exception
|
||||
with the provided message.<br>
|
||||
An inherited class may override it to customize the error handling but the method should
|
||||
never return, otherwise the resulting document would probably be invalid.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>msg</code></dt>
|
||||
<dd>
|
||||
The error message.
|
||||
</dd>
|
||||
</dl>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
35
prints/doc/footer.htm
Executable file
35
prints/doc/footer.htm
Executable file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Footer</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Footer</h1>
|
||||
<code>Footer()</code>
|
||||
<h2>Description</h2>
|
||||
This method is used to render the page footer. It is automatically called by AddPage() and
|
||||
Close() and should not be called directly by the application. The implementation in FPDF is
|
||||
empty, so you have to subclass it and override the method if you want a specific processing.
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>class PDF extends FPDF
|
||||
{
|
||||
function Footer()
|
||||
{
|
||||
// Go to 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
// Select Arial italic 8
|
||||
$this->SetFont('Arial','I',8);
|
||||
// Print centered page number
|
||||
$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="header.htm">Header</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
57
prints/doc/fpdf.htm
Executable file
57
prints/doc/fpdf.htm
Executable file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>FPDF</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>FPDF</H2>
|
||||
<TT>FPDF([<B>string</B> orientation [, <B>string</B> unit [, <B>mixed</B> format]]])</TT>
|
||||
<H4 CLASS='st'>Version</H4>
|
||||
1.0
|
||||
<H4 CLASS='st'>Description</H4>
|
||||
This is the class constructor. It allows to set up the page format, the orientation and the
|
||||
measure unit used in all the methods (except for the font sizes).
|
||||
<H4 CLASS='st'>Parameters</H4>
|
||||
<TT><U>orientation</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
Default page orientation. Possible values are (case insensitive):
|
||||
<UL>
|
||||
<LI><TT>P</TT> or <TT>Portrait</TT>
|
||||
<LI><TT>L</TT> or <TT>Landscape</TT>
|
||||
</UL>
|
||||
Default value is <TT>P</TT>.
|
||||
</BLOCKQUOTE>
|
||||
<TT><U>unit</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
User measure unit. Possible values are:
|
||||
<UL>
|
||||
<LI><TT>pt</TT>: point
|
||||
<LI><TT>mm</TT>: millimeter
|
||||
<LI><TT>cm</TT>: centimeter
|
||||
<LI><TT>in</TT>: inch
|
||||
</UL>
|
||||
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
|
||||
is a very common unit in typography; font sizes are expressed in that unit.
|
||||
<BR>
|
||||
<BR>
|
||||
Default value is <TT>mm</TT>.
|
||||
</BLOCKQUOTE>
|
||||
<TT><U>format</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
The format used for pages. It can be either one of the following values (case insensitive):
|
||||
<UL>
|
||||
<LI><TT>A3</TT>
|
||||
<LI><TT>A4</TT>
|
||||
<LI><TT>A5</TT>
|
||||
<LI><TT>Letter</TT>
|
||||
<LI><TT>Legal</TT>
|
||||
</UL>
|
||||
or a custom format in the form of a two-element array containing the width and the height
|
||||
(expressed in the unit given by <TT>unit</TT>).
|
||||
</BLOCKQUOTE>
|
||||
<HR STYLE="margin-top:1.2em">
|
||||
<DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
|
||||
</BODY>
|
||||
</HTML>
|
18
prints/doc/getpageheight.htm
Executable file
18
prints/doc/getpageheight.htm
Executable file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>GetPageHeight</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GetPageHeight</h1>
|
||||
<code><b>float</b> GetPageHeight()</code>
|
||||
<h2>Description</h2>
|
||||
Returns the current page height.
|
||||
<h2>See also</h2>
|
||||
<a href="getpagewidth.htm">GetPageWidth</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
18
prints/doc/getpagewidth.htm
Executable file
18
prints/doc/getpagewidth.htm
Executable file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>GetPageWidth</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GetPageWidth</h1>
|
||||
<code><b>float</b> GetPageWidth()</code>
|
||||
<h2>Description</h2>
|
||||
Returns the current page width.
|
||||
<h2>See also</h2>
|
||||
<a href="getpageheight.htm">GetPageHeight</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
23
prints/doc/getstringwidth.htm
Executable file
23
prints/doc/getstringwidth.htm
Executable file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>GetStringWidth</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GetStringWidth</h1>
|
||||
<code><b>float</b> GetStringWidth(<b>string</b> s)</code>
|
||||
<h2>Description</h2>
|
||||
Returns the length of a string in user unit. A font must be selected.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>s</code></dt>
|
||||
<dd>
|
||||
The string whose length is to be computed.
|
||||
</dd>
|
||||
</dl>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
20
prints/doc/getx.htm
Executable file
20
prints/doc/getx.htm
Executable file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>GetX</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GetX</h1>
|
||||
<code><b>float</b> GetX()</code>
|
||||
<h2>Description</h2>
|
||||
Returns the abscissa of the current position.
|
||||
<h2>See also</h2>
|
||||
<a href="setx.htm">SetX</a>,
|
||||
<a href="gety.htm">GetY</a>,
|
||||
<a href="sety.htm">SetY</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
20
prints/doc/gety.htm
Executable file
20
prints/doc/gety.htm
Executable file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>GetY</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GetY</h1>
|
||||
<code><b>float</b> GetY()</code>
|
||||
<h2>Description</h2>
|
||||
Returns the ordinate of the current position.
|
||||
<h2>See also</h2>
|
||||
<a href="sety.htm">SetY</a>,
|
||||
<a href="getx.htm">GetX</a>,
|
||||
<a href="setx.htm">SetX</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
37
prints/doc/header.htm
Executable file
37
prints/doc/header.htm
Executable file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Header</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Header</h1>
|
||||
<code>Header()</code>
|
||||
<h2>Description</h2>
|
||||
This method is used to render the page header. It is automatically called by AddPage() and
|
||||
should not be called directly by the application. The implementation in FPDF is empty, so
|
||||
you have to subclass it and override the method if you want a specific processing.
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>class PDF extends FPDF
|
||||
{
|
||||
function Header()
|
||||
{
|
||||
// Select Arial bold 15
|
||||
$this->SetFont('Arial','B',15);
|
||||
// Move to the right
|
||||
$this->Cell(80);
|
||||
// Framed title
|
||||
$this->Cell(30,10,'Title',1,0,'C');
|
||||
// Line break
|
||||
$this->Ln(20);
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="footer.htm">Footer</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
99
prints/doc/image.htm
Executable file
99
prints/doc/image.htm
Executable file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Image</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Image</h1>
|
||||
<code>Image(<b>string</b> file [, <b>float</b> x [, <b>float</b> y [, <b>float</b> w [, <b>float</b> h [, <b>string</b> type [, <b>mixed</b> link]]]]]])</code>
|
||||
<h2>Description</h2>
|
||||
Puts an image. The size it will take on the page can be specified in different ways:
|
||||
<ul>
|
||||
<li>explicit width and height (expressed in user unit or dpi)</li>
|
||||
<li>one explicit dimension, the other being calculated automatically in order to keep the original proportions</li>
|
||||
<li>no explicit dimension, in which case the image is put at 96 dpi</li>
|
||||
</ul>
|
||||
Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
|
||||
<br>
|
||||
<br>
|
||||
For JPEGs, all flavors are allowed:
|
||||
<ul>
|
||||
<li>gray scales</li>
|
||||
<li>true colors (24 bits)</li>
|
||||
<li>CMYK (32 bits)</li>
|
||||
</ul>
|
||||
For PNGs, are allowed:
|
||||
<ul>
|
||||
<li>gray scales on at most 8 bits (256 levels)</li>
|
||||
<li>indexed colors</li>
|
||||
<li>true colors (24 bits)</li>
|
||||
</ul>
|
||||
For GIFs: in case of an animated GIF, only the first frame is displayed.<br>
|
||||
<br>
|
||||
Transparency is supported.<br>
|
||||
<br>
|
||||
The format can be specified explicitly or inferred from the file extension.<br>
|
||||
<br>
|
||||
It is possible to put a link on the image.<br>
|
||||
<br>
|
||||
Remark: if an image is used several times, only one copy is embedded in the file.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>file</code></dt>
|
||||
<dd>
|
||||
Path or URL of the image.
|
||||
</dd>
|
||||
<dt><code>x</code></dt>
|
||||
<dd>
|
||||
Abscissa of the upper-left corner. If not specified or equal to <code>null</code>, the current abscissa
|
||||
is used.
|
||||
</dd>
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
Ordinate of the upper-left corner. If not specified or equal to <code>null</code>, the current ordinate
|
||||
is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled)
|
||||
and, after the call, the current ordinate is moved to the bottom of the image.
|
||||
</dd>
|
||||
<dt><code>w</code></dt>
|
||||
<dd>
|
||||
Width of the image in the page. There are three cases:
|
||||
<ul>
|
||||
<li>If the value is positive, it represents the width in user unit</li>
|
||||
<li>If the value is negative, the absolute value represents the horizontal resolution in dpi</li>
|
||||
<li>If the value is not specified or equal to zero, it is automatically calculated</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
Height of the image in the page. There are three cases:
|
||||
<ul>
|
||||
<li>If the value is positive, it represents the height in user unit</li>
|
||||
<li>If the value is negative, the absolute value represents the vertical resolution in dpi</li>
|
||||
<li>If the value is not specified or equal to zero, it is automatically calculated</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>type</code></dt>
|
||||
<dd>
|
||||
Image format. Possible values are (case insensitive): <code>JPG</code>, <code>JPEG</code>, <code>PNG</code> and <code>GIF</code>.
|
||||
If not specified, the type is inferred from the file extension.
|
||||
</dd>
|
||||
<dt><code>link</code></dt>
|
||||
<dd>
|
||||
URL or identifier returned by AddLink().
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>// Insert a logo in the top-left corner at 300 dpi
|
||||
$pdf->Image('logo.png',10,10,-300);
|
||||
// Insert a dynamic image from a URL
|
||||
$pdf->Image('http://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World',60,30,90,0,'PNG');</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="addlink.htm">AddLink</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
59
prints/doc/index.htm
Executable file
59
prints/doc/index.htm
Executable file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>FPDF 1.81 Reference Manual</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>FPDF 1.81 Reference Manual</h1>
|
||||
<a href="__construct.htm">__construct</a> - constructor<br>
|
||||
<a href="acceptpagebreak.htm">AcceptPageBreak</a> - accept or not automatic page break<br>
|
||||
<a href="addfont.htm">AddFont</a> - add a new font<br>
|
||||
<a href="addlink.htm">AddLink</a> - create an internal link<br>
|
||||
<a href="addpage.htm">AddPage</a> - add a new page<br>
|
||||
<a href="aliasnbpages.htm">AliasNbPages</a> - define an alias for number of pages<br>
|
||||
<a href="cell.htm">Cell</a> - print a cell<br>
|
||||
<a href="close.htm">Close</a> - terminate the document<br>
|
||||
<a href="error.htm">Error</a> - fatal error<br>
|
||||
<a href="footer.htm">Footer</a> - page footer<br>
|
||||
<a href="getpageheight.htm">GetPageHeight</a> - get current page height<br>
|
||||
<a href="getpagewidth.htm">GetPageWidth</a> - get current page width<br>
|
||||
<a href="getstringwidth.htm">GetStringWidth</a> - compute string length<br>
|
||||
<a href="getx.htm">GetX</a> - get current x position<br>
|
||||
<a href="gety.htm">GetY</a> - get current y position<br>
|
||||
<a href="header.htm">Header</a> - page header<br>
|
||||
<a href="image.htm">Image</a> - output an image<br>
|
||||
<a href="line.htm">Line</a> - draw a line<br>
|
||||
<a href="link.htm">Link</a> - put a link<br>
|
||||
<a href="ln.htm">Ln</a> - line break<br>
|
||||
<a href="multicell.htm">MultiCell</a> - print text with line breaks<br>
|
||||
<a href="output.htm">Output</a> - save or send the document<br>
|
||||
<a href="pageno.htm">PageNo</a> - page number<br>
|
||||
<a href="rect.htm">Rect</a> - draw a rectangle<br>
|
||||
<a href="setauthor.htm">SetAuthor</a> - set the document author<br>
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a> - set the automatic page breaking mode<br>
|
||||
<a href="setcompression.htm">SetCompression</a> - turn compression on or off<br>
|
||||
<a href="setcreator.htm">SetCreator</a> - set document creator<br>
|
||||
<a href="setdisplaymode.htm">SetDisplayMode</a> - set display mode<br>
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a> - set drawing color<br>
|
||||
<a href="setfillcolor.htm">SetFillColor</a> - set filling color<br>
|
||||
<a href="setfont.htm">SetFont</a> - set font<br>
|
||||
<a href="setfontsize.htm">SetFontSize</a> - set font size<br>
|
||||
<a href="setkeywords.htm">SetKeywords</a> - associate keywords with document<br>
|
||||
<a href="setleftmargin.htm">SetLeftMargin</a> - set left margin<br>
|
||||
<a href="setlinewidth.htm">SetLineWidth</a> - set line width<br>
|
||||
<a href="setlink.htm">SetLink</a> - set internal link destination<br>
|
||||
<a href="setmargins.htm">SetMargins</a> - set margins<br>
|
||||
<a href="setrightmargin.htm">SetRightMargin</a> - set right margin<br>
|
||||
<a href="setsubject.htm">SetSubject</a> - set document subject<br>
|
||||
<a href="settextcolor.htm">SetTextColor</a> - set text color<br>
|
||||
<a href="settitle.htm">SetTitle</a> - set document title<br>
|
||||
<a href="settopmargin.htm">SetTopMargin</a> - set top margin<br>
|
||||
<a href="setx.htm">SetX</a> - set current x position<br>
|
||||
<a href="setxy.htm">SetXY</a> - set current x and y positions<br>
|
||||
<a href="sety.htm">SetY</a> - set current y position and optionally reset x<br>
|
||||
<a href="text.htm">Text</a> - print a string<br>
|
||||
<a href="write.htm">Write</a> - print flowing text<br>
|
||||
</body>
|
||||
</html>
|
38
prints/doc/line.htm
Executable file
38
prints/doc/line.htm
Executable file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Line</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Line</h1>
|
||||
<code>Line(<b>float</b> x1, <b>float</b> y1, <b>float</b> x2, <b>float</b> y2)</code>
|
||||
<h2>Description</h2>
|
||||
Draws a line between two points.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>x1</code></dt>
|
||||
<dd>
|
||||
Abscissa of first point.
|
||||
</dd>
|
||||
<dt><code>y1</code></dt>
|
||||
<dd>
|
||||
Ordinate of first point.
|
||||
</dd>
|
||||
<dt><code>x2</code></dt>
|
||||
<dd>
|
||||
Abscissa of second point.
|
||||
</dd>
|
||||
<dt><code>y2</code></dt>
|
||||
<dd>
|
||||
Ordinate of second point.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setlinewidth.htm">SetLineWidth</a>,
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
46
prints/doc/link.htm
Executable file
46
prints/doc/link.htm
Executable file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Link</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Link</h1>
|
||||
<code>Link(<b>float</b> x, <b>float</b> y, <b>float</b> w, <b>float</b> h, <b>mixed</b> link)</code>
|
||||
<h2>Description</h2>
|
||||
Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(),
|
||||
Write() or Image(), but this method can be useful for instance to define a clickable area inside
|
||||
an image.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>x</code></dt>
|
||||
<dd>
|
||||
Abscissa of the upper-left corner of the rectangle.
|
||||
</dd>
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
Ordinate of the upper-left corner of the rectangle.
|
||||
</dd>
|
||||
<dt><code>w</code></dt>
|
||||
<dd>
|
||||
Width of the rectangle.
|
||||
</dd>
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
Height of the rectangle.
|
||||
</dd>
|
||||
<dt><code>link</code></dt>
|
||||
<dd>
|
||||
URL or identifier returned by AddLink().
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="addlink.htm">AddLink</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="write.htm">Write</a>,
|
||||
<a href="image.htm">Image</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
28
prints/doc/ln.htm
Executable file
28
prints/doc/ln.htm
Executable file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Ln</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ln</h1>
|
||||
<code>Ln([<b>float</b> h])</code>
|
||||
<h2>Description</h2>
|
||||
Performs a line break. The current abscissa goes back to the left margin and the ordinate
|
||||
increases by the amount passed in parameter.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
The height of the break.
|
||||
<br>
|
||||
By default, the value equals the height of the last printed cell.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="cell.htm">Cell</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
76
prints/doc/multicell.htm
Executable file
76
prints/doc/multicell.htm
Executable file
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>MultiCell</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>MultiCell</h1>
|
||||
<code>MultiCell(<b>float</b> w, <b>float</b> h, <b>string</b> txt [, <b>mixed</b> border [, <b>string</b> align [, <b>boolean</b> fill]]])</code>
|
||||
<h2>Description</h2>
|
||||
This method allows printing text with line breaks. They can be automatic (as soon as the
|
||||
text reaches the right border of the cell) or explicit (via the \n character). As many cells
|
||||
as necessary are output, one below the other.
|
||||
<br>
|
||||
Text can be aligned, centered or justified. The cell block can be framed and the background
|
||||
painted.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>w</code></dt>
|
||||
<dd>
|
||||
Width of cells. If <code>0</code>, they extend up to the right margin of the page.
|
||||
</dd>
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
Height of cells.
|
||||
</dd>
|
||||
<dt><code>txt</code></dt>
|
||||
<dd>
|
||||
String to print.
|
||||
</dd>
|
||||
<dt><code>border</code></dt>
|
||||
<dd>
|
||||
Indicates if borders must be drawn around the cell block. The value can be either a number:
|
||||
<ul>
|
||||
<li><code>0</code>: no border</li>
|
||||
<li><code>1</code>: frame</li>
|
||||
</ul>
|
||||
or a string containing some or all of the following characters (in any order):
|
||||
<ul>
|
||||
<li><code>L</code>: left</li>
|
||||
<li><code>T</code>: top</li>
|
||||
<li><code>R</code>: right</li>
|
||||
<li><code>B</code>: bottom</li>
|
||||
</ul>
|
||||
Default value: <code>0</code>.
|
||||
</dd>
|
||||
<dt><code>align</code></dt>
|
||||
<dd>
|
||||
Sets the text alignment. Possible values are:
|
||||
<ul>
|
||||
<li><code>L</code>: left alignment</li>
|
||||
<li><code>C</code>: center</li>
|
||||
<li><code>R</code>: right alignment</li>
|
||||
<li><code>J</code>: justification (default value)</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>fill</code></dt>
|
||||
<dd>
|
||||
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setfont.htm">SetFont</a>,
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a>,
|
||||
<a href="setfillcolor.htm">SetFillColor</a>,
|
||||
<a href="settextcolor.htm">SetTextColor</a>,
|
||||
<a href="setlinewidth.htm">SetLineWidth</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="write.htm">Write</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
46
prints/doc/output.htm
Executable file
46
prints/doc/output.htm
Executable file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Output</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Output</h1>
|
||||
<code><b>string</b> Output([<b>string</b> dest [, <b>string</b> name [, <b>boolean</b> isUTF8]]])</code>
|
||||
<h2>Description</h2>
|
||||
Send the document to a given destination: browser, file or string. In the case of a browser, the
|
||||
PDF viewer may be used or a download may be forced.
|
||||
<br>
|
||||
The method first calls Close() if necessary to terminate the document.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>dest</code></dt>
|
||||
<dd>
|
||||
Destination where to send the document. It can be one of the following:
|
||||
<ul>
|
||||
<li><code>I</code>: send the file inline to the browser. The PDF viewer is used if available.</li>
|
||||
<li><code>D</code>: send to the browser and force a file download with the name given by <code>name</code>.</li>
|
||||
<li><code>F</code>: save to a local file with the name given by <code>name</code> (may include a path).</li>
|
||||
<li><code>S</code>: return the document as a string.</li>
|
||||
</ul>
|
||||
The default value is <code>I</code>.
|
||||
</dd>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>
|
||||
The name of the file. It is ignored in case of destination <code>S</code>.<br>
|
||||
The default value is <code>doc.pdf</code>.
|
||||
</dd>
|
||||
<dt><code>isUTF8</code></dt>
|
||||
<dd>
|
||||
Indicates if <code>name</code> is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).
|
||||
Only used for destinations <code>I</code> and <code>D</code>.<br>
|
||||
The default value is <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="close.htm">Close</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
18
prints/doc/pageno.htm
Executable file
18
prints/doc/pageno.htm
Executable file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>PageNo</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>PageNo</h1>
|
||||
<code><b>int</b> PageNo()</code>
|
||||
<h2>Description</h2>
|
||||
Returns the current page number.
|
||||
<h2>See also</h2>
|
||||
<a href="aliasnbpages.htm">AliasNbPages</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
48
prints/doc/rect.htm
Executable file
48
prints/doc/rect.htm
Executable file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Rect</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rect</h1>
|
||||
<code>Rect(<b>float</b> x, <b>float</b> y, <b>float</b> w, <b>float</b> h [, <b>string</b> style])</code>
|
||||
<h2>Description</h2>
|
||||
Outputs a rectangle. It can be drawn (border only), filled (with no border) or both.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>x</code></dt>
|
||||
<dd>
|
||||
Abscissa of upper-left corner.
|
||||
</dd>
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
Ordinate of upper-left corner.
|
||||
</dd>
|
||||
<dt><code>w</code></dt>
|
||||
<dd>
|
||||
Width.
|
||||
</dd>
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
Height.
|
||||
</dd>
|
||||
<dt><code>style</code></dt>
|
||||
<dd>
|
||||
Style of rendering. Possible values are:
|
||||
<ul>
|
||||
<li><code>D</code> or empty string: draw. This is the default value.</li>
|
||||
<li><code>F</code>: fill</li>
|
||||
<li><code>DF</code> or <code>FD</code>: draw and fill</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setlinewidth.htm">SetLineWidth</a>,
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a>,
|
||||
<a href="setfillcolor.htm">SetFillColor</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
33
prints/doc/setauthor.htm
Executable file
33
prints/doc/setauthor.htm
Executable file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetAuthor</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetAuthor</h1>
|
||||
<code>SetAuthor(<b>string</b> author [, <b>boolean</b> isUTF8])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the author of the document.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>author</code></dt>
|
||||
<dd>
|
||||
The name of the author.
|
||||
</dd>
|
||||
<dt><code>isUTF8</code></dt>
|
||||
<dd>
|
||||
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setcreator.htm">SetCreator</a>,
|
||||
<a href="setkeywords.htm">SetKeywords</a>,
|
||||
<a href="setsubject.htm">SetSubject</a>,
|
||||
<a href="settitle.htm">SetTitle</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
33
prints/doc/setautopagebreak.htm
Executable file
33
prints/doc/setautopagebreak.htm
Executable file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetAutoPageBreak</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetAutoPageBreak</h1>
|
||||
<code>SetAutoPageBreak(<b>boolean</b> auto [, <b>float</b> margin])</code>
|
||||
<h2>Description</h2>
|
||||
Enables or disables the automatic page breaking mode. When enabling, the second parameter is
|
||||
the distance from the bottom of the page that defines the triggering limit. By default, the
|
||||
mode is on and the margin is 2 cm.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>auto</code></dt>
|
||||
<dd>
|
||||
Boolean indicating if mode should be on or off.
|
||||
</dd>
|
||||
<dt><code>margin</code></dt>
|
||||
<dd>
|
||||
Distance from the bottom of the page.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>,
|
||||
<a href="acceptpagebreak.htm">AcceptPageBreak</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
31
prints/doc/setcompression.htm
Executable file
31
prints/doc/setcompression.htm
Executable file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetCompression</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetCompression</h1>
|
||||
<code>SetCompression(<b>boolean</b> compress)</code>
|
||||
<h2>Description</h2>
|
||||
Activates or deactivates page compression. When activated, the internal representation of
|
||||
each page is compressed, which leads to a compression ratio of about 2 for the resulting
|
||||
document.
|
||||
<br>
|
||||
Compression is on by default.
|
||||
<br>
|
||||
<br>
|
||||
<strong>Note:</strong> the Zlib extension is required for this feature. If not present, compression
|
||||
will be turned off.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>compress</code></dt>
|
||||
<dd>
|
||||
Boolean indicating if compression must be enabled.
|
||||
</dd>
|
||||
</dl>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
34
prints/doc/setcreator.htm
Executable file
34
prints/doc/setcreator.htm
Executable file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetCreator</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetCreator</h1>
|
||||
<code>SetCreator(<b>string</b> creator [, <b>boolean</b> isUTF8])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the creator of the document. This is typically the name of the application that
|
||||
generates the PDF.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>creator</code></dt>
|
||||
<dd>
|
||||
The name of the creator.
|
||||
</dd>
|
||||
<dt><code>isUTF8</code></dt>
|
||||
<dd>
|
||||
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setauthor.htm">SetAuthor</a>,
|
||||
<a href="setkeywords.htm">SetKeywords</a>,
|
||||
<a href="setsubject.htm">SetSubject</a>,
|
||||
<a href="settitle.htm">SetTitle</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
45
prints/doc/setdisplaymode.htm
Executable file
45
prints/doc/setdisplaymode.htm
Executable file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetDisplayMode</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetDisplayMode</h1>
|
||||
<code>SetDisplayMode(<b>mixed</b> zoom [, <b>string</b> layout])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be
|
||||
displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a
|
||||
specific zooming factor or use viewer default (configured in the Preferences menu of Adobe Reader).
|
||||
The page layout can be specified too: single at once, continuous display, two columns or viewer
|
||||
default.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>zoom</code></dt>
|
||||
<dd>
|
||||
The zoom to use. It can be one of the following string values:
|
||||
<ul>
|
||||
<li><code>fullpage</code>: displays the entire page on screen</li>
|
||||
<li><code>fullwidth</code>: uses maximum width of window</li>
|
||||
<li><code>real</code>: uses real size (equivalent to 100% zoom)</li>
|
||||
<li><code>default</code>: uses viewer default mode</li>
|
||||
</ul>
|
||||
or a number indicating the zooming factor to use.
|
||||
</dd>
|
||||
<dt><code>layout</code></dt>
|
||||
<dd>
|
||||
The page layout. Possible values are:
|
||||
<ul>
|
||||
<li><code>single</code>: displays one page at once</li>
|
||||
<li><code>continuous</code>: displays pages continuously</li>
|
||||
<li><code>two</code>: displays two pages on two columns</li>
|
||||
<li><code>default</code>: uses viewer default mode</li>
|
||||
</ul>
|
||||
Default value is <code>default</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
41
prints/doc/setdrawcolor.htm
Executable file
41
prints/doc/setdrawcolor.htm
Executable file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetDrawColor</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetDrawColor</h1>
|
||||
<code>SetDrawColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the color used for all drawing operations (lines, rectangles and cell borders). It
|
||||
can be expressed in RGB components or gray scale. The method can be called before the first
|
||||
page is created and the value is retained from page to page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>r</code></dt>
|
||||
<dd>
|
||||
If <code>g</code> et <code>b</code> are given, red component; if not, indicates the gray level.
|
||||
Value between 0 and 255.
|
||||
</dd>
|
||||
<dt><code>g</code></dt>
|
||||
<dd>
|
||||
Green component (between 0 and 255).
|
||||
</dd>
|
||||
<dt><code>b</code></dt>
|
||||
<dd>
|
||||
Blue component (between 0 and 255).
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setfillcolor.htm">SetFillColor</a>,
|
||||
<a href="settextcolor.htm">SetTextColor</a>,
|
||||
<a href="line.htm">Line</a>,
|
||||
<a href="rect.htm">Rect</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
40
prints/doc/setfillcolor.htm
Executable file
40
prints/doc/setfillcolor.htm
Executable file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetFillColor</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetFillColor</h1>
|
||||
<code>SetFillColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the color used for all filling operations (filled rectangles and cell backgrounds).
|
||||
It can be expressed in RGB components or gray scale. The method can be called before the first
|
||||
page is created and the value is retained from page to page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>r</code></dt>
|
||||
<dd>
|
||||
If <code>g</code> and <code>b</code> are given, red component; if not, indicates the gray level.
|
||||
Value between 0 and 255.
|
||||
</dd>
|
||||
<dt><code>g</code></dt>
|
||||
<dd>
|
||||
Green component (between 0 and 255).
|
||||
</dd>
|
||||
<dt><code>b</code></dt>
|
||||
<dd>
|
||||
Blue component (between 0 and 255).
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a>,
|
||||
<a href="settextcolor.htm">SetTextColor</a>,
|
||||
<a href="rect.htm">Rect</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
92
prints/doc/setfont.htm
Executable file
92
prints/doc/setfont.htm
Executable file
@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetFont</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetFont</h1>
|
||||
<code>SetFont(<b>string</b> family [, <b>string</b> style [, <b>float</b> size]])</code>
|
||||
<h2>Description</h2>
|
||||
Sets the font used to print character strings. It is mandatory to call this method
|
||||
at least once before printing text or the resulting document would not be valid.
|
||||
<br>
|
||||
The font can be either a standard one or a font added via the AddFont() method. Standard fonts
|
||||
use the Windows encoding cp1252 (Western Europe).
|
||||
<br>
|
||||
The method can be called before the first page is created and the font is kept from page
|
||||
to page.
|
||||
<br>
|
||||
If you just wish to change the current font size, it is simpler to call SetFontSize().
|
||||
<br>
|
||||
<br>
|
||||
<strong>Note:</strong> the font definition files must be accessible. They are searched successively in:
|
||||
<ul>
|
||||
<li>The directory defined by the <code>FPDF_FONTPATH</code> constant (if this constant is defined)</li>
|
||||
<li>The <code>font</code> directory located in the same directory as <code>fpdf.php</code> (if it exists)</li>
|
||||
<li>The directories accessible through <code>include()</code></li>
|
||||
</ul>
|
||||
Example using <code>FPDF_FONTPATH</code>:
|
||||
<div class="doc-source">
|
||||
<pre><code>define('FPDF_FONTPATH','/home/www/font');
|
||||
require('fpdf.php');</code></pre>
|
||||
</div>
|
||||
If the file corresponding to the requested font is not found, the error "Could not include font
|
||||
definition file" is raised.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>family</code></dt>
|
||||
<dd>
|
||||
Family font. It can be either a name defined by AddFont() or one of the standard families (case
|
||||
insensitive):
|
||||
<ul>
|
||||
<li><code>Courier</code> (fixed-width)</li>
|
||||
<li><code>Helvetica</code> or <code>Arial</code> (synonymous; sans serif)</li>
|
||||
<li><code>Times</code> (serif)</li>
|
||||
<li><code>Symbol</code> (symbolic)</li>
|
||||
<li><code>ZapfDingbats</code> (symbolic)</li>
|
||||
</ul>
|
||||
It is also possible to pass an empty string. In that case, the current family is kept.
|
||||
</dd>
|
||||
<dt><code>style</code></dt>
|
||||
<dd>
|
||||
Font style. Possible values are (case insensitive):
|
||||
<ul>
|
||||
<li>empty string: regular</li>
|
||||
<li><code>B</code>: bold</li>
|
||||
<li><code>I</code>: italic</li>
|
||||
<li><code>U</code>: underline</li>
|
||||
</ul>
|
||||
or any combination. The default value is regular.
|
||||
Bold and italic styles do not apply to <code>Symbol</code> and <code>ZapfDingbats</code>.
|
||||
</dd>
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
Font size in points.
|
||||
<br>
|
||||
The default value is the current size. If no size has been specified since the beginning of
|
||||
the document, the value taken is 12.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>// Times regular 12
|
||||
$pdf->SetFont('Times');
|
||||
// Arial bold 14
|
||||
$pdf->SetFont('Arial','B',14);
|
||||
// Removes bold
|
||||
$pdf->SetFont('');
|
||||
// Times bold, italic and underlined 14
|
||||
$pdf->SetFont('Times','BIU');</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="addfont.htm">AddFont</a>,
|
||||
<a href="setfontsize.htm">SetFontSize</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>,
|
||||
<a href="write.htm">Write</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
25
prints/doc/setfontsize.htm
Executable file
25
prints/doc/setfontsize.htm
Executable file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetFontSize</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetFontSize</h1>
|
||||
<code>SetFontSize(<b>float</b> size)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the size of the current font.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
The size (in points).
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setfont.htm">SetFont</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
33
prints/doc/setkeywords.htm
Executable file
33
prints/doc/setkeywords.htm
Executable file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetKeywords</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetKeywords</h1>
|
||||
<code>SetKeywords(<b>string</b> keywords [, <b>boolean</b> isUTF8])</code>
|
||||
<h2>Description</h2>
|
||||
Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>keywords</code></dt>
|
||||
<dd>
|
||||
The list of keywords.
|
||||
</dd>
|
||||
<dt><code>isUTF8</code></dt>
|
||||
<dd>
|
||||
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setauthor.htm">SetAuthor</a>,
|
||||
<a href="setcreator.htm">SetCreator</a>,
|
||||
<a href="setsubject.htm">SetSubject</a>,
|
||||
<a href="settitle.htm">SetTitle</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
30
prints/doc/setleftmargin.htm
Executable file
30
prints/doc/setleftmargin.htm
Executable file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetLeftMargin</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetLeftMargin</h1>
|
||||
<code>SetLeftMargin(<b>float</b> margin)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the left margin. The method can be called before creating the first page.
|
||||
<br>
|
||||
If the current abscissa gets out of page, it is brought back to the margin.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>margin</code></dt>
|
||||
<dd>
|
||||
The margin.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="settopmargin.htm">SetTopMargin</a>,
|
||||
<a href="setrightmargin.htm">SetRightMargin</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>,
|
||||
<a href="setmargins.htm">SetMargins</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
29
prints/doc/setlinewidth.htm
Executable file
29
prints/doc/setlinewidth.htm
Executable file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetLineWidth</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetLineWidth</h1>
|
||||
<code>SetLineWidth(<b>float</b> width)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the line width. By default, the value equals 0.2 mm. The method can be called before
|
||||
the first page is created and the value is retained from page to page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>width</code></dt>
|
||||
<dd>
|
||||
The width.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="line.htm">Line</a>,
|
||||
<a href="rect.htm">Rect</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
34
prints/doc/setlink.htm
Executable file
34
prints/doc/setlink.htm
Executable file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetLink</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetLink</h1>
|
||||
<code>SetLink(<b>int</b> link [, <b>float</b> y [, <b>int</b> page]])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the page and position a link points to.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>link</code></dt>
|
||||
<dd>
|
||||
The link identifier returned by AddLink().
|
||||
</dd>
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
Ordinate of target position; <code>-1</code> indicates the current position.
|
||||
The default value is <code>0</code> (top of page).
|
||||
</dd>
|
||||
<dt><code>page</code></dt>
|
||||
<dd>
|
||||
Number of target page; <code>-1</code> indicates the current page. This is the default value.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="addlink.htm">AddLink</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
37
prints/doc/setmargins.htm
Executable file
37
prints/doc/setmargins.htm
Executable file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetMargins</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetMargins</h1>
|
||||
<code>SetMargins(<b>float</b> left, <b>float</b> top [, <b>float</b> right])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change
|
||||
them.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>left</code></dt>
|
||||
<dd>
|
||||
Left margin.
|
||||
</dd>
|
||||
<dt><code>top</code></dt>
|
||||
<dd>
|
||||
Top margin.
|
||||
</dd>
|
||||
<dt><code>right</code></dt>
|
||||
<dd>
|
||||
Right margin. Default value is the left one.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setleftmargin.htm">SetLeftMargin</a>,
|
||||
<a href="settopmargin.htm">SetTopMargin</a>,
|
||||
<a href="setrightmargin.htm">SetRightMargin</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
28
prints/doc/setrightmargin.htm
Executable file
28
prints/doc/setrightmargin.htm
Executable file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetRightMargin</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetRightMargin</h1>
|
||||
<code>SetRightMargin(<b>float</b> margin)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the right margin. The method can be called before creating the first page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>margin</code></dt>
|
||||
<dd>
|
||||
The margin.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setleftmargin.htm">SetLeftMargin</a>,
|
||||
<a href="settopmargin.htm">SetTopMargin</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>,
|
||||
<a href="setmargins.htm">SetMargins</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
33
prints/doc/setsubject.htm
Executable file
33
prints/doc/setsubject.htm
Executable file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetSubject</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetSubject</h1>
|
||||
<code>SetSubject(<b>string</b> subject [, <b>boolean</b> isUTF8])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the subject of the document.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>subject</code></dt>
|
||||
<dd>
|
||||
The subject.
|
||||
</dd>
|
||||
<dt><code>isUTF8</code></dt>
|
||||
<dd>
|
||||
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setauthor.htm">SetAuthor</a>,
|
||||
<a href="setcreator.htm">SetCreator</a>,
|
||||
<a href="setkeywords.htm">SetKeywords</a>,
|
||||
<a href="settitle.htm">SetTitle</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
40
prints/doc/settextcolor.htm
Executable file
40
prints/doc/settextcolor.htm
Executable file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetTextColor</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetTextColor</h1>
|
||||
<code>SetTextColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the color used for text. It can be expressed in RGB components or gray scale. The
|
||||
method can be called before the first page is created and the value is retained from page to
|
||||
page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>r</code></dt>
|
||||
<dd>
|
||||
If <code>g</code> et <code>b</code> are given, red component; if not, indicates the gray level.
|
||||
Value between 0 and 255.
|
||||
</dd>
|
||||
<dt><code>g</code></dt>
|
||||
<dd>
|
||||
Green component (between 0 and 255).
|
||||
</dd>
|
||||
<dt><code>b</code></dt>
|
||||
<dd>
|
||||
Blue component (between 0 and 255).
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setdrawcolor.htm">SetDrawColor</a>,
|
||||
<a href="setfillcolor.htm">SetFillColor</a>,
|
||||
<a href="text.htm">Text</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
33
prints/doc/settitle.htm
Executable file
33
prints/doc/settitle.htm
Executable file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetTitle</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetTitle</h1>
|
||||
<code>SetTitle(<b>string</b> title [, <b>boolean</b> isUTF8])</code>
|
||||
<h2>Description</h2>
|
||||
Defines the title of the document.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>title</code></dt>
|
||||
<dd>
|
||||
The title.
|
||||
</dd>
|
||||
<dt><code>isUTF8</code></dt>
|
||||
<dd>
|
||||
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
|
||||
Default value: <code>false</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setauthor.htm">SetAuthor</a>,
|
||||
<a href="setcreator.htm">SetCreator</a>,
|
||||
<a href="setkeywords.htm">SetKeywords</a>,
|
||||
<a href="setsubject.htm">SetSubject</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
28
prints/doc/settopmargin.htm
Executable file
28
prints/doc/settopmargin.htm
Executable file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetTopMargin</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetTopMargin</h1>
|
||||
<code>SetTopMargin(<b>float</b> margin)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the top margin. The method can be called before creating the first page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>margin</code></dt>
|
||||
<dd>
|
||||
The margin.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setleftmargin.htm">SetLeftMargin</a>,
|
||||
<a href="setrightmargin.htm">SetRightMargin</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>,
|
||||
<a href="setmargins.htm">SetMargins</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
29
prints/doc/setx.htm
Executable file
29
prints/doc/setx.htm
Executable file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetX</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetX</h1>
|
||||
<code>SetX(<b>float</b> x)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the abscissa of the current position. If the passed value is negative, it is relative
|
||||
to the right of the page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>x</code></dt>
|
||||
<dd>
|
||||
The value of the abscissa.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="getx.htm">GetX</a>,
|
||||
<a href="gety.htm">GetY</a>,
|
||||
<a href="sety.htm">SetY</a>,
|
||||
<a href="setxy.htm">SetXY</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
31
prints/doc/setxy.htm
Executable file
31
prints/doc/setxy.htm
Executable file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetXY</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetXY</h1>
|
||||
<code>SetXY(<b>float</b> x, <b>float</b> y)</code>
|
||||
<h2>Description</h2>
|
||||
Defines the abscissa and ordinate of the current position. If the passed values are negative,
|
||||
they are relative respectively to the right and bottom of the page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>x</code></dt>
|
||||
<dd>
|
||||
The value of the abscissa.
|
||||
</dd>
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
The value of the ordinate.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setx.htm">SetX</a>,
|
||||
<a href="sety.htm">SetY</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
33
prints/doc/sety.htm
Executable file
33
prints/doc/sety.htm
Executable file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>SetY</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>SetY</h1>
|
||||
<code>SetY(<b>float</b> y [, <b>boolean</b> resetX])</code>
|
||||
<h2>Description</h2>
|
||||
Sets the ordinate and optionally moves the current abscissa back to the left margin. If the value
|
||||
is negative, it is relative to the bottom of the page.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
The value of the ordinate.
|
||||
</dd>
|
||||
<dt><code>resetX</code></dt>
|
||||
<dd>
|
||||
Whether to reset the abscissa. Default value: <code>true</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="getx.htm">GetX</a>,
|
||||
<a href="gety.htm">GetY</a>,
|
||||
<a href="setx.htm">SetX</a>,
|
||||
<a href="setxy.htm">SetXY</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
39
prints/doc/text.htm
Executable file
39
prints/doc/text.htm
Executable file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Text</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Text</h1>
|
||||
<code>Text(<b>float</b> x, <b>float</b> y, <b>string</b> txt)</code>
|
||||
<h2>Description</h2>
|
||||
Prints a character string. The origin is on the left of the first character, on the baseline.
|
||||
This method allows to place a string precisely on the page, but it is usually easier to use
|
||||
Cell(), MultiCell() or Write() which are the standard methods to print text.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>x</code></dt>
|
||||
<dd>
|
||||
Abscissa of the origin.
|
||||
</dd>
|
||||
<dt><code>y</code></dt>
|
||||
<dd>
|
||||
Ordinate of the origin.
|
||||
</dd>
|
||||
<dt><code>txt</code></dt>
|
||||
<dd>
|
||||
String to print.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>See also</h2>
|
||||
<a href="setfont.htm">SetFont</a>,
|
||||
<a href="settextcolor.htm">SetTextColor</a>,
|
||||
<a href="cell.htm">Cell</a>,
|
||||
<a href="multicell.htm">MultiCell</a>,
|
||||
<a href="write.htm">Write</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
51
prints/doc/write.htm
Executable file
51
prints/doc/write.htm
Executable file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Write</title>
|
||||
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Write</h1>
|
||||
<code>Write(<b>float</b> h, <b>string</b> txt [, <b>mixed</b> link])</code>
|
||||
<h2>Description</h2>
|
||||
This method prints text from the current position. When the right margin is reached (or the \n
|
||||
character is met) a line break occurs and text continues from the left margin. Upon method exit,
|
||||
the current position is left just at the end of the text.
|
||||
<br>
|
||||
It is possible to put a link on the text.
|
||||
<h2>Parameters</h2>
|
||||
<dl class="param">
|
||||
<dt><code>h</code></dt>
|
||||
<dd>
|
||||
Line height.
|
||||
</dd>
|
||||
<dt><code>txt</code></dt>
|
||||
<dd>
|
||||
String to print.
|
||||
</dd>
|
||||
<dt><code>link</code></dt>
|
||||
<dd>
|
||||
URL or identifier returned by AddLink().
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Example</h2>
|
||||
<div class="doc-source">
|
||||
<pre><code>// Begin with regular font
|
||||
$pdf->SetFont('Arial','',14);
|
||||
$pdf->Write(5,'Visit ');
|
||||
// Then put a blue underlined link
|
||||
$pdf->SetTextColor(0,0,255);
|
||||
$pdf->SetFont('','U');
|
||||
$pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');</code></pre>
|
||||
</div>
|
||||
<h2>See also</h2>
|
||||
<a href="setfont.htm">SetFont</a>,
|
||||
<a href="settextcolor.htm">SetTextColor</a>,
|
||||
<a href="addlink.htm">AddLink</a>,
|
||||
<a href="multicell.htm">MultiCell</a>,
|
||||
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
|
||||
<hr style="margin-top:1.5em">
|
||||
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
||||
</body>
|
||||
</html>
|
56
prints/example1.inc
Executable file
56
prints/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/example1_def.inc
Executable file
45
prints/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/example2.inc
Executable file
145
prints/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/example2_def.inc
Executable file
45
prints/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
|
||||
*****************************************************/
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user