php - Zend_Pdf 添加文本链接到 pdf 页面

标签 php zend-framework pdf zend-pdf

是否可以在 Zend_PDF 页面中添加 anchor 文本(链接)? 我无法在 Zend_Pdf 在线手册或阅读代码中找到任何关于此的信息,所以我想这是不可能的。

如果有办法,请指教!

谢谢!

最佳答案

禁用边框:

...
$target = Zend_Pdf_Action_URI::create('http://example.com');
$annotation = Zend_Pdf_Annotation_Link::create(0,0,100,100,$target);
$annotation->getResource()->Border = new Zend_Pdf_Element_Array([
    new Zend_Pdf_Element_Numeric(0),
    new Zend_Pdf_Element_Numeric(0),
    new Zend_Pdf_Element_Numeric(0)
]);
$pdf->pages[0]->attachAnnotation($annotation);
...

关于php - Zend_Pdf 添加文本链接到 pdf 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1186955/

相关文章:

php - 如何用php隐藏表格行的可见性

PHP:转换为 32 位长整数或无符号整数

php - Zend 在 Zend 表单中验证邮政编码 -> 根据给定国家/地区进行验证

r - R生成的pdf图中损坏的UTF字符

pdf - 从 chart.js 到 pdf 的图表

php - Twig 将内容附加到 block

php - UPS 运输模块无法在 Linux 环境中运行

zend-framework - 在 Zend 框架中使用表单

php - 通过多次 foreach 循环计算用户积分的有效方法是什么?

java - 在不使用openoffice的情况下从java中的doc转换为pdf