我正在尝试使用zend_pdf创建现有文件的目录。
我能够放置书签,但是注释的文本没有显示出来,虽然锚点就在那里。
$ pages是现有pdf文件的页面。
foreach ($pages as $pageNo => $page) {
$newPage = $extractor->clonePage($page);
$newPdf->pages[] = $newPage;
$destination[$x] = Zend_Pdf_Destination_Fit::create($newPage);
$target = Zend_Pdf_Action_GoTo::create($destination[$x]);
$annotation = Zend_Pdf_Annotation_Link :: create( $x1, $y1, $x2, $y2, $target );
$annotation->setText('Annotate'.$x);
$newPdf->pages[0]->attachAnnotation( $annotation );
$newPdf->setNamedDestination('page_'.$x, $destination[$x]);
$newPdf->outlines[0]->childOutlines[] = Zend_Pdf_Outline::create('Page '.$x, $newPdf->getNamedDestination('page_'.$x));
$x++;
}
Attatched image显示我得到的内容
有什么建议我做错了什么或我错过了什么?