setPage() 函数上的页码错误:0 [英] Wrong page number on setPage() function: 0

查看:35
本文介绍了setPage() 函数上的页码错误:0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 tcpdf 代码是

My code for tcpdf is

$file_to_show_test_details = 'pdf_view_test_details.tpl';
$test_details= $smarty->fetch($file_to_show_test_details);

// Set some content to print
$html = <<<EOD
$test_details
EOD;

// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, 'XYZ',$pdf->writeHTML($html, true, false, true, false, ''));

函数 writeHTML 不起作用,这就是为什么在浏览器中出现错误setPage() 函数上的页码错误:0"的原因.谁能帮我解决这个问题?

The function writeHTML is not working, that's why the error 'Wrong page number on setPage() function: 0' appears in the browser. Could anyone please help me to solve this issue?

推荐答案

您是否尝试使用 addPage()?

Did you try to use addPage()?

//$pdf = new PDF();

$pdf->AddPage();

这篇关于setPage() 函数上的页码错误:0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆