Skip to content

Commit

Permalink
Update to version 1.32
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSlabon committed Aug 31, 2020
1 parent f8502b2 commit 474b554
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Binary file modified ex.pdf
Binary file not shown.
3 changes: 1 addition & 2 deletions info.htm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<body>
<h1>tFPDF</h1>
<h2>Informations</h2>
Original author: Ian Back<br>
Maintainer : <a href="mailto:tfpdf@tychoveltmeijer.nl?subject=tFPDF">Tycho Veltmeijer</a><br>
Author: <a href="mailto:ian@bpm1.com?subject=tFPDF">Ian Back</a><br>
License: LGPL
<h2>Description</h2>
This class is a modified version of FPDF that adds UTF-8 support. Moreover, it embeds only
Expand Down
12 changes: 7 additions & 5 deletions tfpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
/*******************************************************************************
* tFPDF (based on FPDF 1.82) *
* *
* Version: 1.31 *
* Date: 2019-01-24 *
* Version: 1.32 *
* Date: 2020-08-29 *
* Authors: Ian Back <ianb@bpm1.com> *
* Tycho Veltmeijer <tfpdf@tychoveltmeijer.nl> (versions 1.30+) *
* License: LGPL *
*******************************************************************************/

define('tFPDF_VERSION','1.31');
define('tFPDF_VERSION','1.32');

class tFPDF
{
Expand Down Expand Up @@ -649,6 +649,7 @@ function Link($x, $y, $w, $h, $link)
function Text($x, $y, $txt)
{
// Output a string
$txt = (string)$txt;
if(!isset($this->CurrentFont))
$this->Error('No font has been set');
if ($this->unifontSubset)
Expand Down Expand Up @@ -676,6 +677,7 @@ function AcceptPageBreak()
function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
{
// Output a cell
$txt = (string)$txt;
$k = $this->k;
if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
{
Expand Down Expand Up @@ -793,7 +795,7 @@ function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false)
$w = $this->w-$this->rMargin-$this->x;
$wmax = ($w-2*$this->cMargin);
//$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
$s = str_replace("\r",'',$txt);
$s = str_replace("\r",'',(string)$txt);
if ($this->unifontSubset) {
$nb=mb_strlen($s, 'utf-8');
while($nb>0 && mb_substr($s,$nb-1,1,'utf-8')=="\n") $nb--;
Expand Down Expand Up @@ -941,7 +943,7 @@ function Write($h, $txt, $link='')
$cw = &$this->CurrentFont['cw'];
$w = $this->w-$this->rMargin-$this->x;
$wmax = ($w-2*$this->cMargin);
$s = str_replace("\r",'',$txt);
$s = str_replace("\r",'',(string)$txt);
if ($this->unifontSubset) {
$nb = mb_strlen($s, 'UTF-8');
if($nb==1 && $s==" ") {
Expand Down

0 comments on commit 474b554

Please sign in to comment.