944,086 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 14636
  • PHP RSS
Aug 19th, 2005
0

Using TCPDF or UFPDF to generate pdf files in php

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Joanne-RCI is offline Offline
2 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Search two tables
Next Thread in PHP Forum Timeline: system login error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC