forked from science-ation/science-ation
- Commit all of TCPDF for now
- A working bare-bones letter generator. Not done (no variable substitutions yet), but it does work.
This commit is contained in:
parent
b2e7797a24
commit
345729523e
@ -428,7 +428,7 @@ switch($_GET['action']){
|
||||
echo "<input type=\"button\" onclick=\"return opensendemaildialog()\" value=\"".i18n("Send as email")."\" />";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<td style=\"text-align: center;\"><input type=\"button\" onclick=\"return opensendmaildialog()\" value=\"".i18n("General PDF for mailing")."\" /></td>\n";
|
||||
echo "<td style=\"text-align: center;\"><input type=\"button\" onclick=\"return opensendmaildialog($campaign_id,'$key')\" value=\"".i18n("Generate PDF for mailing")."\" /></td>\n";
|
||||
echo "<td style=\"text-align: center;\"><input type=\"button\" onclick=\"return opensendlabelsdialog(6)\" value=\"".i18n("Generate mailing labels")."\" /></td>\n";
|
||||
echo "</tr></table>\n";
|
||||
echo "</td></tr>\n";
|
||||
@ -717,6 +717,12 @@ function opensendlabelsdialog(reports_id) {
|
||||
});
|
||||
}
|
||||
|
||||
function opensendmaildialog(fcid,key) {
|
||||
var dlargs = "fundraising_campaigns_id="+fcid+"&key="+key;
|
||||
var dlurl = "<?=$config['SFIABDIRECTORY']?>/admin/reports_appeal_letters.php?"+dlargs;
|
||||
$('#content').attr('src',dlurl);
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
105
admin/reports_appeal_letters.php
Normal file
105
admin/reports_appeal_letters.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?
|
||||
/*
|
||||
This file is part of the 'Science Fair In A Box' project
|
||||
SFIAB Website: http://www.sfiab.ca
|
||||
|
||||
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||
Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||
|
||||
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, version 2.
|
||||
|
||||
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; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
require_once('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
|
||||
require_once('../tcpdf/tcpdf_sfiab_config.php');
|
||||
require_once('../tcpdf/tcpdf.php');
|
||||
|
||||
$fcid = intval($_GET['fundraising_campaigns_id']);
|
||||
$key = mysql_real_escape_string($_GET['key']);
|
||||
|
||||
/* Start an output PDF */
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator('SFIAB');
|
||||
$pdf->SetAuthor('SFIAB');
|
||||
$pdf->SetTitle($config['fairname']);
|
||||
$pdf->SetSubject('Fundraising Appeal Letters');
|
||||
$pdf->SetKeywords('');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
//$pdf->setLanguageArray($l);
|
||||
|
||||
/* Load the users */
|
||||
$users = array();
|
||||
$q = mysql_query("SELECT * FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id='$fcid'");
|
||||
while($l = mysql_fetch_assoc($q)) {
|
||||
$uid = $l['users_uid'];
|
||||
$users[$uid] = user_load_by_uid($uid);
|
||||
}
|
||||
|
||||
/* Grab all the emails */
|
||||
$q = mysql_query("SELECT * FROM emails WHERE fundraising_campaigns_id='$fcid' AND val='$key'");
|
||||
|
||||
while($e = mysql_fetch_assoc($q)) {
|
||||
|
||||
foreach($users as $uid=>&$u) {
|
||||
/* FIXME: do substitutions */
|
||||
$subject = $e['subject'];
|
||||
$body = $e['bodyhtml'];
|
||||
/* these dont' need substitutions */
|
||||
$to = $u['name'];
|
||||
$date = date("F j, Y");
|
||||
|
||||
$html = "<table><tr><td align=\"right\" width=\"25\%\"><b>Attn: </b></td><td>$to</td></tr>
|
||||
<tr><td align=\"right\" width=\"25\%\"><b>Subject: </b></td><td>$subject</td></tr>
|
||||
<tr><td align=\"right\" width=\"25\%\"><b>Date: </b></td><td>$date</td></tr>
|
||||
</table>
|
||||
<hr />";
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->writeHTML($html);
|
||||
$pdf->writeHTML($body);
|
||||
$pdf->lastPage();
|
||||
}
|
||||
}
|
||||
$pdf->Output('report.pdf','I');
|
||||
|
||||
?>
|
126
tcpdf/2dbarcodes.php
Normal file
126
tcpdf/2dbarcodes.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : 2dbarcodes.php
|
||||
// Begin : 2009-04-07
|
||||
// Last Update : 2009-08-17
|
||||
// Version : 1.0.000
|
||||
// License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2008-2009 Nicola Asuni - Tecnick.com S.r.l.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// See LICENSE.TXT file for more information.
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Description : PHP class to creates array representations for
|
||||
// 2D barcodes to be used with TCPDF.
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com S.r.l.
|
||||
// Via della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* PHP class to creates array representations for 2D barcodes to be used with TCPDF.
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract Functions for generating string representation of 2D barcodes.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2008-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @version 1.0.000
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
|
||||
* @name TCPDFBarcode
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 1.0.000
|
||||
* @author Nicola Asuni
|
||||
* @link http://www.tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
*/
|
||||
class TCPDF2DBarcode {
|
||||
|
||||
/**
|
||||
* @var array representation of barcode.
|
||||
* @access protected
|
||||
*/
|
||||
protected $barcode_array;
|
||||
|
||||
/**
|
||||
* This is the class constructor.
|
||||
* Return an array representations for 2D barcodes:<ul>
|
||||
* <li>$arrcode['code'] code to be printed on text label</li>
|
||||
* <li>$arrcode['num_rows'] required number of rows</li>
|
||||
* <li>$arrcode['num_cols'] required number of columns</li>
|
||||
* <li>$arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)</li></ul>
|
||||
* @param string $code code to print
|
||||
* @param string $type type of barcode: <ul><li>TEST</li><li>...TO BE IMPLEMENTED</li></ul>
|
||||
*/
|
||||
public function __construct($code, $type) {
|
||||
$this->setBarcode($code, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array representations of barcode.
|
||||
* @return array
|
||||
*/
|
||||
public function getBarcodeArray() {
|
||||
return $this->barcode_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the barcode.
|
||||
* @param string $code code to print
|
||||
* @param string $type type of barcode: <ul><li>TEST</li><li>...TO BE IMPLEMENTED</li></ul>
|
||||
* @return array
|
||||
*/
|
||||
public function setBarcode($code, $type) {
|
||||
$mode = explode(',', $type);
|
||||
switch (strtoupper($mode[0])) {
|
||||
case 'TEST': { // TEST MODE
|
||||
$this->barcode_array['num_rows'] = 5;
|
||||
$this->barcode_array['num_cols'] = 15;
|
||||
$this->barcode_array['bcode'] = array(
|
||||
array(1,1,1,0,1,1,1,0,1,1,1,0,1,1,1),
|
||||
array(0,1,0,0,1,0,0,0,1,0,0,0,0,1,0),
|
||||
array(0,1,0,0,1,1,0,0,1,1,1,0,0,1,0),
|
||||
array(0,1,0,0,1,0,0,0,0,0,1,0,0,1,0),
|
||||
array(0,1,0,0,1,1,1,0,1,1,1,0,0,1,0)
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
// ... Add here real 2D barcodes ...
|
||||
|
||||
default: {
|
||||
$this->barcode_array = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of class
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
1141
tcpdf/CHANGELOG.TXT
Executable file
1141
tcpdf/CHANGELOG.TXT
Executable file
File diff suppressed because it is too large
Load Diff
504
tcpdf/LICENSE.TXT
Executable file
504
tcpdf/LICENSE.TXT
Executable file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY 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
|
||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
87
tcpdf/README.TXT
Executable file
87
tcpdf/README.TXT
Executable file
@ -0,0 +1,87 @@
|
||||
TCPDF - README
|
||||
============================================================
|
||||
|
||||
IF YOU'D LIKE TO SUPPORT TCPDF, PLEASE CONSIDER MAKING A
|
||||
DONATION:
|
||||
http://sourceforge.net/donate/index.php?group_id=128076
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 4.8.009
|
||||
Release date: 2009-09-30
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2001-2009:
|
||||
Nicola Asuni
|
||||
Tecnick.com s.r.l.
|
||||
Via Della Pace, 11
|
||||
09044 Quartucciu (CA)
|
||||
ITALY
|
||||
www.tecnick.com
|
||||
|
||||
URLs:
|
||||
http://www.tcpdf.org
|
||||
http://www.sourceforge.net/projects/tcpdf
|
||||
|
||||
Description:
|
||||
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
|
||||
TCPDF has been originally derived from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org).
|
||||
|
||||
Main Features:
|
||||
// * no external libraries are required for the basic functions;
|
||||
// * supports all ISO page formats;
|
||||
// * supports custom page formats, margins and units of measure;
|
||||
// * supports UTF-8 Unicode and Right-To-Left languages;
|
||||
// * supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
|
||||
// * supports document encryption;
|
||||
// * includes methods to publish some XHTML code, including forms;
|
||||
// * includes graphic (geometric) and transformation methods;
|
||||
// * includes Javascript and Forms support;
|
||||
// * includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS;
|
||||
// * includes methods to set Bookmarks and print a Table of Content;
|
||||
// * includes methods to move and delete pages;
|
||||
// * includes methods for automatic page header and footer management;
|
||||
// * supports automatic page break;
|
||||
// * supports automatic page numbering and page groups;
|
||||
// * supports automatic line break and text justification;
|
||||
// * supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
|
||||
// * supports stroke and clipping mode for text;
|
||||
// * supports clipping masks;
|
||||
// * supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||
// * supports several annotations, including links, text and file attachments;
|
||||
// * supports page compression (requires zlib extension);
|
||||
// * supports text hyphenation.
|
||||
// * supports transactions to UNDO commands.
|
||||
// * supports signature certifications.
|
||||
|
||||
Installation (full instructions on http://www.tcpdf.org):
|
||||
1. copy the folder on your Web server
|
||||
2. set your installation path and other parameters on the config/tcpdf_config.php
|
||||
3. call the examples/example_001.php page with your browser to see an example
|
||||
|
||||
Source Code Documentation:
|
||||
doc/index.html
|
||||
|
||||
For Additional Documentation:
|
||||
http://www.tcpdf.org
|
||||
|
||||
License
|
||||
Copyright (C) 2002-2009 Nicola Asuni - Tecnick.com S.r.l.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
See LICENSE.TXT file for more information.
|
||||
|
||||
============================================================
|
1978
tcpdf/barcodes.php
Normal file
1978
tcpdf/barcodes.php
Normal file
File diff suppressed because it is too large
Load Diff
10
tcpdf/cache/chapter_demo_1.txt
vendored
Executable file
10
tcpdf/cache/chapter_demo_1.txt
vendored
Executable file
@ -0,0 +1,10 @@
|
||||
The year 1866 was marked by a bizarre development, an unexplained and downright inexplicable phenomenon that surely no one has forgotten. Without getting into those rumors that upset civilians in the seaports and deranged the public mind even far inland, it must be said that professional seamen were especially alarmed. Traders, shipowners, captains of vessels, skippers, and master mariners from Europe and America, naval officers from every country, and at their heels the various national governments on these two continents, were all extremely disturbed by the business.
|
||||
In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale.
|
||||
The relevant data on this apparition, as recorded in various logbooks, agreed pretty closely as to the structure of the object or creature in question, its unprecedented speed of movement, its startling locomotive power, and the unique vitality with which it seemed to be gifted. If it was a cetacean, it exceeded in bulk any whale previously classified by science. No naturalist, neither Cuvier nor Lacépède, neither Professor Dumeril nor Professor de Quatrefages, would have accepted the existence of such a monster sight unseen -- specifically, unseen by their own scientific eyes.
|
||||
Striking an average of observations taken at different times -- rejecting those timid estimates that gave the object a length of 200 feet, and ignoring those exaggerated views that saw it as a mile wide and three long--you could still assert that this phenomenal creature greatly exceeded the dimensions of anything then known to ichthyologists, if it existed at all.
|
||||
Now then, it did exist, this was an undeniable fact; and since the human mind dotes on objects of wonder, you can understand the worldwide excitement caused by this unearthly apparition. As for relegating it to the realm of fiction, that charge had to be dropped.
|
||||
In essence, on July 20, 1866, the steamer Governor Higginson, from the Calcutta & Burnach Steam Navigation Co., encountered this moving mass five miles off the eastern shores of Australia. Captain Baker at first thought he was in the presence of an unknown reef; he was even about to fix its exact position when two waterspouts shot out of this inexplicable object and sprang hissing into the air some 150 feet. So, unless this reef was subject to the intermittent eruptions of a geyser, the Governor Higginson had fair and honest dealings with some aquatic mammal, until then unknown, that could spurt from its blowholes waterspouts mixed with air and steam.
|
||||
Similar events were likewise observed in Pacific seas, on July 23 of the same year, by the Christopher Columbus from the West India & Pacific Steam Navigation Co. Consequently, this extraordinary cetacean could transfer itself from one locality to another with startling swiftness, since within an interval of just three days, the Governor Higginson and the Christopher Columbus had observed it at two positions on the charts separated by a distance of more than 700 nautical leagues.
|
||||
Fifteen days later and 2,000 leagues farther, the Helvetia from the Compagnie Nationale and the Shannon from the Royal Mail line, running on opposite tacks in that part of the Atlantic lying between the United States and Europe, respectively signaled each other that the monster had been sighted in latitude 42 degrees 15' north and longitude 60 degrees 35' west of the meridian of Greenwich. From their simultaneous observations, they were able to estimate the mammal's minimum length at more than 350 English feet; this was because both the Shannon and the Helvetia were of smaller dimensions, although each measured 100 meters stem to stern. Now then, the biggest whales, those rorqual whales that frequent the waterways of the Aleutian Islands, have never exceeded a length of 56 meters--if they reach even that.
|
||||
One after another, reports arrived that would profoundly affect public opinion: new observations taken by the transatlantic liner Pereire, the Inman line's Etna running afoul of the monster, an official report drawn up by officers on the French frigate Normandy, dead-earnest reckonings obtained by the general staff of Commodore Fitz-James aboard the Lord Clyde. In lighthearted countries, people joked about this phenomenon, but such serious, practical countries as England, America, and Germany were deeply concerned.
|
||||
In every big city the monster was the latest rage; they sang about it in the coffee houses, they ridiculed it in the newspapers, they dramatized it in the theaters. The tabloids found it a fine opportunity for hatching all sorts of hoaxes. In those newspapers short of copy, you saw the reappearance of every gigantic imaginary creature, from "Moby Dick," that dreadful white whale from the High Arctic regions, to the stupendous kraken whose tentacles could entwine a 500-ton craft and drag it into the ocean depths. They even reprinted reports from ancient times: the views of Aristotle and Pliny accepting the existence of such monsters, then the Norwegian stories of Bishop Pontoppidan, the narratives of Paul Egede, and finally the reports of Captain Harrington -- whose good faith is above suspicion--in which he claims he saw, while aboard the Castilian in 1857, one of those enormous serpents that, until then, had frequented only the seas of France's old extremist newspaper, The Constitutionalist.
|
23
tcpdf/cache/chapter_demo_2.txt
vendored
Executable file
23
tcpdf/cache/chapter_demo_2.txt
vendored
Executable file
@ -0,0 +1,23 @@
|
||||
During the period in which these developments were occurring, I had returned from a scientific undertaking organized to explore the Nebraska badlands in the United States. In my capacity as Assistant Professor at the Paris Museum of Natural History, I had been attached to this expedition by the French government. After spending six months in Nebraska, I arrived in New York laden with valuable collections near the end of March. My departure for France was set for early May. In the meantime, then, I was busy classifying my mineralogical, botanical, and zoological treasures when that incident took place with the Scotia.
|
||||
I was perfectly abreast of this question, which was the big news of the day, and how could I not have been? I had read and reread every American and European newspaper without being any farther along. This mystery puzzled me. Finding it impossible to form any views, I drifted from one extreme to the other. Something was out there, that much was certain, and any doubting Thomas was invited to place his finger on the Scotia's wound.
|
||||
When I arrived in New York, the question was at the boiling point. The hypothesis of a drifting islet or an elusive reef, put forward by people not quite in their right minds, was completely eliminated. And indeed, unless this reef had an engine in its belly, how could it move about with such prodigious speed?
|
||||
Also discredited was the idea of a floating hull or some other enormous wreckage, and again because of this speed of movement.
|
||||
So only two possible solutions to the question were left, creating two very distinct groups of supporters: on one side, those favoring a monster of colossal strength; on the other, those favoring an "underwater boat" of tremendous motor power.
|
||||
Now then, although the latter hypothesis was completely admissible, it couldn't stand up to inquiries conducted in both the New World and the Old. That a private individual had such a mechanism at his disposal was less than probable. Where and when had he built it, and how could he have built it in secret?
|
||||
Only some government could own such an engine of destruction, and in these disaster-filled times, when men tax their ingenuity to build increasingly powerful aggressive weapons, it was possible that, unknown to the rest of the world, some nation could have been testing such a fearsome machine. The Chassepot rifle led to the torpedo, and the torpedo has led to this underwater battering ram, which in turn will lead to the world putting its foot down. At least I hope it will.
|
||||
But this hypothesis of a war machine collapsed in the face of formal denials from the various governments. Since the public interest was at stake and transoceanic travel was suffering, the sincerity of these governments could not be doubted. Besides, how could the assembly of this underwater boat have escaped public notice? Keeping a secret under such circumstances would be difficult enough for an individual, and certainly impossible for a nation whose every move is under constant surveillance by rival powers.
|
||||
So, after inquiries conducted in England, France, Russia, Prussia, Spain, Italy, America, and even Turkey, the hypothesis of an underwater Monitor was ultimately rejected.
|
||||
After I arrived in New York, several people did me the honor of consulting me on the phenomenon in question. In France I had published a two-volume work, in quarto, entitled The Mysteries of the Great Ocean Depths. Well received in scholarly circles, this book had established me as a specialist in this pretty obscure field of natural history. My views were in demand. As long as I could deny the reality of the business, I confined myself to a flat "no comment." But soon, pinned to the wall, I had to explain myself straight out. And in this vein, "the honorable Pierre Aronnax, Professor at the Paris Museum," was summoned by The New York Herald to formulate his views no matter what.
|
||||
I complied. Since I could no longer hold my tongue, I let it wag. I discussed the question in its every aspect, both political and scientific, and this is an excerpt from the well-padded article I published in the issue of April 30.
|
||||
|
||||
"Therefore," I wrote, "after examining these different hypotheses one by one, we are forced, every other supposition having been refuted, to accept the existence of an extremely powerful marine animal.
|
||||
"The deepest parts of the ocean are totally unknown to us. No soundings have been able to reach them. What goes on in those distant depths? What creatures inhabit, or could inhabit, those regions twelve or fifteen miles beneath the surface of the water? What is the constitution of these animals? It's almost beyond conjecture.
|
||||
"However, the solution to this problem submitted to me can take the form of a choice between two alternatives.
|
||||
"Either we know every variety of creature populating our planet, or we do not.
|
||||
"If we do not know every one of them, if nature still keeps ichthyological secrets from us, nothing is more admissible than to accept the existence of fish or cetaceans of new species or even new genera, animals with a basically 'cast-iron' constitution that inhabit strata beyond the reach of our soundings, and which some development or other, an urge or a whim if you prefer, can bring to the upper level of the ocean for long intervals.
|
||||
"If, on the other hand, we do know every living species, we must look for the animal in question among those marine creatures already cataloged, and in this event I would be inclined to accept the existence of a giant narwhale.
|
||||
"The common narwhale, or sea unicorn, often reaches a length of sixty feet. Increase its dimensions fivefold or even tenfold, then give this cetacean a strength in proportion to its size while enlarging its offensive weapons, and you have the animal we're looking for. It would have the proportions determined by the officers of the Shannon, the instrument needed to perforate the Scotia, and the power to pierce a steamer's hull.
|
||||
"In essence, the narwhale is armed with a sort of ivory sword, or lance, as certain naturalists have expressed it. It's a king-sized tooth as hard as steel. Some of these teeth have been found buried in the bodies of baleen whales, which the narwhale attacks with invariable success. Others have been wrenched, not without difficulty, from the undersides of vessels that narwhales have pierced clean through, as a gimlet pierces a wine barrel. The museum at the Faculty of Medicine in Paris owns one of these tusks with a length of 2.25 meters and a width at its base of forty-eight centimeters!
|
||||
"All right then! Imagine this weapon to be ten times stronger and the animal ten times more powerful, launch it at a speed of twenty miles per hour, multiply its mass times its velocity, and you get just the collision we need to cause the specified catastrophe.
|
||||
"So, until information becomes more abundant, I plump for a sea unicorn of colossal dimensions, no longer armed with a mere lance but with an actual spur, like ironclad frigates or those warships called 'rams,' whose mass and motor power it would possess simultaneously.
|
||||
"This inexplicable phenomenon is thus explained away--unless it's something else entirely, which, despite everything that has been sighted, studied, explored and experienced, is still possible!"
|
15
tcpdf/cache/table_data_demo.txt
vendored
Executable file
15
tcpdf/cache/table_data_demo.txt
vendored
Executable file
@ -0,0 +1,15 @@
|
||||
Austria;Vienna;83859;8075
|
||||
Belgium;Brussels;30518;10192
|
||||
Denmark;Copenhagen;43094;5295
|
||||
Finland;Helsinki;304529;5147
|
||||
France;Paris;543965;58728
|
||||
Germany;Berlin;357022;82057
|
||||
Greece;Athens;131625;10511
|
||||
Ireland;Dublin;70723;3694
|
||||
Italy;Roma;301316;57563
|
||||
Luxembourg;Luxembourg;2586;424
|
||||
Netherlands;Amsterdam;41526;15654
|
||||
Portugal;Lisbon;91906;9957
|
||||
Spain;Madrid;504790;39348
|
||||
Sweden;Stockholm;410934;8839
|
||||
United Kingdom;London;243820;58862
|
135
tcpdf/cache/utf8test.txt
vendored
Executable file
135
tcpdf/cache/utf8test.txt
vendored
Executable file
@ -0,0 +1,135 @@
|
||||
Sentences that contain all letters commonly used in a language
|
||||
--------------------------------------------------------------
|
||||
|
||||
Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> -- 2001-09-02
|
||||
|
||||
This file is UTF-8 encoded.
|
||||
|
||||
|
||||
Danish (da)
|
||||
---------
|
||||
|
||||
Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen
|
||||
Wolther spillede på xylofon.
|
||||
(= Quiz contestants were eating strawbery with cream while Wolther
|
||||
the circus clown played on xylophone.)
|
||||
|
||||
German (de)
|
||||
-----------
|
||||
|
||||
Falsches Üben von Xylophonmusik quält jeden größeren Zwerg
|
||||
(= Wrongful practicing of xylophone music tortures every larger dwarf)
|
||||
|
||||
Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich
|
||||
(= Twelve boxing fighters hunted Eva across the dike of Sylt)
|
||||
|
||||
Heizölrückstoßabdämpfung
|
||||
(= fuel oil recoil absorber)
|
||||
(jqvwxy missing, but all non-ASCII letters in one word)
|
||||
|
||||
English (en)
|
||||
------------
|
||||
|
||||
The quick brown fox jumps over the lazy dog
|
||||
|
||||
Spanish (es)
|
||||
------------
|
||||
|
||||
El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y
|
||||
frío, añoraba a su querido cachorro.
|
||||
(Contains every letter and every accent, but not every combination
|
||||
of vowel + acute.)
|
||||
|
||||
French (fr)
|
||||
-----------
|
||||
|
||||
Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à
|
||||
côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce
|
||||
qui lui permet de penser à la cænogenèse de l'être dont il est question
|
||||
dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui,
|
||||
pense-t-il, diminue çà et là la qualité de son œuvre.
|
||||
|
||||
l'île exiguë
|
||||
Où l'obèse jury mûr
|
||||
Fête l'haï volapük,
|
||||
Âne ex aéquo au whist,
|
||||
Ôtez ce vœu déçu.
|
||||
|
||||
Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en
|
||||
canoë au delà des îles, près du mälström où brûlent les novæ.
|
||||
|
||||
Irish Gaelic (ga)
|
||||
-----------------
|
||||
|
||||
D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh
|
||||
|
||||
Hungarian (hu)
|
||||
--------------
|
||||
|
||||
Árvíztűrő tükörfúrógép
|
||||
(= flood-proof mirror-drilling machine, only all non-ASCII letters)
|
||||
|
||||
Icelandic (is)
|
||||
--------------
|
||||
|
||||
Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa
|
||||
|
||||
Sævör grét áðan því úlpan var ónýt
|
||||
(some ASCII letters missing)
|
||||
|
||||
Greek (el)
|
||||
-------------
|
||||
|
||||
Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο
|
||||
(= No more shall I see acacias or myrtles in the golden clearing)
|
||||
|
||||
Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία
|
||||
(= I uncover the soul-destroying abhorrence)
|
||||
|
||||
Japanese (jp)
|
||||
-------------
|
||||
|
||||
Hiragana: (Iroha)
|
||||
|
||||
いろはにほへとちりぬるを
|
||||
わかよたれそつねならむ
|
||||
うゐのおくやまけふこえて
|
||||
あさきゆめみしゑひもせす
|
||||
|
||||
Katakana:
|
||||
|
||||
イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム
|
||||
ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン
|
||||
|
||||
Hebrew (iw)
|
||||
-----------
|
||||
|
||||
? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה
|
||||
|
||||
Polish (pl)
|
||||
-----------
|
||||
|
||||
Pchnąć w tę łódź jeża lub ośm skrzyń fig
|
||||
(= To push a hedgehog or eight bins of figs in this boat)
|
||||
|
||||
Russian (ru)
|
||||
------------
|
||||
|
||||
В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
|
||||
(= Would a citrus live in the bushes of south? Yes, but only a fake one!)
|
||||
|
||||
Thai (th)
|
||||
---------
|
||||
|
||||
[--------------------------|------------------------]
|
||||
๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน
|
||||
จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร
|
||||
ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย
|
||||
ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ
|
||||
|
||||
[The copyright for the Thai example is owned by The Computer
|
||||
Association of Thailand under the Royal Patronage of His Majesty the
|
||||
King.]
|
||||
|
||||
Please let me know if you find others! Special thanks to the people
|
||||
from all over the world who contributed these sentences.
|
50
tcpdf/config/lang/eng.php
Executable file
50
tcpdf/config/lang/eng.php
Executable file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : eng.php
|
||||
// Begin : 2004-03-03
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Language module for TCPDF
|
||||
// (contains translated texts)
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* TCPDF language file (contains translated texts).
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF language file.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.sourceforge.net
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2004-03-03
|
||||
*/
|
||||
|
||||
// ENGLISH
|
||||
|
||||
global $l;
|
||||
$l = Array();
|
||||
|
||||
// PAGE META DESCRIPTORS --------------------------------------
|
||||
|
||||
$l['a_meta_charset'] = 'UTF-8';
|
||||
$l['a_meta_dir'] = 'ltr';
|
||||
$l['a_meta_language'] = 'en';
|
||||
|
||||
// TRANSLATIONS --------------------------------------
|
||||
$l['w_page'] = 'page';
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
50
tcpdf/config/lang/ita.php
Executable file
50
tcpdf/config/lang/ita.php
Executable file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : ita.php
|
||||
// Begin : 2004-03-03
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Language module for TCPDF
|
||||
// (contains translated texts)
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* TCPDF language file (contains translated texts).
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF language file.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.sourceforge.net
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2004-03-03
|
||||
*/
|
||||
|
||||
// ENGLISH
|
||||
|
||||
global $l;
|
||||
$l = Array();
|
||||
|
||||
// PAGE META DESCRIPTORS --------------------------------------
|
||||
|
||||
$l['a_meta_charset'] = 'UTF-8';
|
||||
$l['a_meta_dir'] = 'ltr';
|
||||
$l['a_meta_language'] = 'it';
|
||||
|
||||
// TRANSLATIONS --------------------------------------
|
||||
$l['w_page'] = 'pagina';
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
232
tcpdf/config/tcpdf_config.php
Executable file
232
tcpdf/config/tcpdf_config.php
Executable file
@ -0,0 +1,232 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf_config.php
|
||||
// Begin : 2004-06-11
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Configuration file for TCPDF.
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Configuration file for TCPDF.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.0.014
|
||||
* @link http://tcpdf.sourceforge.net
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2004-10-27
|
||||
*/
|
||||
|
||||
// If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored.
|
||||
|
||||
if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
|
||||
|
||||
// DOCUMENT_ROOT fix for IIS Webserver
|
||||
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
|
||||
if(isset($_SERVER['SCRIPT_FILENAME'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} else {
|
||||
// define here your DOCUMENT_ROOT path if the previous fails
|
||||
$_SERVER['DOCUMENT_ROOT'] = '/var/www';
|
||||
}
|
||||
}
|
||||
|
||||
// Automatic calculation for the following K_PATH_MAIN constant
|
||||
$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
|
||||
if (substr($k_path_main, -1) != '/') {
|
||||
$k_path_main .= '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Installation path (/var/www/tcpdf/).
|
||||
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
||||
*/
|
||||
define ('K_PATH_MAIN', $k_path_main);
|
||||
|
||||
// Automatic calculation for the following K_PATH_URL constant
|
||||
if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
|
||||
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
|
||||
$k_path_url = 'https://';
|
||||
} else {
|
||||
$k_path_url = 'http://';
|
||||
}
|
||||
$k_path_url .= $_SERVER['HTTP_HOST'];
|
||||
$k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
|
||||
}
|
||||
|
||||
/**
|
||||
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
|
||||
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
||||
*/
|
||||
define ('K_PATH_URL', $k_path_url);
|
||||
|
||||
/**
|
||||
* path for PDF fonts
|
||||
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
|
||||
*/
|
||||
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
|
||||
|
||||
/**
|
||||
* cache directory for temporary files (full path)
|
||||
*/
|
||||
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
|
||||
|
||||
/**
|
||||
* cache directory for temporary files (url path)
|
||||
*/
|
||||
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
|
||||
|
||||
/**
|
||||
*images directory
|
||||
*/
|
||||
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
|
||||
|
||||
/**
|
||||
* blank image
|
||||
*/
|
||||
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
|
||||
|
||||
/**
|
||||
* page format
|
||||
*/
|
||||
define ('PDF_PAGE_FORMAT', 'A4');
|
||||
|
||||
/**
|
||||
* page orientation (P=portrait, L=landscape)
|
||||
*/
|
||||
define ('PDF_PAGE_ORIENTATION', 'P');
|
||||
|
||||
/**
|
||||
* document creator
|
||||
*/
|
||||
define ('PDF_CREATOR', 'TCPDF');
|
||||
|
||||
/**
|
||||
* document author
|
||||
*/
|
||||
define ('PDF_AUTHOR', 'TCPDF');
|
||||
|
||||
/**
|
||||
* header title
|
||||
*/
|
||||
define ('PDF_HEADER_TITLE', 'TCPDF Example');
|
||||
|
||||
/**
|
||||
* header description string
|
||||
*/
|
||||
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
|
||||
|
||||
/**
|
||||
* image logo
|
||||
*/
|
||||
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
|
||||
|
||||
/**
|
||||
* header logo image width [mm]
|
||||
*/
|
||||
define ('PDF_HEADER_LOGO_WIDTH', 30);
|
||||
|
||||
/**
|
||||
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
|
||||
*/
|
||||
define ('PDF_UNIT', 'mm');
|
||||
|
||||
/**
|
||||
* header margin
|
||||
*/
|
||||
define ('PDF_MARGIN_HEADER', 5);
|
||||
|
||||
/**
|
||||
* footer margin
|
||||
*/
|
||||
define ('PDF_MARGIN_FOOTER', 10);
|
||||
|
||||
/**
|
||||
* top margin
|
||||
*/
|
||||
define ('PDF_MARGIN_TOP', 27);
|
||||
|
||||
/**
|
||||
* bottom margin
|
||||
*/
|
||||
define ('PDF_MARGIN_BOTTOM', 25);
|
||||
|
||||
/**
|
||||
* left margin
|
||||
*/
|
||||
define ('PDF_MARGIN_LEFT', 15);
|
||||
|
||||
/**
|
||||
* right margin
|
||||
*/
|
||||
define ('PDF_MARGIN_RIGHT', 15);
|
||||
|
||||
/**
|
||||
* default main font name
|
||||
*/
|
||||
define ('PDF_FONT_NAME_MAIN', 'helvetica');
|
||||
|
||||
/**
|
||||
* default main font size
|
||||
*/
|
||||
define ('PDF_FONT_SIZE_MAIN', 10);
|
||||
|
||||
/**
|
||||
* default data font name
|
||||
*/
|
||||
define ('PDF_FONT_NAME_DATA', 'helvetica');
|
||||
|
||||
/**
|
||||
* default data font size
|
||||
*/
|
||||
define ('PDF_FONT_SIZE_DATA', 8);
|
||||
|
||||
/**
|
||||
* default monospaced font name
|
||||
*/
|
||||
define ('PDF_FONT_MONOSPACED', 'courier');
|
||||
|
||||
/**
|
||||
* ratio used to adjust the conversion of pixels to user units
|
||||
*/
|
||||
define ('PDF_IMAGE_SCALE_RATIO', 1);
|
||||
|
||||
/**
|
||||
* magnification factor for titles
|
||||
*/
|
||||
define('HEAD_MAGNIFICATION', 1.1);
|
||||
|
||||
/**
|
||||
* height of cell repect font height
|
||||
*/
|
||||
define('K_CELL_HEIGHT_RATIO', 1.25);
|
||||
|
||||
/**
|
||||
* title magnification respect main font size
|
||||
*/
|
||||
define('K_TITLE_MAGNIFICATION', 1.3);
|
||||
|
||||
/**
|
||||
* reduction factor for small font
|
||||
*/
|
||||
define('K_SMALL_RATIO', 2/3);
|
||||
}
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
227
tcpdf/config/tcpdf_config_alt.php
Executable file
227
tcpdf/config/tcpdf_config_alt.php
Executable file
@ -0,0 +1,227 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : tcpdf_config.php
|
||||
// Begin : 2004-06-11
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Alternative configuration file for TCPDF.
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Alternative configuration file for TCPDF.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.0.014
|
||||
* @link http://tcpdf.sourceforge.net
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2004-10-27
|
||||
*/
|
||||
|
||||
// DOCUMENT_ROOT fix for IIS Webserver
|
||||
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
|
||||
if(isset($_SERVER['SCRIPT_FILENAME'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} else {
|
||||
// define here your DOCUMENT_ROOT path if the previous fails
|
||||
$_SERVER['DOCUMENT_ROOT'] = '/var/www';
|
||||
}
|
||||
}
|
||||
|
||||
// Automatic calculation for the following K_PATH_MAIN constant
|
||||
$k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config'))));
|
||||
if (substr($k_path_main, -1) != '/') {
|
||||
$k_path_main .= '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Installation path (/var/www/tcpdf/).
|
||||
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
||||
*/
|
||||
define ('K_PATH_MAIN', $k_path_main);
|
||||
|
||||
// Automatic calculation for the following K_PATH_URL constant
|
||||
if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
|
||||
if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
|
||||
$k_path_url = 'https://';
|
||||
} else {
|
||||
$k_path_url = 'http://';
|
||||
}
|
||||
$k_path_url .= $_SERVER['HTTP_HOST'];
|
||||
$k_path_url .= str_replace( '\\', '/', substr($_SERVER['PHP_SELF'], 0, -24));
|
||||
}
|
||||
|
||||
/**
|
||||
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
|
||||
* By default it is automatically calculated but you can also set it as a fixed string to improve performances..
|
||||
*/
|
||||
define ('K_PATH_URL', $k_path_url);
|
||||
|
||||
/**
|
||||
* path for PDF fonts
|
||||
* use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
|
||||
*/
|
||||
define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
|
||||
|
||||
/**
|
||||
* cache directory for temporary files (full path)
|
||||
*/
|
||||
define ('K_PATH_CACHE', K_PATH_MAIN.'cache/');
|
||||
|
||||
/**
|
||||
* cache directory for temporary files (url path)
|
||||
*/
|
||||
define ('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
|
||||
|
||||
/**
|
||||
*images directory
|
||||
*/
|
||||
define ('K_PATH_IMAGES', K_PATH_MAIN.'images/');
|
||||
|
||||
/**
|
||||
* blank image
|
||||
*/
|
||||
define ('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
|
||||
|
||||
/**
|
||||
* page format
|
||||
*/
|
||||
define ('PDF_PAGE_FORMAT', 'A4');
|
||||
|
||||
/**
|
||||
* page orientation (P=portrait, L=landscape)
|
||||
*/
|
||||
define ('PDF_PAGE_ORIENTATION', 'P');
|
||||
|
||||
/**
|
||||
* document creator
|
||||
*/
|
||||
define ('PDF_CREATOR', 'TCPDF');
|
||||
|
||||
/**
|
||||
* document author
|
||||
*/
|
||||
define ('PDF_AUTHOR', 'TCPDF');
|
||||
|
||||
/**
|
||||
* header title
|
||||
*/
|
||||
define ('PDF_HEADER_TITLE', 'TCPDF Example');
|
||||
|
||||
/**
|
||||
* header description string
|
||||
*/
|
||||
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
|
||||
|
||||
/**
|
||||
* image logo
|
||||
*/
|
||||
define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg');
|
||||
|
||||
/**
|
||||
* header logo image width [mm]
|
||||
*/
|
||||
define ('PDF_HEADER_LOGO_WIDTH', 30);
|
||||
|
||||
/**
|
||||
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
|
||||
*/
|
||||
define ('PDF_UNIT', 'mm');
|
||||
|
||||
/**
|
||||
* header margin
|
||||
*/
|
||||
define ('PDF_MARGIN_HEADER', 5);
|
||||
|
||||
/**
|
||||
* footer margin
|
||||
*/
|
||||
define ('PDF_MARGIN_FOOTER', 10);
|
||||
|
||||
/**
|
||||
* top margin
|
||||
*/
|
||||
define ('PDF_MARGIN_TOP', 27);
|
||||
|
||||
/**
|
||||
* bottom margin
|
||||
*/
|
||||
define ('PDF_MARGIN_BOTTOM', 25);
|
||||
|
||||
/**
|
||||
* left margin
|
||||
*/
|
||||
define ('PDF_MARGIN_LEFT', 15);
|
||||
|
||||
/**
|
||||
* right margin
|
||||
*/
|
||||
define ('PDF_MARGIN_RIGHT', 15);
|
||||
|
||||
/**
|
||||
* default main font name
|
||||
*/
|
||||
define ('PDF_FONT_NAME_MAIN', 'helvetica');
|
||||
|
||||
/**
|
||||
* default main font size
|
||||
*/
|
||||
define ('PDF_FONT_SIZE_MAIN', 10);
|
||||
|
||||
/**
|
||||
* default data font name
|
||||
*/
|
||||
define ('PDF_FONT_NAME_DATA', 'helvetica');
|
||||
|
||||
/**
|
||||
* default data font size
|
||||
*/
|
||||
define ('PDF_FONT_SIZE_DATA', 8);
|
||||
|
||||
/**
|
||||
* default monospaced font name
|
||||
*/
|
||||
define ('PDF_FONT_MONOSPACED', 'courier');
|
||||
|
||||
/**
|
||||
* ratio used to adjust the conversion of pixels to user units
|
||||
*/
|
||||
define ('PDF_IMAGE_SCALE_RATIO', 1);
|
||||
|
||||
/**
|
||||
* magnification factor for titles
|
||||
*/
|
||||
define('HEAD_MAGNIFICATION', 1.1);
|
||||
|
||||
/**
|
||||
* height of cell repect font height
|
||||
*/
|
||||
define('K_CELL_HEIGHT_RATIO', 1.25);
|
||||
|
||||
/**
|
||||
* title magnification respect main font size
|
||||
*/
|
||||
define('K_TITLE_MAGNIFICATION', 1.3);
|
||||
|
||||
/**
|
||||
* reduction factor for small font
|
||||
*/
|
||||
define('K_SMALL_RATIO', 2/3);
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
56
tcpdf/doc/classtrees_com-tecnick-tcpdf.html
Normal file
56
tcpdf/doc/classtrees_com-tecnick-tcpdf.html
Normal file
@ -0,0 +1,56 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Class Trees for Package com-tecnick-tcpdf</title>
|
||||
<link rel="stylesheet" type="text/css" href="media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<h1>Class Trees for Package com-tecnick-tcpdf</h1>
|
||||
<hr />
|
||||
<div class="classtree">Root class TCPDF</div><br />
|
||||
<ul>
|
||||
<li><a href="com-tecnick-tcpdf/TCPDF.html">TCPDF</a></li></ul>
|
||||
|
||||
<hr />
|
||||
<div class="classtree">Root class TCPDFBarcode</div><br />
|
||||
<ul>
|
||||
<li><a href="com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a></li></ul>
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
20740
tcpdf/doc/com-tecnick-tcpdf/TCPDF.html
Normal file
20740
tcpdf/doc/com-tecnick-tcpdf/TCPDF.html
Normal file
File diff suppressed because it is too large
Load Diff
1379
tcpdf/doc/com-tecnick-tcpdf/TCPDFBarcode.html
Normal file
1379
tcpdf/doc/com-tecnick-tcpdf/TCPDFBarcode.html
Normal file
File diff suppressed because it is too large
Load Diff
107
tcpdf/doc/com-tecnick-tcpdf/_barcodes.php.html
Normal file
107
tcpdf/doc/com-tecnick-tcpdf/_barcodes.php.html
Normal file
@ -0,0 +1,107 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Docs for page barcodes.php</title>
|
||||
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="../classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="../li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="../com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<h1>Procedural File: barcodes.php</h1>
|
||||
Source Location: /barcodes.php<br /><br />
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<div class="contents">
|
||||
<h2>Classes:</h2>
|
||||
<dt><a href="../com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a></dt>
|
||||
<dd>PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br /></dd>
|
||||
</div><br /><br />
|
||||
|
||||
<h2>Page Details:</h2>
|
||||
PHP class to creates array representations for common 1D barcodes to be used with TCPDF.<br /><br /><br /><br />
|
||||
<h4>Tags:</h4>
|
||||
<div class="tags">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>1.0.008</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2008-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>link:</b> </td><td><a href="http://www.tcpdf.org">http://www.tcpdf.org</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>abstract:</b> </td><td>Functions for generating string representation of common 1D barcodes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>license:</b> </td><td><a href="http://www.gnu.org/copyleft/lesser.html">LGPL</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
518
tcpdf/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
Normal file
518
tcpdf/doc/com-tecnick-tcpdf/_config---tcpdf_config.php.html
Normal file
@ -0,0 +1,518 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Docs for page tcpdf_config.php</title>
|
||||
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="../classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="../li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="../com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<h1>Procedural File: tcpdf_config.php</h1>
|
||||
Source Location: /config/tcpdf_config.php<br /><br />
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h2>Page Details:</h2>
|
||||
Configuration file for TCPDF.<br /><br /><br /><br />
|
||||
<h4>Tags:</h4>
|
||||
<div class="tags">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>4.0.014</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>link:</b> </td><td><a href="http://tcpdf.sourceforge.net">http://tcpdf.sourceforge.net</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>since:</b> </td><td>2004-10-27</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>license:</b> </td><td><a href="http://www.gnu.org/copyleft/lesser.html">LGPL</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<hr />
|
||||
<a name="defineHEAD_MAGNIFICATION"></a>
|
||||
<h3>HEAD_MAGNIFICATION <span class="smalllinenumber">[line 211]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>HEAD_MAGNIFICATION = 1.1</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
magnification factor for titles<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_BLANK_IMAGE"></a>
|
||||
<h3>K_BLANK_IMAGE <span class="smalllinenumber">[line 101]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_BLANK_IMAGE = K_PATH_IMAGES.'_blank.png'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
blank image<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_CELL_HEIGHT_RATIO"></a>
|
||||
<h3>K_CELL_HEIGHT_RATIO <span class="smalllinenumber">[line 216]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_CELL_HEIGHT_RATIO = 1.25</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
height of cell repect font height<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PATH_CACHE"></a>
|
||||
<h3>K_PATH_CACHE <span class="smalllinenumber">[line 86]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PATH_CACHE = K_PATH_MAIN.'cache/'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
cache directory for temporary files (full path)<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PATH_FONTS"></a>
|
||||
<h3>K_PATH_FONTS <span class="smalllinenumber">[line 81]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PATH_FONTS = K_PATH_MAIN.'fonts/'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
path for PDF fonts<br /><br /><p>use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts</p><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PATH_IMAGES"></a>
|
||||
<h3>K_PATH_IMAGES <span class="smalllinenumber">[line 96]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PATH_IMAGES = K_PATH_MAIN.'images/'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
images directory<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PATH_MAIN"></a>
|
||||
<h3>K_PATH_MAIN <span class="smalllinenumber">[line 58]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PATH_MAIN = $k_path_main</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Installation path (/var/www/tcpdf/).<br /><br /><p>By default it is automatically calculated but you can also set it as a fixed string to improve performances.</p><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PATH_URL"></a>
|
||||
<h3>K_PATH_URL <span class="smalllinenumber">[line 75]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PATH_URL = $k_path_url</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
URL path to tcpdf installation folder (http://localhost/tcpdf/).<br /><br /><p>By default it is automatically calculated but you can also set it as a fixed string to improve performances.</p><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PATH_URL_CACHE"></a>
|
||||
<h3>K_PATH_URL_CACHE <span class="smalllinenumber">[line 91]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PATH_URL_CACHE = K_PATH_URL.'cache/'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
cache directory for temporary files (url path)<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_SMALL_RATIO"></a>
|
||||
<h3>K_SMALL_RATIO <span class="smalllinenumber">[line 226]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_SMALL_RATIO = 2/3</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
reduction factor for small font<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_TITLE_MAGNIFICATION"></a>
|
||||
<h3>K_TITLE_MAGNIFICATION <span class="smalllinenumber">[line 221]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_TITLE_MAGNIFICATION = 1.3</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
title magnification respect main font size<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_AUTHOR"></a>
|
||||
<h3>PDF_AUTHOR <span class="smalllinenumber">[line 121]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_AUTHOR = 'TCPDF'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
document author<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_CREATOR"></a>
|
||||
<h3>PDF_CREATOR <span class="smalllinenumber">[line 116]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_CREATOR = 'TCPDF'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
document creator<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_FONT_MONOSPACED"></a>
|
||||
<h3>PDF_FONT_MONOSPACED <span class="smalllinenumber">[line 201]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_FONT_MONOSPACED = 'courier'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
default monospaced font name<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_FONT_NAME_DATA"></a>
|
||||
<h3>PDF_FONT_NAME_DATA <span class="smalllinenumber">[line 191]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_FONT_NAME_DATA = 'helvetica'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
default data font name<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_FONT_NAME_MAIN"></a>
|
||||
<h3>PDF_FONT_NAME_MAIN <span class="smalllinenumber">[line 181]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_FONT_NAME_MAIN = 'helvetica'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
default main font name<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_FONT_SIZE_DATA"></a>
|
||||
<h3>PDF_FONT_SIZE_DATA <span class="smalllinenumber">[line 196]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_FONT_SIZE_DATA = 8</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
default data font size<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_FONT_SIZE_MAIN"></a>
|
||||
<h3>PDF_FONT_SIZE_MAIN <span class="smalllinenumber">[line 186]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_FONT_SIZE_MAIN = 10</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
default main font size<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_HEADER_LOGO"></a>
|
||||
<h3>PDF_HEADER_LOGO <span class="smalllinenumber">[line 136]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_HEADER_LOGO = 'tcpdf_logo.jpg'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
image logo<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_HEADER_LOGO_WIDTH"></a>
|
||||
<h3>PDF_HEADER_LOGO_WIDTH <span class="smalllinenumber">[line 141]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_HEADER_LOGO_WIDTH = 30</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
header logo image width [mm]<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_HEADER_STRING"></a>
|
||||
<h3>PDF_HEADER_STRING <span class="smalllinenumber">[line 131]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_HEADER_STRING = "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org"</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
header description string<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_HEADER_TITLE"></a>
|
||||
<h3>PDF_HEADER_TITLE <span class="smalllinenumber">[line 126]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_HEADER_TITLE = 'TCPDF Example'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
header title<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_IMAGE_SCALE_RATIO"></a>
|
||||
<h3>PDF_IMAGE_SCALE_RATIO <span class="smalllinenumber">[line 206]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_IMAGE_SCALE_RATIO = 1</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
ratio used to adjust the conversion of pixels to user units<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_MARGIN_BOTTOM"></a>
|
||||
<h3>PDF_MARGIN_BOTTOM <span class="smalllinenumber">[line 166]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_MARGIN_BOTTOM = 25</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
bottom margin<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_MARGIN_FOOTER"></a>
|
||||
<h3>PDF_MARGIN_FOOTER <span class="smalllinenumber">[line 156]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_MARGIN_FOOTER = 10</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
footer margin<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_MARGIN_HEADER"></a>
|
||||
<h3>PDF_MARGIN_HEADER <span class="smalllinenumber">[line 151]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_MARGIN_HEADER = 5</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
header margin<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_MARGIN_LEFT"></a>
|
||||
<h3>PDF_MARGIN_LEFT <span class="smalllinenumber">[line 171]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_MARGIN_LEFT = 15</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
left margin<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_MARGIN_RIGHT"></a>
|
||||
<h3>PDF_MARGIN_RIGHT <span class="smalllinenumber">[line 176]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_MARGIN_RIGHT = 15</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
right margin<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_MARGIN_TOP"></a>
|
||||
<h3>PDF_MARGIN_TOP <span class="smalllinenumber">[line 161]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_MARGIN_TOP = 27</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
top margin<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_PAGE_FORMAT"></a>
|
||||
<h3>PDF_PAGE_FORMAT <span class="smalllinenumber">[line 106]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PAGE_FORMAT = 'A4'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
page format<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_PAGE_ORIENTATION"></a>
|
||||
<h3>PDF_PAGE_ORIENTATION <span class="smalllinenumber">[line 111]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PAGE_ORIENTATION = 'P'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
page orientation (P=portrait, L=landscape)<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_UNIT"></a>
|
||||
<h3>PDF_UNIT <span class="smalllinenumber">[line 146]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_UNIT = 'mm'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
99
tcpdf/doc/com-tecnick-tcpdf/_htmlcolors.php.html
Normal file
99
tcpdf/doc/com-tecnick-tcpdf/_htmlcolors.php.html
Normal file
@ -0,0 +1,99 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Docs for page htmlcolors.php</title>
|
||||
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="../classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="../li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="../com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<h1>Procedural File: htmlcolors.php</h1>
|
||||
Source Location: /htmlcolors.php<br /><br />
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h2>Page Details:</h2>
|
||||
Array of WEB safe colors.<br /><br /><br /><br />
|
||||
<h4>Tags:</h4>
|
||||
<div class="tags">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>link:</b> </td><td><a href="http://www.tcpdf.org">http://www.tcpdf.org</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>since:</b> </td><td>2.9.000 (2008-03-26)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>license:</b> </td><td><a href="http://www.gnu.org/copyleft/lesser.html">LGPL</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
126
tcpdf/doc/com-tecnick-tcpdf/_tcpdf.php.html
Normal file
126
tcpdf/doc/com-tecnick-tcpdf/_tcpdf.php.html
Normal file
@ -0,0 +1,126 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Docs for page tcpdf.php</title>
|
||||
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="../classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="../li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="../com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<h1>Procedural File: tcpdf.php</h1>
|
||||
Source Location: /tcpdf.php<br /><br />
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<div class="contents">
|
||||
<h2>Classes:</h2>
|
||||
<dt><a href="../com-tecnick-tcpdf/TCPDF.html">TCPDF</a></dt>
|
||||
<dd>This is a PHP class for generating PDF documents without requiring external extensions.<br /></dd>
|
||||
</div><br /><br />
|
||||
|
||||
<h2>Page Details:</h2>
|
||||
This is a PHP class for generating PDF documents without requiring external extensions.<br /><br /><br /><p>TCPDF project (http://www.tcpdf.org) was originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br /> <h3>TCPDF main features are:</h3> <ul><li>no external libraries are required for the basic functions;</li><li>supports all ISO page formats;</li><li>supports custom page formats, margins and units of measure;</li><li>supports UTF-8 Unicode and Right-To-Left languages;</li><li>supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;</li><li>supports document encryption;</li><li>includes methods to publish some XHTML code, including forms;</li><li>includes graphic (geometric) and transformation methods;</li><li>includes Javascript and Forms support;</li><li>includes a method to print various barcode formats: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS;</li><li>includes methods to set Bookmarks and print a Table of Content;</li><li>includes methods to move and delete pages;</li><li>includes methods for automatic page header and footer management;</li><li>supports automatic page break;</li><li>supports automatic page numbering and page groups;</li><li>supports automatic line break and text justification;</li><li>supports JPEG and PNG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)</li><li>supports stroke and clipping mode for text;</li><li>supports clipping masks;</li><li>supports Grayscale, RGB, CMYK, Spot Colors and Transparencies;</li><li>supports several annotations, including links, text and file attachments;</li><li>supports page compression (requires zlib extension);</li><li>supports text hyphenation.</li><li>supports transactions to UNDO commands.</li><li>supports signature certifications.</li></ul> Tools to encode your unicode fonts are on fonts/utils directory.</p></p><br /><br /><br />
|
||||
<h4>Tags:</h4>
|
||||
<div class="tags">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>version:</b> </td><td>4.8.009</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>link:</b> </td><td><a href="http://www.tcpdf.org">http://www.tcpdf.org</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>abstract:</b> </td><td>Class for generating PDF files on-the-fly without requiring external extensions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>license:</b> </td><td><a href="http://www.gnu.org/copyleft/lesser.html">LGPL</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
<h4>Includes:</h4>
|
||||
<div class="tags">
|
||||
require_once(dirname(__FILE__).'/config/tcpdf_config.php') [line 137]<br />
|
||||
main configuration file<br /><br />require_once(dirname(__FILE__).'/htmlcolors.php') [line 149]<br />
|
||||
html colors table<br /><br />require_once(dirname(__FILE__).'/unicode_data.php') [line 144]<br />
|
||||
unicode data<br /><br /></div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<hr />
|
||||
<a name="definePDF_PRODUCER"></a>
|
||||
<h3>PDF_PRODUCER <span class="smalllinenumber">[line 155]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>PDF_PRODUCER = 'TCPDF 4.8.009 (http://www.tcpdf.org)'</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
define default PDF document producer<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
248
tcpdf/doc/com-tecnick-tcpdf/_unicode_data.php.html
Normal file
248
tcpdf/doc/com-tecnick-tcpdf/_unicode_data.php.html
Normal file
@ -0,0 +1,248 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Docs for page unicode_data.php</title>
|
||||
<link rel="stylesheet" type="text/css" href="../media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="../classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="../elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="../li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="../com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="../com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="../com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<h1>Procedural File: unicode_data.php</h1>
|
||||
Source Location: /unicode_data.php<br /><br />
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h2>Page Details:</h2>
|
||||
Unicode Include file for TCPDF.<br /><br /><br /><br />
|
||||
<h4>Tags:</h4>
|
||||
<div class="tags">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><b>author:</b> </td><td>Nicola Asuni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>copyright:</b> </td><td>2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>link:</b> </td><td><a href="http://www.tcpdf.org">http://www.tcpdf.org</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>since:</b> </td><td>2.1.000 (2008-01-08)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>license:</b> </td><td><a href="http://www.gnu.org/copyleft/lesser.html">LGPL</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
<hr />
|
||||
<a name="defineK_LRE"></a>
|
||||
<h3>K_LRE <span class="smalllinenumber">[line 64]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_LRE = 8234</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Left-to-Right Embedding<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_LRM"></a>
|
||||
<h3>K_LRM <span class="smalllinenumber">[line 56]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_LRM = 8206</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Left-to-Right Mark<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_LRO"></a>
|
||||
<h3>K_LRO <span class="smalllinenumber">[line 76]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_LRO = 8237</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Left-to-Right Override<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_PDF"></a>
|
||||
<h3>K_PDF <span class="smalllinenumber">[line 72]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_PDF = 8236</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Pop Directional Format<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_RE_PATTERN_ARABIC"></a>
|
||||
<h3>K_RE_PATTERN_ARABIC <span class="smalllinenumber">[line 103]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_RE_PATTERN_ARABIC = "/(
|
||||
\xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA] # AL
|
||||
| \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF] # AL
|
||||
| \xDA[\x80-\xBF] # AL
|
||||
| \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF] # AL
|
||||
| \xDC[\x80-\x8D\x90\x92-\xAF] # AL
|
||||
| \xDD[\x8D-\xAD] # AL
|
||||
| \xDE[\x80-\xA5\xB1] # AL
|
||||
| \xEF\xAD[\x90-\xBF] # AL
|
||||
| \xEF\xAE[\x80-\xB1] # AL
|
||||
| \xEF\xAF[\x93-\xBF] # AL
|
||||
| \xEF[\xB0-\xB3][\x80-\xBF] # AL
|
||||
| \xEF\xB4[\x80-\xBD] # AL
|
||||
| \xEF\xB5[\x90-\xBF] # AL
|
||||
| \xEF\xB6[\x80-\x8F\x92-\xBF] # AL
|
||||
| \xEF\xB7[\x80-\x87\xB0-\xBC] # AL
|
||||
| \xEF\xB9[\xB0-\xB4\xB6-\xBF] # AL
|
||||
| \xEF\xBA[\x80-\xBF] # AL
|
||||
| \xEF\xBB[\x80-\xBC] # AL
|
||||
| \xD9[\xA0-\xA9\xAB\xAC] # AN
|
||||
)/x"</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_RE_PATTERN_RTL"></a>
|
||||
<h3>K_RE_PATTERN_RTL <span class="smalllinenumber">[line 85]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_RE_PATTERN_RTL = "/(
|
||||
\xD6\xBE # R
|
||||
| \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4] # R
|
||||
| \xDF[\x80-\xAA\xB4\xB5\xBA] # R
|
||||
| \xE2\x80\x8F # R
|
||||
| \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE] # R
|
||||
| \xEF\xAD[\x80\x81\x83\x84\x86-\x8F] # R
|
||||
| \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R
|
||||
| \xF0\x90\xA4[\x80-\x99] # R
|
||||
| \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3] # R
|
||||
| \xF0\x90\xA9[\x80-\x87\x90-\x98] # R
|
||||
| \xE2\x80[\xAB\xAE] # RLE & RLO
|
||||
)/x"</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_RLE"></a>
|
||||
<h3>K_RLE <span class="smalllinenumber">[line 68]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_RLE = 8235</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Right-to-Left Embedding<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_RLM"></a>
|
||||
<h3>K_RLM <span class="smalllinenumber">[line 60]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_RLM = 8207</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Right-to-Left Mark<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<hr />
|
||||
<a name="defineK_RLO"></a>
|
||||
<h3>K_RLO <span class="smalllinenumber">[line 80]</span></h3>
|
||||
<div class="tags">
|
||||
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
|
||||
<code>K_RLO = 8238</code>
|
||||
</td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
Right-to-Left Override<br /><br /> <br />
|
||||
</div>
|
||||
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
|
||||
<br />
|
||||
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
1455
tcpdf/doc/elementindex.html
Normal file
1455
tcpdf/doc/elementindex.html
Normal file
File diff suppressed because it is too large
Load Diff
1478
tcpdf/doc/elementindex_com-tecnick-tcpdf.html
Normal file
1478
tcpdf/doc/elementindex_com-tecnick-tcpdf.html
Normal file
File diff suppressed because it is too large
Load Diff
46
tcpdf/doc/errors.html
Normal file
46
tcpdf/doc/errors.html
Normal file
@ -0,0 +1,46 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>phpDocumentor Parser Errors and Warnings</title>
|
||||
<link rel="stylesheet" type="text/css" href="media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:29 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
69
tcpdf/doc/index.html
Normal file
69
tcpdf/doc/index.html
Normal file
@ -0,0 +1,69 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>TCPDF Documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<div align="center"><h1>TCPDF Documentation</h1></div>
|
||||
<b>Welcome to com-tecnick-tcpdf!</b><br />
|
||||
<br />
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
69
tcpdf/doc/li_com-tecnick-tcpdf.html
Normal file
69
tcpdf/doc/li_com-tecnick-tcpdf.html
Normal file
@ -0,0 +1,69 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>TCPDF Documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="media/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
|
||||
<tr>
|
||||
<td class="header_top">com-tecnick-tcpdf</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr>
|
||||
<td class="header_menu">
|
||||
|
||||
|
||||
[ <a href="classtrees_com-tecnick-tcpdf.html" class="menu">class tree: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex_com-tecnick-tcpdf.html" class="menu">index: com-tecnick-tcpdf</a> ]
|
||||
[ <a href="elementindex.html" class="menu">all elements</a> ]
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="200" class="menu">
|
||||
<b>Packages:</b><br />
|
||||
<a href="li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
|
||||
<br /><br />
|
||||
<b>Files:</b><br />
|
||||
<div class="package">
|
||||
<a href="com-tecnick-tcpdf/_barcodes.php.html"> barcodes.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_htmlcolors.php.html"> htmlcolors.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_tcpdf.php.html"> tcpdf.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_config---tcpdf_config.php.html"> tcpdf_config.php
|
||||
</a><br>
|
||||
<a href="com-tecnick-tcpdf/_unicode_data.php.html"> unicode_data.php
|
||||
</a><br>
|
||||
</div><br />
|
||||
|
||||
|
||||
<b>Classes:</b><br />
|
||||
<div class="package">
|
||||
<a href="com-tecnick-tcpdf/TCPDF.html">TCPDF</a><br />
|
||||
<a href="com-tecnick-tcpdf/TCPDFBarcode.html">TCPDFBarcode</a><br />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
|
||||
|
||||
<div align="center"><h1>TCPDF Documentation</h1></div>
|
||||
<b>Welcome to com-tecnick-tcpdf!</b><br />
|
||||
<br />
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.1</a><br />
|
||||
<div class="credit">
|
||||
<hr />
|
||||
Documentation generated on Wed, 30 Sep 2009 11:18:23 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
tcpdf/doc/media/background.png
Normal file
BIN
tcpdf/doc/media/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 238 B |
BIN
tcpdf/doc/media/empty.png
Normal file
BIN
tcpdf/doc/media/empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 B |
195
tcpdf/doc/media/style.css
Normal file
195
tcpdf/doc/media/style.css
Normal file
@ -0,0 +1,195 @@
|
||||
.php {
|
||||
padding: 1em;
|
||||
}
|
||||
.php-src { font-family: 'Courier New', Courier, monospace; font-weight: normal; }
|
||||
|
||||
body
|
||||
{
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
background-image: url("background.png");
|
||||
background-repeat: repeat-y;
|
||||
font-family: tahoma, verdana, arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #000099;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.menu
|
||||
{
|
||||
color: #ffffff;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
td
|
||||
{
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
td.header_top
|
||||
{
|
||||
color: #ffffff;
|
||||
background-color: #9999cc;
|
||||
font-size: 16pt;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
td.header_line
|
||||
{
|
||||
color: #ffffff;
|
||||
background-color: #333366;
|
||||
}
|
||||
|
||||
td.header_menu
|
||||
{
|
||||
color: #ffffff;
|
||||
background-color: #666699;
|
||||
font-size: 8pt;
|
||||
text-align: right;
|
||||
padding: 2px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
td.menu
|
||||
{
|
||||
padding: 2px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
td.code_border
|
||||
{
|
||||
color: #000000;
|
||||
background-color: #c0c0c0;
|
||||
}
|
||||
|
||||
td.code
|
||||
{
|
||||
color: #000000;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
td.type
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.credit
|
||||
{
|
||||
font-size: 8pt;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.package
|
||||
{
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
div.tags
|
||||
{
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
div.function
|
||||
{
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
div.top
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
div.warning
|
||||
{
|
||||
color: #ff0000;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
div.description
|
||||
{
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
hr
|
||||
{
|
||||
height: 1px;
|
||||
border-style: solid;
|
||||
border-color: #c0c0c0;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
span.smalllinenumber
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-left: 0px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
/* Syntax highlighting */
|
||||
|
||||
.src-code { background-color: #f5f5f5; border: 1px solid #ccc9a4; padding: 0 0 0 1em; margin : 0px;
|
||||
font-family: 'Courier New', Courier, monospace; font-weight: normal; }
|
||||
.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; }
|
||||
|
||||
.src-comm { color: green; }
|
||||
.src-id { }
|
||||
.src-inc { color: #0000FF; }
|
||||
.src-key { color: #0000FF; }
|
||||
.src-num { color: #CC0000; }
|
||||
.src-str { color: #66cccc; }
|
||||
.src-sym { font-weight: bold; }
|
||||
.src-var { }
|
||||
|
||||
.src-php { font-weight: bold; }
|
||||
|
||||
.src-doc { color: #009999 }
|
||||
.src-doc-close-template { color: #0000FF }
|
||||
.src-doc-coretag { color: #0099FF; font-weight: bold }
|
||||
.src-doc-inlinetag { color: #0099FF }
|
||||
.src-doc-internal { color: #6699cc }
|
||||
.src-doc-tag { color: #0080CC }
|
||||
.src-doc-template { color: #0000FF }
|
||||
.src-doc-type { font-style: italic }
|
||||
.src-doc-var { font-style: italic }
|
||||
|
||||
.tute-tag { color: #009999 }
|
||||
.tute-attribute-name { color: #0000FF }
|
||||
.tute-attribute-value { color: #0099FF }
|
||||
.tute-entity { font-weight: bold; }
|
||||
.tute-comment { font-style: italic }
|
||||
.tute-inline-tag { color: #636311; font-weight: bold }
|
||||
|
||||
/* tutorial */
|
||||
|
||||
.authors { }
|
||||
.author { font-style: italic; font-weight: bold }
|
||||
.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
|
||||
.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; }
|
||||
.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; }
|
||||
.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
|
||||
.ref-title-box { }
|
||||
.ref-title { }
|
||||
.ref-purpose { font-style: italic; color: #666666 }
|
||||
.ref-synopsis { }
|
||||
.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #9999CC }
|
||||
.cmd-synopsis { margin: 1em 0em }
|
||||
.cmd-title { font-weight: bold }
|
||||
.toc { margin-left: 2em; padding-left: 0em }
|
||||
|
89
tcpdf/examples/example_001.php
Executable file
89
tcpdf/examples/example_001.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_001.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 001 for TCPDF class
|
||||
// Default Header and Footer
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Default Header and Footer
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 001');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'BI', 16);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 12, 'Example 001 - €àèéìòù', 1, 1, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_001.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
84
tcpdf/examples/example_002.php
Executable file
84
tcpdf/examples/example_002.php
Executable file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_002.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 002 for TCPDF class
|
||||
// Removing Header and Footer
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Removing Header and Footer
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 002');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// remove default header/footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'BI', 20);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'Example 002', 1, 1, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_002.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
117
tcpdf/examples/example_003.php
Executable file
117
tcpdf/examples/example_003.php
Executable file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_003.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 003 for TCPDF class
|
||||
// Custom Header and Footer
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Custom Header and Footer
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
|
||||
// Extend the TCPDF class to create custom Header and Footer
|
||||
class MYPDF extends TCPDF {
|
||||
//Page header
|
||||
public function Header() {
|
||||
// Logo
|
||||
$this->Image(K_PATH_IMAGES.'logo_example.jpg', 10, 8, 15);
|
||||
// Set font
|
||||
$this->SetFont('helvetica', 'B', 20);
|
||||
// Move to the right
|
||||
$this->Cell(80);
|
||||
// Title
|
||||
$this->Cell(30, 10, 'Title', 0, 0, 'C');
|
||||
// Line break
|
||||
$this->Ln(20);
|
||||
}
|
||||
|
||||
// Page footer
|
||||
public function Footer() {
|
||||
// Position at 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
// Set font
|
||||
$this->SetFont('helvetica', 'I', 8);
|
||||
// Page number
|
||||
$this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, 0, 'C');
|
||||
}
|
||||
}
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 003');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'BI', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'Example 003', 0, 1, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_003.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
93
tcpdf/examples/example_004.php
Executable file
93
tcpdf/examples/example_004.php
Executable file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_004.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 004 for TCPDF class
|
||||
// Cell stretching
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Cell stretching
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 004');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'B', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// test Cell stretching
|
||||
$pdf->Cell(0, 10, 'TEST CELL STRETCH: no stretch', 1, 1, 'C', 0, '', 0);
|
||||
$pdf->Cell(0, 10, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);
|
||||
$pdf->Cell(0, 10, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);
|
||||
$pdf->Cell(0, 10, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);
|
||||
$pdf->Cell(0, 10, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_004.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
103
tcpdf/examples/example_005.php
Executable file
103
tcpdf/examples/example_005.php
Executable file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_005.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 005 for TCPDF class
|
||||
// Multicell
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Multicell
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 005');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// set color for filler
|
||||
$pdf->SetFillColor(255, 255, 0);
|
||||
|
||||
// Multicell test
|
||||
$pdf->MultiCell(40, 5, 'A test multicell line 1 test multicell line 2 test multicell line 3', 1, 'L', 1, 0, '', '', true);
|
||||
$pdf->MultiCell(40, 5, 'B test multicell line 1 test multicell line 2 test multicell line 3', 1, 'R', 0, 1, '', '', true);
|
||||
$pdf->MultiCell(40, 5, 'C test multicell line 1 test multicell line 2 test multicell line 3', 1, 'C', 0, 0, '', '', true);
|
||||
$pdf->MultiCell(40, 5, 'D test multicell line 1 test multicell line 2 test multicell line 3'."\n", 1, 'J', 1, 2, '' ,'', true);
|
||||
$pdf->MultiCell(40, 5, 'E test multicell line 1 test multicell line 2 test multicell line 3', 1, 'L', 0, 1, '', '', true);
|
||||
|
||||
$pdf->SetFillColor(255, 200, 200);
|
||||
|
||||
$pdf->MultiCell(40, 5, 'F test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line test multicell line'."\n", 1, 'J', 1, 1, '' ,'', true);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_005.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
243
tcpdf/examples/example_006.php
Executable file
243
tcpdf/examples/example_006.php
Executable file
@ -0,0 +1,243 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_006.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 006 for TCPDF class
|
||||
// WriteHTML and RTL support
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: WriteHTML and RTL support
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 006');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('dejavusans', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create some HTML content
|
||||
$htmlcontent = '<h1>HTML Example</h1>< € € € & è è © > \\slash \\\\double-slash \\\\\\triple-slash<h2>List</h2>List example:<ol><li><img src="../images/logo_example.png" alt="test alt attribute" width="30" height="30" border="0" /> test image</li><li><b>bold text</b></li><li><i>italic text</i></li><li><u>underlined text</u></li><li><b>b<i>bi<u>biu</u>bi</i>b</b></li><li><a href="http://www.tecnick.com" dir="ltr">link to http://www.tecnick.com</a></li><li>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.<br />Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</li><li>SUBLIST<ol><li>row one<ul><li>sublist</li></ul></li><li>row two</li></ol></li><li><b>T</b>E<i>S</i><u>T</u> <del>line through</del></li><li><font size="+3">font + 3</font></li><li><small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal</li></ol><dl><dt>Coffee</dt><dd>Black hot drink</dd><dt>Milk</dt><dd>White cold drink</dd></dl><div style="text-align:center">IMAGES<br /><img src="../images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/logo_example.jpg" alt="test alt attribute" width="100" height="100" border="0" /></div>';
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($htmlcontent, true, 0, true, 0);
|
||||
|
||||
// output some RTL HTML content
|
||||
$pdf->writeHTML('<div style="text-align:center">The words “<span dir="rtl">מזל [mazel] טוב [tov]</span>” mean “Congratulations!”</div>', true, 0, true, 0);
|
||||
|
||||
// test some inline CSS
|
||||
$inlinecss = '<p>This is just an example of html code to demonstrate some supported CSS inline styles.
|
||||
<span style="font-weight: bold;">bold text</span>
|
||||
<span style="text-decoration: line-through;">line-trough</span>
|
||||
<span style="text-decoration: underline line-through;">underline and line-trough</span>
|
||||
<span style="color: rgb(0, 128, 64);">color</span>
|
||||
<span style="background-color: rgb(255, 0, 0); color: rgb(255, 255, 255);">background color</span>
|
||||
<span style="font-weight: bold;">bold</span>
|
||||
<span style="font-size: xx-small;">xx-small</span>
|
||||
<span style="font-size: x-small;">x-small</span>
|
||||
<span style="font-size: small;">small</span>
|
||||
<span style="font-size: medium;">medium</span>
|
||||
<span style="font-size: large;">large</span>
|
||||
<span style="font-size: x-large;">x-large</span>
|
||||
<span style="font-size: xx-large;">xx-large</span>
|
||||
</p>';
|
||||
|
||||
$pdf->writeHTML($inlinecss, true, 0, true, 0);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Print a table
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create some HTML content
|
||||
$subtable = '<table border="1" cellspacing="1" cellpadding="1"><tr><td>a</td><td>b</td></tr><tr><td>c</td><td>d</td></tr></table>';
|
||||
|
||||
$htmltable = '<h2>HTML TABLE:</h2><table border="1" cellspacing="2" cellpadding="2"><tr><th>#</th><th align="right">RIGHT align</th><th align="left">LEFT align</th><th>4A</th></tr><tr><td>1</td><td bgcolor="#cccccc" align="center" colspan="2">A1 ex<i>amp</i>le <a href="http://www.tcpdf.org">link</a> column span. One two tree four five six seven eight nine ten.<br />line after br<br /><small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla<ol><li>first<ol><li>sublist</li><li>sublist</li></ol></li><li>second</li></ol><small color="#FF0000" bgcolor="#FFFF00">small small small small small small small small small small small small small small small small small small small small</small></td><td>4B</td></tr><tr><td>'.$subtable.'</td><td bgcolor="#0000FF" color="yellow" align="center">A2 € € € & è è<br/>A2 € € € & è è</td><td bgcolor="#FFFF00" align="left"><font color="#FF0000">Red</font> Yellow BG</td><td>4C</td></tr><tr><td>1A</td><td rowspan="2" colspan="2" bgcolor="#FFFFCC">2AA<br />2AB<br />2AC</td><td bgcolor="#FF0000">4D</td></tr><tr><td>1B</td><td>4E</td></tr><tr><td>1C</td><td>2C</td><td>3C</td><td>4F</td></tr></table>';
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($htmltable, true, 0, true, 0);
|
||||
|
||||
// Print some HTML Cells
|
||||
|
||||
$cellcontent = '<span color="red">red</span> <span color="green">green</span> <span color="blue">blue</span><br /><span color="red">red</span> <span color="green">green</span> <span color="blue">blue</span>';
|
||||
|
||||
$pdf->SetFillColor(255,255,0);
|
||||
|
||||
$pdf->writeHTMLCell(0, 0, '', '', $cellcontent, 'LRTB', 1, 0, true, 'L');
|
||||
$pdf->writeHTMLCell(0, 0, '', '', $cellcontent, 'LRTB', 1, 1, true, 'C');
|
||||
$pdf->writeHTMLCell(0, 0, '', '', $cellcontent, 'LRTB', 1, 0, true, 'R');
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Print a table
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create some HTML content
|
||||
|
||||
$tablealign = '<h1>Image alignments on HTML table</h1><table cellpadding="1" cellspacing="1" border="1" style="text-align:center;">
|
||||
<tr><td><img src="../images/logo_example.png" border="0" height="41" width="41" /></td></tr>
|
||||
<tr style="text-align:left;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
|
||||
<tr style="text-align:center;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
|
||||
<tr style="text-align:right;"><td><img src="../images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
|
||||
<tr><td style="text-align:left;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="top" /></td></tr>
|
||||
<tr><td style="text-align:center;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="middle" /></td></tr>
|
||||
<tr><td style="text-align:right;"><img src="../images/logo_example.png" border="0" height="41" width="41" align="bottom" /></td></tr>
|
||||
</table>';
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($tablealign, true, 0, true, 0);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Print all HTML colors
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
require_once('../htmlcolors.php');
|
||||
|
||||
$textcolors = '<h1>HTML Text Colors</h1>';
|
||||
$bgcolors = '<hr /><h1>HTML Background Colors</h1>';
|
||||
|
||||
foreach($webcolor as $k => $v) {
|
||||
$textcolors .= '<span color="#'.$v.'">'.$v.'</span> ';
|
||||
$bgcolors .= '<span bgcolor="#'.$v.'" color="#333333">'.$v.'</span> ';
|
||||
}
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($textcolors, true, 0, true, 0);
|
||||
$pdf->writeHTML($bgcolors, true, 0, true, 0);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// Test word-wrap
|
||||
|
||||
// create some HTML content
|
||||
$htmltxt = '<hr /><h1>Various tests</h1><a href="#2">link to page 2</a><br /><font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font> <font face="courier"><b>thisisaverylongword</b></font> <font face="helvetica"><i>thisisanotherverylongword</i></font> <font face="times"><b>thisisaverylongword</b></font> thisisanotherverylongword <font face="times">thisisaverylongword</font>';
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($htmltxt, true, 0, true, 0);
|
||||
|
||||
// Test fonts nesting
|
||||
|
||||
$teststr1 = 'Default <font face="courier">Courier <font face="helvetica">Helvetica <font face="times">Times <font face="dejavusans">dejavusans </font>Times </font>Helvetica </font>Courier </font>Default';
|
||||
|
||||
$teststr2 = '<small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal';
|
||||
|
||||
$teststr3 = '<font size="10" color="#ff7f50">The</font> <font size="10" color="#6495ed">quick</font> <font size="14" color="#dc143c">brown</font> <font size="18" color="#008000">fox</font> <font size="22"><a href="http://www.tcpdf.org">jumps</a></font> <font size="22" color="#a0522d">over</font> <font size="18" color="#da70d6">the</font> <font size="14" color="#9400d3">lazy</font> <font size="10" color="#4169el">dog</font>.';
|
||||
|
||||
$html = $teststr1.'<br />'.$teststr2.'<br />'.$teststr3.'<br />'.$teststr3.'<br />'.$teststr2;
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($html, true, 0, true, 0);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// test pre tag
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$htmlcontent = <<<EOF
|
||||
<div style="background-color:#880000;color:white;">
|
||||
Hello World!<br />
|
||||
Hello
|
||||
</div>
|
||||
<pre style="background-color:#336699;color:white;">
|
||||
int main() {
|
||||
printf("HelloWorld");
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
||||
<tt>Monospace font</tt>, normal font, <tt>monospace font</tt>, normal font.
|
||||
<br />
|
||||
<div style="background-color:#880000;color:white;">DIV LEVEL 1<div style="background-color:#008800;color:white;">DIV LEVEL 2</div>DIV LEVEL 1</div>
|
||||
<br />
|
||||
<span style="background-color:#880000;color:white;">SPAN LEVEL 1 <span style="background-color:#008800;color:white;">SPAN LEVEL 2</span> SPAN LEVEL 1</span>
|
||||
EOF;
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($htmlcontent, true, 0, true, 0);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_006.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
107
tcpdf/examples/example_007.php
Executable file
107
tcpdf/examples/example_007.php
Executable file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_007.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 007 for TCPDF class
|
||||
// Two independent columns with WriteHTMLCell
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Two independent columns with WriteHTMLCell
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 007');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create columns content
|
||||
$left_column = '<b>left column</b> left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column';
|
||||
|
||||
$right_column = '<b>right column</b> right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column';
|
||||
|
||||
// set columns width
|
||||
$first_column_width = 80;
|
||||
$second_column_width = 80;
|
||||
|
||||
// get current vertical position
|
||||
$current_y_position = $pdf->getY();
|
||||
|
||||
// write the first column
|
||||
$pdf->writeHTMLCell($first_column_width, '', '', $current_y_position, $left_column, 1, 0, 0, true);
|
||||
|
||||
// write the second column
|
||||
$pdf->writeHTMLCell($second_column_width, '', '', '', $right_column, 1, 1, 0, true);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_007.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
95
tcpdf/examples/example_008.php
Executable file
95
tcpdf/examples/example_008.php
Executable file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_008.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 008 for TCPDF class
|
||||
// Include external UTF-8 text file
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Include external UTF-8 text file
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 008');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('freeserif', '', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// get esternal file content
|
||||
$utf8text = file_get_contents('../cache/utf8test.txt', false);
|
||||
|
||||
// set a background color
|
||||
$pdf->SetFillColor(230, 240, 255, true);
|
||||
|
||||
// write the text
|
||||
$pdf->Write(5,$utf8text, '', 1);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_008.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
89
tcpdf/examples/example_009.php
Executable file
89
tcpdf/examples/example_009.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_009.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 009 for TCPDF class
|
||||
// Test Image
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Test Image
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 009');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// set JPEG quality
|
||||
$pdf->setJPEGQuality(75);
|
||||
|
||||
// Image example
|
||||
$pdf->Image('../images/image_demo.jpg', 50, 50, 100, 150, '', 'http://www.tcpdf.org', '', true, 150);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_009.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
177
tcpdf/examples/example_010.php
Executable file
177
tcpdf/examples/example_010.php
Executable file
@ -0,0 +1,177 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_010.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 010 for TCPDF class
|
||||
// Text on multiple columns
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Text on multiple columns
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// extend TCPF with custom functions
|
||||
class MYPDF extends TCPDF {
|
||||
|
||||
//number of colums
|
||||
protected $ncols = 3;
|
||||
|
||||
// columns width
|
||||
protected $colwidth = 57;
|
||||
|
||||
//Current column
|
||||
protected $col = 0;
|
||||
|
||||
//Ordinate of column start
|
||||
protected $y0;
|
||||
|
||||
//Set position at a given column
|
||||
public function SetCol($col) {
|
||||
$this->col = $col;
|
||||
// space between columns
|
||||
if ($this->ncols > 1) {
|
||||
$column_space = round((float)($this->w - $this->original_lMargin - $this->original_rMargin - ($this->ncols * $this->colwidth)) / ($this->ncols - 1));
|
||||
} else {
|
||||
$column_space = 0;
|
||||
}
|
||||
// X position of the current column
|
||||
if ($this->rtl) {
|
||||
$x = $this->w - $this->original_rMargin - ($col * ($this->colwidth + $column_space));
|
||||
$this->SetRightMargin($this->w - $x);
|
||||
$this->SetLeftMargin($x - $this->colwidth);
|
||||
} else {
|
||||
$x = $this->original_lMargin + ($col * ($this->colwidth + $column_space));
|
||||
$this->SetLeftMargin($x);
|
||||
$this->SetRightMargin($this->w - $x - $this->colwidth);
|
||||
}
|
||||
$this->x = $x;
|
||||
//$this->x = $x + $this->cMargin; // use this for html mode
|
||||
if ($col > 0) {
|
||||
$this->y = $this->y0;
|
||||
}
|
||||
}
|
||||
|
||||
//Method accepting or not automatic page break
|
||||
public function AcceptPageBreak() {
|
||||
if($this->col < ($this->ncols - 1)) {
|
||||
//Go to next column
|
||||
$this->SetCol($this->col + 1);
|
||||
//Keep on page
|
||||
return false;
|
||||
} else {
|
||||
$this->AddPage();
|
||||
//Go back to first column
|
||||
$this->SetCol(0);
|
||||
//Page break
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Set chapter title
|
||||
public function ChapterTitle($num, $label) {
|
||||
$this->SetFont('helvetica', '', 14);
|
||||
$this->SetFillColor(200, 220, 255);
|
||||
$this->Cell(0, 6, 'Chapter '.$num.' : '.$label, 0, 1, '', 1);
|
||||
$this->Ln(4);
|
||||
// Save ordinate
|
||||
$this->y0 = $this->GetY();
|
||||
}
|
||||
|
||||
// Print chapter body
|
||||
public function ChapterBody($file) {
|
||||
// store current margin values
|
||||
$lMargin = $this->lMargin;
|
||||
$rMargin = $this->rMargin;
|
||||
// get esternal file content
|
||||
$txt = file_get_contents($file, false);
|
||||
// Font
|
||||
$this->SetFont('times', '', 9);
|
||||
// Output text in a column
|
||||
$this->MultiCell($this->colwidth, 5, $txt, 0, 'J', 0, 1, '', '', true, 0, false);
|
||||
$this->Ln();
|
||||
// Go back to first column
|
||||
$this->SetCol(0);
|
||||
// restore previous margin values
|
||||
$this->SetLeftMargin($lMargin);
|
||||
$this->SetRightMargin($rMargin);
|
||||
}
|
||||
|
||||
//Add chapter
|
||||
public function PrintChapter($num,$title,$file) {
|
||||
$this->AddPage();
|
||||
$this->ChapterTitle($num,$title);
|
||||
$this->ChapterBody($file);
|
||||
}
|
||||
}
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 010');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
$pdf->PrintChapter(1, 'A RUNAWAY REEF', '../cache/chapter_demo_1.txt');
|
||||
$pdf->PrintChapter(2, 'THE PROS AND CONS', '../cache/chapter_demo_2.txt');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_010.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
140
tcpdf/examples/example_011.php
Executable file
140
tcpdf/examples/example_011.php
Executable file
@ -0,0 +1,140 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_011.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 011 for TCPDF class
|
||||
// Colored Table
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Colored Table
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// extend TCPF with custom functions
|
||||
class MYPDF extends TCPDF {
|
||||
|
||||
// Load table data from file
|
||||
public function LoadData($file) {
|
||||
// Read file lines
|
||||
$lines = file($file);
|
||||
$data = array();
|
||||
foreach($lines as $line) {
|
||||
$data[] = explode(';', chop($line));
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
// Colored table
|
||||
public function ColoredTable($header,$data) {
|
||||
// Colors, line width and bold font
|
||||
$this->SetFillColor(255, 0, 0);
|
||||
$this->SetTextColor(255);
|
||||
$this->SetDrawColor(128, 0, 0);
|
||||
$this->SetLineWidth(0.3);
|
||||
$this->SetFont('', 'B');
|
||||
// Header
|
||||
$w = array(40, 35, 40, 45);
|
||||
for($i = 0; $i < count($header); $i++)
|
||||
$this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);
|
||||
$this->Ln();
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
// Data
|
||||
$fill = 0;
|
||||
foreach($data as $row) {
|
||||
$this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
|
||||
$this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
|
||||
$this->Cell($w[2], 6, number_format($row[2]), 'LR', 0, 'R', $fill);
|
||||
$this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill);
|
||||
$this->Ln();
|
||||
$fill=!$fill;
|
||||
}
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
}
|
||||
}
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 011');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
//Column titles
|
||||
$header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)');
|
||||
|
||||
//Data loading
|
||||
$data = $pdf->LoadData('../cache/table_data_demo.txt');
|
||||
|
||||
// print colored table
|
||||
$pdf->ColoredTable($header, $data);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_011.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
177
tcpdf/examples/example_012.php
Executable file
177
tcpdf/examples/example_012.php
Executable file
@ -0,0 +1,177 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_012.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 012 for TCPDF class
|
||||
// Graphic Functions
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Graphic Functions
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 012');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// disable header and footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$style = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,20,5,10', 'phase' => 10, 'color' => array(255, 0, 0));
|
||||
$style2 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0));
|
||||
$style3 = array('width' => 1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,10', 'color' => array(255, 0, 0));
|
||||
$style4 = array('L' => 0,
|
||||
'T' => array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => '20,10', 'phase' => 10, 'color' => array(100, 100, 255)),
|
||||
'R' => array('width' => 0.50, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),
|
||||
'B' => array('width' => 0.75, 'cap' => 'square', 'join' => 'miter', 'dash' => '30,10,5,10'));
|
||||
$style5 = array('width' => 0.25, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 64, 128));
|
||||
$style6 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10,10', 'color' => array(0, 128, 0));
|
||||
$style7 = array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 128, 0));
|
||||
|
||||
// Line
|
||||
$pdf->Text(5, 7, 'Line examples');
|
||||
$pdf->Line(5, 10, 80, 30, $style);
|
||||
$pdf->Line(5, 10, 5, 30, $style2);
|
||||
$pdf->Line(5, 10, 80, 10, $style3);
|
||||
|
||||
// Rect
|
||||
$pdf->Text(100, 7, 'Rectangle examples');
|
||||
$pdf->Rect(100, 10, 40, 20, 'DF', $style4, array(220, 220, 200));
|
||||
$pdf->Rect(145, 10, 40, 20, 'D', array('all' => $style3));
|
||||
|
||||
// Curve
|
||||
$pdf->Text(5, 37, 'Curve examples');
|
||||
$pdf->Curve(5, 40, 30, 55, 70, 45, 60, 75, null, $style6);
|
||||
$pdf->Curve(80, 40, 70, 75, 150, 45, 100, 75, 'F', $style6);
|
||||
$pdf->Curve(140, 40, 150, 55, 180, 45, 200, 75, 'DF', $style6, array(200, 220, 200));
|
||||
|
||||
// Circle and ellipse
|
||||
$pdf->Text(5, 82, 'Circle and ellipse examples');
|
||||
$pdf->SetLineStyle($style5);
|
||||
$pdf->Circle(25,105,20);
|
||||
$pdf->Circle(25,105,10, 90, 180, null, $style6);
|
||||
$pdf->Circle(25,105,10, 270, 360, 'F');
|
||||
$pdf->Circle(25,105,10, 270, 360, 'C', $style6);
|
||||
|
||||
$pdf->SetLineStyle($style5);
|
||||
$pdf->Ellipse(100,105,40,20);
|
||||
$pdf->Ellipse(100,105,20,10, 0, 90, 180, null, $style6);
|
||||
$pdf->Ellipse(100,105,20,10, 0, 270, 360, 'DF', $style6);
|
||||
|
||||
$pdf->SetLineStyle($style5);
|
||||
$pdf->Ellipse(175,105,30,15,45);
|
||||
$pdf->Ellipse(175,105,15,7.50, 45, 90, 180, null, $style6);
|
||||
$pdf->Ellipse(175,105,15,7.50, 45, 270, 360, 'F', $style6, array(220, 200, 200));
|
||||
|
||||
// Polygon
|
||||
$pdf->Text(5, 132, 'Polygon examples');
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
|
||||
$pdf->Polygon(array(5,135,45,135,15,165));
|
||||
$pdf->Polygon(array(60,135,80,135,80,155,70,165,50,155), 'DF', array($style6, $style7, $style7, 0, $style6), array(220, 200, 200));
|
||||
$pdf->Polygon(array(120,135,140,135,150,155,110,155), 'D', array($style6, 0, $style7, $style6));
|
||||
$pdf->Polygon(array(160,135,190,155,170,155,200,160,160,165), 'DF', array('all' => $style6), array(220, 220, 220));
|
||||
|
||||
// Polygonal Line
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 164)));
|
||||
$pdf->PolyLine(array(80,165,90,160,100,165,110,160,120,165,130,160,140,165), 'D', array(), array());
|
||||
|
||||
// Regular polygon
|
||||
$pdf->Text(5, 172, 'Regular polygon examples');
|
||||
$pdf->SetLineStyle($style5);
|
||||
$pdf->RegularPolygon(20, 190, 15, 6, 0, 1, 'F');
|
||||
$pdf->RegularPolygon(55, 190, 15, 6);
|
||||
$pdf->RegularPolygon(55, 190, 10, 6, 45, 0, 'DF', array($style6, 0, $style7, 0, $style7, $style7));
|
||||
$pdf->RegularPolygon(90, 190, 15, 3, 0, 1, 'DF', array('all' => $style5), array(200, 220, 200), 'F', array(255, 200, 200));
|
||||
$pdf->RegularPolygon(125, 190, 15, 4, 30, 1, null, array('all' => $style5), null, null, $style6);
|
||||
$pdf->RegularPolygon(160, 190, 15, 10);
|
||||
|
||||
// Star polygon
|
||||
$pdf->Text(5, 212, 'Star polygon examples');
|
||||
$pdf->SetLineStyle($style5);
|
||||
$pdf->StarPolygon(20, 230, 15, 20, 3, 0, 1, 'F');
|
||||
$pdf->StarPolygon(55, 230, 15, 12, 5);
|
||||
$pdf->StarPolygon(55, 230, 7, 12, 5, 45, 0, 'DF', array('all' => $style7), array(220, 220, 200), 'F', array(255, 200, 200));
|
||||
$pdf->StarPolygon(90, 230, 15, 20, 6, 0, 1, 'DF', array('all' => $style5), array(220, 220, 200), 'F', array(255, 200, 200));
|
||||
$pdf->StarPolygon(125, 230, 15, 5, 2, 30, 1, null, array('all' => $style5), null, null, $style6);
|
||||
$pdf->StarPolygon(160, 230, 15, 10, 3);
|
||||
$pdf->StarPolygon(160, 230, 7, 50, 26);
|
||||
|
||||
// Rounded rectangle
|
||||
$pdf->Text(5, 252, 'Rounded rectangle examples');
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
|
||||
$pdf->RoundedRect(5, 255, 40, 30, 3.50, '1111', 'DF');
|
||||
$pdf->RoundedRect(50, 255, 40, 30, 6.50, '1000');
|
||||
$pdf->RoundedRect(95, 255, 40, 30, 10.0, '1111', null, $style6);
|
||||
$pdf->RoundedRect(140, 255, 40, 30, 8.0, '0101', 'DF', $style6, array(200, 200, 200));
|
||||
|
||||
// Arrows
|
||||
$pdf->Text(190, 252, 'Arrows');
|
||||
$pdf->SetLineStyle($style5);
|
||||
$pdf->SetFillColor(255, 0, 0);
|
||||
$pdf->Arrow($x0=200, $y0=280, $x1=185, $y1=266, $head_style=0, $arm_size=5, $arm_angle=15);
|
||||
$pdf->Arrow($x0=200, $y0=280, $x1=190, $y1=263, $head_style=1, $arm_size=5, $arm_angle=15);
|
||||
$pdf->Arrow($x0=200, $y0=280, $x1=195, $y1=261, $head_style=2, $arm_size=5, $arm_angle=15);
|
||||
$pdf->Arrow($x0=200, $y0=280, $x1=200, $y1=260, $head_style=3, $arm_size=5, $arm_angle=15);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_012.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
223
tcpdf/examples/example_013.php
Executable file
223
tcpdf/examples/example_013.php
Executable file
@ -0,0 +1,223 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_013.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 013 for TCPDF class
|
||||
// Graphic Transformations
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Graphic Transformations
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 013');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// disable header and footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
//Scaling
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(50, 20, 40, 10, 'D');
|
||||
$pdf->Text(50, 19, 'Scale');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//Scale by 150% centered by (50,30) which is the lower left corner of the rectangle
|
||||
$pdf->ScaleXY(150, 50, 30);
|
||||
$pdf->Rect(50, 20, 40, 10, 'D');
|
||||
$pdf->Text(50, 19, 'Scale');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Translation
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(125, 20, 40, 10, 'D');
|
||||
$pdf->Text(125, 19, 'Translate');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//Translate 7 to the right, 5 to the bottom
|
||||
$pdf->Translate(7, 5);
|
||||
$pdf->Rect(125, 20, 40, 10, 'D');
|
||||
$pdf->Text(125, 19, 'Translate');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Rotation
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(50, 50, 40, 10, 'D');
|
||||
$pdf->Text(50, 49, 'Rotate');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//Rotate 20 degrees counter-clockwise centered by (50,60) which is the lower left corner of the rectangle
|
||||
$pdf->Rotate(20, 50, 60);
|
||||
$pdf->Rect(50, 50, 40, 10, 'D');
|
||||
$pdf->Text(50, 49, 'Rotate');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Skewing
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(125, 50, 40, 10, 'D');
|
||||
$pdf->Text(125, 49, 'Skew');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//skew 30 degrees along the x-axis centered by (125,60) which is the lower left corner of the rectangle
|
||||
$pdf->SkewX(30, 125, 60);
|
||||
$pdf->Rect(125, 50, 40, 10, 'D');
|
||||
$pdf->Text(125, 49, 'Skew');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Mirroring horizontally
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(50, 80, 40, 10, 'D');
|
||||
$pdf->Text(50, 79, 'MirrorH');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//mirror horizontally with axis of reflection at x-position 50 (left side of the rectangle)
|
||||
$pdf->MirrorH(50);
|
||||
$pdf->Rect(50, 80, 40, 10, 'D');
|
||||
$pdf->Text(50, 79, 'MirrorH');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Mirroring vertically
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(125, 80, 40, 10, 'D');
|
||||
$pdf->Text(125, 79, 'MirrorV');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//mirror vertically with axis of reflection at y-position 90 (bottom side of the rectangle)
|
||||
$pdf->MirrorV(90);
|
||||
$pdf->Rect(125, 80, 40, 10, 'D');
|
||||
$pdf->Text(125, 79, 'MirrorV');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Point reflection
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(50, 110, 40, 10, 'D');
|
||||
$pdf->Text(50, 109, 'MirrorP');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//point reflection at the lower left point of rectangle
|
||||
$pdf->MirrorP(50,120);
|
||||
$pdf->Rect(50, 110, 40, 10, 'D');
|
||||
$pdf->Text(50, 109, 'MirrorP');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
//Mirroring against a straigth line described by a point (120, 120) and an angle -20°
|
||||
$angle=-20;
|
||||
$px=120;
|
||||
$py=120;
|
||||
|
||||
//just vor visualisation: the straight line to mirror against
|
||||
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->Line($px-1,$py-1,$px+1,$py+1);
|
||||
$pdf->Line($px-1,$py+1,$px+1,$py-1);
|
||||
$pdf->StartTransform();
|
||||
$pdf->Rotate($angle, $px, $py);
|
||||
$pdf->Line($px-5, $py, $px+60, $py);
|
||||
$pdf->StopTransform();
|
||||
|
||||
$pdf->SetDrawColor(200);
|
||||
$pdf->SetTextColor(200);
|
||||
$pdf->Rect(125, 110, 40, 10, 'D');
|
||||
$pdf->Text(125, 109, 'MirrorL');
|
||||
$pdf->SetDrawColor(0);
|
||||
$pdf->SetTextColor(0);
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
//mirror against the straight line
|
||||
$pdf->MirrorL($angle, $px, $py);
|
||||
$pdf->Rect(125, 110, 40, 10, 'D');
|
||||
$pdf->Text(125, 109, 'MirrorL');
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_013.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
191
tcpdf/examples/example_014.php
Executable file
191
tcpdf/examples/example_014.php
Executable file
@ -0,0 +1,191 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_014.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 014 for TCPDF class
|
||||
// Javascript Form and user rights (only works on Adobe Acrobat)
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Javascript Form and user rights (only works on Adobe Acrobat)
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 014');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
/*
|
||||
It is possible to create text fields, combo boxes, check boxes and buttons.
|
||||
Fields are created at the current position and are given a name.
|
||||
This name allows to manipulate them via JavaScript in order to perform some validation for instance.
|
||||
*/
|
||||
|
||||
// set default form properties
|
||||
$pdf->setFormDefaultProp(array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 200), 'strokeColor'=>array(255, 128, 128)));
|
||||
|
||||
$pdf->SetFont('helvetica', 'BI', 18);
|
||||
$pdf->Cell(0, 5, 'Subscription form', 0, 1, 'C');
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('helvetica', '', 12);
|
||||
|
||||
// First name
|
||||
$pdf->Cell(35, 5, 'First name:');
|
||||
$pdf->TextField('firstname', 50, 5);
|
||||
$pdf->Ln(6);
|
||||
|
||||
// Last name
|
||||
$pdf->Cell(35, 5, 'Last name:');
|
||||
$pdf->TextField('lastname', 50, 5);
|
||||
$pdf->Ln(6);
|
||||
|
||||
// Gender
|
||||
$pdf->Cell(35, 5, 'Gender:');
|
||||
//$pdf->ComboBox('gender', 10, 5, array('', 'M', 'F'));
|
||||
$pdf->ComboBox('gender', 30, 5, array(array('', '-'), array('M', 'Male'), array('F', 'Female')));
|
||||
$pdf->Ln(6);
|
||||
|
||||
// Drink
|
||||
$pdf->Cell(35, 5, 'Drink:');
|
||||
$pdf->RadioButton('drink', 5, array(), array(), 'Water');
|
||||
$pdf->Cell(35, 5, 'Water');
|
||||
$pdf->Ln(6);
|
||||
$pdf->Cell(35, 5, '');
|
||||
$pdf->RadioButton('drink', 5, array(), array(), 'Beer', true);
|
||||
$pdf->Cell(35, 5, 'Beer');
|
||||
$pdf->Ln(6);
|
||||
$pdf->Cell(35, 5, '');
|
||||
$pdf->RadioButton('drink', 5, array(), array(), 'Wine');
|
||||
$pdf->Cell(35, 5, 'Wine');
|
||||
$pdf->Ln(10);
|
||||
|
||||
// Listbox
|
||||
$pdf->Cell(35, 5, 'List:');
|
||||
$pdf->ListBox('listbox', 60, 15, array('', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7'), array('multipleSelection'=>'true'));
|
||||
$pdf->Ln(20);
|
||||
|
||||
// Adress
|
||||
$pdf->Cell(35, 5, 'Address:');
|
||||
$pdf->TextField('address', 60, 18, array('multiline'=>true));
|
||||
$pdf->Ln(19);
|
||||
|
||||
// E-mail
|
||||
$pdf->Cell(35, 5, 'E-mail:');
|
||||
$pdf->TextField('email', 50, 5);
|
||||
$pdf->Ln(6);
|
||||
|
||||
// Newsletter
|
||||
$pdf->Cell(35, 5, 'Newsletter:');
|
||||
$pdf->CheckBox('newsletter', 5, true, array(), array(), 'OK');
|
||||
$pdf->Ln(10);
|
||||
|
||||
// Date of the day
|
||||
$pdf->Cell(35, 5, 'Date:');
|
||||
$pdf->TextField('date', 30, 5, array(), array('v'=>date('Y-m-d'), 'dv'=>date('Y-m-d')));
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetX(50);
|
||||
|
||||
// Button to validate and print
|
||||
$pdf->Button('print', 30, 10, 'Print', 'Print()', array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64)));
|
||||
|
||||
// Reset Button
|
||||
$pdf->Button('reset', 30, 10, 'Reset', array('S'=>'ResetForm'), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64)));
|
||||
|
||||
// Submit Button
|
||||
$pdf->Button('submit', 30, 10, 'Submit', array('S'=>'SubmitForm', 'F'=>'http://localhost/printvars.php', 'Flags'=>array('ExportFormat')), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64)));
|
||||
|
||||
|
||||
// Form validation functions
|
||||
$js = <<<EOD
|
||||
function CheckField(name,message) {
|
||||
var f = getField(name);
|
||||
if(f.value == '') {
|
||||
app.alert(message);
|
||||
f.setFocus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function Print() {
|
||||
if(!CheckField('firstname','First name is mandatory')) {return;}
|
||||
if(!CheckField('lastname','Last name is mandatory')) {return;}
|
||||
if(!CheckField('gender','Gender is mandatory')) {return;}
|
||||
if(!CheckField('address','Address is mandatory')) {return;}
|
||||
print();
|
||||
}
|
||||
EOD;
|
||||
|
||||
// Add Javascript code
|
||||
$pdf->IncludeJS($js);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_014.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
116
tcpdf/examples/example_015.php
Executable file
116
tcpdf/examples/example_015.php
Executable file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_015.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 015 for TCPDF class
|
||||
// Bookmarks (Table of Content)
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Bookmarks (Table of Content)
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 015');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'B', 20);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// set a bookmark for the current position
|
||||
$pdf->Bookmark('Chapter 1', 0, 0);
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Paragraph 1.1', 1, 0);
|
||||
$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Paragraph 1.2', 1, 0);
|
||||
$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
|
||||
$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Paragraph 1.3', 1, 0);
|
||||
$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Chapter 2', 0, 0);
|
||||
$pdf->Cell(0, 10, 'Chapter 2', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Chapter 3', 0, 0);
|
||||
$pdf->Cell(0, 10, 'Chapter 3', 0, 1, 'L');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_015.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
106
tcpdf/examples/example_016.php
Executable file
106
tcpdf/examples/example_016.php
Executable file
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_016.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 016 for TCPDF class
|
||||
// Document Encryption / Security
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Document Encryption / Security
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// Set PDF protection (RSA 40bit encryption)
|
||||
/*
|
||||
* The permission array is composed of values taken from the following ones:
|
||||
* - copy: copy text and images to the clipboard
|
||||
* - print: print the document
|
||||
* - modify: modify it (except for annotations and forms)
|
||||
* - annot-forms: add annotations and forms
|
||||
* If you don't set any password, the document will open as usual.
|
||||
* If you set a user password, the PDF viewer will ask for it before
|
||||
* displaying the document. The master password, if different from
|
||||
* the user one, can be used to get full access.
|
||||
* Note: protecting a document requires to encrypt it, which increases the
|
||||
* processing time a lot. This can cause a PHP time-out in some cases,
|
||||
* especially if the document contains images or fonts.
|
||||
*/
|
||||
$pdf->SetProtection(array('print'));
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 016');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array('helvetica', '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array('helvetica', '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 20);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'Encryption Example', 1, 1, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_016.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
107
tcpdf/examples/example_017.php
Executable file
107
tcpdf/examples/example_017.php
Executable file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_017.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 017 for TCPDF class
|
||||
// Two independent columns with MultiCell
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Two independent columns with MultiCell
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 017');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create columns content
|
||||
$left_column = 'START left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column left column END'."\n";
|
||||
|
||||
$right_column = 'START right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column right column END'."\n";
|
||||
|
||||
// set columns width
|
||||
$first_column_width = 80;
|
||||
$second_column_width = 80;
|
||||
|
||||
// get current vertical position
|
||||
$current_y_position = $pdf->getY();
|
||||
|
||||
// write the first column
|
||||
$pdf->MultiCell($first_column_width, 0, $left_column, 1, 'J', 0, 0, '', '', true, 0);
|
||||
|
||||
// write the second column
|
||||
$pdf->MultiCell($second_column_width, 0, $right_column, 1, 'J', 0, 1, '', '', true, 0);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_017.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
129
tcpdf/examples/example_018.php
Executable file
129
tcpdf/examples/example_018.php
Executable file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_018.php
|
||||
// Begin : 2008-03-06
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 018 for TCPDF class
|
||||
// RTL document with Persian language
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: RTL document with Persian language
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-06
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 018');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'UTF-8';
|
||||
$lg['a_meta_dir'] = 'rtl';
|
||||
$lg['a_meta_language'] = 'fa';
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($lg);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('dejavusans', '', 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// Persian and English content
|
||||
$htmlpersian = '<span color="#660000">Persian example:</span><br />سلام بالاخره مشکل PDF فارسی به طور کامل حل شد. اینم یک نمونش.<br />مشکل حرف \"ژ\" در بعضی کلمات مانند کلمه ویژه نیز بر طرف شد.<br />نگارش حروف لام و الف پشت سر هم نیز تصحیح شد.<br />با تشکر از "Asuni Nicola" و محمد علی گل کار برای پشتیبانی زبان فارسی.';
|
||||
$pdf->WriteHTML($htmlpersian, true, 0, true, 0);
|
||||
|
||||
// set LTR direction for english translation
|
||||
$pdf->setRTL(false);
|
||||
|
||||
$pdf->SetFontSize(10);
|
||||
|
||||
// Persian and English content
|
||||
$htmlpersiantranslation = '<span color="#0000ff">Hi, At last Problem of Persian PDF Solved completely. This is a example for it.<br />Problem of "jeh" letter in some word like "ویژه" (=special) fix too.<br />The joining of laa and alf letter fix now.<br />Special thanks to "Nicola Asuni" and "Mohamad Ali Golkar" for Persian support.</span>';
|
||||
$pdf->WriteHTML($htmlpersiantranslation, true, 0, true, 0);
|
||||
|
||||
// Restore RTL direction
|
||||
$pdf->setRTL(true);
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('almohanad', '', 18);
|
||||
|
||||
// Arabic and English content
|
||||
$pdf->Cell(0, 12, 'بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ',0,1,'C');
|
||||
$htmlcontent = 'تمَّ بِحمد الله حلّ مشكلة الكتابة باللغة العربية في ملفات الـ<span color="#FF0000">PDF</span> مع دعم الكتابة <span color="#0000FF">من اليمين إلى اليسار</span> و<span color="#009900">الحركَات</span> .<br />تم الحل بواسطة <span color="#993399">صالح المطرفي و Asuni Nicola</span> . ';
|
||||
$pdf->WriteHTML($htmlcontent, true, 0, true, 0);
|
||||
|
||||
$pdf->Ln(5);
|
||||
|
||||
// set LTR direction for english translation
|
||||
$pdf->setRTL(false);
|
||||
|
||||
$pdf->SetFontSize(18);
|
||||
|
||||
// Arabic and English content
|
||||
$htmlcontent2 = '<span color="#0000ff">This is Arabic "العربية" Example With TCPDF.</span>';
|
||||
$pdf->WriteHTML($htmlcontent2, true, 0, true, 0);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_018.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
106
tcpdf/examples/example_019.php
Executable file
106
tcpdf/examples/example_019.php
Executable file
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_019.php
|
||||
// Begin : 2008-03-07
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 019 for TCPDF class
|
||||
// Non unicode with alternative config file
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Non unicode with alternative config file
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
|
||||
// load alternative config file
|
||||
require_once('../config/tcpdf_config_alt.php');
|
||||
define("K_TCPDF_EXTERNAL_CONFIG", true);
|
||||
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 019');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'ISO-8859-1';
|
||||
$lg['a_meta_dir'] = 'ltr';
|
||||
$lg['a_meta_language'] = 'en';
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($lg);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', 'BIU', 20);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'Example 019', 1, 1, 'C');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetFont('times', '', 10);
|
||||
$pdf->MultiCell(80, 0, 'Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.'."\n", 1, 'J', 0, 1, '', '', true, 0);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_019.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
138
tcpdf/examples/example_020.php
Executable file
138
tcpdf/examples/example_020.php
Executable file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_020.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 020 for TCPDF class
|
||||
// Two columns composed by MultiCell of different
|
||||
// heights
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Two columns composed by MultiCell of different heights
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// extend TCPF with custom functions
|
||||
class MYPDF extends TCPDF {
|
||||
public function MultiRow($left, $right) {
|
||||
//MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0)
|
||||
|
||||
$page_start = $this->getPage();
|
||||
$y_start = $this->GetY();
|
||||
|
||||
// write the left cell
|
||||
$this->MultiCell(40, 0, $left, 1, 'R', 0, 2, '', '', true, 0);
|
||||
|
||||
$page_end_1 = $this->getPage();
|
||||
$y_end_1 = $this->GetY();
|
||||
|
||||
$this->setPage($page_start);
|
||||
|
||||
// write the right cell
|
||||
$this->MultiCell(0, 0, $right, 1, 'J', 0, 1, $this->GetX() ,$y_start, true, 0);
|
||||
|
||||
$page_end_2 = $this->getPage();
|
||||
$y_end_2 = $this->GetY();
|
||||
|
||||
// set the new row position by case
|
||||
if (max($page_end_1,$page_end_2) == $page_start) {
|
||||
$ynew = max($y_end_1, $y_end_2);
|
||||
} elseif ($page_end_1 == $page_end_2) {
|
||||
$ynew = max($y_end_1, $y_end_2);
|
||||
} elseif ($page_end_1 > $page_end_2) {
|
||||
$ynew = $y_end_1;
|
||||
} else {
|
||||
$ynew = $y_end_2;
|
||||
}
|
||||
|
||||
$this->setPage(max($page_end_1,$page_end_2));
|
||||
$this->SetXY($this->GetX(),$ynew);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 020');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 9);
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
//$pdf->SetCellPadding(0);
|
||||
//$pdf->SetLineWidth(2);
|
||||
|
||||
$text = 'Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis. Cras nulla nulla, hendrerit et, porttitor eu, adipiscing et, lorem. Pellentesque sit amet augue. Nam lobortis sollicitudin turpis. Sed velit est, mollis non, elementum ac, tempor quis, arcu. Aliquam a pede. Quisque arcu magna, nonummy eget, hendrerit a, lacinia egestas, enim. Donec bibendum. In a ipsum. Sed gravida facilisis sem. Nam tempus, tellus ut tincidunt elementum, augue tellus fermentum quam, sit amet lobortis sem ipsum sed elit.In accumsan ligula nonummy libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed vel risus. Vestibulum ut lacus. Proin fermentum, erat a commodo lacinia, lacus dui hendrerit nulla, et pellentesque neque diam at elit. Fusce blandit, dolor pharetra bibendum lacinia, augue sem scelerisque sem, bibendum sodales orci justo et sapien. Etiam nec eros ac turpis lobortis interdum. Integer volutpat nibh a lacus. Duis erat est, rhoncus nec, rhoncus viverra, pulvinar sit amet, leo. Duis blandit. Nunc convallis nisi ac ante. Cras nunc massa, molestie quis, porttitor a, volutpat accumsan, quam. Nullam a erat vitae orci bibendum viverra. Donec tristique leo eget nisl adipiscing pellentesque. Nam vehicula, enim quis aliquet euismod, dolor sem pellentesque libero, nec blandit nisi erat sit amet dui. Integer sapien. Donec molestie metus in neque. Suspendisse porttitor enim a nisl.Maecenas lacinia dolor ornare ligula. Maecenas eu eros. Curabitur non leo non nulla fringilla auctor. Etiam porttitor diam vel quam. Maecenas sed ligula nec massa venenatis faucibus. Curabitur aliquet accumsan tellus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse vitae eros ac purus fermentum suscipit. Curabitur interdum orci a mi. Nunc placerat diam in elit.Nunc elit. Maecenas vulputate, sem sit amet condimentum lacinia, ipsum eros porta dolor, sed luctus magna ante eu nisl. Proin non nisi. Vivamus sed quam et est lobortis porttitor. Cras sit amet urna sit amet elit ultricies consequat. Praesent blandit elit ut urna. Cras hendrerit rhoncus sapien. Fusce ullamcorper lobortis ipsum. Pellentesque vel velit at sem blandit facilisis. Nulla aliquet orci id metus.';
|
||||
|
||||
// print some rows just as example
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$pdf->MultiRow('Row '.($i+1), $text."\n");
|
||||
}
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_020.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
95
tcpdf/examples/example_021.php
Executable file
95
tcpdf/examples/example_021.php
Executable file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_021.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 021 for TCPDF class
|
||||
// WriteHTML text flow
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: WriteHTML text flow.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 021');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 9);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create some HTML content
|
||||
$html = 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. <em>Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?</em> <em>Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</em><br /><br /><b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i> -> <b>A</b> + <b>B</b> = <b>C</b> -> <i>C</i> - <i>B</i> = <i>A</i> -> <i>C</i> - <i>A</i> = <i>B</i><br /><br /><b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u> <b>Bold</b><i>Italic</i><u>Underlined</u>';
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($html, true, 0, true, 0);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_021.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
136
tcpdf/examples/example_022.php
Executable file
136
tcpdf/examples/example_022.php
Executable file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_022.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 022 for TCPDF class
|
||||
// CMYK colors
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: CMYK colors.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 022');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', "B", 12);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$pdf->SetLineWidth(1);
|
||||
|
||||
$pdf->SetDrawColor(50, 0, 0, 0);
|
||||
$pdf->SetFillColor(100, 0, 0, 0);
|
||||
$pdf->SetTextColor(100, 0, 0, 0);
|
||||
$pdf->Rect(30, 60, 20, 20, 'DF');
|
||||
$pdf->Text(30, 85, 'Cyan');
|
||||
|
||||
$pdf->SetDrawColor(0, 50, 0, 0);
|
||||
$pdf->SetFillColor(0, 100, 0, 0);
|
||||
$pdf->SetTextColor(0, 100, 0, 0);
|
||||
$pdf->Rect(60, 60, 20, 20, 'DF');
|
||||
$pdf->Text(60, 85, 'Magenta');
|
||||
|
||||
$pdf->SetDrawColor(0, 0, 50, 0);
|
||||
$pdf->SetFillColor(0, 0, 100, 0);
|
||||
$pdf->SetTextColor(0, 0, 100, 0);
|
||||
$pdf->Rect(90, 60, 20, 20, 'DF');
|
||||
$pdf->Text(90, 85, 'Yellow');
|
||||
|
||||
$pdf->SetDrawColor(0, 0, 0, 50);
|
||||
$pdf->SetFillColor(0, 0, 0, 100);
|
||||
$pdf->SetTextColor(0, 0, 0, 100);
|
||||
$pdf->Rect(120, 60, 20, 20, 'DF');
|
||||
$pdf->Text(120, 85, 'Black');
|
||||
|
||||
$pdf->SetDrawColor(128, 0, 0);
|
||||
$pdf->SetFillColor(255, 0, 0);
|
||||
$pdf->SetTextColor(255, 0, 0);
|
||||
$pdf->Rect(30, 100, 20, 20, 'DF');
|
||||
$pdf->Text(30, 125, 'Red');
|
||||
|
||||
$pdf->SetDrawColor(0, 127, 0);
|
||||
$pdf->SetFillColor(0, 255, 0);
|
||||
$pdf->SetTextColor(0, 255, 0);
|
||||
$pdf->Rect(60, 100, 20, 20, 'DF');
|
||||
$pdf->Text(60, 125, 'Green');
|
||||
|
||||
$pdf->SetDrawColor(0, 0, 127);
|
||||
$pdf->SetFillColor(0, 0, 255);
|
||||
$pdf->SetTextColor(0, 0, 255);
|
||||
$pdf->Rect(90, 100, 20, 20, 'DF');
|
||||
$pdf->Text(90, 125, 'Blue');
|
||||
|
||||
$pdf->SetDrawColor(50);
|
||||
$pdf->SetFillColor(128);
|
||||
$pdf->SetTextColor(128);
|
||||
$pdf->Rect(30, 140, 20, 20, 'DF');
|
||||
$pdf->Text(30, 165, 'Gray');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_022.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
100
tcpdf/examples/example_023.php
Executable file
100
tcpdf/examples/example_023.php
Executable file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_023.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 023 for TCPDF class
|
||||
// Page Groups
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Page Groups.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 023');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'BI', 12);
|
||||
|
||||
// Start First Page Group
|
||||
$pdf->startPageGroup();
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'Start of group 1', 0, 1, 'L');
|
||||
$pdf->AddPage();
|
||||
|
||||
// Start Second Page Group
|
||||
$pdf->startPageGroup();
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'Start of group 2', 0, 1, 'L');
|
||||
$pdf->AddPage();
|
||||
$pdf->AddPage();
|
||||
$pdf->AddPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_023.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
104
tcpdf/examples/example_024.php
Executable file
104
tcpdf/examples/example_024.php
Executable file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_024.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 024 for TCPDF class
|
||||
// Object Visibility
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Object Visibility
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 024');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 40);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
/*
|
||||
* setVisibility() allows to restrict the rendering of some
|
||||
* elements to screen or printout. This can be useful, for
|
||||
* instance, to put a background image or color that will
|
||||
* show on screen but won't print.
|
||||
*/
|
||||
|
||||
// set visibility only for screen
|
||||
$pdf->setVisibility('screen');
|
||||
$pdf->Write(6, "This line is for display.\n");
|
||||
|
||||
// set visibility only for print
|
||||
$pdf->setVisibility('print');
|
||||
$pdf->Write(6, "This line is for printout.\n");
|
||||
|
||||
// restore visibility
|
||||
$pdf->setVisibility('all');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_024.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
115
tcpdf/examples/example_025.php
Executable file
115
tcpdf/examples/example_025.php
Executable file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_025.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 025 for TCPDF class
|
||||
// Object Transparency
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Object Transparency
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 025');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', 'BI', 8);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
/*
|
||||
* setAlpha() gives transparency support. You can set the
|
||||
* alpha channel from 0 (fully transparent) to 1 (fully
|
||||
* opaque). It applies to all elements (text, drawings,
|
||||
* images).
|
||||
*/
|
||||
|
||||
$pdf->SetLineWidth(1.5);
|
||||
|
||||
// draw opaque red square
|
||||
$pdf->SetFillColor(255, 0, 0);
|
||||
$pdf->Rect(30, 60, 40, 40, 'DF');
|
||||
|
||||
// set alpha to semi-transparency
|
||||
$pdf->SetAlpha(0.5);
|
||||
|
||||
// draw green square
|
||||
$pdf->SetFillColor(0, 255, 0);
|
||||
$pdf->Rect(40, 70, 40, 40, 'DF');
|
||||
|
||||
// draw jpeg image
|
||||
$pdf->Image('../images/image_demo.jpg', 50, 80, 40, 40, '', 'http://www.tcpdf.org', '', true, 72);
|
||||
|
||||
// restore full opacity
|
||||
$pdf->SetAlpha(1);
|
||||
|
||||
// print name
|
||||
$pdf->Text(55,85,'TRANSPARENCY');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_025.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
101
tcpdf/examples/example_026.php
Executable file
101
tcpdf/examples/example_026.php
Executable file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_026.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 026 for TCPDF class
|
||||
// Text Clipping
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Text Clipping
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 026');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', 'BI', 50);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print clipping text
|
||||
$pdf->Text(20, 40, 'STROKE TEXT', 1, false);
|
||||
|
||||
//Start Transformation
|
||||
$pdf->StartTransform();
|
||||
|
||||
// print clipping text
|
||||
$pdf->Text(20, 70, 'CLIPPING TEXT', 2, true);
|
||||
|
||||
// draw jpeg image
|
||||
$pdf->Image('../images/image_demo.jpg', 20, 45, 170, 40, '', 'http://www.tcpdf.org', '', true, 72);
|
||||
|
||||
//Stop Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_026.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
301
tcpdf/examples/example_027.php
Executable file
301
tcpdf/examples/example_027.php
Executable file
@ -0,0 +1,301 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_027.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 027 for TCPDF class
|
||||
// 1D Barcodes
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: 1D Barcodes.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 027');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set a barcode on the page footer
|
||||
$pdf->setBarcode(date('Y-m-d H:i:s'));
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$style = array(
|
||||
'position' => 'S',
|
||||
'border' => true,
|
||||
'padding' => 4,
|
||||
'fgcolor' => array(0,0,0),
|
||||
'bgcolor' => false, //array(255,255,255),
|
||||
'text' => true,
|
||||
'font' => 'helvetica',
|
||||
'fontsize' => 8,
|
||||
'stretchtext' => 4
|
||||
);
|
||||
|
||||
// PRINT VARIOUS 1D BARCODES
|
||||
|
||||
// CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
|
||||
$pdf->Cell(0, 0, 'CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 39', 'C39', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 39 + CHECKSUM
|
||||
$pdf->Cell(0, 0, 'CODE 39 + CHECKSUM', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 39 +', 'C39+', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 39 EXTENDED
|
||||
$pdf->Cell(0, 0, 'CODE 39 EXTENDED', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 39 E', 'C39E', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 39 EXTENDED + CHECKSUM
|
||||
$pdf->Cell(0, 0, 'CODE 39 EXTENDED + CHECKSUM', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 39 E+', 'C39E+', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 93 - USS-93
|
||||
$pdf->Cell(0, 0, 'CODE 93 - USS-93', 0, 1);
|
||||
$pdf->write1DBarcode('TEST93', 'C93', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Standard 2 of 5
|
||||
$pdf->Cell(0, 0, 'Standard 2 of 5', 0, 1);
|
||||
$pdf->write1DBarcode('1234567', 'S25', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
// add a page ----------
|
||||
$pdf->AddPage();
|
||||
|
||||
// Standard 2 of 5 + CHECKSUM
|
||||
$pdf->Cell(0, 0, 'Standard 2 of 5 + CHECKSUM', 0, 1);
|
||||
$pdf->write1DBarcode('1234567', 'S25+', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Interleaved 2 of 5
|
||||
$pdf->Cell(0, 0, 'Interleaved 2 of 5', 0, 1);
|
||||
$pdf->write1DBarcode('1234567', 'I25', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Interleaved 2 of 5 + CHECKSUM
|
||||
$pdf->Cell(0, 0, 'Interleaved 2 of 5 + CHECKSUM', 0, 1);
|
||||
$pdf->write1DBarcode('1234567', 'I25+', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 128 A
|
||||
$pdf->Cell(0, 0, 'CODE 128 A', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 128 A', 'C128A', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 128 B
|
||||
$pdf->Cell(0, 0, 'CODE 128 B', 0, 1);
|
||||
$pdf->write1DBarcode('CODE 128 B', 'C128B', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 128 C
|
||||
$pdf->Cell(0, 0, 'CODE 128 C', 0, 1);
|
||||
$pdf->write1DBarcode('0123456789', 'C128C', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
// add a page ----------
|
||||
$pdf->AddPage();
|
||||
|
||||
// EAN 8
|
||||
$pdf->Cell(0, 0, 'EAN 8', 0, 1);
|
||||
$pdf->write1DBarcode('1234567', 'EAN8', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// EAN 13
|
||||
$pdf->Cell(0, 0, 'EAN 13', 0, 1);
|
||||
$pdf->write1DBarcode('1234567890128', 'EAN13', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// 2-Digits UPC-Based Extention
|
||||
$pdf->Cell(0, 0, '2-Digits UPC-Based Extention', 0, 1);
|
||||
$pdf->write1DBarcode('34', 'EAN2', '', '', 20, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// 5-Digits UPC-Based Extention
|
||||
$pdf->Cell(0, 0, '5-Digits UPC-Based Extention', 0, 1);
|
||||
$pdf->write1DBarcode('51234', 'EAN5', '', '', 40, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// UPC-A
|
||||
$pdf->Cell(0, 0, 'UPC-A', 0, 1);
|
||||
$pdf->write1DBarcode('12345678901', 'UPCA', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// UPC-E
|
||||
$pdf->Cell(0, 0, 'UPC-E', 0, 1);
|
||||
$pdf->write1DBarcode('04210000526', 'UPCE', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
// add a page ----------
|
||||
$pdf->AddPage();
|
||||
|
||||
// MSI
|
||||
$pdf->Cell(0, 0, 'MSI', 0, 1);
|
||||
$pdf->write1DBarcode('80523', 'MSI', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// MSI + CHECKSUM (module 11)
|
||||
$pdf->Cell(0, 0, 'MSI + CHECKSUM (module 11)', 0, 1);
|
||||
$pdf->write1DBarcode('80523', 'MSI+', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
|
||||
$pdf->Cell(0, 0, 'IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200', 0, 1);
|
||||
$pdf->write1DBarcode('01234567094987654321-01234567891', 'IMB', '', '', 130, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// POSTNET
|
||||
$pdf->Cell(0, 0, 'POSTNET', 0, 1);
|
||||
$pdf->write1DBarcode('98000', 'POSTNET', '', '', 80, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// PLANET
|
||||
$pdf->Cell(0, 0, 'PLANET', 0, 1);
|
||||
$pdf->write1DBarcode('98000', 'PLANET', '', '', 80, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
|
||||
$pdf->Cell(0, 0, 'RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)', 0, 1);
|
||||
$pdf->write1DBarcode('SN34RD1A', 'RMS4CC', '', '', 80, 20, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// KIX (Klant index - Customer index)
|
||||
$pdf->Cell(0, 0, 'KIX (Klant index - Customer index)', 0, 1);
|
||||
$pdf->write1DBarcode('SN34RDX1A', 'KIX', '', '', 80, 20, 0.4, $style, 'N');
|
||||
|
||||
// add a page ----------
|
||||
$pdf->AddPage();
|
||||
|
||||
// CODABAR
|
||||
$pdf->Cell(0, 0, 'CODABAR', 0, 1);
|
||||
$pdf->write1DBarcode('123456789', 'CODABAR', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// CODE 11
|
||||
$pdf->Cell(0, 0, 'CODE 11', 0, 1);
|
||||
$pdf->write1DBarcode('123-456-789', 'CODE11', '', '', 80, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// PHARMACODE
|
||||
$pdf->Cell(0, 0, 'PHARMACODE', 0, 1);
|
||||
$pdf->write1DBarcode('789', 'PHARMA', '', '', 30, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// PHARMACODE TWO-TRACKS
|
||||
$pdf->Cell(0, 0, 'PHARMACODE TWO-TRACKS', 0, 1);
|
||||
$pdf->write1DBarcode('105', 'PHARMA2T', '', '', 20, 30, 0.4, $style, 'N');
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// TEST BARCDE ALIGNMENTS
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// Left alignment
|
||||
$style['position'] = 'L';
|
||||
$pdf->write1DBarcode('LEFT', 'C128A', '', '', 180, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Center alignment
|
||||
$style['position'] = 'C';
|
||||
$pdf->write1DBarcode('CENTER', 'C128A', '', '', 180, 30, 0.4, $style, 'N');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// Right alignment
|
||||
$style['position'] = 'R';
|
||||
$pdf->write1DBarcode('RIGHT', 'C128A', '', '', 180, 30, 0.4, $style, 'N');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_027.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
142
tcpdf/examples/example_028.php
Executable file
142
tcpdf/examples/example_028.php
Executable file
@ -0,0 +1,142 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_028.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 028 for TCPDF class
|
||||
// Changing page formats
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: changing page formats
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 028');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// remove default header/footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(10, PDF_MARGIN_TOP, 10);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
$pdf->SetDisplayMode('fullpage', 'SinglePage', 'UseNone');
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'B', 20);
|
||||
|
||||
$pdf->AddPage('P', 'A4');
|
||||
$pdf->Cell(0, 0, 'A4 PORTRAIT', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('L', 'A4');
|
||||
$pdf->Cell(0, 0, 'A4 LANDSCAPE', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('P', 'A5');
|
||||
$pdf->Cell(0, 0, 'A5 PORTRAIT', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('L', 'A5');
|
||||
$pdf->Cell(0, 0, 'A5 LANDSCAPE', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('P', 'A6');
|
||||
$pdf->Cell(0, 0, 'A6 PORTRAIT', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('L', 'A6');
|
||||
$pdf->Cell(0, 0, 'A6 LANDSCAPE', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('P', 'A7');
|
||||
$pdf->Cell(0, 0, 'A7 PORTRAIT', 1, 1, 'C');
|
||||
|
||||
$pdf->AddPage('L', 'A7');
|
||||
$pdf->Cell(0, 0, 'A7 LANDSCAPE', 1, 1, 'C');
|
||||
|
||||
|
||||
// --- test backward editing ---
|
||||
|
||||
|
||||
$pdf->setPage(1, true);
|
||||
$pdf->SetY(50);
|
||||
$pdf->Cell(0, 0, 'A4 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(2, true);
|
||||
$pdf->SetY(50);
|
||||
$pdf->Cell(0, 0, 'A4 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(3, true);
|
||||
$pdf->SetY(50);
|
||||
$pdf->Cell(0, 0, 'A5 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(4, true);
|
||||
$pdf->SetY(50);
|
||||
$pdf->Cell(0, 0, 'A5 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(5, true);
|
||||
$pdf->SetY(50);
|
||||
$pdf->Cell(0, 0, 'A6 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(6, true);
|
||||
$pdf->SetY(50);
|
||||
$pdf->Cell(0, 0, 'A6 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(7, true);
|
||||
$pdf->SetY(40);
|
||||
$pdf->Cell(0, 0, 'A7 test', 1, 1, 'C');
|
||||
|
||||
$pdf->setPage(8, true);
|
||||
$pdf->SetY(40);
|
||||
$pdf->Cell(0, 0, 'A7 test', 1, 1, 'C');
|
||||
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_028.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
120
tcpdf/examples/example_029.php
Executable file
120
tcpdf/examples/example_029.php
Executable file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_029.php
|
||||
// Begin : 2008-06-09
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 029 for TCPDF class
|
||||
// Set PDF viewer display preferences.
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Set PDF viewer display preferences.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-06-09
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 029');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
$preferences = array(
|
||||
'HideToolbar' => true,
|
||||
'HideMenubar' => true,
|
||||
'HideWindowUI' => true,
|
||||
'FitWindow' => true,
|
||||
'CenterWindow' => true,
|
||||
'DisplayDocTitle' => true,
|
||||
'NonFullScreenPageMode' => 'UseNone', // UseNone, UseOutlines, UseThumbs, UseOC
|
||||
'ViewArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
|
||||
'ViewClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
|
||||
'PrintArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
|
||||
'PrintClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox
|
||||
'PrintScaling' => 'AppDefault', // None, AppDefault
|
||||
'Duplex' => 'DuplexFlipLongEdge', // Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge
|
||||
'PickTrayByPDFSize' => true,
|
||||
'PrintPageRange' => array(1,1,2,3),
|
||||
'NumCopies' => 2
|
||||
);
|
||||
|
||||
// set pdf viewer preferences
|
||||
$pdf->setViewerPreferences($preferences);
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 14);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
// print a line
|
||||
$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 1', 0, 0, 'C');
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
// print a line
|
||||
$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 2', 0, 0, 'C');
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
// print a line
|
||||
$pdf->Cell(0, 12, 'DISPLAY PREFERENCES - PAGE 3', 0, 0, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_029.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
170
tcpdf/examples/example_030.php
Executable file
170
tcpdf/examples/example_030.php
Executable file
@ -0,0 +1,170 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_030.php
|
||||
// Begin : 2008-06-09
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 030 for TCPDF class
|
||||
// Colour gradients
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Colour gradients
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-06-09
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 030');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// disable header and footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 14);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
//first page
|
||||
|
||||
//set colors for gradients (r,g,b) or (grey 0-255)
|
||||
$red = array(255, 0, 0);
|
||||
$blue = array(0, 0, 200);
|
||||
$yellow = array(255, 255, 0);
|
||||
$green = array(0, 255, 0);
|
||||
$white = array(255);
|
||||
$black = array(0);
|
||||
|
||||
//set the coordinates x1,y1,x2,y2 of the gradient (see linear_gradient_coords.jpg)
|
||||
$coords = array(0, 0, 1, 0);
|
||||
|
||||
//paint a linear gradient
|
||||
$pdf->LinearGradient(20, 25, 80, 80, $red, $blue, $coords);
|
||||
|
||||
//set the coordinates fx,fy,cx,cy,r of the gradient (see radial_gradient_coords.jpg)
|
||||
$coords = array(0.5, 0.5, 1, 1, 1.2);
|
||||
|
||||
//paint a radial gradient
|
||||
$pdf->RadialGradient(110, 25, 80, 80, $white, $black, $coords);
|
||||
|
||||
//paint a coons patch mesh with default coordinates
|
||||
$pdf->CoonsPatchMesh(20, 115, 80, 80, $yellow, $blue, $green, $red);
|
||||
|
||||
//set the coordinates for the cubic Bézier points x1,y1 ... x12, y12 of the patch (see coons_patch_mesh_coords.jpg)
|
||||
$coords = array(
|
||||
0.00,0.00, 0.33,0.20, //lower left
|
||||
0.67,0.00, 1.00,0.00, 0.80,0.33, //lower right
|
||||
0.80,0.67, 1.00,1.00, 0.67,0.80, //upper right
|
||||
0.33,1.00, 0.00,1.00, 0.20,0.67, //upper left
|
||||
0.00,0.33); //lower left
|
||||
$coords_min = 0; //minimum value of the coordinates
|
||||
$coords_max = 1; //maximum value of the coordinates
|
||||
|
||||
//paint a coons patch gradient with the above coordinates
|
||||
$pdf->CoonsPatchMesh(110, 115, 80, 80, $yellow, $blue, $green, $red, $coords, $coords_min, $coords_max);
|
||||
|
||||
//second page
|
||||
$pdf->AddPage();
|
||||
|
||||
//first patch: f = 0
|
||||
$patch_array[0]['f'] = 0;
|
||||
$patch_array[0]['points'] = array(
|
||||
0.00,0.00, 0.33,0.00,
|
||||
0.67,0.00, 1.00,0.00, 1.00,0.33,
|
||||
0.8,0.67, 1.00,1.00, 0.67,0.8,
|
||||
0.33,1.80, 0.00,1.00, 0.00,0.67,
|
||||
0.00,0.33);
|
||||
$patch_array[0]['colors'][0] = array('r' => 255, 'g' => 255, 'b' => 0);
|
||||
$patch_array[0]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 255);
|
||||
$patch_array[0]['colors'][2] = array('r' => 0, 'g' => 255,'b' => 0);
|
||||
$patch_array[0]['colors'][3] = array('r' => 255, 'g' => 0,'b' => 0);
|
||||
|
||||
//second patch - above the other: f = 2
|
||||
$patch_array[1]['f'] = 2;
|
||||
$patch_array[1]['points'] = array(
|
||||
0.00,1.33,
|
||||
0.00,1.67, 0.00,2.00, 0.33,2.00,
|
||||
0.67,2.00, 1.00,2.00, 1.00,1.67,
|
||||
1.5,1.33);
|
||||
$patch_array[1]['colors'][0]=array('r' => 0, 'g' => 0, 'b' => 0);
|
||||
$patch_array[1]['colors'][1]=array('r' => 255, 'g' => 0, 'b' => 255);
|
||||
|
||||
//third patch - right of the above: f = 3
|
||||
$patch_array[2]['f'] = 3;
|
||||
$patch_array[2]['points'] = array(
|
||||
1.33,0.80,
|
||||
1.67,1.50, 2.00,1.00, 2.00,1.33,
|
||||
2.00,1.67, 2.00,2.00, 1.67,2.00,
|
||||
1.33,2.00);
|
||||
$patch_array[2]['colors'][0] = array('r' => 0, 'g' => 255, 'b' => 255);
|
||||
$patch_array[2]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 0);
|
||||
|
||||
//fourth patch - below the above, which means left(?) of the above: f = 1
|
||||
$patch_array[3]['f'] = 1;
|
||||
$patch_array[3]['points'] = array(
|
||||
2.00,0.67,
|
||||
2.00,0.33, 2.00,0.00, 1.67,0.00,
|
||||
1.33,0.00, 1.00,0.00, 1.00,0.33,
|
||||
0.8,0.67);
|
||||
$patch_array[3]['colors'][0] = array('r' => 0, 'g' => 0, 'b' => 0);
|
||||
$patch_array[3]['colors'][1] = array('r' => 0, 'g' => 0, 'b' => 255);
|
||||
|
||||
$coords_min = 0;
|
||||
$coords_max = 2;
|
||||
|
||||
$pdf->CoonsPatchMesh(10, 25, 190, 200, '', '', '', '', $patch_array, $coords_min, $coords_max);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_030.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
92
tcpdf/examples/example_031.php
Executable file
92
tcpdf/examples/example_031.php
Executable file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_031.php
|
||||
// Begin : 2008-06-09
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 031 for TCPDF class
|
||||
// Pie Chart
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Pie Chart
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-06-09
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 031');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// disable header and footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 14);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$xc = 105;
|
||||
$yc = 55;
|
||||
$r = 40;
|
||||
|
||||
$pdf->SetFillColor(120, 120, 255);
|
||||
$pdf->PieSector($xc, $yc, $r, 20, 120);
|
||||
$pdf->SetFillColor(120, 255, 120);
|
||||
$pdf->PieSector($xc, $yc, $r, 120, 250);
|
||||
$pdf->SetFillColor(255, 120, 120);
|
||||
$pdf->PieSector($xc, $yc, $r, 250, 20);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_031.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
90
tcpdf/examples/example_032.php
Executable file
90
tcpdf/examples/example_032.php
Executable file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_032.php
|
||||
// Begin : 2008-06-09
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 032 for TCPDF class
|
||||
// EPS/AI image
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: EPS/AI image
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-06-09
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 032');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// disable header and footer
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 14);
|
||||
|
||||
// Page 1: AI
|
||||
$pdf->AddPage();
|
||||
$pdf->ImageEps('../images/tiger.ai', 10, 50, 190);
|
||||
|
||||
// Page 2: EPS, with link
|
||||
$pdf->AddPage();
|
||||
$pdf->ImageEps('../images/bug.eps', 0, 25, 0, 240, "http://www.tcpdf.org", true, 'T', 'C');
|
||||
|
||||
// Page 3: AI
|
||||
$pdf->AddPage();
|
||||
$pdf->ImageEps('../images/pelican.ai', 15, 70, 180);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_032.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
97
tcpdf/examples/example_033.php
Executable file
97
tcpdf/examples/example_033.php
Executable file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_033.php
|
||||
// Begin : 2008-06-24
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 033 for TCPDF class
|
||||
// Mixed font types
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Mixed font types
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-06-24
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 033');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$pdf->SetFont('dejavusans', '', 10);
|
||||
$pdf->MultiCell(80, 0, "[True Type Unicode font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0);
|
||||
|
||||
$pdf->Ln(2);
|
||||
|
||||
$pdf->SetFont('times', '', 10);
|
||||
$pdf->MultiCell(80, 0, "[Core font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0);
|
||||
|
||||
$pdf->Ln(2);
|
||||
|
||||
$pdf->SetFont('arialunicid0', '', 9);
|
||||
$pdf->MultiCell(80, 0, "[CID-0 font] : Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis.\n", 1, 'J', 0, 1, '', '', true, 0);
|
||||
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_033.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
98
tcpdf/examples/example_034.php
Executable file
98
tcpdf/examples/example_034.php
Executable file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_034.php
|
||||
// Begin : 2008-07-18
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 034 for TCPDF class
|
||||
// Clipping
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Clipping
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 034');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', 'BI', 50);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
//Start Graphic Transformation
|
||||
$pdf->StartTransform();
|
||||
|
||||
// set clipping mask
|
||||
$pdf->StarPolygon(50, 70, 30, 10, 3, 0, 1, 'CNZ');
|
||||
|
||||
// draw jpeg image to be clipped
|
||||
$pdf->Image('../images/image_demo.jpg', 20, 40, 60, 60, '', 'http://www.tcpdf.org', '', true, 72);
|
||||
|
||||
//Stop Graphic Transformation
|
||||
$pdf->StopTransform();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_034.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
116
tcpdf/examples/example_035.php
Executable file
116
tcpdf/examples/example_035.php
Executable file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_035.php
|
||||
// Begin : 2008-07-22
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 035 for TCPDF class
|
||||
// Line styles with cells and multicells
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Line styles with cells and multicells
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 035');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'BI', 16);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 12, 'Example 035', 1, 1, 'C');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => array(255, 0, 0)));
|
||||
$pdf->SetFillColor(255,255,128);
|
||||
$pdf->SetTextColor(0,0,128);
|
||||
|
||||
$text="DUMMY";
|
||||
|
||||
$pdf->Cell(0, 0, $text, 1, 1, 'L', 1, 0);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 255)));
|
||||
$pdf->SetFillColor(255,255,0);
|
||||
$pdf->SetTextColor(0,0,255);
|
||||
$pdf->MultiCell(60, 4, $text, 1, 'C', 1, 0);
|
||||
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 255, 0)));
|
||||
$pdf->SetFillColor(0,0,255);
|
||||
$pdf->SetTextColor(255,255,0);
|
||||
$pdf->MultiCell(60, 4, $text, 'TB', 'C', 1, 0);
|
||||
|
||||
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 255)));
|
||||
$pdf->SetFillColor(0,255,0);
|
||||
$pdf->SetTextColor(255,0,255);
|
||||
$pdf->MultiCell(60, 4, $text, 1, 'C', 1, 1);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_035.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
92
tcpdf/examples/example_036.php
Executable file
92
tcpdf/examples/example_036.php
Executable file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_036.php
|
||||
// Begin : 2008-08-08
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 036 for TCPDF class
|
||||
// Annotations
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Annotations
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-08-08
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 036');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 16);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 12, 'Example 036', 1, 1, 'C');
|
||||
|
||||
// text annotation
|
||||
$pdf->Annotation(124, 30, 10, 10, "Text annotation example\naccented letters test: àèéìòù", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'title example', 'Subj' => 'example', 'C' => array(255, 255, 0)));
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_036.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
194
tcpdf/examples/example_037.php
Executable file
194
tcpdf/examples/example_037.php
Executable file
@ -0,0 +1,194 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_037.php
|
||||
// Begin : 2008-09-12
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 037 for TCPDF class
|
||||
// Spot colors
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Spot colors.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-09-12
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 037');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 8);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// Define some new spot colors
|
||||
// where c, m, y and k (2nd, 3rd, 4th and 5th parameter) are the equivalent CMYK components.
|
||||
$pdf->AddSpotColor('Pantone 116 C', 0, 20, 100, 0);
|
||||
$pdf->AddSpotColor('HKS 16 K', 30, 100, 90, 10);
|
||||
$pdf->AddSpotColor('Pantone 505 C', 57, 100, 85, 55);
|
||||
$pdf->AddSpotColor('Pantone 440 C', 50, 60, 80, 70);
|
||||
$pdf->AddSpotColor('Pantone 288 C', 100, 60, 10, 5);
|
||||
$pdf->AddSpotColor('Pantone 289 C', 100, 78, 50, 0);
|
||||
$pdf->AddSpotColor('Pantone 356 C', 100, 30, 100, 0);
|
||||
$pdf->AddSpotColor('Pantone 567 C', 100, 50, 80, 45);
|
||||
$pdf->AddSpotColor('Pantone 9060 C', 0, 0, 7, 0);
|
||||
$pdf->AddSpotColor('Pantone 420 C', 22, 14, 22, 0);
|
||||
$pdf->AddSpotColor('Pantone 422 C', 39, 24, 34, 0);
|
||||
$pdf->AddSpotColor('Pantone 433 C', 34, 0, 0, 94);
|
||||
$pdf->AddSpotColor('NovaSpace-Black', 50, 0, 0, 100);
|
||||
$pdf->AddSpotColor('Pantone 601 C', 0, 0, 55, 0);
|
||||
$pdf->AddSpotColor('Pantone 659 C', 50, 20, 0, 10);
|
||||
|
||||
// select the spot color
|
||||
// where tint (the second parameter) is the intensity of the color (full intensity by default).
|
||||
$pdf->SetTextSpotColor('NovaSpace-Black', 100);
|
||||
$pdf->SetDrawSpotColor('NovaSpace-Black', 100);
|
||||
|
||||
$starty = 30;
|
||||
|
||||
// print some spot colors
|
||||
$pdf->SetFillSpotColor('Pantone 116 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 116 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('HKS 16 K', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'HKS 16 K');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 505 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 505 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 440 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 440 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 288 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 288 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 289 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 289 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 356 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 356 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 567 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 567 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 9060 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 9060 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 420 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 420 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 422 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 422 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 433 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 433 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 601 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 601 C');
|
||||
|
||||
$starty += 8;
|
||||
|
||||
$pdf->SetFillSpotColor('Pantone 659 C', 100);
|
||||
$pdf->Rect(30, $starty, 20, 6, 'DF');
|
||||
$pdf->Text(53, $starty + 4, 'Pantone 659 C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_037.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
89
tcpdf/examples/example_038.php
Executable file
89
tcpdf/examples/example_038.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_038.php
|
||||
// Begin : 2008-09-15
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 038 for TCPDF class
|
||||
// CID-0 CJK Fonts without embedding
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: CID-0 CJK Fonts without embedding
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-09-15
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 038');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('arialunicid0', 'U', 20);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'こんにちは世界', 1, 1, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_038.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
103
tcpdf/examples/example_039.php
Executable file
103
tcpdf/examples/example_039.php
Executable file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_039.php
|
||||
// Begin : 2008-10-16
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 039 for TCPDF class
|
||||
// HTML justification
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: HTML justification
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-10-18
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 039');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// create some HTML content
|
||||
$html = '<span style="text-align:justify;">a <u>abc</u> abcdefghijkl abcdef abcdefg <b>abcdefghi</b> a abc abcd <img src="../images/logo_example.png" border="0" height="41" width="41" /> <img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /> abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a <u>abc</u> abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg <b>abcdefghi</b> a abc abcd abcdef abcdefg abcdefghi a abc abcd <a href="http://tcpdf.org">abcdef abcdefg</a> start a abc before <span style="background-color:yellow">yellow color</span> after a abc abcd abcdef abcdefg abcdefghi a abc abcd end abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi a abc abcd abcdef abcdefg abcdefghi<br />abcd abcdef abcdefg abcdefghi<br />abcd abcde abcdef</span>';
|
||||
|
||||
// set core font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($html, true, 0, true, true);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// set UTF-8 font
|
||||
$pdf->SetFont('dejavusans', '', 10);
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($html, true, 0, true, true);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_039.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
111
tcpdf/examples/example_040.php
Executable file
111
tcpdf/examples/example_040.php
Executable file
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_040.php
|
||||
// Begin : 2008-10-28
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 040 for TCPDF class
|
||||
// Booklet mode (double-sided pages)
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Booklet mode (double-sided pages)
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-10-28
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 040');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set booklet mode
|
||||
$pdf->SetBooklet(true, 10, 30);
|
||||
|
||||
// set core font
|
||||
$pdf->SetFont('helvetica', '', 18);
|
||||
|
||||
// add a page (left page)
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 0, 'LEFT PAGE 1', 1, 1, 'C');
|
||||
|
||||
// add a page (right page)
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 0, 'RIGHT PAGE 2', 1, 1, 'C');
|
||||
|
||||
|
||||
// add a page (left page)
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 0, 'LEFT PAGE 3', 1, 1, 'C');
|
||||
|
||||
// add a page (right page)
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 0, 'RIGHT PAGE 4', 1, 1, 'C');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_040.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
92
tcpdf/examples/example_041.php
Executable file
92
tcpdf/examples/example_041.php
Executable file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_041.php
|
||||
// Begin : 2008-12-07
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 041 for TCPDF class
|
||||
// Annotation - FileAttachment
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Annotation - FileAttachment
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-12-07
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 041');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 16);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 12, 'File Attachment', 1, 1, 'C');
|
||||
|
||||
// attach an external file
|
||||
$pdf->Annotation(78, 30, 4, 4, 'text file', array('Subtype'=>'FileAttachment', 'Name' => 'PushPin', 'FS' => '../cache/utf8test.txt'));
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_041.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
105
tcpdf/examples/example_042.php
Executable file
105
tcpdf/examples/example_042.php
Executable file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_042.php
|
||||
// Begin : 2008-12-23
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 042 for TCPDF class
|
||||
// Test Image with alpha channel
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Test Image with alpha channel
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-12-23
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 042');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set JPEG quality
|
||||
//$pdf->setJPEGQuality(75);
|
||||
|
||||
$pdf->SetFont('helvetica', '', 18);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create background text
|
||||
$background_text = str_repeat('TCPDF test PNG Alpha Channel ', 50);
|
||||
$pdf->MultiCell(0, 5, $background_text, 0, 'J', 0, 2, '', '', true, 0, false);
|
||||
|
||||
|
||||
// [A] The Image() method recognizes the alpha channel embedded on the image:
|
||||
|
||||
$pdf->Image('../images/image_with_alpha.png', 50, 50, 100, '', '', 'http://www.tcpdf.org', '', false, 300);
|
||||
|
||||
|
||||
// [B] provide image + separate 8-bit mask
|
||||
|
||||
// first embed mask image (w, h, x and y will be ignored, the image will be scaled to the target image's size)
|
||||
$mask = $pdf->Image('../images/alpha.png', 50, 140, 100, '', '', '', '', false, 300, '', true);
|
||||
// embed image, masked with previously embedded mask
|
||||
$pdf->Image('../images/img.png', 50, 140, 100, '', '', 'http://www.tcpdf.org', '', false, 300, '', false, $mask);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_042.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
89
tcpdf/examples/example_043.php
Executable file
89
tcpdf/examples/example_043.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_043.php
|
||||
// Begin : 2009-01-02
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 043 for TCPDF class
|
||||
// Disk caching
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Disk caching
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-01-02
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', true);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 043');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// Multicell test
|
||||
$pdf->MultiCell(0, 0, "DISK CACHING TEST: check the parameters on class constructor.", 1, 'L', 0, 0, '', '', true);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_043.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
119
tcpdf/examples/example_044.php
Executable file
119
tcpdf/examples/example_044.php
Executable file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_044.php
|
||||
// Begin : 2009-01-02
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 044 for TCPDF class
|
||||
// Move and delete pages
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Move and delete pages
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2008 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-01-02
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 044');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 18);
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE A', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE B', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE D', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE E', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE E-2', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE F', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE C', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE G', 0, 1, 'L');
|
||||
|
||||
// Move page 7 to page 3
|
||||
$pdf->movePage(7, 3);
|
||||
|
||||
// Delete page 6
|
||||
$pdf->deletePage(6);
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Cell(0, 10, 'PAGE H', 0, 1, 'L');
|
||||
|
||||
// NOTE: to insert a page to a previous position, you can add a new page to the end of document and then move it using movePage().
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_044.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
129
tcpdf/examples/example_045.php
Executable file
129
tcpdf/examples/example_045.php
Executable file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_045.php
|
||||
// Begin : 2008-03-04
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 045 for TCPDF class
|
||||
// Bookmarks and Table of Content
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Bookmarks and Table of Content
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 045');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', 'B', 20);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// set a bookmark for the current position
|
||||
$pdf->Bookmark('Chapter 1', 0, 0);
|
||||
|
||||
// print a line using Cell()
|
||||
$pdf->Cell(0, 10, 'Chapter 1', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Paragraph 1.1', 1, 0);
|
||||
$pdf->Cell(0, 10, 'Paragraph 1.1', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Paragraph 1.2', 1, 0);
|
||||
$pdf->Cell(0, 10, 'Paragraph 1.2', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Sub-Paragraph 1.2.1', 2, 0);
|
||||
$pdf->Cell(0, 10, 'Sub-Paragraph 1.2.1', 0, 1, 'L');
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Paragraph 1.3', 1, 0);
|
||||
$pdf->Cell(0, 10, 'Paragraph 1.3', 0, 1, 'L');
|
||||
|
||||
for ($i = 2; $i < 12; $i++) {
|
||||
$pdf->AddPage();
|
||||
$pdf->Bookmark('Chapter '.$i, 0, 0);
|
||||
$pdf->Cell(0, 10, 'Chapter '.$i, 0, 1, 'L');
|
||||
}
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
// add a new page for TOC
|
||||
$pdf->AddPage();
|
||||
|
||||
// write the TOC title
|
||||
$pdf->SetFont('times', 'B', 16);
|
||||
$pdf->MultiCell(0, 0, 'Table Of Content', 0, 'C', 0, 1, '', '', true, 0);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetFont('dejavusans', '', 12);
|
||||
|
||||
// add table of content at page 1
|
||||
$pdf->addTOC(1, 'courier', '.');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_045.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
104
tcpdf/examples/example_046.php
Executable file
104
tcpdf/examples/example_046.php
Executable file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_046.php
|
||||
// Begin : 2009-02-28
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 046 for TCPDF class
|
||||
// Text Hyphenation
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: text Hyphenation
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-02-28
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 046');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
/*
|
||||
You can use an external class to automatically hyphens the text by adding the SHY characters;
|
||||
|
||||
Unicode Data for SHY:
|
||||
Name : SOFT HYPHEN, commonly abbreviated as SHY
|
||||
HTML Entity (decimal): ­
|
||||
HTML Entity (hex): ­
|
||||
HTML Entity (named): ­
|
||||
How to type in Microsoft Windows: [Alt +00AD] or [Alt 0173]
|
||||
UTF-8 (hex): 0xC2 0xAD (c2ad)
|
||||
*/
|
||||
|
||||
// html text with soft hyphens (­)
|
||||
$html = 'On the other hand, we de­nounce with righ­teous in­dig­na­tion and dis­like men who are so be­guiled and de­mo­r­al­ized by the charms of plea­sure of the mo­ment, so blind­ed by de­sire, that they can­not fore­see the pain and trou­ble that are bound to en­sue; and equal blame be­longs to those who fail in their du­ty through weak­ness of will, which is the same as say­ing through shrink­ing from toil and pain. Th­ese cas­es are per­fect­ly sim­ple and easy to distin­guish. In a free hour, when our pow­er of choice is un­tram­melled and when noth­ing pre­vents our be­ing able to do what we like best, ev­ery plea­sure is to be wel­comed and ev­ery pain avoid­ed. But in cer­tain cir­cum­s­tances and ow­ing to the claims of du­ty or the obli­ga­tions of busi­ness it will fre­quent­ly oc­cur that plea­sures have to be re­pu­di­at­ed and an­noy­ances ac­cept­ed. The wise man there­fore al­ways holds in th­ese mat­ters to this prin­ci­ple of se­lec­tion: he re­jects plea­sures to se­cure other greater plea­sures, or else he en­dures pains to avoid worse pains.';
|
||||
|
||||
// print a cell
|
||||
$pdf->writeHTMLCell(50, 0, '', '', $html, 1, 1, 0, true, 'J');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_046.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
112
tcpdf/examples/example_047.php
Executable file
112
tcpdf/examples/example_047.php
Executable file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_047.php
|
||||
// Begin : 2009-03-19
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 047 for TCPDF class
|
||||
// Transactions
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Transactions
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-03-19
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 047');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// start transaction
|
||||
$pdf->startTransaction();
|
||||
|
||||
$pdf->Write(0, "LINE 1\n");
|
||||
$pdf->Write(0, "LINE 2\n");
|
||||
|
||||
// restarts transaction
|
||||
$pdf->startTransaction();
|
||||
|
||||
$pdf->Write(0, "LINE 3\n");
|
||||
$pdf->Write(0, "LINE 4\n");
|
||||
|
||||
// rolls back to the last (re)start
|
||||
$pdf = $pdf->rollbackTransaction();
|
||||
|
||||
$pdf->Write(0, "LINE 5\n");
|
||||
$pdf->Write(0, "LINE 6\n");
|
||||
|
||||
// start transaction
|
||||
$pdf->startTransaction();
|
||||
|
||||
$pdf->Write(0, "LINE 7\n");
|
||||
|
||||
// commit transaction (actually just frees memory)
|
||||
$pdf->commitTransaction();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_047.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
313
tcpdf/examples/example_048.php
Executable file
313
tcpdf/examples/example_048.php
Executable file
@ -0,0 +1,313 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_048.php
|
||||
// Begin : 2009-03-20
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 048 for TCPDF class
|
||||
// HTML tables and table headers
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: HTML tables and table headers
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-03-20
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 048');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 8);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
$tbl = <<<EOD
|
||||
<table cellspacing="0" cellpadding="1" border="1">
|
||||
<tr>
|
||||
<td rowspan="3">COL 1 - ROW 1<br />COLSPAN 3</td>
|
||||
<td>COL 2 - ROW 1</td>
|
||||
<td>COL 3 - ROW 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">COL 2 - ROW 2 - COLSPAN 2<br />text line<br />text line<br />text line<br />text line</td>
|
||||
<td>COL 3 - ROW 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>COL 3 - ROW 3</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
$tbl = <<<EOD
|
||||
<table cellspacing="0" cellpadding="1" border="1">
|
||||
<tr>
|
||||
<td rowspan="3">COL 1 - ROW 1<br />COLSPAN 3<br />text line<br />text line<br />text line<br />text line<br />text line<br />text line</td>
|
||||
<td>COL 2 - ROW 1</td>
|
||||
<td>COL 3 - ROW 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">COL 2 - ROW 2 - COLSPAN 2<br />text line<br />text line<br />text line<br />text line</td>
|
||||
<td>COL 3 - ROW 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>COL 3 - ROW 3</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
$tbl = <<<EOD
|
||||
<table cellspacing="0" cellpadding="1" border="1">
|
||||
<tr>
|
||||
<td rowspan="3">COL 1 - ROW 1<br />COLSPAN 3<br />text line<br />text line<br />text line<br />text line<br />text line<br />text line</td>
|
||||
<td>COL 2 - ROW 1</td>
|
||||
<td>COL 3 - ROW 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">COL 2 - ROW 2 - COLSPAN 2<br />text line<br />text line<br />text line<br />text line</td>
|
||||
<td>COL 3 - ROW 2<br />text line<br />text line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>COL 3 - ROW 3</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
$tbl = <<<EOD
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th rowspan="3">Left column</th>
|
||||
<th colspan="5">Heading Column Span 5</th>
|
||||
<th colspan="9">Heading Column Span 9</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">Rowspan 2<br />This is some text that fills the table cell.</th>
|
||||
<th colspan="2">span 2</th>
|
||||
<th colspan="2">span 2</th>
|
||||
<th rowspan="2">2 rows</th>
|
||||
<th colspan="8">Colspan 8</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1a</th>
|
||||
<th>2a</th>
|
||||
<th>1b</th>
|
||||
<th>2b</th>
|
||||
<th>1</th>
|
||||
<th>2</th>
|
||||
<th>3</th>
|
||||
<th>4</th>
|
||||
<th>5</th>
|
||||
<th>6</th>
|
||||
<th>7</th>
|
||||
<th>8</th>
|
||||
</tr>
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Table with rowspans and THEAD
|
||||
$tbl = <<<EOD
|
||||
<table border="1" cellpadding="2" cellspacing="2">
|
||||
<thead>
|
||||
<tr style="background-color:#FFFF00;color:#0000FF;">
|
||||
<td width="30" align="center"><b>A</b></td>
|
||||
<td width="140" align="center"><b>XXXX</b></td>
|
||||
<td width="140" align="center"><b>XXXX</b></td>
|
||||
<td width="80" align="center"> <b>XXXX</b></td>
|
||||
<td width="80" align="center"><b>XXXX</b></td>
|
||||
<td width="45" align="center"><b>XXXX</b></td>
|
||||
</tr>
|
||||
<tr style="background-color:#FF0000;color:#FFFF00;">
|
||||
<td width="30" align="center"><b>B</b></td>
|
||||
<td width="140" align="center"><b>XXXX</b></td>
|
||||
<td width="140" align="center"><b>XXXX</b></td>
|
||||
<td width="80" align="center"> <b>XXXX</b></td>
|
||||
<td width="80" align="center"><b>XXXX</b></td>
|
||||
<td width="45" align="center"><b>XXXX</b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td width="30" align="center">1.</td>
|
||||
<td width="140" rowspan="6">XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX</td>
|
||||
<td width="140">XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX</td>
|
||||
<td align="center" width="45">XXXX<br />XXXX</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30" align="center" rowspan="3">2.</td>
|
||||
<td width="140" rowspan="3">XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td align="center" width="45">XXXX<br />XXXX</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80">XXXX<br />XXXX<br />XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td align="center" width="45">XXXX<br />XXXX</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80" rowspan="2" >RRRRRR<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td align="center" width="45">XXXX<br />XXXX</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30" align="center">3.</td>
|
||||
<td width="140">XXXX1<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td align="center" width="45">XXXX<br />XXXX</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30" align="center">4.</td>
|
||||
<td width="140">XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td width="80">XXXX<br />XXXX</td>
|
||||
<td align="center" width="45">XXXX<br />XXXX</td>
|
||||
</tr>
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// NON-BREAKING TABLE (nobr="true")
|
||||
|
||||
$tbl = <<<EOD
|
||||
<table border="1" cellpadding="2" cellspacing="2" nobr="true">
|
||||
<tr>
|
||||
<th colspan="3" align="center">NON-BREAKING TABLE</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1-1</td>
|
||||
<td>1-2</td>
|
||||
<td>1-3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2-1</td>
|
||||
<td>3-2</td>
|
||||
<td>3-3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3-1</td>
|
||||
<td>3-2</td>
|
||||
<td>3-3</td>
|
||||
</tr>
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// NON-BREAKING ROWS (nobr="true")
|
||||
|
||||
$tbl = <<<EOD
|
||||
<table border="1" cellpadding="2" cellspacing="2" align="center">
|
||||
<tr nobr="true">
|
||||
<th colspan="3">NON-BREAKING ROWS</th>
|
||||
</tr>
|
||||
<tr nobr="true">
|
||||
<td>ROW 1<br />COLUMN 1</td>
|
||||
<td>ROW 1<br />COLUMN 2</td>
|
||||
<td>ROW 1<br />COLUMN 3</td>
|
||||
</tr>
|
||||
<tr nobr="true">
|
||||
<td>ROW 2<br />COLUMN 1</td>
|
||||
<td>ROW 2<br />COLUMN 2</td>
|
||||
<td>ROW 2<br />COLUMN 3</td>
|
||||
</tr>
|
||||
<tr nobr="true">
|
||||
<td>ROW 3<br />COLUMN 1</td>
|
||||
<td>ROW 3<br />COLUMN 2</td>
|
||||
<td>ROW 3<br />COLUMN 3</td>
|
||||
</tr>
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
$pdf->writeHTML($tbl, true, false, false, false, '');
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_048.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
122
tcpdf/examples/example_049.php
Normal file
122
tcpdf/examples/example_049.php
Normal file
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_049.php
|
||||
// Begin : 2009-04-03
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 049 for TCPDF class
|
||||
// WriteHTML with TCPDF callback functions
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: WriteHTML with TCPDF callback functions
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 049');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
/*
|
||||
NOTE:
|
||||
When using TCPDF methods embedded on XHTML code, you have to escape special
|
||||
characters with equivalent HTML entities:
|
||||
|
||||
- replace double quotes with: "
|
||||
- replace single quote with: \'
|
||||
- replace > with: >
|
||||
- replace < with: <
|
||||
|
||||
Note that the single quote escape contains an additional back-slash character.
|
||||
*/
|
||||
|
||||
$htmlcontent = <<<EOF
|
||||
<h1>Test TCPDF Methods in HTML</h1>
|
||||
<h2>write1DBarcode method in HTML</h2>
|
||||
<tcpdf method="write1DBarcode" params="'CODE 39', 'C39', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true, 'padding'=>4, 'fgcolor'=>array(0,0,0), 'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4), 'N'" />
|
||||
<tcpdf method="write1DBarcode" params="'CODE 128C+ " \'',
|
||||
'C128C', '', '', 80, 30, 0.4, array('position'=>'S', 'border'=>true,
|
||||
'padding'=>4, 'fgcolor'=>array(0,0,0),
|
||||
'bgcolor'=>array(255,255,255), 'text'=>true, 'font'=>'helvetica',
|
||||
'fontsize'=>8, 'stretchtext'=>4), 'N'" />
|
||||
<tcpdf method="AddPage" />
|
||||
<h2> Graphic Functions</h2>
|
||||
<tcpdf method="SetDrawColor" params="0" />
|
||||
<tcpdf method="Rect" params="50, 50, 40, 10, 'DF', array(), array(0,128,255)" />
|
||||
EOF;
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($htmlcontent, true, 0, true, 0);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_049.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
98
tcpdf/examples/example_050.php
Normal file
98
tcpdf/examples/example_050.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_050.php
|
||||
// Begin : 2009-04-09
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 050 for TCPDF class
|
||||
// 2D Barcodes
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: 2D barcodes.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2008-03-04
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 050');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
$style = array(
|
||||
'border' => true,
|
||||
'padding' => 4,
|
||||
'fgcolor' => array(0,0,0),
|
||||
'bgcolor' => false, //array(255,255,255)
|
||||
);
|
||||
|
||||
// write 2D Barcode
|
||||
$pdf->write2DBarcode('X', 'TEST', '', '', 30, 20, $style, 'N');
|
||||
|
||||
// NOTE: This is just experimental. 2D barcodes must be implemented on 2dbarcode.php class file.
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_050.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
108
tcpdf/examples/example_051.php
Normal file
108
tcpdf/examples/example_051.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_051.php
|
||||
// Begin : 2009-04-16
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 051 for TCPDF class
|
||||
// Full page background
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Full page background
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-04-16
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
|
||||
// Extend the TCPDF class to create custom Header and Footer
|
||||
class MYPDF extends TCPDF {
|
||||
//Page header
|
||||
public function Header() {
|
||||
// Full background image
|
||||
$auto_page_break = $this->AutoPageBreak;
|
||||
$this->SetAutoPageBreak(false, 0);
|
||||
$img_file = K_PATH_IMAGES.'image_demo.jpg';
|
||||
$this->Image($img_file, $x=0, $y=0, $w=210, $h=297, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0);
|
||||
$this->SetAutoPageBreak($auto_page_break);
|
||||
}
|
||||
}
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 051');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(0);
|
||||
$pdf->SetFooterMargin(0);
|
||||
|
||||
// remove default footer
|
||||
$pdf->setPrintFooter(false);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 48);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// Pritn a text
|
||||
$pdf->writeHTML('<span style="background-color:yellow;color:blue">PAGE 1</span>', $ln=true, $fill=false, $reseth=false, $cell=false, $align='');
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// Pritn a text
|
||||
$pdf->writeHTML('<span style="background-color:yellow;color:blue">PAGE 2</span>', $ln=true, $fill=false, $reseth=false, $cell=false, $align='');
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_051.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
104
tcpdf/examples/example_052.php
Normal file
104
tcpdf/examples/example_052.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_052.php
|
||||
// Begin : 2009-05-07
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 052 for TCPDF class
|
||||
// Certification Signature (experimental)
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Certification Signature (experimental)
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-05-07
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 052');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set certificate file
|
||||
$certificate = 'file://../tcpdf.crt';
|
||||
|
||||
// set additional information
|
||||
$info = array(
|
||||
'Name' => 'TCPDF',
|
||||
'Location' => 'Office',
|
||||
'Reason' => 'Testing TCPDF',
|
||||
'ContactInfo' => 'http://www.tcpdf.org',
|
||||
);
|
||||
|
||||
// set document signature
|
||||
$pdf->setSignature($certificate, $certificate, 'tcpdfdemo', '', 2, $info);
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('helvetica', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a line of text
|
||||
$text = 'This is a <b color="#FF0000">digitally signed document</b> using the default (example) <b>tcpdf.crt</b> certificate.<br />To validate this signature you have to load the <b>tcpdf.fdf</b> on the Arobat Reader to add the certificate to List of Trusted Identities.<br /><br />For more information check the source code of this example and the source code documentation for the <i>setSignature()</i> method.<br /><br /><a href="http://www.tcpdf.org">www.tcpdf.org</a>.';
|
||||
$pdf->writeHTML($text, true, 0, true, 0);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_052.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
112
tcpdf/examples/example_053.php
Normal file
112
tcpdf/examples/example_053.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_053.php
|
||||
// Begin : 2009-09-02
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 053 for TCPDF class
|
||||
// Javascript example.
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: Javascript example.
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-09-02
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 053');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('times', '', 14);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// print a some of text
|
||||
$text = 'This is an example of JavaScript usage on PDF documents.<br /><br />For more information check the source code of this example, the source code documentation for the <i>IncludeJS()</i> method and the <i>JavaScript for Acrobat API Reference</i> guide.<br /><br /><a href="http://www.tcpdf.org">www.tcpdf.org</a>.';
|
||||
$pdf->writeHTML($text, true, 0, true, 0);
|
||||
|
||||
// write some JavaScript code
|
||||
$js = <<<EOD
|
||||
app.alert('JavaScript Popup Example', 3, 0, 'Welcome');
|
||||
var cResponse = app.response({
|
||||
cQuestion: 'How are you today?',
|
||||
cTitle: 'Your Health Status',
|
||||
cDefault: 'Fine',
|
||||
cLabel: 'Response:'
|
||||
});
|
||||
if (cResponse == null) {
|
||||
app.alert('Thanks for trying anyway.', 3, 0, 'Result');
|
||||
} else {
|
||||
app.alert('You responded, "'+cResponse+'", to the health question.', 3, 0, 'Result');
|
||||
}
|
||||
EOD;
|
||||
|
||||
// force print dialog
|
||||
$js .= 'print(true);';
|
||||
|
||||
// set javascript
|
||||
$pdf->IncludeJS($js);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_053.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
129
tcpdf/examples/example_054.php
Normal file
129
tcpdf/examples/example_054.php
Normal file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
//============================================================+
|
||||
// File name : example_054.php
|
||||
// Begin : 2009-09-07
|
||||
// Last Update : 2009-09-30
|
||||
//
|
||||
// Description : Example 054 for TCPDF class
|
||||
// XHTML Forms
|
||||
//
|
||||
// Author: Nicola Asuni
|
||||
//
|
||||
// (c) Copyright:
|
||||
// Nicola Asuni
|
||||
// Tecnick.com s.r.l.
|
||||
// Via Della Pace, 11
|
||||
// 09044 Quartucciu (CA)
|
||||
// ITALY
|
||||
// www.tecnick.com
|
||||
// info@tecnick.com
|
||||
//============================================================+
|
||||
|
||||
/**
|
||||
* Creates an example PDF TEST document using TCPDF
|
||||
* @package com.tecnick.tcpdf
|
||||
* @abstract TCPDF - Example: XHTML Forms
|
||||
* @author Nicola Asuni
|
||||
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @link http://tcpdf.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2009-09-07
|
||||
*/
|
||||
|
||||
require_once('../config/lang/eng.php');
|
||||
require_once('../tcpdf.php');
|
||||
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor('Nicola Asuni');
|
||||
$pdf->SetTitle('TCPDF Example 054');
|
||||
$pdf->SetSubject('TCPDF Tutorial');
|
||||
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||
|
||||
// set default header data
|
||||
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
|
||||
|
||||
// set header and footer fonts
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
// set default monospaced font
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
|
||||
//set margins
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
|
||||
//set auto page breaks
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
|
||||
//set image scale factor
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($l);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set font
|
||||
$pdf->SetFont('dejavusans', '', 10);
|
||||
|
||||
// add a page
|
||||
$pdf->AddPage();
|
||||
|
||||
// create some HTML content
|
||||
$html = <<<EOD
|
||||
<h1>XHTML Form Example</h1>
|
||||
<form method="post" action="http://localhost/printvars.php" enctype="multipart/form-data">
|
||||
<label for="name">name:</label> <input type="text" name="name" value="" size="20" maxlength="30" /><br />
|
||||
<label for="password">password:</label> <input type="password" name="password" value="" size="20" maxlength="30" /><br /><br />
|
||||
<label for="infile">file:</label> <input type="file" name="userfile" size="20" /><br /><br />
|
||||
<input type="checkbox" name="agree" value="1" checked="checked" /> <label for="agree">I agree </label><br /><br />
|
||||
<input type="radio" name="radioquestion" id="rqa" value="1" /> <label for="rqa">one</label><br />
|
||||
<input type="radio" name="radioquestion" id="rqb" value="2" checked="checked"/> <label for="rqb">two</label><br />
|
||||
<input type="radio" name="radioquestion" id="rqc" value="3" /> <label for="rqc">three</label><br /><br />
|
||||
<label for="selection">select:</label>
|
||||
<select name="selection" size="0">
|
||||
<option value="0">zero</option>
|
||||
<option value="1">one</option>
|
||||
<option value="2">two</option>
|
||||
<option value="3">three</option>
|
||||
</select><br /><br />
|
||||
<label for="selection">select:</label>
|
||||
<select name="multiselection" size="2" multiple="multiple">
|
||||
<option value="0">zero</option>
|
||||
<option value="1">one</option>
|
||||
<option value="2">two</option>
|
||||
<option value="3">three</option>
|
||||
</select><br /><br /><br />
|
||||
<label for="text">text area:</label><br />
|
||||
<textarea cols="40" rows="3" name="text">line one
|
||||
line two</textarea><br />
|
||||
<br /><br /><br />
|
||||
<input type="reset" name="reset" value="Reset" />
|
||||
<input type="submit" name="submit" value="Submit" />
|
||||
<input type="button" name="print" value="Print" onclick="print()" />
|
||||
<input type="hidden" name="hiddenfield" value="OK" />
|
||||
<br />
|
||||
</form>
|
||||
EOD;
|
||||
|
||||
// output the HTML content
|
||||
$pdf->writeHTML($html, true, 0, true, 0);
|
||||
|
||||
// reset pointer to the last page
|
||||
$pdf->lastPage();
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//Close and output PDF document
|
||||
$pdf->Output('example_054.pdf', 'I');
|
||||
|
||||
//============================================================+
|
||||
// END OF FILE
|
||||
//============================================================+
|
||||
?>
|
79
tcpdf/examples/index.php
Normal file
79
tcpdf/examples/index.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
echo '<'.'?'.'xml version="1.0" encoding="UTF-8"'.'?'.'>';
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
|
||||
|
||||
<head>
|
||||
<title>TCPDF Examples</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="aiocp_level" content="0" />
|
||||
<meta name="description" content="TCPDF is a PHP class for generating PDF documents on the fly" />
|
||||
<meta name="author" content="Nicola Asuni" />
|
||||
<meta name="keywords" content="Examples, TCPDF, PDF, PHP class" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>TCPDF Examples</h1>
|
||||
|
||||
<ol>
|
||||
<li>Simple PDF with default Header and Footer: [<a href="example_001.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Simple PDF without Header and Footer: [<a href="example_002.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Custom Header and Footer: [<a href="example_003.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Cell stretching: [<a href="example_004.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Multicell: [<a href="example_005.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>WriteHTML and RTL support: [<a href="example_006.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Independent columns with WriteHTMLCell: [<a href="example_007.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>External UTF-8 text file: [<a href="example_008.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Image: [<a href="example_009.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Multiple columns: [<a href="example_010.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Colored Tables: [<a href="example_011.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Graphic Functions: [<a href="example_012.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Graphic Transformations: [<a href="example_013.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Javascript and Forms: [<a href="example_014.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Bookmarks (Table of Content): [<a href="example_015.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Document Encryption: [<a href="example_016.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Independent columns with MultiCell: [<a href="example_017.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Persian and Arabic language on RTL document: [<a href="example_018.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Non unicode / Alternative config file: [<a href="example_019.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Multicell complex alignment: [<a href="example_020.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>writeHTML alignment: [<a href="example_021.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>CMYK colors: [[<a href="example_022.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Page Groups: [<a href="example_023.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Object Visibility: [<a href="example_024.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Object Transparency: [<a href="example_025.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Text Clipping: [<a href="example_026.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Barcodes: [<a href="example_027.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Multiple page formats: [<a href="example_028.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Set PDF viewer display preferences: [<a href="example_029.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Colour gradients: [<a href="example_030.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Pie Chart Graphic: [<a href="example_031.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>EPS/AI vectorial image: [<a href="example_032.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Mixed font types (TrueType Unicode, core, CID-0): [<a href="example_033.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Clipping masks: [<a href="example_034.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Line styles with cells and multicells: [<a href="example_035.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Text Annotations: [<a href="example_036.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Spot Colors: [<a href="example_037.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>NON-embedded CID-0 CJK font: [<a href="example_038.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>HTML Justification: [<a href="example_039.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Booklet (double-sided pages): [<a href="example_040.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>File attachment: [<a href="example_041.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Image with Alpha Channel Transparency: [<a href="example_042.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Disk caching: [<a href="example_043.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Move and delete page: [<a href="example_044.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Table Of Content with Bookmarks: [<a href="example_045.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Text hyphenation: [<a href="example_046.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Transactions and UNDO: [<a href="example_047.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Table header and rowspan: [<a href="example_048.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>TCPDF methods in HTML: [<a href="example_049.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Experimental 2D Barcode: [<a href="example_050.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Full page background: [<a href="example_051.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Digital Signature Certification: [<a href="example_052.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>Javascript functions: [<a href="example_053.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
<li>XHTML Form: [<a href="example_054.php" title="PDF [new window]" target="_blank">PDF</a>]</li>
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
</html>
|
0
tcpdf/fonts/.noencode
Executable file
0
tcpdf/fonts/.noencode
Executable file
3
tcpdf/fonts/README.TXT
Executable file
3
tcpdf/fonts/README.TXT
Executable file
@ -0,0 +1,3 @@
|
||||
This folder contains fonts descriptions for TCPDF.
|
||||
All fonts names must be in lowercase.
|
||||
Please read the documentation on subfolders for copyright, license and other information.
|
BIN
tcpdf/fonts/ZarBold.ctg.z
Executable file
BIN
tcpdf/fonts/ZarBold.ctg.z
Executable file
Binary file not shown.
BIN
tcpdf/fonts/ZarBold.z
Executable file
BIN
tcpdf/fonts/ZarBold.z
Executable file
Binary file not shown.
BIN
tcpdf/fonts/almohanad.ctg.z
Executable file
BIN
tcpdf/fonts/almohanad.ctg.z
Executable file
Binary file not shown.
102
tcpdf/fonts/almohanad.php
Executable file
102
tcpdf/fonts/almohanad.php
Executable file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
$type='TrueTypeUnicode';
|
||||
$name='AlMohanad';
|
||||
$desc=array('Ascent'=>1093,'Descent'=>-509,'CapHeight'=>1093,'Flags'=>32,'FontBBox'=>'[-278 -507 1124 1093]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
|
||||
$up=-136;
|
||||
$ut=64;
|
||||
$dw=600;
|
||||
$cw=array(
|
||||
0=>0,32=>139,33=>185,34=>308,35=>278,36=>278,37=>556,38=>463,39=>154,40=>185,41=>185,42=>278,43=>317,44=>139,45=>185,46=>139,
|
||||
47=>154,48=>278,49=>278,50=>278,51=>278,52=>278,53=>278,54=>278,55=>278,56=>278,57=>278,58=>185,59=>185,60=>317,61=>317,62=>317,
|
||||
63=>278,64=>517,65=>401,66=>371,67=>401,68=>402,69=>371,70=>339,71=>432,72=>430,73=>214,74=>278,75=>424,76=>369,77=>524,78=>401,
|
||||
79=>432,80=>339,81=>432,82=>396,83=>309,84=>371,85=>401,86=>401,87=>556,88=>401,89=>401,90=>371,91=>185,92=>154,93=>185,94=>323,
|
||||
95=>278,96=>185,97=>278,98=>309,99=>247,100=>309,101=>247,102=>185,103=>278,104=>309,105=>154,106=>185,107=>309,108=>154,109=>463,110=>309,
|
||||
111=>278,112=>309,113=>309,114=>247,115=>216,116=>185,117=>309,118=>278,119=>401,120=>278,121=>278,122=>247,123=>219,124=>122,125=>219,126=>289,
|
||||
8364=>278,1027=>339,8218=>185,1107=>254,8222=>278,8230=>556,8224=>278,8225=>278,710=>185,8240=>556,352=>309,8249=>185,338=>556,1036=>432,381=>371,1039=>432,
|
||||
8216=>185,8217=>185,8220=>278,8221=>278,8226=>194,8211=>278,8212=>556,732=>185,8482=>556,353=>216,8250=>185,339=>401,1116=>297,382=>247,376=>401,161=>185,
|
||||
162=>278,163=>278,164=>278,165=>278,166=>122,167=>278,168=>185,169=>415,170=>167,171=>278,172=>317,174=>415,175=>185,176=>222,177=>317,178=>167,
|
||||
179=>167,180=>185,181=>309,182=>300,183=>139,184=>185,185=>167,186=>183,187=>278,188=>417,189=>417,190=>417,191=>278,192=>401,193=>401,194=>401,
|
||||
195=>401,196=>401,197=>401,198=>556,199=>401,200=>371,201=>371,202=>371,203=>371,204=>216,205=>216,206=>216,207=>216,208=>401,209=>401,210=>432,
|
||||
211=>432,212=>432,213=>432,214=>432,215=>317,216=>432,217=>401,218=>401,219=>401,220=>401,221=>401,222=>339,223=>309,224=>278,225=>278,226=>278,
|
||||
227=>278,228=>278,229=>278,230=>401,231=>247,232=>247,233=>247,234=>247,235=>247,236=>154,237=>154,238=>154,239=>154,240=>278,241=>309,242=>278,
|
||||
243=>278,244=>278,245=>278,246=>278,247=>317,248=>278,249=>309,250=>309,251=>309,252=>309,253=>278,254=>309,255=>278,256=>401,257=>278,258=>401,
|
||||
259=>278,260=>401,261=>278,262=>401,263=>247,264=>401,265=>247,266=>401,267=>247,268=>401,269=>247,270=>401,271=>309,272=>401,273=>309,274=>371,
|
||||
275=>247,276=>371,277=>247,278=>371,279=>247,280=>371,281=>247,282=>371,283=>247,284=>432,285=>278,286=>432,287=>278,288=>432,289=>278,290=>432,
|
||||
291=>278,292=>432,293=>309,294=>432,295=>309,296=>216,297=>154,298=>216,299=>154,300=>216,301=>154,302=>216,303=>154,304=>216,305=>154,306=>490,
|
||||
307=>270,308=>278,309=>185,310=>432,311=>309,312=>297,313=>371,314=>154,315=>371,316=>154,317=>371,318=>154,319=>371,320=>293,321=>371,322=>154,
|
||||
323=>401,324=>309,325=>401,326=>309,327=>401,328=>309,329=>391,330=>401,331=>309,332=>432,333=>278,334=>432,335=>278,336=>432,337=>278,340=>401,
|
||||
341=>247,342=>401,343=>247,344=>401,345=>247,346=>309,347=>216,348=>309,349=>216,350=>309,351=>216,354=>371,355=>185,356=>371,357=>185,358=>371,
|
||||
359=>185,360=>401,361=>309,362=>401,363=>309,364=>401,365=>309,366=>401,367=>309,368=>401,369=>309,370=>401,371=>309,372=>556,373=>401,374=>401,
|
||||
375=>278,377=>371,378=>247,379=>371,380=>247,383=>185,450=>317,477=>247,484=>432,485=>278,536=>309,537=>216,538=>371,539=>185,658=>282,711=>185,
|
||||
728=>185,729=>185,730=>185,731=>185,733=>185,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,
|
||||
779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,
|
||||
795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,
|
||||
811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,
|
||||
827=>0,828=>0,829=>0,830=>0,831=>0,864=>0,865=>0,884=>111,885=>111,890=>0,894=>185,900=>100,901=>183,902=>401,903=>139,904=>451,
|
||||
905=>532,906=>316,908=>451,910=>501,911=>451,912=>183,913=>401,914=>371,915=>339,916=>422,917=>371,918=>371,919=>432,920=>432,921=>216,922=>432,
|
||||
923=>401,924=>524,925=>401,926=>361,927=>432,928=>451,929=>339,931=>361,932=>371,933=>401,934=>482,935=>401,936=>482,937=>451,938=>0,939=>401,
|
||||
940=>336,941=>244,942=>336,943=>183,944=>306,945=>336,946=>306,947=>306,948=>306,949=>244,950=>275,951=>336,952=>306,953=>183,954=>338,955=>275,
|
||||
956=>336,957=>275,958=>275,959=>306,960=>336,961=>306,962=>244,963=>306,964=>244,965=>306,966=>367,967=>275,968=>397,969=>397,970=>183,971=>306,
|
||||
972=>306,973=>306,974=>397,976=>306,977=>306,978=>401,979=>401,980=>401,981=>367,982=>336,986=>283,987=>237,988=>339,989=>261,1024=>371,1025=>371,
|
||||
1026=>371,1028=>401,1029=>309,1030=>216,1031=>216,1032=>278,1033=>573,1034=>573,1035=>449,1037=>432,1038=>401,1040=>401,1041=>371,1042=>371,1043=>328,1044=>432,
|
||||
1045=>371,1046=>615,1047=>313,1048=>429,1049=>429,1050=>424,1051=>432,1052=>524,1053=>432,1054=>432,1055=>430,1056=>339,1057=>401,1058=>371,1059=>401,1060=>444,
|
||||
1061=>401,1062=>429,1063=>432,1064=>618,1065=>618,1066=>482,1067=>539,1068=>350,1069=>401,1070=>619,1071=>408,1072=>278,1073=>278,1074=>279,1075=>246,1076=>309,
|
||||
1077=>247,1078=>417,1079=>227,1080=>319,1081=>319,1082=>297,1083=>302,1084=>376,1085=>309,1086=>278,1087=>309,1088=>309,1089=>247,1090=>274,1091=>278,1092=>458,
|
||||
1093=>278,1094=>309,1095=>309,1096=>454,1097=>454,1098=>340,1099=>423,1100=>284,1101=>247,1102=>439,1103=>284,1104=>247,1105=>247,1106=>309,1108=>247,1109=>216,
|
||||
1110=>154,1111=>154,1112=>185,1113=>440,1114=>437,1115=>309,1117=>309,1118=>278,1119=>309,1164=>339,1165=>284,1166=>339,1167=>309,1168=>339,1169=>254,1170=>339,
|
||||
1171=>254,1172=>339,1173=>254,1174=>615,1175=>417,1176=>322,1177=>216,1178=>432,1179=>297,1180=>432,1181=>297,1182=>432,1183=>297,1184=>537,1185=>352,1186=>432,
|
||||
1187=>309,1188=>563,1189=>408,1190=>432,1191=>461,1192=>401,1193=>247,1194=>401,1195=>247,1196=>371,1197=>274,1198=>401,1199=>278,1200=>401,1201=>278,1202=>401,
|
||||
1203=>278,1204=>581,1205=>432,1206=>432,1207=>309,1208=>432,1209=>309,1210=>432,1211=>309,1212=>367,1213=>247,1214=>367,1215=>247,1216=>216,1217=>615,1218=>417,
|
||||
1219=>432,1220=>297,1223=>432,1224=>309,1227=>432,1228=>309,1232=>401,1233=>278,1234=>401,1235=>278,1236=>556,1237=>401,1238=>371,1239=>247,1240=>367,1241=>247,
|
||||
1242=>367,1243=>247,1244=>615,1245=>417,1246=>313,1247=>227,1248=>322,1249=>216,1250=>432,1251=>309,1252=>432,1253=>309,1254=>432,1255=>278,1256=>432,1257=>278,
|
||||
1258=>432,1259=>278,1260=>401,1261=>247,1262=>401,1263=>278,1264=>401,1265=>278,1266=>401,1267=>278,1268=>432,1269=>309,1272=>548,1273=>423,1488=>280,1489=>280,
|
||||
1490=>174,1491=>280,1492=>280,1493=>158,1494=>158,1495=>280,1496=>280,1497=>158,1498=>287,1499=>280,1500=>280,1501=>280,1502=>280,1503=>156,1504=>158,1505=>280,
|
||||
1506=>280,1507=>292,1508=>280,1509=>273,1510=>280,1511=>305,1512=>285,1513=>299,1514=>280,1548=>195,1563=>246,1567=>340,1569=>392,1570=>306,1571=>247,1572=>447,
|
||||
1573=>247,1574=>602,1575=>192,1576=>635,1577=>369,1578=>635,1579=>635,1580=>548,1581=>1173,1582=>548,1583=>363,1584=>363,1585=>439,1586=>442,1587=>875,1588=>875,
|
||||
1589=>1061,1590=>1061,1591=>811,1592=>811,1593=>549,1594=>547,1600=>389,1601=>755,1602=>574,1603=>717,1604=>555,1605=>423,1606=>532,1607=>371,1608=>454,1609=>633,
|
||||
1610=>643,1611=>-19,1612=>-26,1613=>-20,1614=>-19,1615=>-18,1616=>-19,1617=>-19,1618=>-15,1632=>383,1633=>383,1634=>383,1635=>383,1636=>383,1637=>383,1638=>383,
|
||||
1639=>383,1640=>383,1641=>383,1642=>383,1645=>398,7936=>336,7937=>336,7938=>336,7939=>336,7940=>336,7941=>336,7942=>336,7943=>336,7944=>401,7945=>401,7946=>401,
|
||||
7947=>401,7948=>401,7949=>401,7950=>401,7951=>401,7952=>244,7953=>244,7954=>244,7955=>244,7956=>244,7957=>244,7960=>371,7961=>371,7962=>371,7963=>371,7964=>371,
|
||||
7965=>371,7968=>336,7969=>336,7970=>336,7971=>336,7972=>336,7973=>336,7974=>336,7975=>336,7976=>432,7977=>432,7978=>432,7979=>432,7980=>432,7981=>432,7982=>432,
|
||||
7983=>432,7984=>183,7985=>183,7986=>183,7987=>183,7988=>183,7989=>183,7990=>183,7991=>183,7992=>216,7993=>216,7994=>216,7995=>216,7996=>216,7997=>216,7998=>216,
|
||||
7999=>216,8000=>306,8001=>306,8002=>306,8003=>306,8004=>306,8005=>306,8008=>432,8009=>432,8010=>432,8011=>432,8012=>432,8013=>432,8016=>306,8017=>306,8018=>306,
|
||||
8019=>306,8020=>306,8021=>306,8022=>306,8023=>306,8025=>401,8027=>401,8029=>401,8031=>401,8032=>397,8033=>397,8034=>397,8035=>397,8036=>397,8037=>397,8038=>397,
|
||||
8039=>397,8040=>451,8041=>451,8042=>451,8043=>451,8044=>451,8045=>451,8046=>451,8047=>451,8048=>336,8049=>336,8050=>244,8051=>244,8052=>336,8053=>336,8054=>183,
|
||||
8055=>183,8056=>306,8057=>306,8058=>306,8059=>306,8060=>397,8061=>397,8064=>336,8065=>336,8066=>336,8067=>336,8068=>336,8069=>336,8070=>336,8071=>336,8072=>401,
|
||||
8073=>401,8074=>401,8075=>401,8076=>401,8077=>401,8078=>401,8079=>401,8080=>336,8081=>336,8082=>336,8083=>336,8084=>336,8085=>336,8086=>336,8087=>336,8088=>432,
|
||||
8089=>432,8090=>432,8091=>432,8092=>432,8093=>432,8094=>432,8095=>432,8096=>397,8097=>397,8098=>397,8099=>397,8100=>397,8101=>397,8102=>397,8103=>397,8104=>451,
|
||||
8105=>451,8106=>451,8107=>451,8108=>451,8109=>451,8110=>451,8111=>451,8112=>336,8113=>336,8114=>336,8115=>336,8116=>336,8118=>336,8119=>336,8120=>401,8121=>401,
|
||||
8122=>401,8123=>401,8124=>401,8125=>278,8126=>0,8127=>278,8128=>278,8129=>306,8130=>336,8131=>336,8132=>336,8134=>336,8135=>336,8136=>371,8137=>371,8138=>432,
|
||||
8139=>432,8140=>432,8141=>278,8142=>278,8143=>278,8144=>183,8145=>183,8146=>183,8147=>183,8150=>183,8151=>183,8152=>216,8153=>216,8154=>216,8155=>216,8157=>278,
|
||||
8158=>278,8159=>278,8160=>306,8161=>306,8162=>306,8163=>306,8164=>306,8165=>306,8166=>306,8167=>306,8168=>401,8169=>401,8170=>401,8171=>401,8172=>339,8173=>306,
|
||||
8174=>306,8175=>278,8178=>397,8179=>397,8180=>397,8182=>397,8183=>397,8184=>432,8185=>432,8186=>451,8187=>451,8188=>451,8189=>278,8190=>278,8208=>185,8209=>185,
|
||||
8219=>185,8223=>278,8227=>311,8241=>1011,8248=>261,8251=>404,8253=>386,8255=>529,8256=>529,8257=>188,8258=>517,8259=>185,8260=>93,8261=>184,8262=>184,8267=>300,
|
||||
8308=>167,8309=>556,8321=>167,8322=>167,8323=>167,8324=>167,8352=>394,8353=>401,8354=>435,8355=>339,8356=>278,8357=>463,8358=>401,8359=>389,8361=>556,8470=>530,
|
||||
8471=>415,8479=>401,8483=>401,8486=>451,8487=>451,8494=>306,8498=>339,8543=>417,8706=>274,8710=>340,8721=>396,8722=>317,8730=>305,8734=>418,8800=>317,8804=>317,
|
||||
8805=>317,9674=>274,12353=>556,12354=>556,12355=>556,12356=>556,12357=>556,12358=>556,12359=>556,12360=>556,12361=>556,12362=>556,12363=>556,12364=>556,12365=>556,12366=>556,
|
||||
12367=>556,12368=>556,12369=>556,12370=>556,12371=>556,12372=>556,12373=>556,12374=>556,12375=>556,12376=>556,12377=>556,12378=>556,12379=>556,12380=>556,12381=>556,12382=>556,
|
||||
12383=>556,12384=>556,12385=>556,12386=>556,12387=>556,12388=>556,12389=>556,12390=>556,12391=>556,12392=>556,12393=>556,12394=>556,12395=>556,12396=>556,12397=>556,12398=>556,
|
||||
12399=>556,12400=>556,12401=>556,12402=>556,12403=>556,12404=>556,12405=>556,12406=>556,12407=>556,12408=>556,12409=>556,12410=>556,12411=>556,12412=>556,12413=>556,12414=>556,
|
||||
12415=>556,12416=>556,12417=>556,12418=>556,12419=>556,12420=>556,12421=>556,12422=>556,12423=>556,12424=>556,12425=>556,12426=>556,12427=>556,12428=>556,12429=>556,12430=>556,
|
||||
12431=>556,12432=>556,12433=>556,12434=>556,12435=>556,12449=>556,12450=>556,12451=>556,12452=>556,12453=>556,12454=>556,12455=>556,12456=>556,12457=>556,12458=>556,12459=>556,
|
||||
12460=>556,12461=>556,12462=>556,12463=>556,12464=>556,12465=>556,12466=>556,12467=>556,12468=>556,12469=>556,12470=>556,12471=>556,12472=>556,12473=>556,12474=>556,12475=>556,
|
||||
12476=>556,12477=>556,12478=>556,12479=>556,12480=>556,12481=>556,12482=>556,12483=>556,12484=>556,12485=>556,12486=>556,12487=>556,12488=>556,12489=>556,12490=>556,12491=>556,
|
||||
12492=>556,12493=>556,12494=>556,12495=>556,12496=>556,12497=>556,12498=>556,12499=>556,12500=>556,12501=>556,12502=>556,12503=>556,12504=>556,12505=>556,12506=>556,12507=>556,
|
||||
12508=>556,12509=>556,12510=>556,12511=>556,12512=>556,12513=>556,12514=>556,12515=>556,12516=>556,12517=>556,12518=>556,12519=>556,12520=>556,12521=>556,12522=>556,12523=>556,
|
||||
12524=>556,12525=>556,12526=>556,12527=>556,12528=>556,12529=>556,12530=>556,12531=>556,12532=>556,12533=>556,12534=>556,63033=>278,63034=>278,63035=>278,63036=>278,63037=>278,
|
||||
63038=>278,63039=>278,63040=>278,63041=>278,63171=>185,63196=>278,64256=>309,64257=>309,64258=>309,64259=>463,64260=>463,64262=>402,64606=>0,64607=>0,64608=>0,64609=>0,
|
||||
64610=>0,64830=>467,64831=>467,65010=>814,65152=>392,65153=>306,65154=>281,65155=>247,65156=>250,65157=>447,65158=>412,65159=>247,65160=>222,65161=>602,65162=>535,65163=>360,
|
||||
65164=>329,65165=>192,65166=>220,65167=>635,65168=>644,65169=>338,65170=>321,65171=>369,65172=>419,65173=>635,65174=>644,65175=>345,65176=>336,65177=>635,65178=>644,65179=>393,
|
||||
65180=>345,65181=>548,65182=>553,65183=>637,65184=>652,65185=>548,65186=>546,65187=>637,65188=>656,65189=>548,65190=>544,65191=>637,65192=>656,65193=>363,65194=>439,65195=>363,
|
||||
65196=>439,65197=>440,65198=>471,65199=>439,65200=>474,65201=>875,65202=>871,65203=>608,65204=>588,65205=>875,65206=>871,65207=>609,65208=>587,65209=>1061,65210=>1033,65211=>794,
|
||||
65212=>758,65213=>1061,65214=>1033,65215=>794,65216=>761,65217=>811,65218=>793,65219=>659,65220=>647,65221=>811,65222=>793,65223=>659,65224=>642,65225=>549,65226=>481,65227=>512,
|
||||
65228=>409,65229=>547,65230=>476,65231=>512,65232=>409,65233=>755,65234=>748,65235=>416,65236=>442,65237=>574,65238=>550,65239=>416,65240=>442,65241=>717,65242=>687,65243=>883,
|
||||
65244=>409,65245=>555,65246=>511,65247=>338,65248=>297,65249=>423,65250=>478,65251=>489,65252=>476,65253=>532,65254=>548,65255=>336,65256=>326,65257=>371,65258=>391,65259=>524,
|
||||
65260=>412,65261=>454,65262=>412,65263=>633,65264=>566,65265=>643,65266=>560,65267=>357,65268=>333,65269=>623,65270=>617,65271=>603,65272=>621,65273=>576,65274=>617,65275=>576,
|
||||
65276=>625);
|
||||
$enc='';
|
||||
$diff='';
|
||||
$file='almohanad.z';
|
||||
$ctg='almohanad.ctg.z';
|
||||
$originalsize=227760;
|
||||
?>
|
BIN
tcpdf/fonts/almohanad.z
Executable file
BIN
tcpdf/fonts/almohanad.z
Executable file
Binary file not shown.
1768
tcpdf/fonts/arialunicid0.php
Executable file
1768
tcpdf/fonts/arialunicid0.php
Executable file
File diff suppressed because it is too large
Load Diff
33
tcpdf/fonts/courier.php
Executable file
33
tcpdf/fonts/courier.php
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// core font definition file for TCPDF (www.tcpdf.org)
|
||||
$type='core';
|
||||
$dw=600;
|
||||
$cw=array(0=>600,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>600,9=>600,
|
||||
10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,
|
||||
20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>600,
|
||||
30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,
|
||||
40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,
|
||||
50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,
|
||||
60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,
|
||||
70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,
|
||||
80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,
|
||||
90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,
|
||||
100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,
|
||||
109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,
|
||||
118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,
|
||||
127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,
|
||||
136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,
|
||||
145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,
|
||||
154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,
|
||||
163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,
|
||||
172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,
|
||||
181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,
|
||||
190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,
|
||||
199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,
|
||||
208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,
|
||||
217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,
|
||||
226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,
|
||||
235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,
|
||||
244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,
|
||||
253=>600,254=>600,255=>600);
|
||||
?>
|
46
tcpdf/fonts/dejavu-fonts-ttf-2.29/AUTHORS
Normal file
46
tcpdf/fonts/dejavu-fonts-ttf-2.29/AUTHORS
Normal file
@ -0,0 +1,46 @@
|
||||
abysta at yandex.ru
|
||||
Adrian Schroeter
|
||||
Andrey Valentinovich Panov
|
||||
Ben Laenen
|
||||
Besarion Gugushvili
|
||||
Bhikkhu Pesala
|
||||
Clayborne Arevalo
|
||||
Dafydd Harries
|
||||
Danilo Segan
|
||||
Davide Viti
|
||||
David Jez
|
||||
David Lawrence Ramsey
|
||||
Denis Jacquerye
|
||||
Dwayne Bailey
|
||||
Eugeniy Meshcheryakov
|
||||
Gee Fung Sit
|
||||
Heikki Lindroos
|
||||
James Cloos
|
||||
James Crippen
|
||||
John Karp
|
||||
Keenan Pepper
|
||||
Lars Naesbye Christensen
|
||||
Mashrab Kuvatov
|
||||
Max Berger
|
||||
Mederic Boquien
|
||||
Michael Everson
|
||||
Misu Moldovan
|
||||
Nguyen Thai Ngoc Duy
|
||||
Nicolas Mailhot
|
||||
Ognyan Kulev
|
||||
Ondrej Koala Vacha
|
||||
Peter Cernak
|
||||
Remy Oudompheng
|
||||
Roozbeh Pournader
|
||||
Sahak Petrosyan
|
||||
Sander Vesik
|
||||
Stepan Roh
|
||||
Stephen Hartke
|
||||
Steve Tinney
|
||||
Tavmjong Bah
|
||||
Tim May
|
||||
Valentin Stoykov
|
||||
Vasek Stodulka
|
||||
Wesley Transue
|
||||
|
||||
$Id: AUTHORS 2344 2009-03-08 13:02:37Z moyogo $
|
3
tcpdf/fonts/dejavu-fonts-ttf-2.29/BUGS
Normal file
3
tcpdf/fonts/dejavu-fonts-ttf-2.29/BUGS
Normal file
@ -0,0 +1,3 @@
|
||||
See http://dejavu.sourceforge.net/wiki/index.php/Bugs
|
||||
|
||||
$Id: BUGS 80 2004-11-13 13:12:02Z src $
|
99
tcpdf/fonts/dejavu-fonts-ttf-2.29/LICENSE
Normal file
99
tcpdf/fonts/dejavu-fonts-ttf-2.29/LICENSE
Normal file
@ -0,0 +1,99 @@
|
||||
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
|
||||
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
|
||||
|
||||
Bitstream Vera Fonts Copyright
|
||||
------------------------------
|
||||
|
||||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
|
||||
a trademark of Bitstream, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of the fonts accompanying this license ("Fonts") and associated
|
||||
documentation files (the "Font Software"), to reproduce and distribute the
|
||||
Font Software, including without limitation the rights to use, copy, merge,
|
||||
publish, distribute, and/or sell copies of the Font Software, and to permit
|
||||
persons to whom the Font Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice shall
|
||||
be included in all copies of one or more of the Font Software typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in particular
|
||||
the designs of glyphs or characters in the Fonts may be modified and
|
||||
additional glyphs or characters may be added to the Fonts, only if the fonts
|
||||
are renamed to names not containing either the words "Bitstream" or the word
|
||||
"Vera".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts or Font
|
||||
Software that has been modified and is distributed under the "Bitstream
|
||||
Vera" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but no
|
||||
copy of one or more of the Font Software typefaces may be sold by itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
||||
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
|
||||
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
|
||||
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
|
||||
FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the names of Gnome, the Gnome
|
||||
Foundation, and Bitstream Inc., shall not be used in advertising or
|
||||
otherwise to promote the sale, use or other dealings in this Font Software
|
||||
without prior written authorization from the Gnome Foundation or Bitstream
|
||||
Inc., respectively. For further information, contact: fonts at gnome dot
|
||||
org.
|
||||
|
||||
Arev Fonts Copyright
|
||||
------------------------------
|
||||
|
||||
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the fonts accompanying this license ("Fonts") and
|
||||
associated documentation files (the "Font Software"), to reproduce
|
||||
and distribute the modifications to the Bitstream Vera Font Software,
|
||||
including without limitation the rights to use, copy, merge, publish,
|
||||
distribute, and/or sell copies of the Font Software, and to permit
|
||||
persons to whom the Font Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice
|
||||
shall be included in all copies of one or more of the Font Software
|
||||
typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in
|
||||
particular the designs of glyphs or characters in the Fonts may be
|
||||
modified and additional glyphs or characters may be added to the
|
||||
Fonts, only if the fonts are renamed to names not containing either
|
||||
the words "Tavmjong Bah" or the word "Arev".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts
|
||||
or Font Software that has been modified and is distributed under the
|
||||
"Tavmjong Bah Arev" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but
|
||||
no copy of one or more of the Font Software typefaces may be sold by
|
||||
itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
||||
TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Tavmjong Bah shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Font Software without prior written authorization
|
||||
from Tavmjong Bah. For further information, contact: tavmjong @ free
|
||||
. fr.
|
||||
|
||||
$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
|
1193
tcpdf/fonts/dejavu-fonts-ttf-2.29/NEWS
Normal file
1193
tcpdf/fonts/dejavu-fonts-ttf-2.29/NEWS
Normal file
File diff suppressed because it is too large
Load Diff
59
tcpdf/fonts/dejavu-fonts-ttf-2.29/README
Normal file
59
tcpdf/fonts/dejavu-fonts-ttf-2.29/README
Normal file
@ -0,0 +1,59 @@
|
||||
DejaVu fonts 2.29 (c)2004-2009 DejaVu fonts team
|
||||
------------------------------------------------
|
||||
|
||||
The DejaVu fonts are a font family based on the Bitstream Vera Fonts
|
||||
(http://gnome.org/fonts/). Its purpose is to provide a wider range of
|
||||
characters (see status.txt for more information) while maintaining the
|
||||
original look and feel.
|
||||
|
||||
DejaVu fonts are based on Bitstream Vera fonts version 1.10.
|
||||
|
||||
Available fonts (Sans = sans serif, Mono = monospaced):
|
||||
|
||||
DejaVu Sans Mono
|
||||
DejaVu Sans Mono Bold
|
||||
DejaVu Sans Mono Bold Oblique
|
||||
DejaVu Sans Mono Oblique
|
||||
DejaVu Sans
|
||||
DejaVu Sans Bold
|
||||
DejaVu Sans Bold Oblique
|
||||
DejaVu Sans Oblique
|
||||
DejaVu Sans ExtraLight (experimental)
|
||||
DejaVu Serif
|
||||
DejaVu Serif Bold
|
||||
DejaVu Serif Bold Italic (experimental)
|
||||
DejaVu Serif Italic (experimental)
|
||||
DejaVu Sans Condensed (experimental)
|
||||
DejaVu Sans Condensed Bold (experimental)
|
||||
DejaVu Sans Condensed Bold Oblique (experimental)
|
||||
DejaVu Sans Condensed Oblique (experimental)
|
||||
DejaVu Serif Condensed (experimental)
|
||||
DejaVu Serif Condensed Bold (experimental)
|
||||
DejaVu Serif Condensed Bold Italic (experimental)
|
||||
DejaVu Serif Condensed Italic (experimental)
|
||||
|
||||
All fonts are also available as derivative called DejaVu LGC with support
|
||||
only for Latin, Greek and Cyrillic scripts.
|
||||
|
||||
For license information see LICENSE. What's new is described in NEWS. Known
|
||||
bugs are in BUGS. All authors are mentioned in AUTHORS.
|
||||
|
||||
Fonts are published in source form as SFD files (Spline Font Database from
|
||||
FontForge - http://fontforge.sf.net/) and in compiled form as TTF files
|
||||
(TrueType fonts).
|
||||
|
||||
For more information go to http://dejavu.sourceforge.net/.
|
||||
|
||||
Characters from Arev fonts, Copyright (c) 2006 by Tavmjong Bah:
|
||||
---------------------------
|
||||
U+01BA, U+01BF, U+01F7, U+021C-U+021D, U+0220, U+0222-U+0223,
|
||||
U+02B9, U+02BA, U+02BD, U+02C2-U+02C5, U+02d4-U+02D5,
|
||||
U+02D7, U+02EC-U+02EE, U+0346-U+034E, U+0360, U+0362,
|
||||
U+03E2-03EF, U+0460-0463, U+0466-U+0486, U+0488-U+0489, U+04A8-U+04A9,
|
||||
U+0500-U+050F, U+2055-205E, U+20B0, U+20B2-U+20B3, U+2102, U+210D, U+210F,
|
||||
U+2111, U+2113, U+2115, U+2118-U+211A, U+211C-U+211D, U+2124, U+2135,
|
||||
U+213C-U+2140, U+2295-U+2298, U+2308-U+230B, U+26A2-U+26B1, U+2701-U+2704,
|
||||
U+2706-U+2709, U+270C-U+274B, U+2758-U+275A, U+2761-U+2775, U+2780-U+2794,
|
||||
U+2798-U+27AF, U+27B1-U+27BE, U+FB05-U+FB06
|
||||
|
||||
$Id: README 2344 2009-03-08 13:02:37Z moyogo $
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user