将现有 pdf 添加到 fpdf
我是否可以调用任何函数来将现有的 pdf 包含在我的 fpdf
文件中?
例如
$pdf->AddPage(from file example.pdf);
类似的事情?有可能吗?
Is there any function that I could call in order to include an existing pdf in my fpdf
file?
For example
$pdf->AddPage(from file example.pdf);
something like that? is it posible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题的答案是 FPDF 需要通过额外的库来增强。
其中一个“免费”PHP 库是 MIT 授权的“Setasign”FPDI,它增强了 FPDF
更多详细信息和下载位置可通过
https://www.setasign.com/products/fpdi/downloads
开发存储库FPDI 的“问题”支持可在 GitHub 上找到:https://github.com/Setasign/FPDI
FPDI 也可以通过 Composer 安装。相关的包可以在 Packagist 上找到。
与该问题相关的代码示例:
如果您希望将多个 PDF 嵌入到“Portfolio”中,则需要使用 SetaPDF-Merger,它不是“免费”,请参阅 https://manuals.setasign.com/setapdf-merger-manual/portfolios/
The Answer to this Question is that FPDF needs boosting by means of an additional library.
One such "Free" PHP library is MIT licensed "Setasign" FPDI which enhances FPDF
More details and a download location are available via
https://www.setasign.com/products/fpdi/downloads
The development repository and "Issues" support of FPDI is available on GitHub at https://github.com/Setasign/FPDI
FPDI can also be installed via Composer. The related package is available on Packagist.
A code example related to the question:
If you wish to embed multiple PDFs into a "Portfolio" you would need to use SetaPDF-Merger Which is NOT "Free" see https://manuals.setasign.com/setapdf-merger-manual/portfolios/