JOOMLA! 中的 TCPDF 库组件以 PDF 形式输出 html

发布于 2024-10-08 14:47:11 字数 326 浏览 0 评论 0原文

我在 joomla 中有一个组件可以导出为 PDF,我遇到的问题是导出的 PDF 不可读,因为 Joomla! 的 html 是不可读的。页面插入在 pdf 本身之后和之前。

我已经制定了组件的标准结构,并将其称为

index.php?option=com_listado_factura&task=exportar_pdf

com_listado_factura 组件的名称和 exportar_factura 导出为 pdf 的控制器的功能。

到处找了也没找到解决办法,谢谢

I have a component in joomla that exports to PDF, the problem that i'm encountering is that the PDF exported is unreadable because the html of the Joomla! page in inserted after and before the pdf itself.

I have made a standard structure of a component and call it like

index.php?option=com_listado_factura&task=exportar_pdf

being com_listado_factura the name of the component and exportar_factura the function of the controller that exports to pdf.

I've looked everywhere and couldn't find the solution, thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

望她远 2024-10-15 14:47:11

调用:

ob_end_clean();

解决方案是在之前

$tcpdf->output();

The solution was to call:

ob_end_clean();

before

$tcpdf->output();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文