Skip to content

Commit

Permalink
FPDF 1.8.1 compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Dec 15, 2017
1 parent d7f6402 commit 7585016
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2


before_script:
- composer install --no-interaction

script:
- vendor/bin/phpunit
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
pdf-invoicr
===========
# PDF Invoice

This is a streamlined fork of [pdf-invoicr](https://github.com/farjadtahir/pdf-invoicr).

Changes:
- PHP 7.0 Support
- PSR-4 compatible
- Available as composer package
- Dependencies are coming via composer

INTRODUCTION
===========
Expand Down
4 changes: 3 additions & 1 deletion src/InvoicePrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ public function Header()
//Title
$this->SetTextColor(0, 0, 0);
$this->SetFont($this->font, 'B', 20);
$this->Cell(0, 5, iconv("UTF-8", "ISO-8859-1", strtoupper($this->title)), 0, 1, 'R');
if(isset($this->title) and !empty($this->title)) {
$this->Cell(0, 5, iconv("UTF-8", "ISO-8859-1", strtoupper($this->title)), 0, 1, 'R');
}
$this->SetFont($this->font, '', 9);
$this->Ln(5);

Expand Down

0 comments on commit 7585016

Please sign in to comment.