Using TCPDF or UFPDF to generate pdf files in php

Reply

Join Date: Aug 2005
Posts: 2
Reputation: Joanne-RCI is an unknown quantity at this point 
Solved Threads: 0
Joanne-RCI Joanne-RCI is offline Offline
Newbie Poster

Using TCPDF or UFPDF to generate pdf files in php

 
0
  #1
Aug 19th, 2005
I have been trying to implement UFPDF into my programs which currently use FPDF to generate pdf files. We have changed to use UTF-8 within our system and now must change the pdf generation programs. I have also tried TCPDF and do not seem to be able to get anywhere with either. The following is a simple program that I have been trying to get this working in. I'm currently getting the following error "Could not include font metric file".

<?PHP
include_once("../set_env_pdf.php");
define('FPDF_FONTPATH','ufpdf/font/');
include_once('ufpdf/ufpdf.php');

$pdf=new PDF(P,mm,Letter,true);

$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetX(2);
$pdf->SetFont('vera','',12);
$pdf->SetX(5);
$pdf->Cell(0,9,'Hello World',0,0,'L');

$pdf->Ln(3.5);
$pdf->Output();
?>

I am using the fonts that were downloaded with TCPDF (vera.php, vera.z, vera.ctg.z) and they are in the fonts directory 1 down from the ufpdf directory ( This font has been declared in fpdf.php). The program ufpdf.php is in the ufpdf directory. I'm at a loss as to why I keep getting this error and everything I read on it tells me that the font is in the wrong directory but I don't see that as the issue in this case. Any assistance that anyone could offer would be greatly appreciated.

Thanks,
Joanne
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 11816 | Replies: 0
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC