Witam mam następujący problem z utworzeniem pliku pdf na serwerze
błąd wygląda w sposób następujący
FPDF error: Could not include font metric file
to oznacza, że muszę c zrobić?
dodałem plik helveticab oraz timesb.
pozdrawiam i proszę o pomoc
Witam mam następujący problem z utworzeniem pliku pdf na serwerze
błąd wygląda w sposób następujący
FPDF error: Could not include font metric file
to oznacza, że muszę c zrobić?
dodałem plik helveticab oraz timesb.
pozdrawiam i proszę o pomoc
Bierzesz znaczący fragment któregoś warninga, np. Warning: include(helveticab.php) [function.include]: failed to open stream: No such file or directory
, wrzucasz w Google: http://stackoverflow.com/questions/6280707/create-a-pdf-a4-size-from-using-php-script. Przeczytać, zrozumieć, zastosować w praktyce.
Czy Wy wszyscy naprawdę uważacie, że jesteście jacyś specjalni i na pewno pierwsi w danym temacie? Po co szukać, przecież jesteście zbyt alternatywni żeby mieć takie same problemy jak inni ludzie.
według mnie wszystko gra:)
to mój kod
require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',10);
$pdf->ln();
$pdf->SetTitle('Sebastian');
$pdf->SetFillColor(107,142,35);
$pdf->ln();
$pdf->Cell(20,10,'DZ',1,,
,1);
$pdf->Cell(22,10,'Godziny',1,,
,1);
$pdf->Cell(53,10,'Przedmiot',1,,
,1);
$pdf->SetFont('Times','B',10);
$pdf->Output();
według tego samouczka
http://www.id.uzh.ch/cl/zinfo/fpdf/doc/setfont.htm
zmieniłem to na times wygląda to teraz tak
mam inny błąd tym razem taki
Warning: include(times.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\cwiczenia\fpdf.php on line 541
Warning: include() [function.include]: Failed opening 'times.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cwiczenia\fpdf.php on line 541
FPDF error: Could not include font metric file
Masz wszystkie pliki niezbędne dla FPDF? Według dokumentacji:
Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:
They are in the current directory (the one where the running script lies) They are in one of the directories defined by the include_path parameter They are in the directory defined by the FPDF_FONTPATH constant
Example for the last case (note the trailing slash):
define('FPDF_FONTPATH','/home/www/font/');
require('fpdf.php');If the file corresponding to the requested font is not found, the error "Could not include font metric file" is generated.
(http://www.id.uzh.ch/cl/zinfo/fpdf/doc/setfont.htm)
Na brak znalezienia pliki wskazuje też wcześniejszy warning z błędem odczytu times.php. Ewentualnie ustaw, jak w cytacie powyżej, prawidłową ścieżkę do FPDF_FONTPATH.