public function attachGraphicsContext(BaseGraphicsContext $gc) { $this->getZendPdf()->pages[] = $gc->getPage(); $this->graphicsContexts[] = $gc; }
protected function doGoToAction(BaseGraphicsContext $gc, $x1, $y1, $x2, $y2, $top) { try { $destination = \ZendPdf\Destination\FitHorizontally::create($gc->getPage(), $top); $annotation = $this->createAnnotationLink($x1, $y1, $x2, $y2, $destination); $this->getPage()->attachAnnotation($annotation); } catch (\ZendPdf\Exception\ExceptionInterface $e) { throw new RuntimeException('Error while adding goTo action', 0, $e); } }