Joanne-RCI 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.