我有一个脚本,它通过TCPDF创建一个包含多个页面的pdf报告 . 这很好用 . 我想要做的是创建一个包含多个报告的pdf . 这很好用,我有一个大的pdf包含所有报告的所有页面 .

在双面纸上打印pdf时,我的问题就出现了 . 如果报告包含不均匀的页数,则以下报告将从上一个报告的最后一页的背面开始 .

有没有办法告诉TCPDF在文档中启动新文档,以便双方打印都能正常工作?

我的代码(php):

$this->pdf = new TCPDF();
// Loop through all reports
foreach($report as $report):
    // Add pages to the report
    foreach($reportPages as $page):
        $this->pdf->AddPage();
    endforeach;
    // Here I would like to tell to start a new document
    $this->pdf->addDocument(); // I can not find anything in the docs
endforeach;
// Ouput the pdf
$this->pdf->Output('report.pdf');

感谢任何帮助!