altocompta/doc/tfpdf/ex.php
Dany De Bontridder dabe37bf51 Merged revisions 3315-3327 via svnmerge from
file:///home/developper/svn/phpcompta/branches/rel510

........
  r3316 | danydb | 2010-06-18 20:20:11 +0200 (Fri, 18 Jun 2010) | 1 line
  
  Add the receipt number for the CBC_OL
........
  r3317 | danydb | 2010-06-18 20:37:49 +0200 (Fri, 18 Jun 2010) | 1 line
  
  truncate the table import_tmp 
........
  r3318 | danydb | 2010-06-18 20:48:49 +0200 (Fri, 18 Jun 2010) | 2 lines
  
  Typo
........
  r3319 | danydb | 2010-06-18 21:54:58 +0200 (Fri, 18 Jun 2010) | 2 lines
  
  typo
........
  r3323 | danydb | 2010-06-19 12:59:28 +0200 (Sat, 19 Jun 2010) | 1 line
  
  Card ordered by name
........
  r3324 | danydb | 2010-06-19 13:12:36 +0200 (Sat, 19 Jun 2010) | 1 line
  
  Card ordered by name, add SQL script
........
  r3325 | danydb | 2010-06-19 13:21:11 +0200 (Sat, 19 Jun 2010) | 2 lines
  
  Bug sql order when not unlimited size
........
  r3326 | danydb | 2010-06-19 21:03:49 +0200 (Sat, 19 Jun 2010) | 1 line
  
  Fix bug in the verification of BILAN
........
  r3327 | danydb | 2010-06-20 21:52:57 +0200 (Sun, 20 Jun 2010) | 1 line
  
  Update PDF class to TFPDF
........
2010-06-21 12:15:47 +00:00

26 lines
685 B
PHP

<?php
// Optionally define the filesystem path to your system fonts
// otherwise tFPDF will use [path to tFPDF]/font/unifont/ directory
// define("_SYSTEM_TTFONTS", "C:/Windows/Fonts/");
require('tfpdf.php');
$pdf = new tFPDF();
$pdf->AddPage();
// Add a Unicode font (uses UTF-8)
$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
$pdf->SetFont('DejaVu','',14);
// Load a UTF-8 string from a file and print it
$txt = file_get_contents('HelloWorld.txt');
$pdf->Write(8,$txt);
// Select a standard font (uses windows-1252)
$pdf->SetFont('Arial','',14);
$pdf->Ln(10);
$pdf->Write(5,'The file size of this PDF is only 17 KB.');
$pdf->Output();
?>