Skip to content

My modified version of tFPDF with support for cropped images

Notifications You must be signed in to change notification settings

dacostafilipe/tFPDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

tFPDF

My modified version of tFPDF with support for cropped images.

Original by Ian Back : http://www.fpdf.org/en/script/script92.php

How to use

<?php

$pdf = new tFPDF();
$pdf->AddPage();

// Add a Unicode font (uses UTF-8)
$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
$pdf->SetFont('DejaVu','',14);

// Add some text
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial','',14);
$pdf->Text('Nullam dictum felis eu pede');

//Move down
$pdf->SetY(20);

// Added cropped image 
$pdf->ImageCropped('/images/sample.png', 50, 50, 200, 100);
    
$pdf->Output();

?>

About

My modified version of tFPDF with support for cropped images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages