PHP && PDFLib: PDF_begin_page: Function must not be called in 'object' scope

Модератор: Модераторы разделов

Аватара пользователя
Kasper_WPS
Сообщения: 312
ОС: Gentoo

PHP && PDFLib: PDF_begin_page: Function must not be called in 'object' scope

Сообщение Kasper_WPS »

Помогите разобраться, есть такая ошибка:

Код: Выделить всё

Fatal error: pdf_begin_page(): [2100] PDF_begin_page: Function must not be called in 'object' scope in /.../index.php on line 9

Вот в таком скрипте:

Код: Выделить всё

<?php
$pdf = pdf_new();
pdf_open_file($pdf, "test.pdf");
?>


Может кто-то с талкивался с таким поведением? Мне бы только узнать, что сие обозначает на жаргоне php ;) PDFLib стоит, pecl-pdflib, тоже :)

-- Эту проблему я решил. Не было прав на запись... Видимо бессонные ночи сказываются :) Теперь новая ошибка:

Код: Выделить всё

pdf_findfont(): [2516] PDF_findfont: Metrics data for font 'Arial' not found in /...index.php on line 9

<?php
$pdf = pdf_new();
pdf_open_file($pdf, "./uploads/test.pdf");
// start a new page (A4)
pdf_begin_page($pdf, 595, 842);

// get and use a font object
$arial = pdf_findfont($pdf, "Arial", "winansi", 1);
         pdf_setfont ($pdf,$arial, 10);



Не находит шрифт??? Это как-то связано с опцией --with-freetype???
Gentoo Linux - Stage1 - Core2 Q6600 Quad - 2008.0
Kernel: Gentoo-sources - 2.6.36 GCC 4.5.1
XOrg-server 1.9.2 (NVIDIA-9600GT), KDE4 4.5.4
Спасибо сказали: