【发布时间】:2013-04-11 13:26:19
【问题描述】:
<?php
$pdf=pdf_new();
pdf_open_file($pdf, "test.pdf");
pdf_begin_page($pdf, 595, 842);
$arial = pdf_findfont($pdf, "Arial", "host", 1);
pdf_setfont($pdf, $arial, 10);
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,",50, 750);
pdf_end_page($pdf);
pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50,730);
pdf_close($pdf);
?>
错误是:
致命错误:在 /var/www/Sample/sam.php:4 中带有消息“不得在“对象”范围内调用函数”的未捕获异常“PDFlibException” 堆栈跟踪: #0 /var/www/Sample/sam.php(4): pdf_begin_page(资源 id #2, 595, 842) #1 {main} 在第 4 行的 /var/www/Sample/sam.php 中抛出【问题讨论】:
-
这几乎是同一个问题:stackoverflow.com/questions/997627/… 这能解决您的问题吗?
-
@Xavjer 还有问题没有解决它看起来像未回答的问题
-
请将您的问题更新为您的新代码和错误...因为第一个错误是因为您使用了折旧的 pdf_begin_page 而不是 PDF_begin_page_ext
-
在 eclipse 中没有类似 PDF_begin_page_ext 的函数,我在上面的代码中使用 eclipse 它没有显示语法错误并且你建议的函数不存在
标签: php