30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-06-05 23:30:47 +00:00
This commit is contained in:
nicolaasuni 2011-01-03 19:09:38 +01:00
parent c07e80bcb3
commit 074477d870
4 changed files with 61 additions and 38 deletions

View File

@ -1,3 +1,7 @@
5.9.035 (2011-01-03)
- A problem related to HTML table border alignment was fixed.
- Bug #2996366 "FastCGI and Header Problems" was fixed.
5.9.034 (2010-12-19)
- DejaVu and GNU Free fonts were updated.

View File

@ -8,11 +8,11 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 5.9.034
Release date: 2010-12-19
Version: 5.9.035
Release date: 2011-01-03
Author: Nicola Asuni
Copyright (c) 2002-2010:
Copyright (c) 2002-2011:
Nicola Asuni
Tecnick.com s.r.l.
Via Della Pace, 11
@ -67,7 +67,7 @@ For Additional Documentation:
http: www.tcpdf.org
License
Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l.
Copyright (C) 2002-2011 Nicola Asuni - Tecnick.com S.r.l.
TCPDF is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as

View File

@ -2,7 +2,7 @@
//============================================================+
// File name : example_055.php
// Begin : 2009-10-21
// Last Update : 2010-08-08
// Last Update : 2010-12-27
//
// Description : Example 055 for TCPDF class
// Display all characters available on core fonts.
@ -67,38 +67,44 @@ $pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('helvetica', '', 10);
$pdf->SetFont('helvetica', '', 14);
// add a page
$pdf->AddPage();
// array of core font names
// array of font names
$core_fonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats');
$html = '<h1>Core Fonts Dump</h1>';
// set fill color
$pdf->SetFillColor(221,238,255);
// create one HTML table for each core font
foreach($core_fonts as $font) {
// create HTML content
$html .= '<table cellpadding="1" cellspacing="0" border="1" nobr="true" style="font-family:'.$font.';text-align:center;">';
$html .= '<tr style="background-color:yellow;"><td colspan="16" style="font-family:helvetica;font-weight:bold">'.strtoupper($font).'</td></tr><tr>';
// add a page
$pdf->AddPage();
// Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
// set font for title
$pdf->SetFont('helvetica', 'B', 16);
// print font name
$pdf->Cell(0, 10, 'FONT: '.$font, 1, 1, 'C', true, '', 0, false, 'T', 'M');
// set font for chars
$pdf->SetFont($font, '', 16);
// print each character
for ($i = 0; $i < 256; ++$i) {
if (($i > 0) AND (($i % 16) == 0)) {
$html .= '</tr><tr>';
$pdf->Ln();
}
$chr = $pdf->unichr($i);
// replace special characters
$trans = array('<' => '&lt;', '>' => '&gt;');
$chr = strtr($chr, $trans);
$html .= '<td>'.$chr.'</td>';
$pdf->Cell(11.25, 11.25, $pdf->unichr($i), 1, 0, 'C', false, '', 0, false, 'T', 'M');
}
$html .= '</tr></table><br />&nbsp;<br />';
$pdf->Ln(20);
// print a pangram
$pdf->Cell(0, 0, 'The quick brown fox jumps over the lazy dog', 0, 1, 'C', false, '', 0, false, 'T', 'M');
}
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
// ---------------------------------------------------------
//Close and output PDF document

View File

@ -1,13 +1,13 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 5.9.034
// Version : 5.9.035
// Begin : 2002-08-03
// Last Update : 2010-12-19
// Last Update : 2011-01-03
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT GNU-LGPLv3 + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE GENERATED PDF DOCUMENTS.
// -------------------------------------------------------------------
// Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l.
// Copyright (C) 2002-2011 Nicola Asuni - Tecnick.com S.r.l.
//
// This file is part of TCPDF software library.
//
@ -134,7 +134,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 5.9.034
* @version 5.9.035
*/
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
@ -146,7 +146,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.php');
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
* @version 5.9.034
* @version 5.9.035
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {
@ -157,7 +157,7 @@ class TCPDF {
* Current TCPDF version.
* @private
*/
private $tcpdf_version = '5.9.034';
private $tcpdf_version = '5.9.035';
// Protected properties
@ -4208,6 +4208,11 @@ class TCPDF {
if (!isset($this->theadMargins['top'])) {
$this->theadMargins['top'] = $this->tMargin;
}
// store end of header position
if (!isset($this->columns[0]['th'])) {
$this->columns[0]['th'] = array();
}
$this->columns[0]['th']['\''.$this->page.'\''] = $this->y;
$this->tMargin = $this->y;
$this->pagedim[$this->page]['tm'] = $this->tMargin;
$this->lasth = 0;
@ -8085,10 +8090,14 @@ class TCPDF {
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
// force download dialog
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream', false);
header('Content-Type: application/download', false);
header('Content-Type: application/pdf', false);
if (strpos(php_sapi_name(), 'cgi') === false) {
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream', false);
header('Content-Type: application/download', false);
header('Content-Type: application/pdf', false);
} else {
header('Content-Type: application/pdf');
}
// use the Content-Disposition header to supply a recommended filename
header('Content-Disposition: attachment; filename="'.basename($name).'";');
header('Content-Transfer-Encoding: binary');
@ -8135,10 +8144,14 @@ class TCPDF {
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
// force download dialog
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream', false);
header('Content-Type: application/download', false);
header('Content-Type: application/pdf', false);
if (strpos(php_sapi_name(), 'cgi') === false) {
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream', false);
header('Content-Type: application/download', false);
header('Content-Type: application/pdf', false);
} else {
header('Content-Type: application/pdf');
}
// use the Content-Disposition header to supply a recommended filename
header('Content-Disposition: attachment; filename="'.basename($name).'";');
header('Content-Transfer-Encoding: binary');